Jump to content

Combat Mechanics


licker

Recommended Posts

Ok now I'm really confused.

In the combat simulator, I have two different ships with identical stats (ie a cruiser vs a modded carrier) and they give me a 100% kill on the carrier. But if I matchup two identical ships (ie two cruisers) they give me the results I expect.

Very strange.

I'm not clear on what you're matching up in combat.

Link to comment
Share on other sites

  • Replies 57
  • Created
  • Last Reply

Top Posters In This Topic

I'm not clear on what you're matching up in combat.

I'm playing in the editor.

I mod two different class of ships (a cruiser and a carrier) to have stats that are identical in every way.

I set up combat in the simulator, but playing two carriers or two cruisers gives different results to playing a cruiser vs a carrier.

Link to comment
Share on other sites

I think Rich had also suggested that units that are more than 50% damaged move more slowly - which would allow for the possibility of running them down and finishing them off. Admittedly, that doesn't work quite as well if you have a bunch of units, and you send the damaged ones away - because the healthy units will still block the path of the enemy.

Yeah I suggested that when a unit goes to 50% hit points it loses a third movement and attack value. This isn't entirely my idea as it comes directly from ED. I think EoS is far better than ED but can benefit from some of the features that ED has so I've been suggesting them. Some have been implemented and some are still on the list.

Link to comment
Share on other sites

My suggestion is to add a "hits to break" field to the unit editor. When the unit reaches the number it then takes the action listed in "broken action" field. Like "return to base" for aircraft or "withdraw " for ships, maybe for ground units it would "stop attacking" or "withdraw to best defensive terrain".

Link to comment
Share on other sites

I'm playing in the editor.

I mod two different class of ships (a cruiser and a carrier) to have stats that are identical in every way.

I set up combat in the simulator, but playing two carriers or two cruisers gives different results to playing a cruiser vs a carrier.

Strange. The to-hit vs ship, damage vs ship, and defense values are the same? I'll jump into the editor and see if I can reproduce it.

Link to comment
Share on other sites

I'm playing in the editor.

I mod two different class of ships (a cruiser and a carrier) to have stats that are identical in every way.

I set up combat in the simulator, but playing two carriers or two cruisers gives different results to playing a cruiser vs a carrier.

Ok. I ran a test. I changed the aircraft carrier (class 2) to have the same to-hit vs ship and defense value as a cruiser (class 2). The numbers are about the same, but slightly different. There will be a slight discrepancy due to the random number generator, but it seems to be slightly more than a random-number generator issue. Anyway, here's the numbers I came up with. The average damage in these four cases varies from 4.84 to 4.94, a difference of about 2%. Are you seeing something different?

CruiserCarrierCombat.jpg

Link to comment
Share on other sites

My suggestion is to add a "hits to break" field to the unit editor. When the unit reaches the number it then takes the action listed in "broken action" field. Like "return to base" for aircraft or "withdraw " for ships, maybe for ground units it would "stop attacking" or "withdraw to best defensive terrain".

When a unit "breaks" would that mean that the unit has no combat ability, but it can still move?

Link to comment
Share on other sites

When a unit "breaks" would that mean that the unit has no combat ability, but it can still move?
Basically, at that point it would no longer do any attacking i.e. moving toward the enemy, but it would still defend while trying to fulfill it's "broken" status protocol. So, let's say I order an armored unit to attack a city. The attack goes badly and the armored unit reaches it's "broken number" of hits. At that point the armored unit would give up attacking the city i.e. no more calculations would be done to damage the target units. At this point, we would consider that the armored unit has broken contact with the enemy. So, now, let's say the "broken action" that unit type has is "withdraw", basically the unit just quits attacking. It just pulls back 180 degrees to be right outside the unit circle of the enemy and nothing else happens that turns as far as combat is concerned.

