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

Hero Request, The Guardian

Status
Not open for further replies.
Level 5
Joined
Oct 20, 2019
Messages
60
Hello, this is my first time requesting a hero so i don't really know if this is done right.

Anyway, i have this hero that i would like to create but im not very good at triggers so i'm searching for someone thats experienced with this and willing to help me out.

This hero is going to be in my survival map and he have the role as a Tank.
His model is a Captain Swordsman High Elf, if you have any questions i will gladly answer them.

Feel free to give him a background story aswell if you like that, i don't mind.

Anyway, here he is, The Guardian

The Guardian swings his sword with all his might onto an enemy with a devastating force, stunning the main target and creating a minor shockwave around the target, reducing the movementspeed and attackspeed for those affected by the shockwave.
Ability Type: Single Target, AoE
Range: Melee
AoE: 250
Cooldown: 10 sec
Movement Reduction: X
Attack Speed Reduction: X
Stun Duration: 1 sec
MS & AS reduction Duration: 5 sec
Debuff: Crushing Blow
Lvl 1 - 80 damage, slows MS by 30% and AS by 15%
Lvl 2 - 120 damage, slows MS by 35% and AS by 20%
Lvl 3 - 160 damage, slows MS by 40% and AS by 25%
Lvl 4 - 200 damage, slows MS by 45% and AS by 30%
Lvl 5 - 240 damage, slows MS by 50% and AS by 35%

The Guardian slams his shield against his opponents with immense physical force, reducing the targets armor and stunning it heavily.
Ability Type: Single Target
Range: Melee
Cooldown: 10 sec
Stun Duration: X
Armor Reduction: X
Armor Reduction Duration: 5 sec
Debuff: Shield Bash
Lvl 1 - 160 damage, 1 armor reduction and 1,5 second stun duration
Lvl 2 - 240 damage, 2 armor reduction and 2 second stun duration
Lvl 3 - 320 damage, 3 armor reduction and 2,5 second stun duration
Lvl 4 - 400 damage, 4 armor reduction and 3 second stun duration
Lvl 5 - 480 damage, 5 armor reduction and 3,5 second stun duration

The Guardian is stronger and tougher far above the average human.
With his impenetrable shield he can block any number of physical attacks, but only for a brief moment.
Ability Type: Passive/Activated
Cooldown: 25 sec
Buff: Guardian Might
Lvl 1 - Passive: Increased strength by 7 and defense by 1
Lvl 1 - Activated: 100% block chance for 3 seconds
Lvl 2 - Passive: Increased strength by 9 and defense by 2
Lvl 2 - Activated: 100% block chance for 3,5 seconds
Lvl 3 - Passive: Increased strength by 11 and defense by 3
Lvl 3 - Activated: 100% block chance for 4 seconds
Lvl 4 - Passive: Increased strength by 13 and defense by 4
Lvl 4 - Activated: 100% block chance for 4,5 seconds
Lvl 5 - Passive: Increased strength by 15 and defense by 5
Lvl 5 - Activated: 100% block chance for 5 seconds

The Guardian imbues his body with ancient power from his ancestors, allowing him to become nearly invulnerable.
Ability Type: Activated, Auto selftarget
Cooldown: 60 sec
Duration: 15 sec
Buff: Guardian Glory
Lvl 1 - Increased strength by 25 and damage reduction by 25%
Lvl 2 - Increased strength by 35 and damage reduction by 45%
Lvl 3 - Increased strength by 45 and damage reduction by 65%
 
Level 39
Joined
Feb 27, 2007
Messages
4,994
It will be more beneficial for you in the long run if you learn to make things like this yourself. None of these effects are particularly difficult or complex to reproduce so I believe you'll be able to do it.

Crushing Blow
:
- Modify a copy of Storm Bolt to have no projectile, max projectile speed, and range equal to the hero's attack range (afaik melee is ~100 or less range). Set cooldown, stun duration, etc..
- If only the main target should take damage, then set damage here in this spell; otherwise leave it at 0.
- Replace the Art - Animation Names with "attack". If your model has an attack slam or a particular other animation you wish to use, you can add other tags here too.
- Modify a copy of Thunderclap to have 250 range and a unique buff (can copy the thunderclap buff). Set MS/AS slow values to what you want.
- If all affected units should take damage put the damage here, otherwise leave it at 0
- Dummy cast this TC spell whenever the main spell is cast:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Crushing Blow
  • Actions
    • Set TempPoint = (Position of (Triggering Unit))
    • Unit - Create 1 DUMMY_UNIT_TYPE for (Owner of (Triggering Unit)) at TempPoint
    • Unit - Add a 2.00 second expiration timer to (Last created unit)
    • Unit - Add TC_SPELL to (Last created unit)
    • Unit - Set level of TC_SPELL for (Last created unit) to (Level of Crushing Blow for (Triggering Unit))
    • Unit - Order (Last created unit) to Human Mountain King - Thunderclap
    • Custom script: call RemoveLocation(udg_TempPoint)
If you don't know how to make the proper dummy unit for casting spells, just do some searching around here and you'll find it. Here's a tutorial about memory leaks, which is what the custom script in the above trigger fixes: Things That Leak


