# Stacked spaceships and shields

This topic is 2079 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

A HoM&M style combat but with spaceships.

One stack fire at another, total damage 50, enemy stack HP reduced by 50. Trivial.
But how to incorporate shields? In non stacked it's easy, first all shield points have to be down, then hull structure takes damage. But with a stack of 1000 spaceships it would make no sense...

For example, one ship has 100 HP and 50 shields. There is a stack of 1000 of such ships.
If we sum up all the shields and prohibit any damage until shield is down it would make it progressively invulnerable to make huge stacks (with 1000 ships it would mean 50000 shield points to be taken down before any casualities (and decrease of offensive capabilities) take place. Construction of huge stacks of high shield low HP fleets would be the only reasonable strategy.

##### Share on other sites
off the top of my head turn the shield value in to percentages example enemy ship has 100 hp and 100% shields you fire for 50 damage enemy ship now has 100 hp and 50% shields you fire again for 50 enemy ship now has 75 life and 0% shields ect..
have the shields have a time regeneration period where so much of the percentage comes back ( which also opens a feature for customizing ships if you wanted)

##### Share on other sites

off the top of my head turn the shield value in to percentages example enemy ship has 100 hp and 100% shields you fire for 50 damage enemy ship now has 100 hp and 50% shields you fire again for 50 enemy ship now has 75 life and 0% shields ect..
have the shields have a time regeneration period where so much of the percentage comes back ( which also opens a feature for customizing ships if you wanted)
Don't forget the stacks. You don't fire at a single ship, you fire at the whole stack. There are 1000 ships with 100 HP and X shields each (so total HP of the stack is 10,000 and shields 1000*X). Why one shot of a mere 50 damage would reduce the shields of 1000 ships by 50%?

##### Share on other sites
Simulate them individually. Computers can do that easily these days. Also, this will prevent an anti capital ship weapon dealing 1000 damage to destroy 5 smaller ships at once. If you want to save on resources, you could limit the number of targets to 100 per stack. When a ship fires at a stack, it randomly targets one of the active ships. If it kills that ship, another ship from the stack is promoted if there are more than 100 ships in the stack. It will create a result closer to what a player might expect.

##### Share on other sites

Simulate them individually.
Impossible, I need it for a MMO, so it would kill the server; plus it is basicly impossible to convey in the interface (showing this stack as individual things); plus confusing to the player (a stack is a stack, the player expects it to behave like a stack); and above all it is "stupid work" because I would be coding something the player won't see nor notice 99% of the time
Simulating them individually is soooo much work and added complexity for so tiny gain of fun that I would rather abandon the whole shields idea than implement it

I was thinking along the lines: each hit deals 50% of damage to HP and 50% to shields, if there are no shields all damage is done directly to HP, when enough HP is lost a ship is destroyed (HoM&M style) regardless of remaining shield (but what happens to "leftovers of shields", the portion of what the ship would have left is removed as the ship dies?) Would it work? Or something similar maybe?

##### Share on other sites
Maybe it would help if you break down in general terms what HP, Shields and Stacks are representing (and maybe you've already done this).

In these types of games, Stacks & HP can be thought of as just plain hit points in a typical RPG, with the additional component of tiers of degraded combat performance. What I mean is that, for example, if you have 5 ships each having 2 HP, you have a total of 10 HP stack. Each time 2 Damage is taken, the stack degrades in capabilities (usually damage output) by 1/5.

What do you want shields to represent? Free HP without degradation tiers (which is what is sounds like from your first post)? Note that percentages (or penalties to attack chance) boil down to basically the same thing - adding HPs. A free HP pool like this would be powerful, you will need to balance shields with a cost. Some examples:

Diminishing returns - as stacks get larger, added shield HP per ship decreases
Restriction to movement, or disallow movement altogether when shields are up
Cost/power requirements, or requries other resources that are present in the game
Damage penalty when shields are up Edited by laztrezort

##### Share on other sites
Why don't you just introduce an artillery weapon to the game, which instead of a fixed amount of damage gives a small amount of damage per unit in the stack? This weapon would be weak against small stacks, strong against large stacks, and the only thing that can take out very large stacks of shielded ships. Edited by Wiggin

##### Share on other sites

What do you want shields to represent?
Good question. I want shields because spaceships are supposed to have shields and shields are cool and everyone like shields and you can make decisions if you want to build ships that have shields or that have something else instead That's my premise, I don't need it for any mechanics purpose (could do with HP alone well enough). As long as shields have something to do with reducing damage the ship takes and it is intuitive to the player I'm fine with it.

##### Share on other sites
Another avenue to consider would be having different Defenses, which are matched against different types of Weapons to determine damage effectiveness. As an off the top of my head example, you could have something like:

Armor - standard defense, average protection against most weapons
Deflection Shields - good vs. ballistics & missles, bad vs. beam & lasers
Energy Shields - good vs. beams & lasers, bad vs. ballistics & missles

You could potentially expand on that, for example having "tuned" shields which are effective only against certain types of energy weapons, or fast speedy ships gaining a bonus due to ability to dodge ballistic or missles. For some more examples, either look at some table-top space RPGs, or games like Gratuitous Space Battles.

You often see something like this in fantasy RPGs, where certain elemental attacks are more effective vs. certain enemies, or certain weapons are more effective vs. certain armor types.

A well-balanced scheme like this can add some strategy to army design, and will ensure that no defense is overpowered against all enemy types.

##### Share on other sites
When I said to simulate them individually, I meant within the stack. You still target the stack, but damage is done to a particular ship in the stack. It will behave differently than if you grouped them and killed as if a single ship was targeted all the time, so it's not wasted effort. Instead of linearly losing strength, the stack will fight at near full strength until it reaches very low HP, at which point its power will decrease sharply.

##### Share on other sites
I think it depends how the enemy targets the ships.

If IQ=1, the enemy attacks 1 ship at a time and thus it first takes shield, then hp and then repeats. (assuming 1 ship type per stack)

If IQ=0, the enemy attacks all at the same time and thus takes all shield first, then hp.

IQ=0.5 would take half shield first, then half hp.

Then have multiple stacks, and in the same way decide how the enemy attacks or how the stack behaves. Or something like that.

##### Share on other sites
To clarify, that's how stacked combat looks like:

(there is some icon/picture of a unit and the number of units in a stack, detailed info (like remaining HP, attack) only when you click on a unit)

##### Share on other sites
More details needed? It depends on how you're doing the calculations.

Ship: 100 hp.
Stack: 1,000 ships.

If you do 500 damage to this stack, I assume the stack will lose 5 ships?

Ship: 100 hp, 50 shields.
Stack: 1,000 ships.

If you do 500 damage to this stack, you will lose 1 ship for each 150 damage. 50 damage to punch through the shields, then 100 hp to destroy the ship. So 500 damage causes the stack to lose 3 ships.

##### Share on other sites

More details needed? It depends on how you're doing the calculations.

Ship: 100 hp.
Stack: 1,000 ships.

If you do 500 damage to this stack, I assume the stack will lose 5 ships?

Ship: 100 hp, 50 shields.
Stack: 1,000 ships.

If you do 500 damage to this stack, you will lose 1 ship for each 150 damage. 50 damage to punch through the shields, then 100 hp to destroy the ship. So 500 damage causes the stack to lose 3 ships.

Wrong, because it depends on how the stack is attacked. You can attack either all ships at once (which acts like it was a single unit with huge shield), or 1 at a time, which is the most efficient way to take down units (but if the units get weaker at low hp it gets more complex. It might make sense to first attack 1 at a time to take down shields, then attack all at once to weaken them quickly)

You need some variables for this behaviour. (attack all at once or 1 at a time)

You might also want separate variables for shield and hp (attack 1 at a time to take down shield, then attack all at once)

0.5 for the variable(s) would mean, lets say, put half of the damage to all enemy units, and other half to a single unit.

##### Share on other sites

Wrong, because it depends on how the stack is attacked. You can attack either all ships at once (which acts like it was a single unit with huge shield), or 1 at a time, which is the most efficient way to take down units (but if the units get weaker at low hp it gets more complex. It might make sense to first attack 1 at a time to take down shields, then attack all at once to weaken them quickly)

How do you know this is what Acharis intended? His description was "One stack fire at another, total damage 50, enemy stack HP reduced by 50. Trivial." It doesn't have the an option to attack all at once or 1 at a time.

##### Share on other sites

More details needed? It depends on how you're doing the calculations.

Ship: 100 hp.
Stack: 1,000 ships.

If you do 500 damage to this stack, I assume the stack will lose 5 ships?
Exactly. Just as in HoM&M. Players are accustomed to it already and it would be to confusing to change that part.

Ship: 100 hp, 50 shields.
Stack: 1,000 ships.

If you do 500 damage to this stack, you will lose 1 ship for each 150 damage. 50 damage to punch through the shields, then 100 hp to destroy the ship. So 500 damage causes the stack to lose 3 ships.
That's the whole problem... If I deal damage first to single ship's shields then to its hp then there is no difference between hp and shields at all (could just do resistance=hp+shields). In 1 vs 1 battle shields make sense because these regenerate, but with stack vs stack it is almost irrelevant since the whole stack deals so huge damage that it always assure taking down at least one ship, so that ship can't regenerate.

That's exactly the problem I don't know how to solve Edited by Acharis

##### Share on other sites

That's the whole problem... If I deal damage first to single ship's shields then to its hp then there is no difference between hp and shields at all (could just do resistance=hp+shields). In 1 vs 1 battle shields make sense because these regenerate, but with stack vs stack it is almost irrelevant since the whole stack deals so huge damage that it always assure taking down at least one ship, so that ship can't regenerate.

That's exactly the problem I don't know how to solve

Ah, its much clearer now. Thanks. I guess it boils down to what kind of gameplay you are trying to produce with shields. I suppose if you are trying to allow a "hit and run before shields run out, take no permanent damage" kind of tactic, making shields very very small compared to hp might be a solution.

Ship: 100 hp 5 shield point
Stack: 1,000 ships

A stack gets as many shields as the sum of it's units shield points. So, this stack gets 5,000 shields. This seems reasonable since a 5,000 damage attack will only kill 50 ships without shields.

Then, adjust the shield point number according to how massable the units are. Cheap low tier units that comes in high stack sizes should have very little shield point. While expensive high tier units that comes in low stack sizes would need higher shield point.

Alternatively...

Ship: 100 hp 5% shields
Stack: 1,000 ships

This stack will have 5% of its total hp as shields (5,000 shields). Essentially giving it 50 extra ships in shields.

Hope these helped. Edited by Legendre

##### Share on other sites
The issue is you treat shields like a second form of HP. You should give another property to shields that would allow it to function properly for stacked units. There are a bunch of ways to treat shields depending on how complex the combat simulation is. On the simple side, they could act as damage absorbtion like in MOO1. On the complex side, they could absorb damage by a percentage/flat value scaling to the current shield/max shield value of the stack.

##### Share on other sites
Shields can be health that recharges (slowly, and only outside of combat), but damage dealt is distributed between the shield and the HP. (10 damage dealt = 5 to hp, 5 to shield). This way, shields aren't a perfect buffer against damage, but only a partial buffer.

Another alternative is giving shields a strong but non-linear benefit.
That is, shields completely block a percentage of the damage dealt, but the stacking of shields reducing the individual unit's shield benefit the more shields are present.

For units with 100 hp and 5% shield: 1 units: 100 hp, 5% shield (5 / 1 = +5%) 2 units: 200 hp, 7.5% shield (5 / 2 = +2.5%) 3 units: 300 hp, 9.16% shield (5 / 3 = +1.66%) 4 units: 400 hp, 10.41% shield (5 / 4 = +1.25%)

Health stacks perfect, but shields reduce their benefit for each additional unit, helping prevent juggernaut invulnerable stacks.

To further prevent impossible-to-beat shielded stacks, you could give certain units 'shield penetration' weapons. (Either they skip through shields completely, dealing damage directly to the enemy's health, or they reduce the shield's effectiveness by a percentage). You can also have additional units or weapons whose sole job is to damage shields instead of health, and the enemy's shields only recharge (slowly) outside of battle. Edited by Servant of the Lord

##### Share on other sites

The issue is you treat shields like a second form of HP.
Yes, I know. But in a huge majority of space games shields are just a form of HP, players are accustomed to it and frankly that's the most intuitive and enjoyable form of shields. If possible I would want to retain shields as "front HP"

But if you have some interesting ideas for shields that don't behave like HP, please post.

Shields can be health that recharges (slowly, and only outside of combat), but damage dealt is distributed between the shield and the HP. (10 damage dealt = 5 to hp, 5 to shield). This way, shields aren't a perfect buffer against damage, but only a partial buffer.
That's quite similar to my initial concept.
Damage is dealt 50% to HP and 50% to shields (if no shields then all goes to HP). Shields regenerate during combat and quite rapidly (20% each turn), I assumed an average ship would have less shields than HP but the shields can rarely be taken down completely due to regeneration (this should lead to a nice spaceship construction choice, you can go for long battles survivability (shields) or short battles survivability (HP)).
There would be 3 types of weapons:
* normal, 50% damage split, if no shields 100% done to HP
* penetration, ignore shields and deal all to HP
* shield destroyer, 100% done to shields but never harm HP even if no shields present

But with this model I wonder what to do with remaining shields when a ship is destroyed (that problem appear in a scenario with shields > HP). Example: There are 20 ships 100 HP and 200 shields each (2000 HP and 4000 shields total). The stack was hit by 200 damage normal weapon (so -100 HP and -100 shields) which means the stack is now 19 ships 1900 HP 3900 shields. But that's not true since one ship dies and its shields are gone completely, so it should have lost 100 shields from the weapon and the remaining 100 shields should be lost because the ship that generated it ceased to exist. So, logically it should be 19 ships 1900 HP 3800 shields...

Similarly, what if the stack is hit by a penetrating weapon that ignores shields?

Not sure how to approach this.

Another alternative is giving shields a strong but non-linear benefit.
That is, shields completely block a percentage of the damage dealt, but the stacking of shields reducing the individual unit's shield benefit the more shields are present.

For units with 100 hp and 5% shield: 1 units: 100 hp, 5% shield (5 / 1 = +5%) 2 units: 200 hp, 7.5% shield (5 / 2 = +2.5%) 3 units: 300 hp, 9.16% shield (5 / 3 = +1.66%) 4 units: 400 hp, 10.41% shield (5 / 4 = +1.25%)

Health stacks perfect, but shields reduce their benefit for each additional unit, helping prevent juggernaut invulnerable stacks.
So, smaller stacks would be better than large ones...

##### Share on other sites
Whats wrong with making it "100 hp 5% shields". At the beginning of its turn, the stack gets 5% of its current total HP as shields. To do any real damage to the stack, you need to punch through its shields first.

Scales nicely when your stack decreases.

##### Share on other sites

[quote name='Tiblanc' timestamp='1339360953' post='4948008']
The issue is you treat shields like a second form of HP.
Yes, I know. But in a huge majority of space games shields are just a form of HP, players are accustomed to it and frankly that's the most intuitive and enjoyable form of shields. If possible I would want to retain shields as "front HP"

But if you have some interesting ideas for shields that don't behave like HP, please post.
[/quote]

Like I said, it depends on the target complexity of the battle simulation.

A simple method is have shields mitigate incoming damage. They would not have any HP value and would always be effective. That way, no matter the stack size, they never break the combat simulation.

A more complex method would have shields mitigate incoming damage, but also have an HP value. What you can do is have their damage mitigation value vary based on the current shield value. To balance small and large ships, this value depends on the hull size. Think of it as a sphere. The thickness of the shield is the mitigation value. On small ships, you need less shield power to attain the same thickness. As shields lose HP, they lose mitigation power. This allows you different builds where you could rely on shields to absorb all incoming damage, but have weak armor or put your defenses on your armor to have reliability.

The tougher part is how to determine the shield strength of a particular ship within the stack. Tracking individual ships is out, so we need to approximate. A simple method would be to have a common shield HP value. It will work better than a second HP value because some damage penetrates the shields at all values. For example, at 100%, it could block 75% damage. When it gets down to half, it would block 37.5% damage. You can tweak it so it blocks 150% damage at 100% shield HP, which makes it block 75% at 50% shield HP.

Another method would be to use randomness to determine what's the shield value of a given ship in the stack. You can use a standard distribution curve to pick the shield value. This means most ships would be close to the stack's value, but some could have lower or higher amounts. For example, in a stack of 100 ships at 75% shield, you could have 15 that have 100%, 10 at 50% and 5 at 25%. Don't take these values at the complete method though, they are just numbers made on the spot to illustrate the point. Then, you can use a method similar to the one above where you have partial mitigation. When a ship is destroyed, its remaining shield value is removed from the stack. The advantage of this one is you can have higher mitigation shield values without having an immortal fleet.

For something different, you can have shields act as an energy converter. Shields are tuned to either block damage or convert it to energy. The higher the block value, the lower the energy conversion. With more energy, weapons become supercharged and do more damage. Energy would be fully spent on the next turn so you don't need to track it on individual ships.

##### Share on other sites
Don't forget the stacks. You don't fire at a single ship, you fire at the whole stack.[/quote]
There's no simple way to introduce shields and it's not needed. Stacks are a mechanic that is used to present a number of similar units in a simple and abstract way. It's basically a replacement for HP bars in HoMM. You shouldn't try to overcomplicate it for the sake of setting/lore by introducing things like HP bars or shield bars.

##### Share on other sites

[quote name='Servant of the Lord' timestamp='1339365443' post='4948019']
Health stacks perfect, but shields reduce their benefit for each additional unit, helping prevent juggernaut invulnerable stacks.
So, smaller stacks would be better than large ones...[/quote]
No, the benefit of each additional unit to a stack would decrease. Per-unit benefit of a large stack is worse than the per-unit benefit in a small stack, but a large stack is still better than a small one, it's just that each additional unit's shield decreases in worth, but that still increases the power of the larger stack, just with diminishing benefit (in the shield category). This (along with shield-ignoring weapons and shield-damaging weapons) prevents shields from getting out of control.

Or, you can just rename health 'shields', if all you want is the word 'shield' in your game. Edited by Servant of the Lord

##### Share on other sites

Whats wrong with making it "100 hp 5% shields". At the beginning of its turn, the stack gets 5% of its current total HP as shields. To do any real damage to the stack, you need to punch through its shields first.
It makes big stacks invincible (smaller stacks can't even scratch them). That's why shields can't be collective.