Now, of course, on the enemy turn your opponent may see that you are ripe for counter-attack. When the enemy counter-attacks "broken" units automatically move away from the enemy in the direction that is most favorable for their defense. So, an armored unit would probably just move back down a road not allowing the enemy to maintain contact. An infantry unit would probably move into a woods behind them or mountains, etc... You could even pick a random direction as long as it is away from all known enemy units. (Forced retreats tend to very chaotic in real life.) If the enemy was faster combat would still happen and the unit could defend itself (combat calculations would happen normally) but would still move away to the best of it ability. In the case of airplanes they'd probably just quit attacking and move to the next leg of their orders. Same with ships as long as that didn't lead to further contact with the enemy. If no "next leg" was specified or the next leg put them in further contact with the enemy they would move in a random direction that kept them away from the enemy. Of course, all these retreat moves would be totally out of control of the player. The units just do them and the player can't do anything with the broken units until they are no longer in contact with the enemy for one turn. So, it's quite possible that your land units might retreat until their backs are to the ocean and then die if the enemy presses every turn after they are broken.

If a unit was forced by retreat into the unit circle of an enemy the attack calculations would run. It's possible a unit fighting for it's life might breakout of an encirclement or flanking attack. But, odds are since the unit would probably be heavily damaged it would die.

This would also make encirclement and flanking valid strategies. This adds strategic depth to the game, but doesn't add micro-management since the computer takes care of the retreating. Another thing you could do to add depth without micro-management is make attack reduce the movement speed of a unit (maybe you already do this). For example: I'd love to be able to drop paratroops (or my special forces units) onto a road to slow down the enemy while I'm trying to take a city on the other side of an island. That way I could hit him with air attacks for a longer period of time before he gets to invasion beach...anyway you get the idea. Of course, this really wouldn't apply to air or sea units as that type of combat is quick and fatal.

Link to comment
Share on other sites

Is there any way to prevent both engaged units being destroyed during combat?

I've got a simplified ruleset that I'm seeing the majority of engagements between two units leaving neither side with a victorious unit to limp home, which is pretty poor from a fun game perspective, and though I know this is not a sim, both units being wiped out is not very "realistic" either.

If I set my units to do one HP damage per hit, and both units have one hitpoint, one of them has to die first right, and the other should be left with one hitpoint?

edit: I think I mostly see this with air units, does that mean both sides are getting dealt the whole turn's worth damage even though one of them should die part-way through the turn?

Link to comment
Share on other sites

A real world unit that is capable of wiping out, mopping up and taking prisoner an enemy unit may be severely depleted but they must still be cohesive and must still exist as a fighting formation or the more likely result is a stalemate with both sides remaining intact.

Nonetheless I am trying to create a 50% chance of a unit killing another unit in EoS and it seems what I get is a 100% chance of both units killing each other.

Link to comment
Share on other sites

Nonetheless I am trying to create a 50% chance of a unit killing another unit in EoS and it seems what I get is a 100% chance of both units killing each other.
Based on my reading about the combat system, I think you will need to put the damage per hit to less than the unit total damage, however, I do believe the dice rolls are simultaneous, so two evenly matched units will always have a chance of destroying each other. You could reduce this chance by increasing the hit points for each unit and decreasing the damage per hit. The odds are much lower of two 4 hit units doing 1 point of damage per hit both dying at the same time vs. two 2 point units doing 2 damage per per hit.
Link to comment
Share on other sites

Is there any way to prevent both engaged units being destroyed during combat?

I've got a simplified ruleset that I'm seeing the majority of engagements between two units leaving neither side with a victorious unit to limp home, which is pretty poor from a fun game perspective, and though I know this is not a sim, both units being wiped out is not very "realistic" either.

In the rules editor under "Global Values", there is a combat randomness value at the very top. If the combat randomness is low (close to 0.0), then combat tends to be very close - sometimes units will simultaneously destroy each other. If the combat randomness is high (near 1.0), then combat results are more random. The downside to high combat randomness is that sometimes a weaker enemy unit will destroy your stronger unit.

If I set my units to do one HP damage per hit, and both units have one hitpoint, one of them has to die first right, and the other should be left with one hitpoint?

