How to display multiple hitpoints?

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

How to display multiple hitpoints?

Veqryn
Administrator
There are two things I am thinking of trying to change in the engine, which I've wanted to do for around two years:

1. Multiple dice rolls for attacks
2. Multiple hitpoints for units


The first one is actually pretty easy in the grand scheme of things.  I just need to screw around with the ... 3 or 4 places in the engine where have strategic bombers rolling extra dice, and expand it to be any unit.  Create a few new unit attachments, game options, and tech options, and we are done.  Probably only 5-6 hours of work total.


The second looks like it will be incredibly difficult.  The reason is because of:
1. How we currently manage "multiple hitpoints" is that we have something called "isTwoHit", which we check and stuff.  This is a boolean, not an integer.  We could create an integer, but we will need to go into and through all the code in the entire engine, including all the AIs, and selection and matching code, all the battle calculation code, battles for normal, strat bombing, and other types, etc, and fix stuff.

2. There is no "check" for units dying.  Right now, being "hit" and "dying" are completely separate.  Case in point: when you strategic bomb a factory, and deal "x" damage to it, the damage is counted as a separate number in the unit's stats (call it unitProductionDamage or whatever).  Then, to make the engine show you the "_hit" image, the engine then causes the unit to take 1 hitpoint of damage (real combat damage).  As you know, the factory doesn't "die", even though the Factory has only 1 hitpoint, and you just dealt it 1 hitpoint of damage.  The "hitpoints" of a unit are purely cosmetic: they exist so that you see the "_hit" image of a damaged unit.  
The only time units die, is when we select them as casualties.  That is the only cause of death in TripleA.

3. All the graphics and display methods, like for example the "choose casualties" menu, are only made to show units with 1 or 2 hitpoints.
How do we show units with multiple hitpoints?


For example:
lets say I have to select who gets damaged, and I have 2 points of damage to distribute.
my units are:


1 cruiser (1 hp)
1 carrier (2 hp)
1 battleship (3 hp)
1 damaged battleship (2/3 hp)
1 very damaged battleship (1/3 hp)
1 bruised chuck norris (33/40 hp)


I need some original ideas for how to display this situation, all on the same screen.

thanks,
veqryn
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Ajmdemen
Maybe not original, but I would simply go for small dots. Red dots could represent hit points, white ones hit points absorbed (damage). Bigger number of hit points (10) could be represented by bigger dots.
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

eurofabio
In reply to this post by Veqryn
Ok, maybe you can try something like this:

1 cruiser (1 hp each) - total remaining 1 hp
1 carrier (2 hp each)  - total remaining 2 hp
3 battleship (3 hp each) - total remaining 6 hp (some units are damaged)
1 bruised chuck norris (40 hp each) - total remaining 33 hp (unit damaged)

( ) kill weaker units  ( ) distribute the damage

-----------------------------------------

Explanation:

I grouped the battleships because they are the same type of unit.

The user MUST choose between "kill weaker units" or "distribute the damage"

So if the user chooses "kill the weaker units" and choose put the two hits on the battleships, one will die and the second one will stay with 1 hit point. The third one will remain full.

However if he chooses "distribute the damage", all battleships will survive, since the first hit will be assigned to the full one. Now you have 2 battleships with 2 hp and one with 1 hp. Then the next hit will be assigned to one of the battheships with 2 hp. In the end you have:

2 battleships with 1 hp and the third one with 2 hp.
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

eurofabio
The bad think is this approach is that you can't choose hit that battleship with 2 hp as first to be hit.

And I just realized that some units could have transportable units loaded.

So, if I have 2 transports:

first_transp with 2 inf
sec_transp with 1 inf

it is very easy of course the sec_transp should be choose first

but if I have:

first_transp with 3 inf (total 9 PUs)
sec_transp with 1 armor + 1 inf (total 9 PUs)

Which one the engine must choose?

In this case we need another buttons like

(  ) save by number of units   (  ) save by expensive unit
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

eurofabio
Combining my ideas in a simple one:

1 cruiser (1 hp each) - total remaining 1 hp
1 carrier (2 hp each)  - total remaining 2 hp
3 battleship (3 hp each) - total remaining 6 hp (some units are damaged)
1 bruised chuck norris (40 hp each) - total remaining 33 hp (unit damaged)

Then when you click in "battleship", the program open another window just with the battleships, and in that screen you can choose which one will be hit.

If there is just one unit (like the chuck norris or the cruiser) there is no reason to open this screen, just give hits to the unit.

By the way, Chuck Norris, only 40 hp? This is madness!
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Rolf Larsson
In reply to this post by Veqryn
1. Multiple dice rolls is a cool feature, I am looking forward for it.

