I am working in a custom worldmap. Since updating to e.1.6.0 the game crashes on load without a valid SettlementsDistance cache. While the settlements_scripts entity in my worldmap automatically runs the settlement scripts on saving the worldmap in the scene editor, they fail. Accordingly, they need to be run manually within the scene editor.
Running the CheckPositions and SavePositions scripts updates mymod/ModuleData/Settlements.xml for its correct worldmap coordinates and saves it as Sandbox/ModuleData/Settlements.xml.
Running the ComputeAndSaveSettlementsDistanceCache saves the correct cache for my worldmap in Sandbox/ModuleData.
Currently, the xml and cache are saved in Sandbox/ModuleData, which is where the game needs them to avoid crashing on loading, but they are overwritten by any game update or when verifying local steam files as they are not Native Sandbox files.
For modders this halfway house is confusing and error prone. I hope a correction is already scheduled in Taleworlds Development lists, but note it here to ensure it isn't missed and to emphasis its priority.
For modded Worldmaps the game needs to load settlements.xml and distance cache from that mod's ModuleData.
The settlements_scripts need to save files to the relevant worldmap's ModuleData.
The bug that disables the automatic running and saving of settlements scripts on saving a modded worldmap also needs to be fixed to allow modders to build new worldmaps without having to understand any of this - as was clearly Taleworlds original design intention.
Running the CheckPositions and SavePositions scripts updates mymod/ModuleData/Settlements.xml for its correct worldmap coordinates and saves it as Sandbox/ModuleData/Settlements.xml.
Running the ComputeAndSaveSettlementsDistanceCache saves the correct cache for my worldmap in Sandbox/ModuleData.
Currently, the xml and cache are saved in Sandbox/ModuleData, which is where the game needs them to avoid crashing on loading, but they are overwritten by any game update or when verifying local steam files as they are not Native Sandbox files.
For modders this halfway house is confusing and error prone. I hope a correction is already scheduled in Taleworlds Development lists, but note it here to ensure it isn't missed and to emphasis its priority.
For modded Worldmaps the game needs to load settlements.xml and distance cache from that mod's ModuleData.
The settlements_scripts need to save files to the relevant worldmap's ModuleData.
The bug that disables the automatic running and saving of settlements scripts on saving a modded worldmap also needs to be fixed to allow modders to build new worldmaps without having to understand any of this - as was clearly Taleworlds original design intention.