Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED]VHP
Report, edit, etc...Posted by V0lcom on 2006-09-13 at 01:30:01
Explain to me Virtual Hit Points,
it seems interesting and I am trying
many test maps at things I would like
to create for my first rpg. (I'm sick of ez to make
bounds and Defenses)
So I'm seeing if this would be of some interest to me.
Report, edit, etc...Posted by Sopris on 2006-09-13 at 02:14:52
Lol, you might have done so already but did you check this?

Tutorials-Virtual-Tux
Report, edit, etc...Posted by Zeratul_101 on 2006-09-13 at 02:22:13
*sigh* i need to save this so i can just copy and paste pinch.gif

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 HP

CONDITIONS

none

ACTIONS

modify unit hitpoints(%)

VHP

CONDITIONS

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
Report, edit, etc...Posted by V0lcom on 2006-09-13 at 02:53:56
But When I have one unit under my Jim Raynor(marine, invincible), do you have the ling be controlled by me or the computer?
Report, edit, etc...Posted by JordanN_3335 on 2006-09-13 at 16:57:33
QUOTE(V0lcom @ Sep 13 2006, 02:53 AM)
But When I have one unit under my Jim Raynor(marine, invincible), do you have the ling be controlled by me or the computer?
[right][snapback]559913[/snapback][/right]


Either works. closedeyes.gif I like using the computer so i doesnt unburrow.
Report, edit, etc...Posted by Zell.Dincht on 2006-09-13 at 17:09:38
QUOTE
MMA Forum Guidelines
1. Please, ALWAYS check the Tutorials Database before posting.
Report, edit, etc...Posted by V0lcom on 2006-09-13 at 19:15:52
QUOTE(Zell.Dincht @ Sep 13 2006, 02:09 PM)

[right][snapback]560086[/snapback][/right]

Sorry tux's vhp didn't help I knew how to do all of that.
I have the unit under the marine, but how can i get it so
that my marine doesn't move slower?
Report, edit, etc...Posted by Zeratul_101 on 2006-09-13 at 19:20:41
use these triggers.

***
player commands at least one burrowed unit

add one to Timer DC
preserve
***

***
player commands at least 1 hero
Timer DC is at least 3
player brings no burrowed unit to 'tracker(location following the 'hero')'

move 1 burrowed unit to 'tracker'
set timer DC to 0
***
Report, edit, etc...Posted by V0lcom on 2006-09-13 at 19:23:50
What is timer Dc sorry jw.
Report, edit, etc...Posted by dark_templar_99 on 2006-09-13 at 19:24:04
If you dont want your unit to move slow then do this:

CREATE 1 civilian at "centered location"
CENTER "centered location" on civilian"
Move ling to "centered location"
Remove all civilians
preserve trigger

the civilian will spawn next to the Main unit, then center the location that is centered on the main unit onto the civilian and move the unit under the civilian, which is now offset (not under the main unit). Then if you remove the civilian in the same trigger you will not even notice the civilian at all, and he will not get in the way either.

I just thought of a good V-HP system, that would allow you to detect damage without any units being killed at all.... I'll have to work on it a bit, but i think it would work.
Report, edit, etc...Posted by Zeratul_101 on 2006-09-13 at 19:27:58
QUOTE(V0lcom @ Sep 13 2006, 05:23 PM)
What is timer Dc sorry jw.
[right][snapback]560189[/snapback][/right]


its a death counter used as a timer. thats just the name i assigned to it.
Report, edit, etc...Posted by V0lcom on 2006-09-13 at 19:31:24
QUOTE(Zeratul_101 @ Sep 13 2006, 04:27 PM)
its a death counter used as a timer.  thats just the name i assigned to it.
[right][snapback]560196[/snapback][/right]

ok thank you

ADDITION:
QUOTE(dark_templar_99 @ Sep 13 2006, 04:23 PM)
If you dont want your unit to move slow then do this:

CREATE 1 civilian at "centered location"
CENTER "centered location" on civilian"
Move ling to "centered location"
Remove all civilians
preserve trigger

the civilian will spawn next to the Main unit, then center the location that is centered on the main unit onto the civilian and move the unit under the civilian, which is now offset (not under the main unit).  Then if you remove the civilian in the same trigger you will not even notice the civilian at all, and he will not get in the way either.

I just thought of a good V-HP system, that would allow you to detect damage without any units being killed at all....  I'll have to work on it a bit, but i think it would work.
[right][snapback]560190[/snapback][/right]


Lol you wouldn't want a civ spawning everytime you lose an hp lol.
Report, edit, etc...Posted by Urmom(U) on 2006-09-13 at 19:50:52
This is how I make it not slow the unit down.

Current Player brings exactly 0 unit to "Follow"
--------
Move Location "Follow" on unit owned by current player
move all vHP unit for comp to "Follow"
preserve
Report, edit, etc...Posted by V0lcom on 2006-09-13 at 20:01:13
QUOTE(Urmom(U) @ Sep 13 2006, 04:50 PM)
This is how I make it not slow the unit down.

Current Player brings exactly 0 unit to "Follow"
--------
Move Location "Follow" on unit owned by current player
move all vHP unit for comp to "Follow"
preserve
[right][snapback]560216[/snapback][/right]

That's what I was thinking thanks
that is a lot easier.
Thank you Everyone for you help it's really appreciated.
Next Page (1)