2. Hitpoints, a great feature, it should allow Triplea to have some Table Top maps. However the biggest problem here I guess is when a "normal" map is going to include this feature with more than 3 hitpoints. Let´s say someone thinks about an infantry division as a single unit, giving the one infantry just 100 HPs, how will the map look like when there are 10 divisions with different HPs, that makes 10 spaces in a territory, cause simply stacking is no longer possible, when they have different values. So I think this HP feature goes to 1 unit per tile tactical/tabletopstyle maps, but needs some more additional work to function properly. Would be great if this feature would come with repair some HPs by another unit, selectable in xml and it would be great if a damaged unit could be identified in the xml, to reduce attack/defense and other abilities for it like it is currently done for Carriers in Global. A milestone for Triplea, but very difficult to realize I guess.

I would simply use numbers to display the remaining HPs for a unit, a different color of course than the white one which is currently used to display the amount of units, red maybe or green. It should be ok to only display remaining HPs cause it is a map makers task to find a common base for the HP max of its units.
For normal maps, where I can only think of a few HPs it should be also fine to see a "2" or "3" on the unit, indicating that the unit has 2 or 3 HPs left. It would not interfere with the current system, cause a 2hit unit that has  been hit, has also 1 HP left.

How to select it? Well the current 2hit choice has this box with arrows, you can only select 1, why not allowing to have 2,3 etc selected there.
 
We now have custom dice!
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Veqryn
Administrator
For displaying it on the map, I would suggest the following way:

No more than 2 stacks per unit type: undamaged, and damaged.

A number in the top corner can show the "most damaged" unit's damage.  (Similar to how damaged factories is done, but the other corner)

If the user wants a more detailed breakdown, they can switch to the territory tab.  That tab will show each unit with different amounts of damage.



I'm still out on how to show the casualty selection view.  I don't really like anything suggested so far.

I should be able to pick any unit, and give it any amount of damage.  Anything short of that, does not accomplish what we need to accomplish.  And, it needs to be done in a simple view, that way a stack of 100 units is still easy to read and see in the casualty window.

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

RODTHEGOD
This post was updated on .
Why re-invent the wheel?

There are lots of strategy games out there and they almost all have the same visual representation of hit points. A little green bar that slowly reduces to 0 and changes color to yellow then red as it approaches death. Though I would recommend using all the ROYGBIV colors for a reason I'll get to in a bit. Maybe we should be able to define the colors

How to display it? I'd say leave them all under one stack but when you move your curser over it, it displays a number (the number of units at that health) next to a health bar and then in decreasing value show all the different health bars within that stack
so say you have 5 3-hit battleships;

2 were at 3 HP
1 was at 2 HP
2 were at 1 HP

You move your curser over the stack of 5 battleships and you see, right under the battleship, a 2 next to a full green bar over a 1 next to a 2/3rds full yellow bar and finally another 2 next to a 1/3rd full red bar.


"specied" is supposed to say "specified"

Without the curser, you see the total # of units of that type along with the sum of all the units HP
So a full green bar would mean all the units were at full health.

In this case there is a total of 10/15 hp in the stack so I decided yellow at the 2/3rds mark

EDIT: Just an idea perhaps on stacks, a blue bar means the stack is at 100% health



When it comes to the stats, I think you should try to include as much stuff as possible.

In terms of regeneration,
-what is needed to repair a unit
ex: money, other units presence, unit sacrifice or unit hit point sacrifice, can't repair, automatic repair
-the rate at which it can be repaired:
ex: 1 hp a turn, 2 hp a turn, 3 hp a turn...
-consequences for having certain levels of hp:
ex: a 3-hit battleship has full stats at max hp,
loses some attack and defense at 2 hp and
looses more attack and defense + some movement and its bombard ability at 1 hp
-negative regeneration,
ex1: a unit that dies after a certain amount of turns (that can be repaired?),
ex2: a 5 hit battleship that can repair itself (without cost) at 4 hp
Needs money or whatever to repair it from 2-3 hp
And dies at the end of its turn if it’s at 1 hp
-different kinds of hit points
ex1: shields that regenerate for free and can be bypassed by certian things
ex2: a timed life bar that is seperate from the hp bar because it can't be attacked
-units that regenerate hp by killing other units or being in that battle when their units die
ex: zombies
-units that give more or less hp to allied or enemy units in the battle
ex: a death star that makes everything else really small

Umm that's everything I can think of at the moment.
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Veqryn
Administrator
This post was updated on .
Rod, I like the idea.  However, it would only work for the main map screen.

We are still lost on how to allow users to select casualties and distribute damage.


For example,

How can I distribute 3 damage to one cruiser with 3/3 hp, and 1 damage to the 2/3 cruiser, and 1 damage to one 1/3 cruiser?
(and this menu/method would also work well for a stack of 100 different units, all of varying damage)

That is the main sticking point.

Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

RODTHEGOD
Wait I'm a little confused. Are you looking for a something visual for when you're select casualties?
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

eurofabio
He is looking for both:

- how the units will be represented in the map

