Krill already mentioned that he wants a new game option that turns the combat deterministic at least when defending against the barbarians. I already started work on it and this is how deterministic combat works.
Standard combat
1. Compare the odds of Attacker winning and loosing (as shown in-game)
2. If AttackerWinning is higher, attacker wins
3. If AttackerLoosing is lower or same, attacker looses
With withdrawal it gets a little bit more complicated
1. Compare the odds of Attacker winning and loosing (as shown in-game)
2. If AttackerWinning is higher, attacker wins
3. If AttackerLoosing is lower or same add up withdrawal odds with Winning Odds aka survive odds
4. If SurviveOdds are higher then LoosingOdds, then withdrawal is triggered
5. If SurviveOdds are lower or same as LoosingOdds, then attacker looses
The winning unit is still damaged. For the damage you can expect the most likely outcome as shown by the BUG combat odds feature. In case of a draw the result with the higher HP amount is used.
The unit still receives XP like in standard BtS.
Now while implementing this I had a different thought. What about if I could turn all the combat in Civ4 deterministic in another game option. The single unit combat is already been taken of by the explanation above. This leaves only these combat aspects with random elements:
- Collateral damage
- Flanking damage
- Air unit interception
- Air bombing
- Nuke interception
As for how it could work:
Collateral damage: Here we generate a random number between 0 and 10000 and multiply it with the current HP of each unit being damaged. In general units with higher HP are damaged more likely and this could be made deterministic. The problem though is that if you have enough immune units the will be choosen everytime once every other unit is damaged once.
Flanking damage: Here we generate a random number against the defending unit odds (not the unit being flanked). If the number is higher the unit is damaged. One way to make this deterministic is to just inverse the defending units odds and damage that many units. eg. The defender has 60% odds of defending therefore we would damage 40% of the units or the flanking maximum.
Air unit interception works similar to standard single combat aka combat over multiple rounds with a change to hit the other. Like above I could just calculate the most likely outcome and damage the units accordingly.
Air bombing is hard as here we just make a random number from 0 to airBombRate and compare it to a random number from 0 to airBombDefense. The main problem here is that there is no way for the player to manipulate this by promotions or anything.
Nuke interception probably can't be made deterministic as it's a single dice roll (D100) against the interception value.
I'm really struggling in coming up with good easy rules to make these aspects deterministic and this is why I'm turning to the community in hopes that somebody comes up with a good idea.
Standard combat
1. Compare the odds of Attacker winning and loosing (as shown in-game)
2. If AttackerWinning is higher, attacker wins
3. If AttackerLoosing is lower or same, attacker looses
With withdrawal it gets a little bit more complicated
1. Compare the odds of Attacker winning and loosing (as shown in-game)
2. If AttackerWinning is higher, attacker wins
3. If AttackerLoosing is lower or same add up withdrawal odds with Winning Odds aka survive odds
4. If SurviveOdds are higher then LoosingOdds, then withdrawal is triggered
5. If SurviveOdds are lower or same as LoosingOdds, then attacker looses
The winning unit is still damaged. For the damage you can expect the most likely outcome as shown by the BUG combat odds feature. In case of a draw the result with the higher HP amount is used.
The unit still receives XP like in standard BtS.
Now while implementing this I had a different thought. What about if I could turn all the combat in Civ4 deterministic in another game option. The single unit combat is already been taken of by the explanation above. This leaves only these combat aspects with random elements:
- Collateral damage
- Flanking damage
- Air unit interception
- Air bombing
- Nuke interception
As for how it could work:
Collateral damage: Here we generate a random number between 0 and 10000 and multiply it with the current HP of each unit being damaged. In general units with higher HP are damaged more likely and this could be made deterministic. The problem though is that if you have enough immune units the will be choosen everytime once every other unit is damaged once.
Flanking damage: Here we generate a random number against the defending unit odds (not the unit being flanked). If the number is higher the unit is damaged. One way to make this deterministic is to just inverse the defending units odds and damage that many units. eg. The defender has 60% odds of defending therefore we would damage 40% of the units or the flanking maximum.
Air unit interception works similar to standard single combat aka combat over multiple rounds with a change to hit the other. Like above I could just calculate the most likely outcome and damage the units accordingly.
Air bombing is hard as here we just make a random number from 0 to airBombRate and compare it to a random number from 0 to airBombDefense. The main problem here is that there is no way for the player to manipulate this by promotions or anything.
Nuke interception probably can't be made deterministic as it's a single dice roll (D100) against the interception value.
I'm really struggling in coming up with good easy rules to make these aspects deterministic and this is why I'm turning to the community in hopes that somebody comes up with a good idea.
Mods: RtR CtH
Pitboss: PB39, PB40, PB52, PB59 Useful Collections: Pickmethods, Mapmaking, Curious Civplayer
Buy me a coffee
Pitboss: PB39, PB40, PB52, PB59 Useful Collections: Pickmethods, Mapmaking, Curious Civplayer
Buy me a coffee