*sigh* i need to save this so i can just copy and paste
Virtual Hit Points(VHP) is a method of tracking HP through virtual data(such as death counters) as opposed to the unit HP bar. This virtual data(which is usually stored in death counters - which i'll be referring to it as from now on) has much more versatility due to many more related trigger conditions/actions. As a note, the primary unit(which will have VHP) will always be invincible.
This is a list of how triggers function with standard unit HP and VHP:
Standard HPCONDITIONS
none
ACTIONS
modify unit hitpoints(%)
VHPCONDITIONS
deaths
ACTION
set deaths
modify unit hitpoints(%)
As you can see, VHP has more trigger functions, albeit still not very many but enough for their purpose. Death related trigger functions are for the virtual aspect of the map to perform arithmetic calculations(adding, subtracting, etc) while 'modify unit hitpoints' is used to express the final value of these calculations.
Mathematical calculations are impossible using only standard HP. As you can see from the listing above, standard HP has no method for detecting HP and has no calculation actions(excluding an output action - 'modify unit hitpoints').
Above was a comparison between VHP and standard HP and a brief look at the mathematical functions/properties of VHP. Next is a look into how values can be inputted into the 'system.' From this point on, VHP divides into two branches - Unit-Based(AKA Semi) VHP and Total VHP.
TVHP is a
highly specialized form of VHP which can be frustrating to use and understand. In addition, it can result in a very different style of gameplay(usually much slower and 'calmer'). On the plus side, it allows the mapmaker to 'modify' some of the hard-coded values, such as attack range and rate. Although it can be quite a powerful system to use, I don't recommend it to anyone not experienced with both VHP and mapmaking in general.
The much simpler and more popular branch of VHP is UBVHP, which I will refer to simply as VHP unless mentioned otherwise. VHP utilizes a secondary unit(SU), which serves as a 'damage soaker' for the primary unit(PU), which is invincible, and also as a method of input. The SU will be moved(recentered) onto the PU as necessary. Enemies will attack the SU instead of the PU because the latter is invincible and cannot be attacked. The SU is usually a burrowed unit - I'll use a zergling for this tutorial - although it can be any air unit as well. The SU could be a normal, ground level unit, although it would interfere with movement. Also, the SU is usually a one-hit killed unit.
The 'industry standard' is a 1 HP burrowed zergling. Whenever the Zergling is killed, it represents 1% damage to the PU. Upon the death of a Zergling, one 'death' is subtracted from a death counter(DC) - starting with 100 deaths. The deaths can be translated into unit HP at any time, usually immediately. Also, a new Zergling is created and made to follow the PU.
This is an example of an 'input' and some 'output' triggers:
P1 is the owner of the PU(marine)
P2 is the owner of the Zergling
'PU tracker' is the location following the PU
Trigger |
Description: |
Input trigger |
|
Conditions: |
¤ P2 commands at most 0 Zerglings |
Actions: |
¤ Preserve trigger
|
¤ create 1 zergling at 'PU tracker' for player 2. Apply properties(burrowed)
|
¤ modify death counts for P1: subtract 1 death for Zerglings |
Trigger |
Description: |
Output trigger after 1 attack |
|
Conditions: |
¤ P1 has suffered as exactly 99 deaths of Zerglings |
Actions: |
¤ Preserve trigger
|
¤ set hit points for 1 Marine owned by P1 at 'PU tracker' to 99% |
Trigger |
Description: |
Output trigger after 2 attacks |
|
Conditions: |
¤ P1 has suffered as exactly 98 deaths of Zerglings |
Actions: |
¤ Preserve trigger
|
¤ set hit points for 1 Marine owned by P1 at 'PU tracker' to 98% |
Now, lets review in point form, what you need for VHP to work:
-an invincible PU
-a vincible SU(preferably a burrowed unit)
-an 'input' trigger which detects the death of a zergling
-'output' triggers to modify the PU's unit HP
The principle of VHP is that you can detect when a unit has died, but not when it has been hit. So, logically, you would need for a unit to die. It can't be the PU(because it can't attack back if its already dead), so you'll need another unit to be the target. Once the unit is dead, the 'knowledge' of its death can be used in conjunction with 'modify unit hit points' for advanced HP manipulation.
*more to come* - time to go mapmaking