• 🏆 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!

Trigger Noob needs help making sense of the values

Level 2
Joined
Apr 15, 2024
Messages
10
So I'm trying to make the Ritual Dagger work in a map for a pre-reforged W3 map, I found a thread here that shows exactly what needs to be done to make it work, but I'm having real issues figuring out how to find each thing, but I'm completely stuck at Set TempGroup = (Units within 600.00 of TempPoint matching (((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True))
I can't for the life of me find the -belongs to an ally of- condition at all, any help would be greatly appreciated.
 

Attachments

  • triggerhelp2.png
    triggerhelp2.png
    27.6 KB · Views: 8
  • triggerhelp.png
    triggerhelp.png
    72.8 KB · Views: 7

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
That isn't actually how Ritual Dagger works since that trigger heals instantly instead of over time, but it will get you very close to what you need. Or maybe you want it to be instant?

Anyway, when Setting TempGroup you'll see a list of Functions. In those Functions you will find "Units within range matching". After clicking that you will see a new field that you can click and edit to use any kind of Condition you want. See Chaosium's post for the exact Condition you want.

To further explain, Conditions are broken up into many categories (Comparisons), each dealing with different types of things.

In this case we're looking for a Boolean Comparison Condition. You can determine which type of Condition you need by looking at the terminology used:
  • (Matching unit) belongs to an ally of (Triggering player) Equal to True
Note how it says Equal to True at the end. That's the value of the Condition. The only time you'll see the words Equal to True or Equal to False is when you're dealing with Booleans. A Boolean is like a switch that can either be True or False. In this case it's used to determine whether some game logic is True or False.

Using this same logic, we can determine that when we see something like this:
  • (Something) Equal to 100
We know it's an Integer Comparison because it's value 100 is an Integer (a whole number).

This would be a Real Comparison because it's value 100.00 is a Real (a fractional number):
  • (Something) Equal to 100.00
This would be a Unit-Type Comparison because it's value Footman is a Unit-Type (the Units you edit/create in the Object Editor):
  • (Something) Equal to Footman
Hopefully this helps you understand better.
 
Last edited:
Level 2
Joined
Apr 15, 2024
Messages
10
Thank you guys so much, that helped me alot, also oh I thought it would work like scroll of regeneration, is it alot more complicated to set it to heal over time?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
Thank you guys so much, that helped me alot, also oh I thought it would work like scroll of regeneration, is it alot more complicated to set it to heal over time?
You have to change it if you want it to work like Scroll of Regeneration.
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Death Pact (Ritual Dagger)
  • Actions
    • Set TempPoint = (Position of (Target unit of ability being))
    • Unit - Create 1 Dummy for (Triggering player) at TempPoint facing...
    • Set TempDummy = (Last created unit)
    • Unit - Add a 0.20 second Generic expiration timer to TempDummy
    • Unit - Add Scroll of Regeneration (Ritual Dagger) to TempDummy
    • Custom script: call IssueImmediateOrderById( udg_TempDummy, 852273 )
    • Custom script: call RemoveLocation( udg_TempPoint )
Here is the list of "ingredients" you'll need:

New Abilities:
- Death Pact: This will be customized to not heal the user. It's just meant to kill the target Undead unit and run our trigger. Give this Ability to the Item.
- Scroll of Regeneration: This will be customized to function like Ritual Dagger's heal. I'm pretty sure they're almost identical.

New Variables:
- TempPoint = Point
- TempDummy = Unit

New Units:
- Dummy: A special unit based on the Locust.

A Dummy unit is a "hidden" unit that we use in our triggers to cast spells. You generally only need 1 main Dummy unit that you can reuse throughout your triggers. Here's how to create one in the Object Editor:

1) Copy and paste the Locust unit. It's under the Undead/Special folder.
2) Set it's Model = None, Shadow = None, Attacks Enabled = None, Movement Type = None, Speed Base = 0.

With these settings, the Dummy unit will be completely "invisible", uncontrollable (outside of triggers), and will cast Abilities instantly. Just remember that the Dummy unit has the same casting restrictions as any normal Unit, so you'll want to make sure that the Abilities it casts have enough Cast Range, 0 Mana Cost, No Requirements, proper Targets Allowed, etc.
 
