• 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.

Buff System v1.8

Description :
Buff System allows you to create dummy buffs based on auras making buff handling and stacking a lot easier.

  • Run Buffing
    • Events
    • Conditions
    • Actions
      • Set BS_Recycle = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (BS_Buffed_Unit[BS_Index2] is alive) Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BS_Buffed_Unit[BS_Index2] is Magic Immune) Equal to True
              • BS_MagicImmune[BS_Index2] Equal to False
            • Then - Actions
              • Set BS_Recycle = False
            • Else - Actions
        • Else - Actions
          • Set BS_Recycle = False
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BS_Recycle Equal to True
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (BS_Buffed_Unit[BS_Index2] has buff BS_Buff[BS_Index2]) Equal to True
            • Then - Actions
              • For each (Integer BS_Index3) from 1 to (BS_Index2 - 1), do (Actions)
                • Loop - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BS_Buffed_Unit[BS_Index3] Equal to BS_Buffed_Unit[BS_Index2]
                      • BS_Buff[BS_Index3] Equal to BS_Buff[BS_Index2]
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • BS_Stack[BS_Index3] Less than BS_MaxStack[BS_Index3]
                        • Then - Actions
                          • Set BS_Stack[BS_Index3] = (BS_Stack[BS_Index3] + 1)
                        • Else - Actions
                      • Set BS_Buffing_Unit[BS_Index3] = BS_Buffing_Unit[BS_Index2]
                      • Set BS_Buffed_Unit[BS_Index3] = BS_Buffed_Unit[BS_Index2]
                      • Set BS_Buff_Ability[BS_Index3] = BS_Buff_Ability[BS_Index2]
                      • Set BS_Bonus_Ability[BS_Index3] = BS_Bonus_Ability[BS_Index2]
                      • Set BS_Use_Bonus[BS_Index3] = BS_Use_Bonus[BS_Index2]
                      • Set BS_Buff[BS_Index3] = BS_Buff[BS_Index2]
                      • Set BS_Buff_Duration[BS_Index3] = BS_Buff_Duration[BS_Index2]
                      • Set BS_Buff_Category[BS_Index3] = BS_Buff_Category[BS_Index2]
                      • Set BS_MaxStack[BS_Index3] = BS_MaxStack[BS_Index2]
                      • Set BS_Buff_Type[BS_Index3] = BS_Buff_Type[BS_Index2]
                      • Set BS_Permanent[BS_Index3] = BS_Permanent[BS_Index2]
                      • Set BS_MagicImmune[BS_Index3] = BS_MagicImmune[BS_Index2]
                      • Set BS_Index2 = (BS_Index2 - 1)
                      • Set BS_Event_Index = BS_Index3
                      • Set BS_Buffed_Event = 3.00
                      • Set BS_Buffed_Event = 0.00
                      • Set BS_Buff_Duration[BS_Index3] = BS_Buff_Duration[BS_Event_Index]
                    • Else - Actions
            • Else - Actions
              • Set BS_Event_Index = BS_Index2
              • Set BS_Buffed_Event = 1.00
              • Set BS_Buffed_Event = 0.00
              • Set BS_Buff_Duration[BS_Index2] = BS_Buff_Duration[BS_Event_Index]
              • For each (Integer BS_IntegerA) from 1 to 14, do (Actions)
                • Loop - Actions
                  • Player - Disable BS_Buff_Ability[BS_Index2] for (Player(BS_IntegerA))
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BS_Buff_Duration[BS_Index2] Greater than 0.00
                • Then - Actions
                  • Unit - Add BS_Buff_Ability[BS_Index2] to BS_Buffed_Unit[BS_Index2]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BS_Use_Bonus[BS_Index2] Equal to True
                    • Then - Actions
                      • Player - Disable BS_Bonus_Ability[BS_Index2] for (Owner of BS_Buffed_Unit[BS_Index2])
                      • Unit - Add BS_Bonus_Ability[BS_Index2] to BS_Buffed_Unit[BS_Index2]
                    • Else - Actions
                • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Buff Periodic <gen> is on) Not equal to True
            • Then - Actions
              • Trigger - Turn on Buff Periodic <gen>
            • Else - Actions
        • Else - Actions
  • Buff Periodic
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • For each (Integer BS_Index1) from 1 to BS_Index2, do (Actions)
        • Loop - Actions
          • Set BS_Recycle = False
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BS_Buff_Duration[BS_Index1] Greater than or equal to 0.05
              • (BS_Buffed_Unit[BS_Index1] is alive) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (BS_Buffed_Unit[BS_Index1] is Magic Immune) Equal to True
                  • BS_MagicImmune[BS_Index1] Equal to False
                • Then - Actions
                  • Set BS_Recycle = True
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • BS_Permanent[BS_Index1] Equal to False
                    • Then - Actions
                      • Set BS_Buff_Duration[BS_Index1] = (BS_Buff_Duration[BS_Index1] - 0.05)
                    • Else - Actions
            • Else - Actions
              • Set BS_Recycle = True
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • BS_Recycle Equal to True
            • Then - Actions
              • Set BS_Event_Index = BS_Index1
              • Set BS_Buffed_Event = 2.00
              • Set BS_Buffed_Event = 0.00
              • Unit - Remove BS_Buff_Ability[BS_Index1] from BS_Buffed_Unit[BS_Index1]
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BS_Use_Bonus[BS_Index1] Equal to True
                • Then - Actions
                  • Unit - Remove BS_Bonus_Ability[BS_Index1] from BS_Buffed_Unit[BS_Index1]
                • Else - Actions
              • Unit - Remove BS_Buff[BS_Index1] buff from BS_Buffed_Unit[BS_Index1]
              • Set BS_Buffing_Unit[BS_Index1] = BS_Buffing_Unit[BS_Index2]
              • Set BS_Buffed_Unit[BS_Index1] = BS_Buffed_Unit[BS_Index2]
              • Set BS_Buff_Ability[BS_Index1] = BS_Buff_Ability[BS_Index2]
              • Set BS_Bonus_Ability[BS_Index1] = BS_Bonus_Ability[BS_Index2]
              • Set BS_Use_Bonus[BS_Index1] = BS_Use_Bonus[BS_Index2]
              • Set BS_Buff[BS_Index1] = BS_Buff[BS_Index2]
              • Set BS_Buff_Duration[BS_Index1] = BS_Buff_Duration[BS_Index2]
              • Set BS_Buff_Category[BS_Index1] = BS_Buff_Category[BS_Index2]
              • Set BS_Stack[BS_Index1] = BS_Stack[BS_Index2]
              • Set BS_MaxStack[BS_Index1] = BS_MaxStack[BS_Index2]
              • Set BS_Buff_Type[BS_Index1] = BS_Buff_Type[BS_Index2]
              • Set BS_Permanent[BS_Index1] = BS_Permanent[BS_Index2]
              • Set BS_MagicImmune[BS_Index1] = BS_MagicImmune[BS_Index2]
              • Set BS_Index2 = (BS_Index2 - 1)
              • Set BS_Index1 = (BS_Index1 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BS_Index2 Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions


You will find the documentation inside the map.


Buff System 1.8
-Stun System plugin added
-Event system improved
-Now Buff System can be used as an indexer
-Debuff system efficiency improved slightly
-Faerie Fire reworked
-Dispell no longer dispells disarm effects
-Buff System now disables spell books for all players (not just for buffed unit owner)
-Some leaks fixed
-Documentation added
-Stuns on heroes now last 50% less

Buff System 1.7
-New spell added (Storm Bolt)
-New spell added (Disarm)
-Buffs now have category
-Normal buffs can now be integrated with the system
-Category Restrictions added
-Deadly buffs concept removed
-Preloading added
-Slow Circle duration increased to 6 seconds
-Bloodlust not working on magic immune units fixed
-Enchanted Shields leak fixed
-Colored hotkey is tooltips
-Enchanted Shields tooltip fixed
-Some tooltip fix
-Basic loading screen changed

Buff System 1.6
-New spell added (Avatar)
-Event added to check when a unit gets buffed
-Event added to check when a unit gets debuffed
-Event added to check when a unit gets rebuffed
-Dispell engine now have an option to remove deadly buffs too
-Dispell engine efficiency improved
-Spell Steal engine efficiency improved
-Bladestorm removed
-Archimode's Bloodlust transfered to Blademaster
-Magic immune bug fixed

Buff System 1.5
-Blademaster added (new hero)
-Bladestorm added (new spell)
-Soul Vitality (new spell)
-Incinerate (new spell)
-New option added buff type
-New option for permanent buffs added
-New option for buff stacking
-New option to make buffs work on magic immune units
-A slow circle added to test the magic immunity
-Buff owner will be registered in index
-On rebuffing all settings will be applied not only duration
-Efficiency on dispelling and spellstealing improved
-Buffs Initialization is no longer needed, removed
-Buff Check interval changed from 0.03 to 0.05
-Buffs cannot be applied on immune units
-Enchanted Shields armor effect decreased from 10 to 5
-Faerie Fire becomes deadly only at level 3
-Faerie Fire efficiency improved
-Renew no longer increase movement speed
-Bloodlust can be casted on magic immune units
-Recycling deadly buffs bug fixed
-Fixed minor bugs
-Some variable names changed
-Some grammar corrections

Buff System 1.4
-Efficiency increased
-Renew added (new spell)
-Deadly buffs option added
-Faerie Fire tooltip fixed
-Faerie Fire is now a deadly buff
-Visual effect for Dispell
-Visual effect for Spellsteal
-Bloodlust can now be casted on enemies to test Spell Steal
-Shadow Strike can now be casted on allys to test Dispell
-Faerie Fire can now be casted on allys to test a deadly buff
-Dispell can be now targeted to self
-Alchemist range increased from 200 to 300
-Map redesigned

Buff System 1.3
-Faerie Fire added to Buffs Initialization

Buff System 1.2
-Small indexing bug fixed

Buff System v1.1
-New spell added (Faerie Fire)
-Support to multi level abilites
-Debuff engine added
-Efficiency Improved

Buff System v1.0
-Dispell added (new spell)
-Spell Steal added (new spell)
-Bug Fixed


Note:
*This system is MUI ( multi unit instanceable)

Checkout my facebook page for more : OfficialNoobsmoke

Keywords:
Buff System Noobsmoke king_drift_alex noob_smoke
Contents

Buff System v1.8 (Map)

Reviews
Approved. Still, don't use an array index as the loop integer. Also generally in WC3, the buff icon starts to blink when the buff is about to end. That would require dummy casters though, and is not possbile with this system.

Moderator

M

Moderator

Maker, Buff System v1.4, 17th Oct 2011

Approved.

Still, don't use an array index as the loop integer.

Also generally in WC3, the buff icon starts to blink when the buff is about to end. That would require dummy casters though, and is not possbile with this system.
 
lol?
i really think this system can be useful!
I can't explain why right now since it's pretty complicated, but anyways:
Some spells can be triggered with the presence of a buff instead of a constant loop trigger ;) I'm talking specifically about passives.
well.. that wasn't complicated after all.
...
Anyways, good job!