The combat is calculated simultaneously, so there can sometimes be situations where both units destroy each other.

edit: I think I mostly see this with air units, does that mean both sides are getting dealt the whole turn's worth damage even though one of them should die part-way through the turn?

Yes. Combat for air units involves calculating the whole turn in one brief encounter.

Link to comment
Share on other sites

Ok. I was trying to do a 50% hit per tic for every unit class with every unit class doing 1 hitpoint damage sequentially per tic. The relative strength and weakness of units was going to be through higher hitpoints for stronger units. I was trying to do a classic empire remake, and this is the system used in the Empire for windows game I found.

But this means that my attempted 50/50 odds of a 1 hitpoint unit killing another 1 hitpoint unit is impossible then. I thought it was just rolling the dice until one unit scored one HP damage and therefore won the fight. Random combat still gives a 85% chance of them both being destroyed, non-random gives a 100% chance of both being destroyed.

It also will make higher hitpoint units much less powerful because they will take damage in almost every engagement.

I know it isn't a fault with your system because it doesn't do the unique thing I want, but I would point out that many simplified combat games like empire and civilization do sequential turns of combat. I've seen both units be destroyed fairly often in the official ruleset too. Having no winner in combat is boring!

Link to comment
Share on other sites

Ok. I was trying to do a 50% hit per tic for every unit class with every unit class doing 1 hitpoint damage sequentially per tic. The relative strength and weakness of units was going to be through higher hitpoints for stronger units. I was trying to do a classic empire remake, and this is the system used in the Empire for windows game I found.

But this means that my attempted 50/50 odds of a 1 hitpoint unit killing another 1 hitpoint unit is impossible then. I thought it was just rolling the dice until one unit scored one HP damage and therefore won the fight. Random combat still gives a 85% chance of them both being destroyed, non-random gives a 100% chance of both being destroyed.

It also will make higher hitpoint units much less powerful because they will take damage in almost every engagement.

I know it isn't a fault with your system because it doesn't do the unique thing I want, but I would point out that many simplified combat games like empire and civilization do sequential turns of combat. I've seen both units be destroyed fairly often in the official ruleset too. Having no winner in combat is boring!

Hm. Maybe I should look at the aircraft combat more closely. I know that, occasionally, both units can be destroyed in combat, but it happens so rarely with ground and sea units that I wasn't too concerned about it. That is an interesting point in regard to air units, though.

Link to comment
Share on other sites

No, no. An attack of 0.5 against a defense of 1 will you an average of 0.5 hits per turn.

Maybe I should've been more clear about the calculation. The calculation is: (0.01 * Attack to-hit / Defense) each tic. There are 100 tics per turn. So, an attack of 50 versus a defense of 1 will give you a 50% chance to hit every tic.

I'm really really confused now.

Here are some scenarios I've been trying in the combat simulator:

*1 - Identical Units with: 1 attack to hit doing 1 HP damage per hit & 1 defence & 1 HP.

Result: 50% Chance of 1HP damage, 50% chance of zero HP damage.

*2 - Identical Units with: 1 attack to hit doing 1 HP damage per hit & 1 defence & 10 HP.

Result: 97% Chance of doing 2 HP damage

I was imagining that it was some kind of binomial distribution but none of the results I'm seeing seem to exactly match that. It doesn't seem to be consistent with the equation above.

Link to comment
Share on other sites

I'll write what Brit responded when I asked him.

The attacker's to-hit value and the defender's defense value are used to calculate the percentages. A to-hit of 10 against a defense of 5 will hit (on average) twice per turn.

I think it's really simpler than you think but takes understanding how it works. Hope this helps.

Link to comment
Share on other sites

That doesn't agree with anything I'm seeing in the game and is contrary to the equation that Brit posted in this very thread and which I quoted in the post above.

