LoneGazebo / Community-Patch-DLL

Community Patch for Civilization V - Brave New World
Other
286 stars 158 forks source link

Diplo AI gives different result after reload #9797

Closed ilteroi closed 3 months ago

ilteroi commented 1 year ago

V 3.3.1

While debugging, I played up to a certain turn (138) and then reloaded the autosave from the previous turn (137).

Interestingly I got an extra diplo statement from an AI player (Persia) the second time they experienced turn 137.

So apparently there is some state which is not serialized or reset correctly.

Logs are here: diplo-logs.zip (I put in <reload> markers to make orientation easier ... playing as Japan.)

Example difference:

First run

137, Persia, --- Jerusalem, IGNORE, ---, TGT Favorable, MAGG None, PRX Far, , ---, Conquest, 0, Bully, 0, 0, 0, 0, 0, 0, 0, Ignore, 60, Protective, 18
137, Persia, --- Ormus, IGNORE, ---, TGT Favorable, MAGG None, PRX Far, , ---, Conquest, 0, Bully, 0, 0, 0, 0, 0, 0, 0, Ignore, 60, Protective, 12
137, Persia, --- Kabul, IGNORE, ---, TGT Favorable, MAGG None, PRX Far, , ---, Conquest, 0, Bully, 0, 0, 0, 0, 0, 0, 0, Ignore, 60, Protective, 12

Second run

137, Persia, --- Jerusalem, IGNORE, ---, TGT Favorable, MAGG None, PRX Far, , ---, Conquest, 0, Bully, 0, 0, 0, 0, 0, 0, 0, Ignore, 60, Protective, 18
137, Persia, --- Kabul, IGNORE, ---, TGT Favorable, MAGG None, PRX Far, , ---, Conquest, 0, Bully, 0, 0, 0, 0, 0, 0, 0, Ignore, 60, Protective, 12
137, Persia, --- Ormus, IGNORE, ---, TGT Favorable, MAGG None, PRX Far, , ---, Conquest, 0, Bully, 0, 0, 0, 0, 0, 0, 0, Ignore, 60, Protective, 12
137, Polynesia, Persia, GUARDED, ---, OPN ENEMY, W_THT NONE, 0/0, TGT Bad, MAGG None, PRX Close, LND N, VCT N, VBlock N, WND Weak, MCF N, ---, War, 0, Hostile, 0, Deceptive, 323, Guarded, 196, Afraid, 51, Neutral, 13, Friendly, 23
137, Persia, Polynesia, **WAR_HOSTILE**, HOSTILE, OPN Competitor, W_THT NONE, 0/0, TGT Favorable, MAGG None, PRX Close, LND N, VCT N, VBlock N, WND N, MCF N, ---, War, 1153, Hostile, 936, Deceptive, 6, Guarded, 4, Afraid, 33, Neutral, 19, Friendly, 5

Notice the different order and also the weird message from Polynesia ... what is going on there?

Obviously this non-reproducability is highly annoying and it would be great if someone could fix it.

alchx commented 1 year ago

3.0.4 I have a suspicion that the results of previous turns influence (yield) If you move units into the same tiles, kill enemies with the same sequence of attacks, you get different results:

--- perfect result--- Turn 91 - we finish the turn so that the profitability of the empire is shortchanged Turn 92 - we take the barbarian camp, kill the French - for some reason, sometimes Japan moves differently on this turn, although there are no new camps Turn 93 - Japan denounces us, we denounce Japan Turn 94 - Japan denounces the Zulus, the friendship between them ends, the Zulus are neutral towards us

--- load from 92 -- Turn 92 - we take the camp of the barbarians, kill the French with the same sequence of attacks, stand on the same tiles Turn 93 - Japan offers us to accept the embassy. They denounce us, but 1-3 turns later

-- load from 93 from perfect result -- Turn 93 - Japan denounces us, we denounce Japan Turn 94 - Japanese-Zulu friendship continues, Zulus are unhappy that we denounced their friends

It's unpredictable. Perhaps the number generator takes an input that is not in the save files.

RecursiveVision commented 1 year ago

I really need to fix the dialogue system...