One more thing, please post the triggers.
 
Level 12
Joined
Nov 20, 2007
Messages
660
lol?
i really think this system can be useful!
I can't explain why right now since it's pretty complicated, but anyways:
Some spells can be triggered with the presence of a buff instead of a constant loop trigger ;) I'm talking specifically about passives.
well.. that wasn't complicated after all.
...
Anyways, good job!

One more thing, please post the triggers.

belive me, i started a project and now i have to rework all spells from it becose it can't be done without this system :ogre_hurrhurr:
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
This is quite good I guess, not that I'm a fan of GUI buff systems as they require tons of object editor created stuff.

Why do you have the buff ability in a spellbook, it doesn't have an icon anyway? :p

The loop really shouldn't loop at 0.01. Much better with 0.03-0.04. And please, get a better recycling indexing like Hanky's dynamic indexing template.

This system bugs if a lvl 2 spell is casted and then a lvl 3 buff. The lvl 3 buff won't be applied.

Also preload the abilities. It has this lagg the first time abilities are added to a unit.
 
Level 12
Joined
Nov 20, 2007
Messages
660
This is quite good I guess, not that I'm a fan of GUI buff systems as they require tons of object editor created stuff.

Why do you have the buff ability in a spellbook, it doesn't have an icon anyway? :p