10 attack vs 5 defence should give a 2% chance of hitting each of 100 tics, which should be only a 27.3% chance of hitting exactly twice per turn. The combat simulator does show some kind of distribution of hit probablities, but doesn't agree with any of the probability calculators I'm using.

For example, this Binomial Calulator plug in n=100 for the number of "rolls/tics" per turn, 0.02 as the odds of hitting, you can see the distribution of the chances of doing one, two three, four hits in that 100 tics by setting x to the number you want to show.

But what I'm seeing in the game actually doesn't agree with Brit's equation either. If I set the chance to hit as 0.5 there should be a near certainty of doing at least 70 hits per turn, so every unit should be destroyed every time, but my 10HP battleship doesn't even die. Also it is possible for defence to be higher than attack in EoS but that doesn't make sense because it gives odds greater than 100%.

Link to comment
Share on other sites

I'm really really confused now.

Here are some scenarios I've been trying in the combat simulator:

*1 - Identical Units with: 1 attack to hit doing 1 HP damage per hit & 1 defence & 1 HP.

Result: 50% Chance of 1HP damage, 50% chance of zero HP damage.

*2 - Identical Units with: 1 attack to hit doing 1 HP damage per hit & 1 defence & 10 HP.

Result: 97% Chance of doing 2 HP damage

I was imagining that it was some kind of binomial distribution but none of the results I'm seeing seem to exactly match that. It doesn't seem to be consistent with the equation above.

I tried reproducing this problem, but didn't have any luck.

Here's the results I saw:

*1 - Identical Units with: 1 attack to hit doing 1 HP damage per hit & 1 defence & 1 HP.

Result: 50% Chance of 1HP damage, 50% chance of zero HP damage.

*2 - Identical Units with: 1 attack to hit doing 1 HP damage per hit & 1 defence & 10 HP.

Result:

1% Chance of doing 0 HP damage,

32% Chance of doing 1 HP damage,

40% Chance of doing 2 HP damage,

18% Chance of doing 3 HP damage,

5% Chance of doing 4 HP damage,

3% Chance of doing 5 HP damage,

etc

I guess you can send me the ruleset and I can take a look for any difference between our two tests. Also, you're not using Combat Randomness of 0.0, are you? If you have a combat randomness at or near 0.0, the results will come out to the numbers you're seeing. (I'm using a combat randomness of 0.5.)

Link to comment
Share on other sites

Yes that is with randomness at 0.0. Your results seem to match mine but with a wider spread.

Why does a 1% chance to do 1 HP damage in each of 100 tics of combat produce results so skewed toward doing 2 HP damage? My bell curve of results shows the highest probability is zero hits, then lower odds for 1, 2 hits etc.

I'm actually not reporting a bug or a problem (at least I don't think I am), I'm just trying to get my head around how it works, and I can't work it out.

Link to comment
Share on other sites

Yes that is with randomness at 0.0. Your results seem to match mine but with a wider spread.

Why does a 1% chance to do 1 HP damage in each of 100 tics of combat produce results so skewed toward doing 2 HP damage? My bell curve of results shows the highest probability is zero hits, then lower odds for 1, 2 hits etc.

I'm actually not reporting a bug or a problem (at least I don't think I am), I'm just trying to get my head around how it works, and I can't work it out.

Well, the fact that we get different curves is because of the combat randomness value.

As far as the question of why it clusters around 2 damage, rather than 1 damage, I had to think about this for a little bit. I *think* maybe what's going on here is that when one unit attacks another, the other unit gets a counterattack. In other words, in each tic:

Unit 1 attacks Unit 2 (1% chance to hit), Unit 2 counterattacks (1% chance to hit)

Unit 2 attacks Unit 1 (1% chance to hit), Unit 1 counterattacks (1% chance to hit)

I'm not sure if this is correct or not - I don't think units should be setup for attacking each other. I need to verify it. But, it would result in an average damage around 2. (I have the game in the middle of a change, so the code won't build right now, which means I can't actually verify if this is what's going on.)

Link to comment
Share on other sites


×
×
  • Create New...