Shield Bash:
- I would tell you to just modify storm bolt again here but a unit can't have two spells with the same order on it at once because casting one of them will attempt to cast both and cause a collision. Instead modify Storm Bolt to be cast from a dummy unit, instead of casting from the main hero.
- Modify the "Channel" spell (tutorial here: Spells - Channel) to function as a dummy ability that casts but has no effect. You can put animations here too.
- Modify Faerie Fire to reduce armor as desired (change its buff too).
- Dummy cast both the FF and SB spells when the hero casts the main spell:
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Shield Bash
  • Actions
    • Set TempPoint = (Position of (Triggering Unit))
    • Unit - Create 1 DUMMY_UNIT_TYPE for (Owner of (Triggering Unit)) at TempPoint
    • Unit - Add a 2.00 second expiration timer to (Last created unit)
    • Unit - Add FF_SPELL to (Last created unit)
    • Unit - Set level of FF_SPELL for (Last created unit) to (Level of Crushing Blow for (Triggering Unit))
    • Unit - Order (Last created unit) to Night Elf Druid of the Talon - Faerie Fire (Target unit of ability being cast)
    • -------- --------
    • Unit - Create 1 DUMMY_UNIT_TYPE for (Owner of (Triggering Unit)) at TempPoint
    • Unit - Add a 2.00 second expiration timer to (Last created unit)
    • Unit - Add SB_SPELL to (Last created unit)
    • Unit - Set level of SB_SPELL for (Last created unit) to (Level of Crushing Blow for (Triggering Unit))
    • Unit - Order (Last created unit) to Night Elf Druid of the Talon - Faerie Fire (Target unit of ability being cast)
    • Custom script: call RemoveLocation(udg_TempPoint)
With a perfect dummy unit you can cast any number of spells instantaneously, but my presumption is that your dummy would not be set up to do so. Thus you need multiple dummies.


Guardian Glory:
- You'll need a Damage Detection system for this. I recommend Damage Engine 5.4.2.3 This is possible with 100% evasion but it will show the "miss" text which I assume you don't want.
- Either use another channel ability or modify something with no target (like Roar) to do nothing but give the appropriate buff for the desired duration
- Modify the "Item armor bonus" and "item hero stat bonus (+1 strength)" abilities to be unit abilities with the appropriate number of levels. Set all data fields as necessary for the passive bonus.
- Item abilities generally do not show up on units' command cards so you probably don't have to hide these abilities or put them in a disabled spellbook.
- You'll need a trigger working with the DDS to block damage if a unit has the buff:
  • Events
    • Game - DamageEvent becomes equal to 1.00
  • Conditions
    • (DamageEventTarget has buff Guardian Glory) equal to true
    • IsDamageSpell equal to False //sounds like you don't want to block spell damage
    • IsDamageCode equal to False //might or might not need this depending on if other damage dealt by triggers in your map should count as a blockable attack
  • Actions
    • Set DamageEventAmount = 0.00
    • -------- maybe display some floating text here to show damage was blocked, or play a special effect, or something else --------
- And also a trigger to add the item abilities and level them up when the hero levels his skills:
  • Events
    • Hero - A hero learns a skill
  • Conditions
    • (Learned hero skill) equal to Guardian Glory
  • Actions
    • Set LVL = (Level of Guardian Glory for (Triggering Unit))
    • If (All conditions are true) then do (then actions) else do (Else actions)
      • If - Conditions
        • LVL equal to 1
      • Then - Actions
        • Unit - Add ITEM_ARMOR to (Triggering Unit))
        • Unit - Add ITEM_STRENGTH to (Triggering Unit))
      • Else - Actions
        • Unit - Set level of ITEM_ARMOR for (Triggering Unit) to LVL
        • Unit - Set level of ITEM_STRENGTH for (Triggering Unit) to LVL

Guardian Might:
- Pick a different no target spell than what you picked for Glory (or use channel since its base order can be changed) and again make it do nothing but apply a buff for a duration.
- Create another copy of that item strength bonus ability and give it 3 levels with appropriate strength bonuses (passive abilities can overlap on units since they have no order to use them).
- Define damage reduction amounts in an array:
  • Events
    • Time - Elapsed game time is 0.50 seconds //Don't use the map init event
  • Conditions
  • Actions
    • Set GM_Reduction[1] = 0.25
    • Set GM_Reduction[2] = 0.45
    • Set GM_Reduction[3] = 0.65
- Check for this buff in another on damage trigger:
  • Events
    • Game - DamageEvent becomes equal to 1.00
  • Conditions
    • (DamageEventTarget has buff Guardian Might) equal to True
  • Actions
    • Set DamageEventAmount = (DamageEventAmount x (1.00 - GM_Reduction[(Level of (Guardian Might) for DamageEventTarget)]))
    • -------- maybe display some floating text here to show damage was reduced, or play a special effect, or something else --------
- You will also need to add the strength and remove it at the appropriate times. The reason I don't suggest doing this with the "Hero - Modify attribute" action is that it may be hard to undo the added stat when the ability ends (if you level it up while it's active, for example).
  • Events
    • Unit - A unit starts the effect of an ability
  • Conditions
    • (Ability being cast) equal to Guardian Might
  • Actions
    • Unit - Add ITEM_STRENGTH_GM to (Triggering Unit))
    • Unit - Set level of ITEM_STRENGTH_GM for (Triggering Unit) to (Level of Guardian Might for (Triggering Unit))
    • Unit - Add (Triggering Unit) to GM_CheckGroup
- And a trigger to remove the ability when the unit no longer has the buff:
  • Events
    • Time - Every 0.25 seconds of game-time //can make it lower to be more precise but you'll probably never notice it lagging behind in practice
  • Conditions
  • Actions
    • Unit Group - Pick every unit in GM_CheckGroup and do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Then actions) else do (Else actions)
          • If - Conditions
            • ((Picked unit) has buff Guardian Might) equal to False
          • Then - Actions
            • Unit - Remove (Picked unit) from GM_CheckGroup
            • Unit - Remove ITEM_STRENGTH_GM from (Picked Unit)
          • Else - Actions
And that's it!
 
Last edited:
Status
Not open for further replies.
Top