[SDK] Advanced Combat Odds for Rar 2.7.x

devolution

Prince
Joined
Oct 7, 2016
Messages
534
Location
Norway
All,

Many of you may be familiar with a rather popular modcomp for Civ4 BTS: PieceOfMind's Advanced Combat Odds https://forums.civfanatics.com/threads/pieceofminds-advanced-combat-odds.310415/

This mod gives a graphical breakdown of Victory, Retreat and Defeats odds as well as other helpful info like expected HP loss etc.

When I first started modding RaR, this was one of the first modcomps that I considered merging.
However, it mas made complicated by a unique feature, "limited combat rounds" which was introduced several versions ago. This is essentially an upper cap on combat rounds which is currently hard-coded to equal 7. Unfortunately, like I have alluded to in the bug thread, the odds calculation was not updated and it kept assuming that combat would be carried out until either the attacker or the defender died. This is clearly not correct, since a third outcomes is possible, a draw in case the combat round limit has been reached.

To fix this I have corrected the existing function that calculates the victory odds and added another that estimates the odds of a draw. In addition I have selectively chosen the parts of ACO that I deem suitable for inclusion in RaR. The preliminary result is demonstrated in the attached image.


Quick Summary:
- Fixes the wrong calculation and display of combat odds issue.
- Displays a graphical representation of combat odds, including the odds of a draw (shown in yellow)


Advanced Combat Odds for RaR Preview:

 
That would be nice to have.
 
So when will beta 3 be ready?

I need to ensure that the import/export bug that was recently discussed in the bug thread has been resolved. It would be great if you and\or other players could attempt to reproduce it in beta2 and then report back.
 
Last edited:
I will give it a try tonight, but i hardly ever used this feature. I think you mean this bug description?

devolution said:
All,

Could I get an accurate description of the import/export bug, I can only fix issues that I'm aware of.
It is the bug described here:

https://forums.civfanatics.com/thre...-bugs-and-todos.449958/page-116#post-14964697

I am using 2.7 beta 2 and I am still seeing this behaviour.

To reproduce it very easily:

Start a new game and build a colony straight away. Select your city then select governor then click imports.

I choose train oil as an example so choose that and then set the left box to a value (I chose 20). Don't bother ticking the checkboxes.

Click OK.

Reselect imports and notice how the value is now in the right box. Click OK and reopen imports and notice it is back in the left box.

It seems to stop switching after that but changing the value will restart the bugged behaviour.

I hope this helps.

I can confirm that this still happens in 2.7.1 beta 2 downloaded today from https://forums.civfanatics.com/attachments/religion_and_revolution_2_7_1_beta2-zip.490268/

I may add that if you enter different values to import and export (both unequal to zero) the switching never stops.
 
Last edited:
Top Bottom