Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Dynamic VHP for multiple, spawned units
Dynamic VHP for multiple, spawned units
Dec 13 2009, 1:59 am
By: Jack
Pages: 1 2 3 >
 

Dec 13 2009, 1:59 am Jack Post #1

>be faceless void >mfw I have no face

[url=http://download896.mediafire.com/eyozi31x9gmg/nnhainjgmtm/dynamic_VHP0.3.scx
]Map Download[/url]

The idea is simple. What it does, is VHP for large amounts of enemy units. These units can be randomly spawned, preplaced, built, whatever. Pros and cons down the bottom. This is NOT VHP FOR ONE UNIT. It's for MANY. Each player has only one unit.(it can be done with more, but the more player-owned units, the more locations used)
Low(under 6) numbers of players are preferable, again, to save locations.

First, you have to decide what the most units that come within about 15x15 of the player unit. Let's say that you decide there will never be more than 20 by the hero.

Next, create a large location. It has to be the same size or similiar to the range of the player. For melee units, this system can work especially well. Make a trigger that Always centers the location on the hero.

Next, make 20 1x1pixel locations for each player.

Have a trigger detecting if there are at least 21 zealots( we'll use zealots as the enemy in this example) in the big hero location. If there is, there's a couple of things you can do. You can just remove it. You can move it back to where it spawned. Or, if you have spare locations, you can center a location on it, temporarily remove it, and move it back when there are 19 or less zealots in the hero location.

Now, the meat of the system. I use 2 computers, there may be a better way though. The big hero loc is named BigLoc. Each small loc is named l1, l2, etc. Replace lx with the respective number.

P1
Conditions
P8 brings at least one zealot to BigLoc.
P8 brings at most 0 zealots to lx

Actions:
Center lx on zealot owned by P8
Give zealot at lx to P7
Set Deaths of Cantina to 3

Trigger 2
P1
Conditions:
P1 has suffered 1 deaths of cantina.

Actions:
Center lx on zealot at lx
Preserve

Trigger 3
P7 brings 0 zealots to lx
P1 has suffered at least 1 deaths of cantina

Actions:
Subtract one deaths of Cantina
Create 1 zealot at lx
Center lx on zealot at lx
Preserve.

Copy twenty times per player, using different lx each time, and a different DC.

Not sure if i finished everything, but there's the basic idea. The Cantina to 3 deaths can be changed to whatever number of VHP you want the zealots to have.

[quote PROS]



- Works for large amounts of units


-Especially useful for zombie maps with large amounts of zombies, if you want an ammo system


-For the amount of units it works with, relatively few locations used


-Can have randomized VHP used easily[/quote]

[quote
CONS]
-Uses potentially large amounts of locations

-Requires two computers. There is a work around, which gets complicated if you want it to look nice. Ask if you need it.

-If a unit leaves the BigHeroLoc, the VHP for it is reset. It would be advisable NOT to use for boss units.

[/quote]

Post has been edited 7 time(s), last time on Apr 15 2010, 4:51 am by Jack.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 2:24 am ImagoDeo Post #2



I don't think that would work unless you have 20 different death counts, one for each zealot.



None.

Dec 13 2009, 2:29 am Jack Post #3

>be faceless void >mfw I have no face

That's the idea. It says by the end, copying with a different DC.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 3:26 am ImagoDeo Post #4



Oh, missed that.

Still, it's really DC-intensive. A seperate counter for EVERY SINGLE UNIT? Phew.



None.

Dec 13 2009, 5:06 am Jack Post #5

>be faceless void >mfw I have no face

20 DCs for each player. Not for every unit. The advantage of this system is that you can have a map with hundreds of enemies, and VHP for all of them, at least from the players perspective.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 5:19 am ImagoDeo Post #6



Aren't there only 228 units in the game? If so, you'd be limited to 228 death counters, and that still wouldn't work because NO map uses 0 units that can die. (Except Monopoly... I think...)

So you're naturally limited by the number of possible DCs.



None.

Dec 13 2009, 5:26 am Jack Post #7

>be faceless void >mfw I have no face

I believe there are quite a few more units, including unkillable ones. Each DC can be reused for each player, so p1 can have 20 deaths of Cantina at the same time that P2 has 38 deaths of Cantina. DC amount isn't a problem. There are other pros and cons, which I may write out later.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 5:41 am ImagoDeo Post #8



228 including the unplaceable/unused/crashing ones.

Multiplied by 8, that gives 1824 possible vHP units - so you're right, no problems there. The problem with this is when two players come into contact with one another; their DCs and vHP triggers will conflict, causing glitches.



None.

Dec 13 2009, 6:08 am Jack Post #9

>be faceless void >mfw I have no face

Yes, that's one of the cons. If 3 players attack a 3VHP unit, it won't die. It has to be hit 3 times by one player. Another con is that if the unit leaves and re-enters the large loc, its VHP is reset. Another is if too many units enter the location. A way around that is to have randomized VHP, so if the player kills the 21st unit, he thinks it randomized to 1VHP. Boss units would have their own VHP outside the system, so that if they get attacked and leave the loc, the player doesn't have to re-kill the boss's VHP.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 7:45 am scwizard Post #10



I don't understand how this functions as a VHP system.

Under what circumstances does a hero lose a HP point?



None.

Dec 13 2009, 7:49 am Jack Post #11

>be faceless void >mfw I have no face

Not VHP for the hero, VHP for the ENEMIES. Especially useful for zombie maps with ammo systems and large amounts of zombies.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 6:58 pm stickynote Post #12



Or you could just detect when the zombie dies and respawn it where t died than subtract a death count if you want it to have lives.



None.

Dec 13 2009, 7:13 pm xYoshix Post #13



...Or you can use harm detection.



None.

Dec 13 2009, 7:23 pm Jack Post #14

>be faceless void >mfw I have no face

Death detection is used in the system...

How would harm detection work for hundreds of enemies?



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 8:53 pm Kaias Post #15



Traditionally you build the concepts you theorize; it's called proof of concept. In any case, let me amend your PROS and CONS list for your current system.

PROS:
- variable and settable health for a bunch of units
- Spells can damage by killing units

CONS:
- Uses up a ridiculous amount of locations (21 per human player, in your example)
- Uses up 2 enemy computers
- Units that leave player ranges lose all damage taken
- Spells can only damage units within the player ranges
- The greater the player 'range' the more potential units that need to be tracked- the smaller the range, the less range spells have and the greater the likelihood of damage resetting
- There is no variable damage, it only detects a unit being killed not by whom or by what.
- vHP system is only for enemies
- Enemies can be team attacked too often for them to do anything (constant death and replace).
- Players are not attributed to their kills and hits; any sort of experience must be a shared team pool.
- Inefficient trigger and location usage
- Can only work on units that are too slow or made too slow to outrun a 1x1 pixel location (2x2 pixel is inherently flawed in that other units can easily steal locations, particularly with how many units you wish it to work for).

I should also note that this method of dealling with excess of 20 units in range is useless:
"Or, if you have spare locations, you can center a location on it, temporarily remove it, and move it back when there are 19 or less zealots in the hero location."
As you may as well us that location to track another enemy rather than pretend it isn't there.

In all, there really isn't any advantage to this system to traditional vHP systems. In fact, the only reason it should ever be used over regular SC fighting mechanics (actual health) is that it supports spells that hurt the units without physically attacking it (and even then it can only do as much damage as every other attack).

Conclusion: Stop spamming the shoutbox



None.

Dec 13 2009, 9:22 pm Jack Post #16

>be faceless void >mfw I have no face

Quote from Kaias
Traditionally you build the concepts you theorize; it's called proof of concept. In any case, let me amend your PROS and CONS list for your current system.

PROS:
- variable and settable health for a bunch of units
- Spells can damage by killing units

CONS:
- Uses up a ridiculous amount of locations (21 per human player, in your example)
For the amount of units that the VHP covers, a small amount.
Quote
- Uses up 2 enemy computers
As stated, there is a work around, involving a burrowed zling being moved underneath every couple of seconds. It's complicated, however, so I won't post it unless someone is going to use it.
Quote
- Units that leave player ranges lose all damage taken

- Spells can only damage units within the player ranges
- The greater the player 'range' the more potential units that need to be tracked- the smaller the range, the less range spells have and the greater the likelihood of damage resetting
All 3, true.
Quote
- There is no variable damage, it only detects a unit being killed not by whom or by what.
Assuming only one player hero, because each player has his own locations, it would be very easy to increase how much damage the hero does. Just add a check to see if the hero has a more powerful weapon. If so, subtract more than 1 VHP.
Quote
- vHP system is only for enemies
I felt no need to outline VHP for the heroes, as it's been done before.
Quote
- Enemies can be team attacked too often for them to do anything (constant death and replace).
Same as every other VHP.
Quote
- Players are not attributed to their kills and hits; any sort of experience must be a shared team pool.
Wrong. I'm not sure how you got that idea.
Quote
- Inefficient trigger and location usage
This is only a rough draft of the idea, cecil told me to post what I had so others could perhaps improve on the idea.
Quote
- Can only work on units that are too slow or made too slow to outrun a 1x1 pixel location (2x2 pixel is inherently flawed in that other units can easily steal locations, particularly with how many units you wish it to work for).
I haven't got access to Scmdraft for a while, so I haven't been able to test what location size is best. Probably inverted locations.
Quote
I should also note that this method of dealling with excess of 20 units in range is useless:
"Or, if you have spare locations, you can center a location on it, temporarily remove it, and move it back when there are 19 or less zealots in the hero location."
As you may as well us that location to track another enemy rather than pretend it isn't there.
Granted. I had an idea of just not having VHP for any excess units. The player would assume the one-shot kills were randomized VHP at 1.
Quote
In all, there really isn't any advantage to this system to traditional vHP systems. In fact, the only reason it should ever be used over regular SC fighting mechanics (actual health) is that it supports spells that hurt the units without physically attacking it (and even then it can only do as much damage as every other attack).

Conclusion: Stop spamming the shoutbox
I see several advantages. Do any other VHP systems work for hundreds of units?

Sorry for being overly excited about a new idea that could potentially help a lot of people make better maps, next time I just won't post. The last thing we need is new ideas...



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 10:14 pm Kaias Post #17



Quote from name:zany_001
Quote from Kaias
In all, there really isn't any advantage to this system to traditional vHP systems. In fact, the only reason it should ever be used over regular SC fighting mechanics (actual health) is that it supports spells that hurt the units without physically attacking it (and even then it can only do as much damage as every other attack).
I see several advantages. Do any other VHP systems work for hundreds of units?
Any that devotes as many locations

Quote from name:zany_001
Quote from Kaias
- Enemies can be team attacked too often for them to do anything (constant death and replace).
Same as every other VHP.
No, it is only that way for every vHP that involves killing the actual unit vHP is being done for.

Quote from name:zany_001
Quote from Kaias
- vHP system is only for enemies
I felt no need to outline VHP for the heroes, as it's been done before.
So has vHP for enemies. All the same, I am merely making a comprehensive list for the Pros and Cons

Quote from name:zany_001
Quote from Kaias
- Can only work on units that are too slow or made too slow to outrun a 1x1 pixel location (2x2 pixel is inherently flawed in that other units can easily steal locations, particularly with how many units you wish it to work for).
I haven't got access to Scmdraft for a while, so I haven't been able to test what location size is best. Probably inverted locations.
Think about it, if a 2x2 pixel location is able to reach what a 1x1 pixel can't, it is because where the 1x1 pixel would be just outside the unit's collision area where the 2x2 could reach inside. If the location would or could be outside the units collision area (because the unit is too fast) then it can be stolen by another unit. Using an inverted location only makes it so even fewer units are applicable.


Quote
Quote from name:zany_001
Quote from Kaias
- There is no variable damage, it only detects a unit being killed not by whom or by what.
Assuming only one player hero, because each player has his own locations, it would be very easy to increase how much damage the hero does. Just add a check to see if the hero has a more powerful weapon. If so, subtract more than 1 VHP.
Quote from name:zany_001
Quote from Kaias
- Players are not attributed to their kills and hits; any sort of experience must be a shared team pool.
Wrong. I'm not sure how you got that idea.
You haven't thought this through. When one of player 8's units enters one of the player's range locations, a location is placed on it for that player and the unit is given to player 7. Because that unit is now player 7's, it won't assign a location for any other of the other players (since it relies on it being player 8 to depict where to assign a location to it. Your method for detecting damage:

Trigger 3
P7 brings 0 zealots to lx
P1 has suffered at least 1 deaths of cantina

Actions:
Subtract one deaths of Cantina
Create 1 zealot at lx
Center lx on zealot at lx
Preserve.


Doesn't delineate who killed the zealot, only that it is dead. It doesn't matter if you have a 'stronger sword' if you can't tell that the 'strong sword' killed the unit.

Quote from name:zany_001
CONS
If several players attack the same unit, the unit won't die any faster than if only one player attacked it.
This is untrue.



None.

Dec 13 2009, 11:02 pm Jack Post #18

>be faceless void >mfw I have no face

Ah. I forgot about the 2nd computer. Hmm. My 1-computer method might solve some of those cons, I'll have to think a bit.

As for these other systems, what are they?



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Dec 13 2009, 11:12 pm CecilSunkure Post #19



Here's a quote from another post of mine describing a VHP system for multiple enemies and players:

Quote from CecilSunkure
Well if you know how to use binary countoffs and single switch randomization, you can rig up a pretty kick ass VHP system with ease.

You could first randomize the hit from one unit to another, and then depending on the amount of the DC that is landed on during randomization, you then divide the base amount of damage from a unit (which you decide the amount of via death counts) by a certain factor with a binary countoff. The resulting quotient could then be the amount of DC's (health) subtracted from the unit being attacked. You could have all this done within a single trigger cycle too. You can also reuse your binary countoffs for all players, to minimize triggering done by the mapper.

Here's an example:

Player 1 tries to hit a Weak Zombie.

Player 1 rolls an attack check with single switch randomization. Let's say the DC parameters for this role are between 0-100. Every increment of DCs (the amount of the increment decided on by the mapper) for this roll will represent a different quality of a successful hit, or even complete miss.

So this means that if the player rolls 0-9 deaths, the hit completely misses. If the player rolls from 10-49 deaths, his base attack amount will be divide by 20. If he rolls from 50-89 deaths, his base attack amount will be divide by 16. If he rolls from 90-100, then his base attack amount will be divided by 14.

Lets say Player 1's unit currently has a base attack damage of 100. He can now inflict either 0 damage (miss), 5 damage, 6 damage, or 7 damage.

You can set up more division amounts if you want, and you can change the base attack amount any way you want for any unit. You can also specify which units are applied to which type of divisions of base attacks.

Then just use a simple system for representing HP with DCs.

But.. If you want to have hordes of zombies, it will get a bit tedious representing VHP for multiple enemies at once. You could try using 1x1 pixel locations constantly being moved over enemies that spawn near the players to employ VHP. You could designate the zergling to represent hit points of a zombie (burrowed), and then cycle through and center locations onto the zerglings every trigger cycle, with use of two different computer types -this way you don't have to mess with giving the actual zombie to different computer players every trigger cycle in order to center locations. Once the locations are set, they should be moved to the zergling that they are currently over as to keep the same locations over their same zombies. From here, you can just have different groups of locations represent different types of zombies; locations 0-9 be weak zombies, 10-19 be normal zombies, 20-29 be strong, etc. Make sure these locations are 1x1 pixel width, so that the locations don't "jump" from one unit to another.

Maybe mix in a couple types of zombies that are always 1 hit kills (so you can have a hordish look to the amounts of enemies without bothering to apply VHP to these 1 hit kill zombies).

Lemme know if any of this was explained poorly.

I guess one could use inverted locations instead of 1x1, meh. Just make sure to have a lot of triggers for centering locations as to make sure that every single unit is updated every single trigger cycle.

Each location will also need to be coupled with a unique deathcount. This means you will need a countoff to transfer the DC of the damage being done into subtracting damage from each unit's DC. This will take about 10 triggers per unit type, more or less depending on how much damage you will have your maximum attack deal.

The downfalls of this is: 1 location for each unit with VHP; 2 computer slots taken up.

Pros of this: Any amount of damage can be done by any unit to any unit within a trigger cycle, and any unit can have any amount of HP, and even any amount of armour reducing percentages of damage.

However, if you just plan your map out accordingly, you can just use about 30-50 locations (and 30 different DCs) for all your enemy units. You can make some sort of nice spawning system, so that players only battle 1-10 enemies at a time.

I really wish my RPG was made with VHP, but I was too far into my map to employ VHP once I actually considered that route.

Not really sure if this is just a traditional usage of VHP or not, so I'm sorry if this has all been said before; this is just what I thought up on my own.

Post has been edited 1 time(s), last time on Dec 13 2009, 11:18 pm by CecilSunkure.



None.

Dec 13 2009, 11:17 pm Jack Post #20

>be faceless void >mfw I have no face

Cecil, except for the randomized damage dealt, that is pretty similiar to what I have, except you don't need a location for every unit on the map, just a location for every unit within range of the player. If you make the spawns right, you should never exceed the amount of locations used.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Options
Pages: 1 2 3 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:08 pm]
Oh_Man -- example of wat u mean?
[05:59 am]
NudeRaider -- *is
[05:17 am]
NudeRaider -- despite all its flaws the sound design its fantastic
[10:29 pm]
Oh_Man -- homeworld 3 = massive disappointment
[2024-5-14. : 10:05 am]
Moose -- ya
[2024-5-14. : 5:23 am]
zsnakezz -- yes
[2024-5-12. : 8:51 pm]
l)ark_ssj9kevin -- Are you excited for Homeworld 3?
[2024-5-12. : 8:44 pm]
l)ark_ssj9kevin -- Hi Brusilov
[2024-5-12. : 4:35 pm]
O)FaRTy1billion[MM] -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
my server that was hosting it died
[2024-5-10. : 8:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
Please log in to shout.


Members Online: 6camilac192wL4, 7harpere8891fM4