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

Does anyone have a working warrior rage system?

Status
Not open for further replies.
Level 3
Joined
Feb 22, 2020
Messages
43
Im pretty new to triggering, and found a rage system but cant get it to work from script errors in the code they made. It was also over my head on how to fix it.

So now im looking for anyone who has made or knows of a good warrior rage system, please help!
 
Level 3
Joined
Feb 22, 2020
Messages
43
Basically mana that is added when dealing damage or taking damage?
Yep! pretty much the sum of it. Also would have to work around mana regeneration to make sure the warrior doesnt naturally regen mana if they have items with it. ive set mana regen to -100%sohopefully take would work.
 
Yep! pretty much the sum of it. Also would have to work around mana regeneration to make sure the warrior doesnt naturally regen mana if they have items with it. ive set mana regen to -100%sohopefully take would work.
You should put mana regeneration to 0%, and then reduce mana with a periodic trigger. That way it's easier to modify how rapidly the mana/rage should be depleted, and you can turn it on/off when the warrior enters/leaves combat.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
The mana regeneration part is IMO more complicated than it may seem on first sight.
You should put mana regeneration to 0%, and then reduce mana with a periodic trigger. That way it's easier to modify how rapidly the mana/rage should be depleted, and you can turn it on/off when the warrior enters/leaves combat.
This won't work if the unit in question is a hero as they passively gain mana points and mana regeneration per point of intelligence and from items.

Something like this could work when the unit manipulates items:
  • Item manipulation
    • Events
      • Unit - A unit Uses an item
      • Unit - A unit Acquires an item
      • Unit - A unit Loses an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to RageWarrior
    • Actions
      • Set VariableSet CONST_ManaRegenPerInt = 0.05 //this value should match the "Hero Attributes - Mana Regen. Bonus per Intelligence Point" field in Gameplay Constants
      • Unit - Set Max Mana of (Triggering unit) to 100
      • Unit - Set Unit: (Triggering unit)'s Real Field: Mana Regeneration ('umpr') to Value: (-1.00 x (CONST_ManaRegenPerInt x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
Then there is the question of unit actually carrying (and possibly using) items that regenerate mana (e.g. mana potion). Using items is the same as casting the ability of the item, so the trigger below should be able to prevent unit from using item abilities
  • Prevent Mana regen from items
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to RageWarrior
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Item Mana Regain (Lesser)
          • (Ability being cast) Equal to Item Mana Regain (Greater)
          • ...expand the list with other abilities that regenerate mana...
    • Actions
      • Unit - Order (Triggering unit) to Stop.
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: The unit does not h...
The two triggers above prevented hero from passively (via atttributes) and actively (via items/abilties) regenerate mana. However the third problem is aura-like abilities (e.g. Brilliance Aura from Archmage) which regenerate mana to everyone around a unit (so the regeneration effect comes from external source to the unit with rage bar). For this, I would probably recommend triggering the aura effect instead of the native functionality (e.g. periodic trigger that every 0.25 sec picks every unit nearby units with the mana regenerating aura and increases their mana).
 
Level 3
Joined
Feb 22, 2020
Messages
43
the unit will be a hero, im creating the Warrior class from WoW and is a class selection game so will have to work for heroes.
The mana regeneration part is IMO more complicated than it may seem on first sight.

This won't work if the unit in question is a hero as they passively gain mana points and mana regeneration per point of intelligence and from items.

Something like this could work when the unit manipulates items:
  • Item manipulation
    • Events
      • Unit - A unit Uses an item
      • Unit - A unit Acquires an item
      • Unit - A unit Loses an item
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to RageWarrior
    • Actions
      • Set VariableSet CONST_ManaRegenPerInt = 0.05 //this value should match the "Hero Attributes - Mana Regen. Bonus per Intelligence Point" field in Gameplay Constants
      • Unit - Set Max Mana of (Triggering unit) to 100
      • Unit - Set Unit: (Triggering unit)'s Real Field: Mana Regeneration ('umpr') to Value: (-1.00 x (CONST_ManaRegenPerInt x (Real((Intelligence of (Triggering unit) (Include bonuses))))))
Then there is the question of unit actually carrying (and possibly using) items that regenerate mana (e.g. mana potion). Using items is the same as casting the ability of the item, so the trigger below should be able to prevent unit from using item abilities
  • Prevent Mana regen from items
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to RageWarrior
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Item Mana Regain (Lesser)
          • (Ability being cast) Equal to Item Mana Regain (Greater)
          • ...expand the list with other abilities that regenerate mana...
    • Actions
      • Unit - Order (Triggering unit) to Stop.
      • Game - Display to (Player group((Owner of (Triggering unit)))) the text: The unit does not h...
The two triggers above prevented hero from passively (via atttributes) and actively (via items/abilties) regenerate mana. However the third problem is aura-like abilities (e.g. Brilliance Aura from Archmage) which regenerate mana to everyone around a unit (so the regeneration effect comes from external source to the unit with rage bar). For this, I would probably recommend triggering the aura effect instead of the native functionality (e.g. periodic trigger that every 0.25 sec picks every unit nearby units with the mana regenerating aura and increases their mana).
so the next step would be to create a system were they gain mana when they attack targets but then the rage they generate depletes when they are out of combat.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
For gaining mana on attack you would probably need a damage detection system to properly react to the "specific unit takes damage" event and clear it up afterward (e.g. when any unit dies). There should be some DDS in the resource section.

As for losing mana - you need to first know the conditions when a unit should start losing mana (is it after few seconds of not attacking anything or when getting too far from enemies?). There is no combat lock system as is in WoW - It would either require an implementation of that system in WCIII (something like threat tables) or some simpler solution could suffice (like the idea that rage starts decreasing few seconds after not attacking).
Then there is the question whether only one unit in the entire game can use the system or if it can be only one unit per player or any number of units per any number of players. That will impact the complexity of the triggers.
 
Level 3
Joined
Feb 22, 2020
Messages
43
so the system i was trying to use in the original post was a DDS but i kept getting an error from the code after i implemented it. Any good suggestions? And aslo not the best with triggering yet and have noticed DDS systems take a lot of knowledge to make triggers from. Any help in the right direction would be wonderful.
 
Status
Not open for further replies.
Top