Jump to content
Sign in to follow this  
licker

Combat Mechanics

Recommended Posts

Have you had a chance to look at this Brit?

Okay, I looked at this. I was right about the code: the combat simulator sets up both sides to attack each other. While it doesn't make much sense when you're pitting infantry against infantry, the reason I had set it up this way was to calculate the effects of ranged units. If an infantry is attacking, and an artillery is defending, then there's a period of time when the infantry is moving in to attack the artillery. For a period of time, the infantry can't attack the artillery, but the artillery can attack the infantry because it's a ranged unit. So, by setting up both sides to attack each other, it simulates the effects of infantry moving in under fire of the artillery. (This would happen automatically in the game because artillery would have field orders that would cause it to automatically attack.) If I hadn't done that, then neither side would attack each other until the infantry was within combat range, and it would decimate the artillery.

So, that's the reason for the 2x damage in the calculation.

Share this post


Link to post
Share on other sites

Thanks for taking the time to reply. That does help a lot.

The combat simulator is still doing things I don't really understand which I find a bit frustrating.

attachment.php?attachmentid=530&stc=1&d=1276318923

For example I've taken the class 1 infantry from the official ruleset and given them 10 HP. Combat randomness is set to 0.5 as this seems to give the closest to the "correct" binomial curve. Both units have 4.0 defence and 4.0 attack, so each tic they should be subjected to an attack and a defense "roll" of 0.01 right? By my calculations there should be 13% chance of doing zero damage in 200 rounds of combat, but here there is no chance of zero HP damage.

Oh a BUG: If you set a unit to have more than 99 hit points, the combat simulator goes absolutely nuts, damage seems to only calculated to 99 HP and over 110HP there are really weird entries like 145124% to get 184 HP damage and such.

Please is there any chance of changing the combat calculations (or an option) so that units don't both die in a combat? First to get a hit and go to zero HP dies, the other unit lives?

This is pretty important if you want to make a ruleset on a smaller scale (Like setting units to be like single tanks instead of divisions) or a simplified dice roll type combat system. If I want two units to go head to head and whoever hits first wins, I can't really do that if all the hits are assigned at the same time and both units die. This latter situation is what I'm seeing almsot every time in my simplified ruleset.

Share this post


Link to post
Share on other sites
Thanks for taking the time to reply. That does help a lot.

The combat simulator is still doing things I don't really understand which I find a bit frustrating.

attachment.php?attachmentid=530&stc=1&d=1276318923

Your attachment isn't showing up.

For example I've taken the class 1 infantry from the official ruleset and given them 10 HP. Combat randomness is set to 0.5 as this seems to give the closest to the "correct" binomial curve. Both units have 4.0 defence and 4.0 attack, so each tic they should be subjected to an attack and a defense "roll" of 0.01 right? By my calculations there should be 13% chance of doing zero damage in 200 rounds of combat, but here there is no chance of zero HP damage.

Combat randomness of 0.5 isn't truly random. A randomness value of 1.0 will give more random values and will probably give you some chance of doing 0HP of damage. A randomness value of 0.0 (or anything less than 1.0) will cause a certain regularity in the frequency of hits.

Oh a BUG: If you set a unit to have more than 99 hit points, the combat simulator goes absolutely nuts, damage seems to only calculated to 99 HP and over 110HP there are really weird entries like 145124% to get 184 HP damage and such.

Ah. I just looked up the code, and the combat simulator tracks upto 100 HP of damage. This isn't a bug in the combat calculator, but a bug in the combat simulator system which reports the damage.

Please is there any chance of changing the combat calculations (or an option) so that units don't both die in a combat? First to get a hit and go to zero HP dies, the other unit lives?

Sorry I didn't get that into the latest update.

This is pretty important if you want to make a ruleset on a smaller scale (Like setting units to be like single tanks instead of divisions) or a simplified dice roll type combat system. If I want two units to go head to head and whoever hits first wins, I can't really do that if all the hits are assigned at the same time and both units die. This latter situation is what I'm seeing almsot every time in my simplified ruleset.

Is this a problem specifically with air units, or is this something that happens with all units when you turn down the combat randomness to 0.0?

Share this post


Link to post
Share on other sites
Your attachment isn't showing up.

attachment.php?attachmentid=532&stc=1&d=1276595287

Hopefully this works (can't edit my post now), the forum seems to have lost my attachment.

Combat randomness of 0.5 isn't truly random. A randomness value of 1.0 will give more random values and will probably give you some chance of doing 0HP of damage. A randomness value of 0.0 (or anything less than 1.0) will cause a certain regularity in the frequency of hits.

Perhaps my problem is that the combat equation you posted should give 100% predictable probabilities, but the combat simulator doesn't seem to do that. Adding randomness to the equation makes it even less predictable and I am no closer to getting the results I was trying for.

Ah. I just looked up the code, and the combat simulator tracks upto 100 HP of damage. This isn't a bug in the combat calculator, but a bug in the combat simulator system which reports the damage.

Sorry I didn't get that into the latest update.

Is this a problem specifically with air units, or is this something that happens with all units when you turn down the combat randomness to 0.0?

This happens regularly with ground units too. I have a unitset with fairly high hit chances 50 attack and 1 defence and zero combat randomness. This sees the majority of my battles result in both battlers dying. If combat was truly sequential, first to zero HP should die.

Share this post


Link to post
Share on other sites
This happens regularly with ground units too. I have a unitset with fairly high hit chances 50 attack and 1 defence and zero combat randomness. This sees the majority of my battles result in both battlers dying. If combat was truly sequential, first to zero HP should die.

Could you send me a copy of your ruleset?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...