• 🏆 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/Ability Request - Wildhammer Dwarves

Status
Not open for further replies.
Level 4
Joined
Dec 2, 2013
Messages
67
Hi all
I am making a custom race of Wildhammer Dwarves, you can check the progress in my [Altered Melee] Wildhammer Dwarves thread.

I am in need of several spells that probably you would be willing to help with triggering:

Courier
Code Type: GUI
Target Type: Single Target
Number of Levels: 1 (Unit Ability)
Target Allowed: Friend, Structure
Cooldown: None
Mana Cost: None
Effect: Generates 2 gold per trip.
In-game Description: Allow Gryphon to deliver messages to another Main Building (Warrior Hall, Veteran Hall, Ancestor Hall). Each completed trip generates a small amount of gold.
(Got the inspiration from the good old game Age of Empire 2, where the caravan can generate gold by going back and forth between Markets.)

The way it works in my concept: this ability requires 2 main buildings built. Player selects the ability and clicks on one main building (1st). The Gryphon automatically detects another main building (2nd) and starts going there, then it goes back to the 1st, once arriving at the 1st there is gold generated (2 gold per trip maybe?). Until given a new order, the Gryphon will keep doing this ability.

Salvage
Code Type: GUI
Target Type: None
Number of Levels: 1 (Unit Ability)
Target Allowed: Friend, Structure
Cooldown: None, Passive Ability
Mana Cost: None
Effect: When enemy destroy buildings and mechanical units (or player destroy them himself), those destroyed give back 20% of its gold and lumber cost to player.
In-game Description: Each structure or mechanical unit destroyed by the enemy gives a portion of its cost back to the player.

Entomb
Code Type: GUI
Target Type: Single Target
Number of Levels: 1 (Unit Spell)
Target Allowed: Ground, Enemy, Neutral, Organic
Cooldown: 8 seconds
Mana Cost: 120
Duration: 22 seconds
In-game Description: Causes earth pillars to burst from the ground and traps an enemy unit, rendering it unable to move, attack or cast spells, and stopping others from attacking or casting on it. Lasts 20 seconds.
(Basically the Night Elf’s Cyclone spell but without the ‘tossing into the air’ part, inspired by Earth Nova spell model. If possible, please help with the spell effect also)


Fireforge Bomb
Code Type: GUI
Target Type: Area (Small Radius around 200 – 300, please make it easily modified)
Number of Levels: 1 (Unit Ability)
Target Allowed: Enemy, Ground, Structure, Organic
Duration: 20 seconds
Cooldown: 40 seconds
Mana Cost: None
Effect: Skyraider throws some bombs/flasks/potions to target area. When enemy units are hit, they will be drained 10 mana per seconds. When enemy buildings are hit, the bombs will make production time 50% slower.
(in a way, similar to Frosty Wyrm’s breath but it does not stop a building’s production time. Also, the effect of this ability is not stackable, thus it is not OP)


Cancelling most requests, somehow managed to create them myself except the Courier and Salvage abilities.

