Hello, long time listener first time poster (on FFH anyway)
I just finished my second game and I was surprised by a religious loss. Granted I can learn from the experience not to do this, but I have a bug report and a suggestion. I was blocked from the other remaining players by Clan of Embers, so I needed to keep Open Borders with him to reach them, and he flooded me with Fellowship of Leaves missionaries. Just when I was making progress against the remaining player, I suddenly lost. I had been looking in the victory screen occasionally but there were no danger signs there.
Bug: this bug is in vanilla too, but vanilla doesn't have a religious victory. I have encountered and fixed this bug in my own mod. The victory screen does not reliably show the religious percentage of the highest player. In my case it showed FoL had a religious percentage of zero, when in fact it was 81% and I lost.
Please see Assets/Python/Screens/CvVictoryScreen.py, line 434 in version 33:
Code:
for iLoopReligion in range(gc.getNumReligionInfos()):
if (iLoopReligion != iOurReligion):
religionPercent = gc.getGame().calculateReligionPercent(iLoopReligion)
if (religionPercent > bestReligionPercent):
bestReligionPercent = religionPercent
iBestReligion = iLoopReligion
Note that religionPercent is an intermediate variable. When the loop exits, religionPercent is set to the last religion, basically junk, while bestReligionPercent is set to the correct best percentage.
However, at line 571, when the screen is filled up, the wrong variable is used:
Code:
screen.setTableText(szTable, 5, iRow, (u"%d%%" % religionPercent), "", WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_LEFT_JUSTIFY)
This should use bestReligionPercent, not religionPercent.
Now, for the suggestion: in my mod, I have gotten complaints from people who experience a sudden religious loss, just like this. In my mod, I have a popup which comes when any religion reaches 25% religious percentage, which alerts the player they should take some action. Then another popup comes at 50% in case they forgot.
If other people have had this problem in FFH, it may be worthwhile to put some kind of popup. Since religious victory is not present in vanilla, other players besides myself may have had this unpleasant experience.