• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Sacrifice System.

Status
Not open for further replies.
Level 2
Joined
Jun 1, 2019
Messages
10
So I looked at the Sacrifice ability and realized that it has huge potential yet limited by stiff un-editable outcomes.

What I need from it at first was simple, sacrifice 1 custom unit for another. But then once I tested it though the Object Editor thinking it would be simple... it wasn't. There was no editable functions in the spells or the building that let me choose what it would produce, it was always Shades and Acolytes.

Now I guess by changing the Shade itself I could change the outcome but I wanted to flex my muscles in learning how to use the editor in making a custom race that can co-exist with the other 4 (inspired by the UB for this), so that was out of the question.

My request and question is multi-faceted:

  1. Is there a way to edit this field so a custom sacrifice spell can change a creature into another.
  2. If so can there be more than 1 creature sacrificed. I can't imagine how this is possible other than perhaps a transport space mechanic.
  3. If you can't have multiple creatures, can you at least choose a gold/lumber cost for it to be sacrificed? Or even sacrifice a creature FOR gold and lumber?
  4. Can you make the sacrificed creature a timed summon?
  5. Can you make the summon creature require a specific upkeep requirement? (like sacrificing 1 food creature to a 3 Food can only be possible if you have 3 food).
  6. This one is the doozey, can you choose to have 2 different specific creatures transform into specific creature this way?

I want to know and have a script where this is possible for future stuff, I can imagine a whole game-mode around sacrificing units to make bigger units and it requires a knowledge of the engine far better than mine to put together I didn't know whether this belonged in Request or Help Zone, since 1. I want it for myself but 2. I want it for future people to make cool modes out of since it seems like it would have high versatility.
 
Last edited:
Level 22
Joined
Feb 26, 2008
Messages
891
I would probably start with something like Death Pact and trigger the creation of the desired unit. You have a lot of flexibility using the "Starts the Effect of an Ability" trigger event.

I'm not sure what you're asking with your 2nd point. Do you want to kill two units with one cast? It would seem difficult to choose both units properly.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
I attached a map with a Sacrifice system.

It doesn't have everything you listed but it should cover the basics. I could always add more to it if you wanted something else. Or you can always edit yourself if you understand the triggers. They aren't too complicated, albeit a little messy.

Edit: Updated it, added some more stuff.
 

Attachments

  • Sacrifice.w3x
    29.3 KB · Views: 32
Last edited:
Level 8
Joined
May 21, 2019
Messages
435
So I looked at the Sacrifice ability and realized that it has huge potential yet limited by stiff un-editable outcomes.
Which is where you'd wanna use triggers. :)

Now I guess by changing the Shade itself I could change the outcome but I wanted to flex my muscles in learning how to use the editor in making a custom race that can co-exist with the other 4 (inspired by the UB for this), so that was out of the question.
Not at all out of the question. You can replace the Shade when it's spawned and the player spawning it plays as your custom race. All you need is a variable(array probably) that tracks the custom faction for each player, and then a trigger that replaces any shades entering the map with whatever you wanna replace them with.

Is there a way to edit this field so a custom sacrifice spell can change a creature into another.
Probably not, if it didn't work for you. But again, you don't have to do it this way.

If so can there be more than 1 creature sacrificed.
With triggers, the limits in this regard are almost endless.

If you can't have multiple creatures, can you at least choose a gold/lumber cost for it to be sacrificed? Or even sacrifice a creature FOR gold and lumber?
All 3 can be done rather easily with triggers.

Can you make the sacrificed creature a timed summon?
Yes.

Can you make the summon creature require a specific upkeep requirement? (like sacrificing 1 food creature to a 3 Food can only be possible if you have 3 food).
Yes, I am fairly certain that tracking remaining food is possible, although I have never done it.

This one is the doozey, can you choose to have 2 different specific creatures transform into specific creature this way?
Yes.

I want to know and have a script where this is possible for future stuff, I can imagine a whole game-mode around sacrificing units to make bigger units and it requires a knowledge of the engine far better than mine to put together I didn't know whether this belonged in Request or Help Zone, since 1. I want it for myself but 2. I want it for future people to make cool modes out of since it seems like it would have high versatility.
I think Uncle just offered you one, but if any of the above features is missing, do tell, and I will help making it.
 
Level 2
Joined
Jun 1, 2019
Messages
10
I attached a map with a Sacrifice system.

It doesn't have everything you listed but it should cover the basics. I could always add more to it if you wanted something else. Or you can always edit yourself if you understand the triggers. They aren't too complicated, albeit a little messy.

Edit: Updated it, added some more stuff.

That's exactly what I need for my map currently, thank you, the AOE feature is particularly great. Though is there a way to have a minimum amount of units sacrificed and to create 1 creature? so I can set it to be lik 5 Imps = 1 Overfiend. Would go well in a future map of mine where you create Abominations.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
That's exactly what I need for my map currently, thank you, the AOE feature is particularly great. Though is there a way to have a minimum amount of units sacrificed and to create 1 creature? so I can set it to be lik 5 Imps = 1 Overfiend. Would go well in a future map of mine where you create Abominations.

I added the 5 Imps = 1 Overfiend thingy. Try version 2 out, I attached the map below.

Some of the variables cause other variables to be disabled to make sure that everything works. For example, RequiredUnitCount will disable/override MaximumUnitsSacrificed. I'll make it more intuitive at some point, but I'm done working on it for today :p

Edit: Version 3 is out. Added HierarchyUnitsOnly, which allows you to toggle whether or not you want to be able to target units outside of the Hierarchy. If it's set to False and UsesHierarchy is set to True, and you sacrifice a Footman for example (a unit that's not in the Hierarchy), the footman will default to whatever you set SpawnedUnit as. Otherwise, if HierarchyUnitsOnly is set to true, the Footman won't be sacrificed since it's not in the Hierarchy.
 

Attachments

  • Sacrifice v.3.w3x
    35.4 KB · Views: 27
Last edited:
Level 2
Joined
Jun 1, 2019
Messages
10
Triggers, dude. Try to think outside the box.
Still learning the trigger system, this is actually helping me since I know what I want done and seeing it being done, it can help me in the future on what fields you have to change and what variables you make.

I added the 5 Imps = 1 Overfiend thingy. Try version 2 out, I attached the map below.

Edit: Re-uploaded it.

Thanks, I'll check it out :D I am learning quite a bit.
 
Status
Not open for further replies.
Top