Hope I explain them well. In case there are things you need to further clarify, feel free to let me know. Thanks in advance!
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,534
Salvage:
  • Salvage
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Level of Salvage for (Triggering unit)) Equal to 1
    • Actions
      • Set VariableSet TempIntegers[1] = ((Unit: (Triggering unit)'s Integer Field: Gold Bounty Awarded - Base ('ubba')) / 5)
      • Set VariableSet TempIntegers[2] = ((Unit: (Triggering unit)'s Integer Field: Lumber Bounty Awarded - Base ('ulba')) / 5)
      • Player - Add TempIntegers[1] to (Triggering player).Current gold
      • Player - Add TempIntegers[2] to (Triggering player).Current lumber
Unfortunately, we don't have access to the Gold Cost/Lumber Cost of a unit (why, I don't know). So instead we can modify some Stats that we DO have access to. In this case I'm getting the unit's Gold Bounty Awarded - Base and Lumber Bounty Awarded - Base to determine the refund. So you would need to adjust these values in the Object Editor for each of your buildings that use the Salvage ability. See my attached picture.

Courier:
Courier requires a Unit Indexer. You can copy the one from my map, it's a single trigger that doesn't need any further customization.
Don't copy it if you already have a Unit Indexing system in your map.
Also, this system will conflict with any triggers of yours that are already using "Custom value of unit", so be aware of that. That conflict isn't an issue though since the Unit Indexer allows you to achieve the same effect by using Variables.
  • Courier Start
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Courier
    • Actions
      • -------- Cancel the ability if you target an invalid structure! --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Target unit of ability being cast)) Not equal to Castle
          • (Unit-type of (Target unit of ability being cast)) Not equal to Keep
          • (Unit-type of (Target unit of ability being cast)) Not equal to Town Hall
        • Then - Actions
          • Skip remaining actions
        • Else - Actions
      • -------- --------
      • -------- Find other Town Hall-type units that belong to the Courier --------
      • Set VariableSet Courier_UnitGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Triggering player)) and (((Matching unit) is alive) Equal to True)))
      • Unit Group - Pick every unit in Courier_UnitGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Not equal to Castle
              • (Unit-type of (Picked unit)) Not equal to Keep
              • (Unit-type of (Picked unit)) Not equal to Town Hall
            • Then - Actions
              • Unit Group - Remove (Picked unit) from Courier_UnitGroup.
            • Else - Actions
      • Unit Group - Remove (Target unit of ability being cast) from Courier_UnitGroup.
      • -------- --------
      • -------- If there's at least 1 eligible Town Hall-type unit that we can deliver to then proceed with the ability - ELSE, cancel the ability --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Courier_UnitGroup) Greater than 0
        • Then - Actions
          • Set VariableSet CV = (Custom value of (Triggering unit))
          • Set VariableSet Courier_HasMessage[CV] = False
          • Set VariableSet Courier_Home[CV] = (Target unit of ability being cast)
          • -------- --------
          • -------- This gets the closest eligible Town-Hall unit --------
          • Set VariableSet Courier_Points[0] = (Position of (Target unit of ability being cast))
          • Set VariableSet TempReals[0] = 999999.00
          • Unit Group - Pick every unit in Courier_UnitGroup and do (Actions)
            • Loop - Actions
              • Set VariableSet Courier_Points[1] = (Position of (Picked unit))
              • Set VariableSet TempReals[1] = (Distance between Courier_Points[0] and Courier_Points[1])
              • Custom script: call RemoveLocation (udg_Courier_Points[1])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • TempReals[1] Less than TempReals[0]
                • Then - Actions
                  • Set VariableSet TempReals[0] = TempReals[1]
                  • Set VariableSet Courier_Destination[CV] = (Picked unit)
                • Else - Actions
          • Custom script: call RemoveLocation (udg_Courier_Points[0])
          • -------- --------
          • -------- This is the order for the second Courier (Hidden) ability: --------
          • Unit - Order (Triggering unit) to Night Elf Keeper Of The Grove - Entangling Roots Courier_Destination[CV]
        • Else - Actions
      • -------- --------
      • Custom script: call DestroyGroup (udg_Courier_UnitGroup)
  • Courier Delivery
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Courier (Delivery - Hidden)
    • Actions
      • Set VariableSet CV = (Custom value of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Courier_Home[CV] is alive) Equal to False
        • Then - Actions
          • -------- AUTOMATICALLY FIND NEW TOWN HALL: --------
          • -------- You can delete the Actions after this line to prevent the Gyrphon from automatically trying to find a new Town Hall: --------
          • -------- --------
          • Unit - Remove Courier (Delivery - Hidden) from (Triggering unit)
          • Unit - Add Courier (Delivery - Hidden) to (Triggering unit)
          • -------- --------
          • -------- Find other Town Hall-type units that belong to the Courier --------
          • Set VariableSet Courier_UnitGroup = (Units in (Playable map area) matching (((Owner of (Matching unit)) Equal to (Triggering player)) and (((Matching unit) is alive) Equal to True)))
          • Unit Group - Pick every unit in Courier_UnitGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Not equal to Castle
                  • (Unit-type of (Picked unit)) Not equal to Keep
                  • (Unit-type of (Picked unit)) Not equal to Town Hall
                • Then - Actions
                  • Unit Group - Remove (Picked unit) from Courier_UnitGroup.
                • Else - Actions
          • Unit Group - Remove Courier_Destination[CV] from Courier_UnitGroup.
          • -------- --------
          • -------- If there's at least 1 eligible Town Hall-type unit that we can deliver to then proceed with the ability - ELSE, cancel the ability --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in Courier_UnitGroup) Greater than 0
            • Then - Actions
              • Set VariableSet Courier_HasMessage[CV] = False
              • Set VariableSet Courier_Home[CV] = Courier_Destination[CV]
              • -------- --------
              • -------- This gets the closest eligible Town-Hall unit --------
              • Set VariableSet Courier_Points[0] = (Position of Courier_Home[CV])
              • Set VariableSet TempReals[0] = 999999.00
              • Unit Group - Pick every unit in Courier_UnitGroup and do (Actions)
                • Loop - Actions
                  • Set VariableSet Courier_Points[1] = (Position of (Picked unit))
                  • Set VariableSet TempReals[1] = (Distance between Courier_Points[0] and Courier_Points[1])
                  • Custom script: call RemoveLocation (udg_Courier_Points[1])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempReals[1] Less than TempReals[0]
                    • Then - Actions
                      • Set VariableSet TempReals[0] = TempReals[1]
                      • Set VariableSet Courier_Destination[CV] = (Picked unit)
                    • Else - Actions
              • Custom script: call RemoveLocation (udg_Courier_Points[0])
              • -------- --------
              • -------- This is the order for the second Courier (Hidden) ability: --------
              • Unit - Order (Triggering unit) to Night Elf Keeper Of The Grove - Entangling Roots Courier_Destination[CV]
            • Else - Actions
          • -------- --------
          • Custom script: call DestroyGroup (udg_Courier_UnitGroup)
          • -------- STOP - Don't Delete Beyond This --------
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Courier_HasMessage[CV] Equal to False
            • Then - Actions
              • Set VariableSet Courier_HasMessage[CV] = True
              • -------- --------
              • Unit - Remove Courier (Delivery - Hidden) from (Triggering unit)
              • Unit - Add Courier (Delivery - Hidden) to (Triggering unit)
              • Unit - Order (Triggering unit) to Night Elf Keeper Of The Grove - Entangling Roots Courier_Home[CV]
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Courier_HasMessage[CV] Equal to True
                • Then - Actions
                  • -------- Add GOLD --------
                  • Player - Add 2 to (Triggering player).Current gold
                  • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using UI\Feedback\GoldCredit\GoldCredit.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Set VariableSet Courier_HasMessage[CV] = False
                  • -------- --------
                  • Unit - Remove Courier (Delivery - Hidden) from (Triggering unit)
                  • Unit - Add Courier (Delivery - Hidden) to (Triggering unit)
                  • Unit - Order (Triggering unit) to Night Elf Keeper Of The Grove - Entangling Roots Courier_Destination[CV]
                • Else - Actions