Last edited:
Level 2
Joined
Apr 15, 2024
Messages
10
I want it to work like ritual dagger, so maybe I need to do like a combination of the two? Also thanks for the tips, I got a better understanding of how the triggers and conditions work :D
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
I want it to work like ritual dagger, so maybe I need to do like a combination of the two? Also thanks for the tips, I got a better understanding of how the triggers and conditions work :D
I updated my last post with everything you need. We're still using the Death Pact ability the same way as before, but everything else is different. Now we have an "invisible" Dummy unit spawn in and cast a custom Scroll of Regeneration ability on nearby allied units.

So the Item casts our new Death Pact ability -> Then the Dummy unit casts our new Scroll of Regeneration ability.

Not too complicated when you think about it, we're just combining some existing abilities to make a new one.

Although, this line may confuse you:
  • Custom script: call IssueImmediateOrderById( udg_TempDummy, 852273 )
Unfortunately, a unit can only be ordered to cast Scroll of Regeneration through code, which is what we're doing here. 852273 is the abilities Order Id number. But most abilities can be ordered to cast without code.
 
Last edited:
Level 2
Joined
Apr 15, 2024
Messages
10
I saw! Thank you, I just tried it though and the scroll of regeneration doesnt trigger, the unit gets sacrificed and theres the visual of an effect happening but no life is being regenerated, have I done something wrong?
Actually I couldnt choose "none" for the dummys model, so I just put in a custom model file that doesnt exist, is that the issue?
 

Attachments

  • ritualdaggerdummy.png
    ritualdaggerdummy.png
    79.1 KB · Views: 3
  • ritualdagger2.png
    ritualdagger2.png
    81.6 KB · Views: 3
  • ritualdagger1.png
    ritualdagger1.png
    15.1 KB · Views: 3
  • ritualdagger3.png
    ritualdagger3.png
    114.5 KB · Views: 2
Last edited:
Level 2
Joined
Apr 15, 2024
Messages
10
Oh I tried that now but it still doesnt trigger, I chose the TempPoint,
 

Attachments

  • RITUALDAGGER4.png
    RITUALDAGGER4.png
    14.3 KB · Views: 4
Level 2
Joined
Apr 15, 2024
Messages
10
Hmm, perhaps try to increase its expiration timer a bit ? Something like 1-2 seconds. Perhaps it doesn't have the time to cast its ability, especially if it has values greater than 0.20 for these lines

View attachment 469632
I tried to make it 3 seconds but it still doesnt work :/ I think we're close to figuring it out, there's just something I've not done correctly.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
I never actually tested that Order Id, so it could just be bad. I found it from an old forum post. A way to test this would be to add a different ability to the Dummy, like Thunderclap for example, and order it to cast that. If that works it would tell us that you did everything correctly and it's something wrong with the Order Id/Scroll of Regen ability.
  • Unit - Add Thunderclap (Dummy) to TempDummy
  • Unit - Order TempDummy to Human - Mountain King - Thunderclap
Other things:
  • Don't change the Targets Allowed on your new Scroll of Regeneration ability.
  • Don't mess with those Art - Cast values, they have to be set to 0.00 for it to work (the Locust already uses 0.00 by default). You don't want ANY delays.
  • The expiration timer is fine, Scroll of Regeneration will cast at most 1 frame later after being ordered to do so.
  • Give the ability a unique name so you don't mix it up with the original ability. Then double check that these match in the trigger.
  • Ensure that your units are actually damaged since the buff only applies to units that are hurt -> Data = Allow When Full: Never.
  • Remember to double check that Mana Costs and other casting requirements are removed from your Dummy abilities.
  • Double check that you've modified the Movement Type and Speed Base of the Dummy unit. Everything I listed is important.
 