The loop really shouldn't loop at 0.01. Much better with 0.03-0.04. And please, get a better recycling indexing like Hanky's dynamic indexing template.

This system bugs if a lvl 2 spell is casted and then a lvl 3 buff. The lvl 3 buff won't be applied.

Also preload the abilities. It has this lagg the first time abilities are added to a unit.

1.i make it 0.01 to be standard (can be edited)
2.what's wrong with my recycling ? :ogre_haosis:
3.ill fix that
4.preload it's a little bit hard, becose if you have like 50 buffs :vw_death:
 
Level 12
Joined
Nov 20, 2007
Messages
660
1. No 0.01 sucks balls. 32 FPS is enough not 100.

2. The recycling won't recycle until all instances are gone. Until then if you cast 1 spell every sec and they last 2 seconds, the loop will grow yet only 2 instances will be on.

4. But it's needed, definitely. Fix it.

no, lol, my recycling is perfect :ogre_hurrhurr: it replaces the current position of index with the lastest position of the index and reduces index[2] with 1 (interchange it's the word for this i guess :grin:)
 
Level 13
Joined
Mar 16, 2008
Messages
941
The recycling is ok. There is only one bug with that sort of indexing.
Lets say you have 5 buffs present: 1, 2, 3, 4, 5.
Your BS_Index[1] is 1, buff ok. 2., buff ok. 3., buff over. Now you replace 3 with 5.
The old 5 is now 3 but you continue counting with 4. The old 5 will be skipped.
To avoid this just lower BS_Index[1] when you redeem an old buff.

However, 0.01 is realy way to short. 0.03-0.04 will do it.
Oh, and what about aura-delay? Dunno if units that have the aura themselves don't have the 0.2-0.25 second delay, but if yes: useless. If not: Usefull allthough the performance sucks due to GUI.
 
Level 10
Joined
Oct 29, 2010
Messages
16
The problem with this system is that self-buffing auras do not work on units with transformation abilities. For example, no hero with a transformation (Metamorphosis, Avatar, Chemical Rage) also has an aura for this very reason.

Auras also act differently when it comes to invulnerability and dispel mechanics, making it difficult to correspond with the behavior of real buffs.

It's not a bad system, but it is very limited due to game mechanics. You will get strange bugs in your map when relying on auras for individual buffs that you can only avoid by not using any other mechanic that would cause it.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
The problem with this system is that self-buffing auras do not work on units with transformation abilities. For example, no hero with a transformation (Metamorphosis, Avatar, Chemical Rage) also has an aura for this very reason.

Auras also act differently when it comes to invulnerability and dispel mechanics, making it difficult to correspond with the behavior of real buffs.

It's not a bad system, but it is very limited due to game mechanics. You will get strange bugs in your map when relying on auras for individual buffs that you can only avoid by not using any other mechanic that would cause it.

Avatar does not change the unit, thus it doesn't affect physical based auras.

And can you tell me, how does dispelling react over auras?
 
Level 12
Joined
Nov 20, 2007
Messages
660
The recycling is ok. There is only one bug with that sort of indexing.
Lets say you have 5 buffs present: 1, 2, 3, 4, 5.
Your BS_Index[1] is 1, buff ok. 2., buff ok. 3., buff over. Now you replace 3 with 5.
The old 5 is now 3 but you continue counting with 4. The old 5 will be skipped.
To avoid this just lower BS_Index[1] when you redeem an old buff.

However, 0.01 is realy way to short. 0.03-0.04 will do it.
Oh, and what about aura-delay? Dunno if units that have the aura themselves don't have the 0.2-0.25 second delay, but if yes: useless. If not: Usefull allthough the performance sucks due to GUI.

oh, thanks about the little bug.
 
Level 10
Joined
Oct 29, 2010
Messages
16
I never had that bug with self-buffing auras with transformable units so far... what happens when you add aura to them?
Units lose the abilities inside the spell book when they transform. You can run a test yourself. Make a spell book ability with an aura inside. Add the ability to the Demon Hunter in both of his forms, and run the map. When you activate Metamorphosis, the hero loses the aura shortly after. The only workaround is to re-add the spell book after the hero has finished casting the transformation with triggers.

Also, I have sometimes experienced auras affecting not the transformed hero but still the unit around the hero. I'd have to test more to clarify that bug specifically.

can you tell me, how does dispelling react over auras?
Let's say you add an aura-based ability to a unit that is Magic Immune or Invulnerable. The aura will never fail to apply the buff - real buffs will.

This also applies to item effects like Amulet of Spell Shield which will protect against magic debuffs like Cripple and Slow but not an added aura.
 
Level 22
Joined
Nov 14, 2008
Messages
3,256
Units lose the abilities inside the spell book when they transform. You can run a test yourself. Make a spell book ability with an aura inside. Add the ability to the Demon Hunter in both of his forms, and run the map. When you activate Metamorphosis, the hero loses the aura shortly after. The only workaround is to re-add the spell book after the hero has finished casting the transformation with triggers.

Also, I have sometimes experienced auras affecting not the transformed hero but still the unit around the hero. I'd have to test more to clarify that bug specifically.
.

Why use spellbook at all? Just add the ability, make it permanent then it will stay there even when the unit uses chaos ability or transforms. Make it non-permanent and remove the ability when you remove it.
 
Level 5
Joined
Feb 13, 2019
Messages
128
Quick question though, I've heard you don't want to make an object editor modified copy of a base Warcraft 3 Spell(Like let's say Firebolt) because if you have multiple spells with the same BaseID's you'd find that it will not work properly, you could get "mixed effects" So say one Firebolt is weaker and stuns for 2 seconds and does 50 dmg, but one stuns for 7 seconds and does 150 dmg, your weaker example might fire the 150dmg or longer stun, things like that. (So you make custom spells out of channel?)

If I make multiple buffs or just even just one buff, (the example says use Bloodlust) will the amounts of the effects from my buffs, debuffs, damage, etc. act as intended? Or will the ID's start conflicting with one another?
 
Level 42
Joined
Feb 27, 2007
Messages
5,322
I've heard you don't want to make an object editor modified copy of a base Warcraft 3 Spell(Like let's say Firebolt) because if you have multiple spells with the same BaseID's you'd find that it will not work properly, you could get "mixed effects" So say one Firebolt is weaker and stuns for 2 seconds and does 50 dmg, but one stuns for 7 seconds and does 150 dmg, your weaker example might fire the 150dmg or longer stun, things like that. (So you make custom spells out of channel?)
This is not at all true, there is no mixing up that can ever happen. The issue you’re thinking of is that if a unit has 2+ (non-passive) spells with the same base order, the unit will attempt to cast ALL of the shared id spells when any of them are cast. This is not permitted by the game engine so you get some unintended behavior of the spells not fully casting.

Buffs have nothing to do with this behavior. Make as many buffs as you want with this system.
 
Level 5
Joined
Feb 13, 2019
Messages
128
This is not at all true, there is no mixing up that can ever happen. The issue you’re thinking of is that if a unit has 2+ (non-passive) spells with the same base order, the unit will attempt to cast ALL of the shared id spells when any of them are cast. This is not permitted by the game engine so you get some unintended behavior of the spells not fully casting.

Buffs have nothing to do with this behavior. Make as many buffs as you want with this system.


Ahhhh, thanks once again my good man. :cool:2
 
Level 6
Joined
Oct 31, 2015
Messages
96
This system does not cover the transformation problem. When a unit is transformed (Bear Form, Burrow, ...) it loses all abilities which the unit does not possess by default. Even if the timers keep track of the buff duration, any effects and the buff display are lost since the spellbook abilities are not preplace in the given unit. I don't expect any updates on this particular system, but this is a relevant matter for any buff system based on adding abilities to transforming units.
 
Top