- how the units will be selected when hit
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Zim Xero
This post was updated on .
In reply to this post by Veqryn
how about using the existing screen for casualty selection... and just make multi hit units appear at bottom of the list as if they were a regular unit.  Illustrate the hp remaining for each of these units.  The player will be allowed to select this many of  each unit as casualties.


In the example above, the axe guy has 3hp remaining (instead of being 3 units).  The only change is that it should be listed as x1 attackers.  It would be nice to have a 2-hit unit symbol in the second column to make it clear that it is a 'multi'.... with the 2nd one representing the final hp.
'thats the way it is' makes it neither desireable nor inevitable
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

RODTHEGOD
In reply to this post by Veqryn
Ah ok I get you now.

Why not just do something like this:


Where you just select the Hit and then the unit just moves down kind of thing
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

RogerCooper
In reply to this post by Veqryn
Veqryn wrote
We are still lost on how to allow users to select casualties and distribute damage.
In games where hit points are used, the player usually has little or no control over what unit gets the damage. That may be the solution to the problem. Methods I have seen used are

1. Most remaining HP (most block games use this)
2. Cheapest unit (which is what people usually do in A&A)
3. Best defender (as the Civ games)
4. Randomly

If most units have multiple HP, the game would have a very different feel, more like an area movement version of Civ. That is not a bad thing, but other issues will need to be dealt with such as upkeep, regeneration, replacements & limited combat rounds.

I suggest not showing HP detail on the map screen, but allow right-clicking to bring up an information screen.
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

hepster
RogerCooper wrote
I suggest not showing HP detail on the map screen, but allow right-clicking to bring up an information screen.
I agree with this last point.  I'd probably only have it displayed if you use something like the Territory view, so that the detail info only gets displayed on the right panel when you cursor over any given Territory.
“A man can never have too much red wine, too many books, or too much ammunition”― Rudyard Kipling
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Edwin van der Wal
Hi Veq, this is very interesting, is this still on the radar / in development?
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Veqryn
Administrator
it might be relatively easy to do behind the scenes

most of the work would be on getting rid of all the "isTwoHitpoint" code

however, I've abandoned all work on this because i can't think of a good way to display this stuff for the user
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Edwin van der Wal
Well you could for now leave it up to the map designer... at least it is easy for us to implement and is extendable.. also the way to display hits is different for each type of map, for example in a A&A type game you probably want burning tank, burning a LOT and not burning at all... in an RPG type game you probably want 8/10 hits or a red bar that shows the damage in a blockwargame you probably want to use dots or facing... in a hex&diecut type of game you probably want to be able to "flip" the counter upside down so there is a organized form and disorganized form.

So have the map designer include:

Battleship_10.png, Battleship_9.png ... Battleship_1.png.. and default to Battleship.png if there is no Battleship_{currentHitpoints}.png available. (gets kind of tricky when you have units up to 100 hitpoints)

I have another few systems question though...

1) most Wargame systems and some RPG systems that work with multiple hitpoints will want the current_hits affect performance. (a damaged panzer can only defend and only @ half strength) a blocktype unit will have 4,3,2 or 1 which will affect its combat powers.

2) You should be able to optionally bomb hitpoints away... but also you should be able to do multiple hitpoints damage and also be able to control the amount of rounds you can fight in 1 combat.
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Veqryn
Administrator
exactly, it is too much work
Please contribute to the TripleA 2013 donation drive:
http://tripleadev.1671093.n2.nabble.com/2013-TripleA-Donation-Drive-tp7583455.html
Reply | Threaded
Open this post in threaded view
|

Re: How to display multiple hitpoints?

Rolf Larsson
So this is not going to happen soon? Sad thing, cause it would allow for a whole new section of maps much easier, tactical and tabletop like.
Making one image for every unit and hit seems insane, just one folder, lets say hitpoints, with all the required images. Bars or numbers and colours could then be customized, just like the current dice folder.
Every time it needs to be displayed, the image is placed upon the unitimage, selecting casualties just like buying a number of units with the box and arrows up and down...
For the effect it has on units, I don´t think it is very complicated, really just a lot of work, with some tricky things to be considered I am sure.

Example with 10 hitpoints:

Unit attachement:
                         <option name="movement" value="1"/>
                         <option name="transportCost" value="2"/>
                         <option name="attack" value="10"/>
                         <option name="defense" value="20"/>
                         <option name="artillerySupportable" value="true"/>
                         ...
                         <option name=maxhitpoints" value="10"/>
                         <option name="Hitpointeffects" value="true"/>
                         <option name="HitpointAttackEffectRange1" value="-1" count="9-7"/>
                         <option name="HitpointDefenseEffectRange1" value="-2" count="9-7"/>
                         <option name="HitpointAttackEffectRange2" value="-4" count="7-4"/>
                         <option name="HitpointDefenseEffectRange2" value="-8" count="7-4"/>
                         ...
We now have custom dice!
12