Last edited:
Level 2
Joined
Apr 15, 2024
Messages
10
I never actually tested that Order Id, so it could just be bad. I found it from an old forum post. A way to test this would be to add a different ability to the Dummy, like Thunderclap for example, and order it to cast that. If that works it would tell us that you did everything correctly and it's something wrong with the Order Id/Scroll of Regen ability.
  • Unit - Add Thunderclap (Dummy) to TempDummy
  • Unit - Order TempDummy to Human - Mountain King - Thunderclap
Other things:
  • Don't change the Targets Allowed on your new Scroll of Regeneration ability.
  • Don't mess with those Art - Cast values, they have to be set to 0.00 for it to work (the Locust already uses 0.00 by default). You don't want ANY delays.
  • The expiration timer is fine, Scroll of Regeneration will cast at most 1 frame later after being ordered to do so.
  • Give the ability a unique name so you don't mix it up with the original ability. Then double check that these match in the trigger.
  • Ensure that your units are actually damaged since the buff only applies to units that are hurt -> Data = Allow When Full: Never.
  • Remember to double check that Mana Costs and other casting requirements are removed from your Dummy abilities.
  • Double check that you've modified the Movement Type and Speed Base of the Dummy unit. Everything I listed is important.
I tried out adding thunder clap but didnt work either, I made sure to revert any changes I made to the targets for scroll of regen ritual, I had added to include allies and I didnt change anything about the art cast values for any of the abilities, Ive gave scroll of regeneration (ritual dagger) as a suffix so to not confuse them, I even tried just adding the normal scroll of regeneration to see if it that would work but no, all my units are predamaged, there's no mana cost for it and I made sure to set the movement type and speed base to none/0.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
I tried out adding thunder clap but didnt work either, I made sure to revert any changes I made to the targets for scroll of regen ritual, I had added to include allies and I didnt change anything about the art cast values for any of the abilities, Ive gave scroll of regeneration (ritual dagger) as a suffix so to not confuse them, I even tried just adding the normal scroll of regeneration to see if it that would work but no, all my units are predamaged, there's no mana cost for it and I made sure to set the movement type and speed base to none/0.
Can you post your trigger? Also, give the Dummy a model so you can see if it even spawns in the first place.
 
Level 2
Joined
Apr 15, 2024
Messages
10
Can you post your trigger? Also, give the Dummy a model so you can see if it even spawns in the first place.
I tried giving it a model and it spawns, so something is just wrong with the dummy casting the ability.
 

Attachments

  • ritualdagger5.png
    ritualdagger5.png
    32.4 KB · Views: 2
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
I tried giving it a model and it spawns, so something is just wrong with the dummy casting the ability.
Alright, I figured it out, that forum post was outdated or something. The Order Id for Scroll of Regen is: 852609

So your custom script needs to be updated to use this Integer:
  • Custom script: call IssueImmediateOrderById( udg_TempDummy, 852609 )
Another issue I found while testing, Death Pact can't be used if your Hero is on full life.

EDIT: The solution is simple, set Data - Life Converted To Life to 0.00.
1713288239972.png



Here's how I figured out the Order Id if you're interested:
1713288071654.png
 

Attachments

  • Ritual Dagger custom.w3m
    19.3 KB · Views: 2
Last edited:
Level 2
Joined
Apr 15, 2024
Messages
10
Alright, I figured it out, that forum post was outdated or something. The Order Id for Scroll of Regen is: 852609

So your custom script needs to be updated to use this Integer:
  • Custom script: call IssueImmediateOrderById( udg_TempDummy, 852609 )
Another issue I found while testing, Death Pact can't be used if your Hero is on full life.

EDIT: The solution is simple, set Data - Life Converted To Life to 0.00.
View attachment 469638


Here's how I figured out the Order Id if you're interested:
View attachment 469637
It worked! Thank you guys soooo much, I really appreciate it! And I already set the death pact to life converted to life to 0, do I need to add the second category/triggers for it to work or is it enough to change the death pact ritual dagger life converted?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,558
It worked! Thank you guys soooo much, I really appreciate it! And I already set the death pact to life converted to life to 0, do I need to add the second category/triggers for it to work or is it enough to change the death pact ritual dagger life converted?
Well, it works, so I wouldn't change anything else unless it stops working.
 
Last edited:
Top