• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Developing a Naga item

Level 5
Joined
Oct 9, 2024
Messages
77
I’m developing a Naga race for Warcraft 3 and realized I need to create a unique structure or item shop for them — something equivalent to the Arcane Vault for humans. Just like the Night Elves have the Moonstone, which allows them to switch between day and night, I want to create a unique item for the Nagas that controls the weather.


My idea is a Scroll of Rain (or another thematic name) that, when activated, makes it start raining for a set duration. During this rain, all Naga units should regenerate health continuously. I would like suggestions on how to efficiently create this item in the editor, ensuring that:
 
I'd give all naga units an invisible ability based on ring of regeneration with a dummy tech requirement, so it would be disabled by default, and then you set this dummy tech level to 1 when the scroll is used so the ability becomes active, and set it back to 0 when the rain stops

That what you don't have to deal with unit groups and picking many units at a time to add/remove abilities
 
But how do I create the rain? A player might buy several scrolls and trigger one rain effect right after another. I can’t allow the trigger that ends the first rain to fire in the middle of the second one, interrupting the effect.
 
But how do I create the rain? A player might buy several scrolls and trigger one rain effect right after another. I can’t allow the trigger that ends the first rain to fire in the middle of the second one, interrupting the effect.
You can find a simple Weather system in this thread:
I believe it should have everything you need. Just disable the Weather Setup trigger because that's used for cycling through automated Weather effects.

Then when you use your Item you could do something like this:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Rain (Naga - Weather)
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Weather_Counter Equal to 0
      • Then - Actions
        • Set VariableSet Weather_Name = rain_heavy
        • Trigger - Run Weather Create By Name <gen> (ignoring conditions)
      • Else - Actions
    • Set VariableSet Weather_Counter = (Weather_Counter + 1)
    • Wait 10.00 game-time seconds
    • Set VariableSet Weather_Counter = (Weather_Counter - 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Weather_Counter Equal to 0
      • Then - Actions
        • Environment - Turn Weather_Last Off
      • Else - Actions
It should rain for 10.00 seconds and be MUI.

Weather_Counter is a new Integer variable I created specifically for this trigger.
Rain (Naga - Weather) can be an ability based on Channel with all of the effects removed.
 
Last edited:
It’s supposed to last around 30 seconds, but that part I can handle. What I’m wondering is: if the player uses another scroll while the first one is still active, won’t something go wrong? My idea is that using a second scroll during the duration of the first should extend the total rain time. For example, if the first scroll has 30 seconds and the player uses a second one halfway through, then the total rainfall should become 45 seconds — the remaining 15 seconds from the first scroll plus the full 30 seconds from the second
 
It’s supposed to last around 30 seconds, but that part I can handle. What I’m wondering is: if the player uses another scroll while the first one is still active, won’t something go wrong? My idea is that using a second scroll during the duration of the first should extend the total rain time. For example, if the first scroll has 30 seconds and the player uses a second one halfway through, then the total rainfall should become 45 seconds — the remaining 15 seconds from the first scroll plus the full 30 seconds from the second
MUI means it will work for multiple units at once, in this case multiple units with the ability. So if something is called MUI, quoting myself here:
It should rain for 10.00 seconds and be MUI.
Then it's safe to assume that you can spam it 1000 times on 1000 different units all at the same time without any "conflicting" issues. Side note: MPI means the same thing but for Players.

Anyway, you can change the Wait to 30.00 seconds. But the time doesn't stack, it works exactly like a Moonstone where it resets the timer rather than extending it. If you want it to be extended then you can introduce a Timer variable and change things slightly:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Rain (Naga - Weather)
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Rain_Is_On Equal to False
      • Then - Actions
        • Set Variable Rain_Is_On = True
        • Set Variable Weather_Name = rain_heavy
        • Trigger - Run Weather Create By Name <gen> (ignoring conditions)
      • Else - Actions
    • Set Variable Rain_Time_Left = (Remaining time for Rain_Timer)
    • Countdown Timer - Start Rain_Timer as a One-shot timer that will expire in (Rain_Time_Left + 30.00) seconds
  • Events
    • Time - Rain_Timer expires
  • Conditions
  • Actions
    • Environment - Turn Weather_Last Off
    • Set Variable Rain_Is_On = False
    • Set Variable Rain_Time_Left = 0.00
Rain_Is_On = Boolean
Rain_Time_Left = Real
Rain_Timer = Timer

A Timer variable will either start fresh if it's off (OR) restart if it's currently on. This is very useful, and much better than using a Wait action which cannot be stopped/restarted. My first solution with the Wait was because I was being lazy and wanted everything contained in one trigger with less variables.
 
Last edited:
Thanks for the help, but I'm having trouble with these triggers. If it's not too much trouble, could you upload the map so I can see the trigger in the editor? I'd learn better that way.
 
It shouldn't be too difficult, it's mostly the same Actions repeated a few times. Try this:

Step 1: Open my Weather map found in that link I sent you earlier.
Step 2: Open the Trigger Editor, click the Weather folder or whatever it's named, and Copy it.
Step 2: Open your map, open your Trigger Editor, click on something to gain focus, and Paste it.
Step 4: Create the above triggers.

Some tips for when you try to create the triggers:

Tip 1: Always start by creating the Variables first.

Tip 2: Use the search for text box when trying to find an Action. Don't be too specific, it's finicky.

Tip 3: Use pattern word association, for example:
Rain_Is_On is a Boolean variable. That means if it's being used in a Condition then the Condition is most likely under the Boolean Comparison category.

Tip 4: Everything is categorized in alphabetical order. You can even see a prefix before the name, for example:
  • Countdown Timer - Start Rain_Timer as a One-shot timer that will expire in (Rain_Time_Left + 30.00) seconds
See how it says "Countdown Timer - ", that means this Action is found in the "Countdown Timer" category.
 
Last edited:
Back
Top