Closed hackedpassword closed 4 months ago
Yep that's what it is: pulling promotions out mid-game is confusing Unciv. I went back and copied each changed Example I to another Example promotion. Having the legacy promo allowed next turn to complete.
So it's not our bug except if we want to prevent such happenings actively - by updating GameInfo.removeMissingModReferences (in BackwardCompatibility) so these bad references are caught? removeUnitsAndPromotions sounds like it should already... Only runs on game load though. Is there a loophole to reload mods and rebuild a ruleset without... nah, impossible.
With exact steps to repro we could debug maybe.
When you change promotions, units with existing promotions that no longer exist have them removed.
The problem here is that we didn't safeguard against uniques granting this promotion - probably "All newly-trained [baseUnitFilter] units [cityFilter] receive the [promotion] promotion"
but I would check the mod checker on your end.
I've come up with an automatic healing technique for previous saves that use a promo later obsoleted/removed:
{
"name": "Volley",
"uniques": [
"This Unit gains the [Volley I] promotion", // migrate
"This Unit loses the [Volley] promotion", // cleanup
],
...
},
{
"name": "Volley I",
"uniques": ["[+50]% Strength <vs cities>"],
...
},
That's NEAT! Seriously!
Is there an existing issue for this?
Game Version
4.11.5
Describe the bug
Crash data below:
Platform: Android Version: 4.11.5 (Build 988) Rulesets: [Policy mod, RekMOD, Community Maps, Nextgen Maps, BabylonUI, NextgenMaps Labs, AFX, Z2, Inverted World, Antiyoy maps, Better ruins Lite, Civ V - Vanilla, No Fog Of War, Resource Recyclers, Civ V Leader portraits, CoeHarMod, Alpha Frontier, Raze anything, All units can be automated, Civ V - Gods & Kings, The Great Unciv Rework, Closer Cities Distance of 1, Better Workers, Better ruins, Mapping Tools for Unciv] Last Screen:
com.unciv.ui.screens.worldscreen.WorldScreen
Device Model: SM-G973U1 API Level: 31 System Memory: 7461 MB Available (used by Kernel): 2411 MB System Low Memory state: false Java heap limit: 512 MB Java heap free: 1 MB
Message:
Save Mods:
Permanent audiovisual Mods:
Steps to Reproduce
Been modifying promotions, everything was OK. After hitting next turn, this crash happened.
Most recent updates have been to the promotion tree structure. It's entirely possible that the game is unhappy that a few promotions ceased existing mid-game, like Amphibious - > Amphibious I.
Screenshots
This really has nothing to do with it but was one of the last rendered screens. And it looks cool.
Link to save file
Too big!
https://pastebin.com/yXnJe9WK
Operating System
Android
Additional Information
I'll put this up to get feedback, poke at it more in a bit.