The Virus Buff v1.03

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
228981-albums7784-picture92959.png

DESCRIPTION

A deadly virus that cause forced adrenaline among those infected thus quickly spreading death to those nearby. The infected can quickly infect others in just seconds time. These virus can cause such destruction for a long duration but slightly weakens as it infects others. Whenever these infected dies, they have a chance to blow up and infect within an area of its point. Beware to those of the living...

Screenshots


228981-albums7784-picture92953.jpg


Triggers:

(Outdated)

  • FB Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Specify The Fire Buff (also change the buff of the FB_BuffSpell to FB_FireBuff in Object Editor) --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_Buff = Sick
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Specify the Fire Ability (for buff placement - you must base it on Cripple) --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_BuffSpell = Fire
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Specify the Fire's Attack/Damage Type --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_DamageType = Magic
      • Set FB_AttackType = Spells
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Specify the Dummy Unit Casting FB_BuffSpell --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_DummyUnit = Dummy1
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- [ M A I N A B I L I T Y ] --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_MainSpell = FB_MainSpell
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- [ C O N S T A N T S ] --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Infection Radius --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_CONSTANT_InfectRadius = 155.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- MinDuration per spread in seconds --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_CONSTANT_MinDuration = 3.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- MaxDamage per spread. Expressed in base value. --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_CONSTANT_MaxDamage = 75.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Infection Delay in seconds --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_CONSTANT_InfectDelay = 0.75
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Infected Chance To Explode On Death --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_ChanceToExplode = 100.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Infect Explosion Radius --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_ExplodeInfectRadius = 200.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Infection Damage/Duration per spread. Expressed in (%) --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_CONSTANT_Damage = 10.00
      • Set FB_CONSTANT_Duration = 10.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Virus Damage & Duration (Levels) --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set CFG_LevelDamage[1] = 4.00
      • Set CFG_LevelDamage[2] = 8.00
      • Set CFG_LevelDamage[3] = 12.00
      • Set CFG_LevelDamage[4] = 16.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set CFG_LevelDuration[1] = 15.00
      • Set CFG_LevelDuration[2] = 16.00
      • Set CFG_LevelDuration[3] = 17.00
      • Set CFG_LevelDuration[4] = 18.00
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • -------- Others (DO NOT TOUCH) --------
      • -------- ------------------------------------------------------------------------------------------------------------ --------
      • Set FB_CONSTANT_Damage = (FB_CONSTANT_Damage / 100.00)
      • Set FB_CONSTANT_Duration = (FB_CONSTANT_Duration / 100.00)
      • Set TempPoint = (Center of (Playable map area))
      • Unit - Create 1 FB_DummyUnit for Neutral Hostile at TempPoint facing Default building facing degrees
      • Set FB_DummyCaster = (Last created unit)
      • Unit - Add FB_BuffSpell to FB_DummyCaster
      • Custom script: call RemoveLocation(udg_TempPoint)
      • -------- ------------------------------------------------------------------------------------------------------------ --------
  • FB Call
    • Events
    • Conditions
    • Actions
      • Set FB_Integer1 = (FB_Integer1 + 1)
      • Set FB_Caster[FB_Integer1] = CFG_Caster
      • Set FB_Counter[FB_Integer1] = 0.00
      • Set FB_CurDur[FB_Integer1] = CFG_Duration
      • Set FB_Damage[FB_Integer1] = CFG_Damage
      • Set FB_Duration[FB_Integer1] = CFG_Duration
      • Set FB_Player[FB_Integer1] = (Owner of CFG_Target)
      • Set FB_Target[FB_Integer1] = CFG_Target
      • Unit - Order FB_DummyCaster to Undead Necromancer - Cripple FB_Target[FB_Integer1]
      • Animation - Change FB_Target[FB_Integer1]'s vertex coloring to (0.00%, 50.00%, 0.00%) with 0.00% transparency
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FB_Integer1 Equal to 1
        • Then - Actions
          • Trigger - Turn on FB Loop <gen>
        • Else - Actions
  • FB Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer FB_Integer2) from 1 to FB_Integer1, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • FB_Duration[FB_Integer2] Less than or equal to 0.00
                  • (FB_Target[FB_Integer2] has buff FB_Buff) Equal to False
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (FB_Target[FB_Integer2] is dead) Equal to True
                • Then - Actions
                  • Unit - Make FB_Target[FB_Integer2] Explode on death
                  • Set TempReal = (Random real number between 0.00 and 100.00)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • TempReal Less than or equal to FB_ChanceToExplode
                    • Then - Actions
                      • Set TempPoint = (Position of FB_Target[FB_Integer2])
                      • Set TempGroup = (Units within FB_ExplodeInfectRadius of TempPoint)
                      • Unit Group - Pick every unit in TempGroup and do (Actions)
                        • Loop - Actions
                          • Set TempUnit = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (TempUnit belongs to an ally of FB_Player[FB_Integer2]) Equal to True
                              • TempUnit Not equal to FB_Caster[FB_Integer2]
                              • TempUnit Not equal to FB_Target[FB_Integer2]
                              • (Unit-type of TempUnit) Not equal to FB_DummyUnit
                              • (TempUnit has buff FB_Buff) Not equal to True
                            • Then - Actions
                              • Set CFG_Caster = FB_Caster[FB_Integer2]
                              • Set CFG_Damage = (FB_Damage[FB_Integer2] + (FB_Damage[FB_Integer2] x FB_CONSTANT_Damage))
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CFG_Damage Greater than FB_CONSTANT_MaxDamage
                                • Then - Actions
                                  • Set CFG_Damage = FB_CONSTANT_MaxDamage
                                • Else - Actions
                              • Set CFG_Duration = (FB_CurDur[FB_Integer2] - (FB_CurDur[FB_Integer2] x FB_CONSTANT_Duration))
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CFG_Duration Less than FB_CONSTANT_MinDuration
                                • Then - Actions
                                  • Set CFG_Duration = FB_CONSTANT_MinDuration
                                • Else - Actions
                              • Set CFG_Target = TempUnit
                              • Trigger - Run FB Call <gen> (ignoring conditions)
                            • Else - Actions
                      • Custom script: call DestroyGroup(udg_TempGroup)
                      • Custom script: call RemoveLocation(udg_TempPoint)
                    • Else - Actions
                • Else - Actions
              • Unit - Make FB_Target[FB_Integer2] Die normally on death
              • Unit - Remove FB_Buff buff from FB_Target[FB_Integer2]
              • Animation - Change FB_Target[FB_Integer2]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
              • Set FB_Caster[FB_Integer2] = FB_Caster[FB_Integer1]
              • Set FB_CurDur[FB_Integer2] = FB_CurDur[FB_Integer1]
              • Set FB_Damage[FB_Integer2] = FB_Damage[FB_Integer1]
              • Set FB_Duration[FB_Integer2] = FB_Duration[FB_Integer1]
              • Set FB_Player[FB_Integer2] = FB_Player[FB_Integer1]
              • Set FB_Target[FB_Integer2] = FB_Target[FB_Integer1]
              • Set FB_Caster[FB_Integer1] = No unit
              • Set FB_Target[FB_Integer1] = No unit
              • Set FB_Integer1 = (FB_Integer1 - 1)
              • Set FB_Integer2 = (FB_Integer2 - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FB_Integer1 Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions
              • Unit - Cause FB_Caster[FB_Integer2] to damage FB_Target[FB_Integer2], dealing (FB_Damage[FB_Integer2] x 0.03) damage of attack type FB_AttackType and damage type FB_DamageType
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • FB_Counter[FB_Integer2] Greater than or equal to FB_CONSTANT_InfectDelay
                • Then - Actions
                  • Set TempPoint = (Position of FB_Target[FB_Integer2])
                  • Set TempGroup = (Units within FB_CONSTANT_InfectRadius of TempPoint)
                  • Custom script: set udg_TempGroup2 = CreateGroup()
                  • Unit Group - Pick every unit in TempGroup and do (Actions)
                    • Loop - Actions
                      • Set TempUnit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (TempUnit belongs to an ally of FB_Player[FB_Integer2]) Equal to True
                          • TempUnit Not equal to FB_Caster[FB_Integer2]
                          • TempUnit Not equal to FB_Target[FB_Integer2]
                          • (Unit-type of TempUnit) Not equal to FB_DummyUnit
                          • (TempUnit has buff FB_Buff) Not equal to True
                        • Then - Actions
                          • Unit Group - Add TempUnit to TempGroup2
                        • Else - Actions
                  • Set CFG_Caster = FB_Caster[FB_Integer2]
                  • Set CFG_Damage = (FB_Damage[FB_Integer2] + (FB_Damage[FB_Integer2] x FB_CONSTANT_Damage))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CFG_Damage Greater than FB_CONSTANT_MaxDamage
                    • Then - Actions
                      • Set CFG_Damage = FB_CONSTANT_MaxDamage
                    • Else - Actions
                  • Set CFG_Duration = (FB_CurDur[FB_Integer2] - (FB_CurDur[FB_Integer2] x FB_CONSTANT_Duration))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CFG_Duration Less than FB_CONSTANT_MinDuration
                    • Then - Actions
                      • Set CFG_Duration = FB_CONSTANT_MinDuration
                    • Else - Actions
                  • Set CFG_Target = (Random unit from TempGroup2)
                  • Trigger - Run FB Call <gen> (ignoring conditions)
                  • Set FB_Counter[FB_Integer2] = 0.00
                  • Custom script: call DestroyGroup(udg_TempGroup)
                  • Custom script: call DestroyGroup(udg_TempGroup2)
                  • Custom script: call RemoveLocation(udg_TempPoint)
                • Else - Actions
                  • Set FB_Counter[FB_Integer2] = (FB_Counter[FB_Integer2] + 0.03)
              • Set FB_Duration[FB_Integer2] = (FB_Duration[FB_Integer2] - 0.03)


Usage:

- Copy the Fire Buff folder and paste it in your Trigger Editor. Make sure to check "Automatically create unknown variables while pasting trigger data" if its enabled.​

Versions:


  • 1.00 - First release
  • 1.01 - Modified dummy caster. Changed to a global caster. Updated at the triggers. As mentioned by BPower.
  • 1.02 - Renamed spell to The Virus Buff to remove any sarcastic feedback. Cleaned up everything needs cleaning I guess. Added new features. Spell is still registered manually since its a buff now.
  • 1.03 - Fixed a lag issue when multiple infected units explode at the same time. Fixed explode effects firing on a dead unit.

"Always use the latest version."

At: http://www.hiveworkshop.com/forums/...bcfe45bd991588092b20252bd&dateline=1419428870

"Don't forget! Credits for use."


Keywords:
virus, disease, plague, sick, deadly, infect, dead
Contents

Incendiary Bottle (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 01:27, 17nd Feb 2015 IcemanBo: http://www.hiveworkshop.com/forums/spells-569/virus-buff-v1-02-a-260573/index2.html#post2654147 15:32, 2nd Feb 2015 IcemanBo...
Level 23
Joined
Mar 15, 2012
Messages
2,669
Please rename the spell title and everything linked to Ebola. It's a good "spell" but a bad concept.

Also take down that horrific image.

Agreed with the image because it needs a in-game screenshot there instead however it is just a name and well there is no reason to rename it.

Just reviewed the rules and as long as you remove that bad image and replace it with your spell in-game then its fine and acceptable.
 
Level 19
Joined
Jul 14, 2011
Messages
871
I dont understand why people have so much against a name. The plague killed much more people, yet it is better. The nukes killed much more people too, yet they arent hated on.

Other than the image - afaik, it is better to use 2 variables for indexing instead of one array.
 
Level 23
Joined
Mar 15, 2012
Messages
2,669
I dont understand why people have so much against a name. The plague killed much more people, yet it is better. The nukes killed much more people too, yet they arent hated on.

Other than the image - afaik, it is better to use 2 variables for indexing instead of one array.

Simple, time made them forget. They're people who have forgotten the real horrors.
 
Level 5
Joined
May 14, 2013
Messages
48
True, it is better to forget the past and move on to the future. Those horrors were the result of bad hygiene [mostly].

"That's the point, though almost all people don't realize that they are the once to blame for these things. The people who destroy Earth polluting every single resources it has. Thus making uncertain changes to everything we destroy. Its not Earth or nature to blame, its the intelligent ones who live in it."
 
Level 19
Joined
Mar 18, 2012
Messages
1,717
You have to check if the casted spell is plague.

I really don't like your indexing, I recommend to check out the tutorial about dynamic indexing in my signature.

2. Your configuration trigger posted in the description is incomplete.
--> You use a lot of variables in cast which are not specified in the config.

3. The conditional check for turning of the loop trigger should be found at the bottom, otherwise you will have an needless delay of 0.03

4. In the end we can discuss how to use only one dummy caster, instead of one per spell cast.

5. You shouldn't use hardcoded values i.e. 155. Please add them as variables to the spell configuration trigger.
 
Level 5
Joined
May 14, 2013
Messages
48
"nice"

Its nice that you notice some things rather unnoticed. Well the call depends on the GUI user whether he creates a trigger for the spell... I'll just add a sample starter call for the triggers since its more efficient because you use less variables... About creating dummy units I've decided to use your words and use only one dummy per caster (not per virus spread since that's the cause of the major lag when the virus spread). Great words. I'll update soon.

"And perhaps what I need is a good documentation format for things to really work efficiently."
______________________
PS: We want things our way, don't we? (So don't bother about my ways in implementing codes.)
 
Last edited:
Level 23
Joined
Mar 15, 2012
Messages
2,669
He's trying to help you, don't do it the best way then your spell will likely get rejected. More variables is better for your every day mapmaker, for us it might be easier. Also variables are faster then function calls. Example!: Triggering unit is a function call while set someunit = triggering unit is a variable which is even faster. For most stuff this doesn't matter, but speed matters now. Also of course need documentation.
 
Do not user integer array for indexing or looping.
It is not needed, and makes the code less readable.

The damage dealt is done by caster[index]. But you want
to continue the effect even when the caster is dead.
Seems like a logical mistake to me. Or check if caster is alive,
or use a dummy to deal damage. Else, please explain.

The damage dealt could be calculated once, onRegister. (damage*0.03)

Radius of infection could be variable. User could set it when register.

OwnerOfTarget may be indexed, too.

When you infect new units there is no need to check if unit is alive.
Units with buffs are always alive.

The check currently done to ensure the damage <= 2x damage_default is invalid.
Because it is actually not the real damage_default, but only the damage registered
by the instance that is currently operating.
User simply could register a MaxDamage instead, if the feature should stay in the system.

Make the plague delay configurable.
Make the attack type configurable.

You have to null all unit[maxIndex] variables onDeindex.
The check to turn off the loop should only be done onDeindex.

System is fair and simple to use. But some things have to be changed for now.
 
Level 16
Joined
Nov 18, 2012
Messages
1,430
Many people had died from the virus and u are still playing jokes with it ?
:goblin_wtf: Seriously? Worst comment. This is a spell for a game not real life...
I must say that it made me laugh when I saw Ebola on hero. :ogre_hurrhurr:
Now you need to improve the description of the spell...because I really didnt understand a word of it.
Pretty sure you don't need 4 triggers for this spell. 3 are enough.
 
Level 33
Joined
Apr 24, 2012
Messages
5,116
:goblin_wtf: Seriously? Worst comment. This is a spell for a game not real life...
I must say that it made me laugh when I saw Ebola on hero. :ogre_hurrhurr:
Now you need to improve the description of the spell...because I really didnt understand a word of it.
Pretty sure you don't need 4 triggers for this spell. 3 are enough.

Actually the spell was named Ebola Virus FYI
 
Is it "The Plague" or "The Virus Buff" or "Fire Buff"? I saw these three different names. :D

  • Explode effect should be configurable.
  • The exact definition of unit visuals should be configurable. (you change vertex color)
    • Custom script: set udg_TempGroup2 = CreateGroup()
    ^Why? It might already exist. (and certain that it exists after init.)
  • Why you infect only one random unit in range?
  • As said before, damage can be calculated once only.
  • The "Or - Multiple Conditions" block can be avoided.
  • No real variable is needed to check the explosion chance. You directly can use the expression in the comparisson.
    • -------- Infection Damage/Duration per spread. Expressed in (%) --------
    ^I don't think this comment is quite correct. User might get confused. (damage/duration constants in config part)
 
Level 5
Joined
May 14, 2013
Messages
48
Is it "The Plague" or "The Virus Buff" or "Fire Buff"? I saw these three different names. :D
Ok to be clear this spell is not really intended to be a virus buff in the first place. Before I really got the idea of a virus buff this spell was just a simple fire buff that spread & spread. Then I realized something more interesting than a simple fire buff and that is why it has the Fire Buff tag in it.

@UnitGroup2: ^Why? It might already exist. (and certain that it exists after init.)

No worries it is destroyed after its been used.

Why you infect only one random unit in range?

I changed it from area infection to single infection so that logical values can be more efficient because area infection per delay is inefficient and only spread let say 10 DPS from host then infect adds 10% damage is now 11 where in some cases doesn't reach the max damage.

As said before, damage can be calculated once only.

Well as I am using your method I didn't like the result, GUI reals only accept 2 decimal ends and when the resulting DPS with a (registered damage * 0.03) becomes somewhere below 0.00101 no damage is applied since I'm using another multiplier to register another damage on infect.

The "Or - Multiple Conditions" block can be avoided.

Which in particular?

Updated :D
 
Last edited:
Which in particular?
The very first in loop.:)

No worries it is destroyed after its been used.
But it does already exist after map initialization. GUI will automatically create a group.

You currently have 3 temporary unit groups, which you create/destroy.
You need only 1 temp group, and 1 static group.
The temp one can be used for creation like "PickEveryUnits....".
The static one can be used for evaluating your random target. You only
have to add units to this group, and then use the "Clear group" function afterwerds.
No need to create/destroy it each time. :)
 
Top