1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Travel to distant realms and encounter scenes unknown to the common folk. The Greatest of Adventures is upon us with the 8th Cinematic Contest. Join in on a fun ride.
    Dismiss Notice
  4. The 18th Icon Contest is ON! Choose any ingame unit and give him/her Hero abilities. Good luck to all.
    Dismiss Notice
  5. The Secrets of Warcraft 3 have revealed interesting works. The RESULTS for Abelhawk's Mini-Mapping Contest #15 have come out!
    Dismiss Notice
  6. Contestants are to create a scene set in the Stone Age. Come and see what you can come up with. We wish you the best of luck!
    Dismiss Notice
  7. Colour outside the lines! Techtree Contest #13 is a go. The contest is optionally paired.
    Dismiss Notice
  8. Night Rider gained several songs for his journey. The poll for the 12th Music Contest has started. Check it out!
    Dismiss Notice
  9. Greetings cerebrates, our Swarm needs new spawners that will have numerous children. Join the HIVE's 31st Modeling Contest - Spawners and Spawned! The contest is optionally paired.
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[Spell] Sacrifice System.

Discussion in 'World Editor Help Zone' started by Cebi, Jun 5, 2019.

  1. Cebi

    Cebi

    Joined:
    Jun 1, 2019
    Messages:
    10
    Resources:
    0
    Resources:
    0
    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: Jun 5, 2019
  2. Ghan_04

    Ghan_04

    Vice Chieftain

    Joined:
    Feb 26, 2008
    Messages:
    1,387
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    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.
     
  3. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    304
    Resources:
    0
    Resources:
    0
    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.
     

    Attached Files:

    Last edited: Jun 5, 2019
  4. Cespie

    Cespie

    Joined:
    May 21, 2019
    Messages:
    277
    Resources:
    0
    Resources:
    0
    Which is where you'd wanna use triggers. :)

    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.

    Probably not, if it didn't work for you. But again, you don't have to do it this way.

    With triggers, the limits in this regard are almost endless.

    All 3 can be done rather easily with triggers.

    Yes.

    Yes, I am fairly certain that tracking remaining food is possible, although I have never done it.

    Yes.

    I think Uncle just offered you one, but if any of the above features is missing, do tell, and I will help making it.
     
  5. Cebi

    Cebi

    Joined:
    Jun 1, 2019
    Messages:
    10
    Resources:
    0
    Resources:
    0
    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: Jun 5, 2019
  6. Wrda

    Wrda

    Joined:
    Nov 18, 2012
    Messages:
    1,008
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Triggers, dude. Try to think outside the box.
     
  7. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    304
    Resources:
    0
    Resources:
    0
    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.
     

    Attached Files:

    Last edited: Jun 6, 2019
  8. Cebi

    Cebi

    Joined:
    Jun 1, 2019
    Messages:
    10
    Resources:
    0
    Resources:
    0
    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.

    Thanks, I'll check it out :D I am learning quite a bit.