Variables:
TempIntegers = Integer (Array)
TempReals = Real (Array)
Courier_Home = Unit (Array)
Courier_Destination = Unit (Array)
Courier_HasMessage = Boolean (Array)
Courier_UnitGroup = Unit Group
Courier_Points = Point (Array)
CV = Integer

Abilities:
Salvage = Passive ability based on Storm Hammers (any ability with no effect will work)

Courier = Based on Channel. Modified to be a Unit ability that has 99999 cast range, 0.00 follow through time, Disable Abilities = False, Options: Visible. Base Order Id = thunderbolt. Target Type: Unit Target. Targets Allowed: Player Units, Structures

Courier (Delivery - Hidden) = Based on Channel. Modified to be a Unit ability that has 10 cast range, 0.00 follow through time, Disable Abilities = False, Options: Visible. Base Order Id = entangling roots. Target Type: Unit Target.

You won't be able to open my map if you don't use the latest version of wc3.
 

Attachments

  • Salvage example.png
    Salvage example.png
    834.4 KB · Views: 29
  • Salvage + Courier 2.w3m
    27.6 KB · Views: 21
Last edited:
Level 4
Joined
Dec 2, 2013
Messages
67
Wow, that was fast :)

Let me see what I can do, maybe it is time to upgrade to the newest patch. I will try it soon

Anyway, thanks so much for your help :piru:
 
Status
Not open for further replies.
Top