[MOD FIX] IndieStone Anti Deletion-Crash Fixinator SQL

Let me see if I have this right. If the unit ids get reindexed, then pre-made scenario maps will load the wrong units on the map because of mistaken ids?

Could scenario makers store the unit name in the unit's script data? Then on game initialization a generic Lua file could look over all the unit names, match the names in the database if they are still there, and convert the unit id as necessary?

I don't know if that's the best solution or not, just a thought, if I'm reading this correctly.
 
I delete all the units, and then add in 15. Start WB, set mod, load map from shortcut (back to mod area).. you know, since it doesn't open in the mod maps dir. Everything looks fine. Now, load other map by "change mod" -> load map. Now units are my 15 + all the regular units! The debug database still only shows my units, so WB must be pulling them from memory somewhere.......... sometimes, not always though :confused:

With civs, if I keep all the originals, and add Carthage (#22 now). Set the battle to Rome (14) vs Arabia (1), save + exit. Delete civs except Rome, Carthage, England, Germany, Egypt, Greece and Persia -> save + build. In civ5 load the battle and it shows England and ???. England is debugdatabase ID 1 and ?? is past my ID range.

So for certain it saves the ID number for civs.

Which should be fine if WB didn't have a corrupt ID list.

> Could scenario makers store the unit name in the unit's script data
The battle map can be used with Advanced Setup to pick the right civs. And then I have a lua script running to add the armies. This works, but I don't know how to set everything. Anyway, yeah it might be possible to work around some of this.

This mod comp is needed to compact the IDs, but till WB is fixed it's only useful for random map mods, which is actually most of them.
 
In my original delete attempts (when ignorant of missing IDs) I found that deleting techs, buildings and policies crashed the game outright. Civs and leaders: no ill effects. Units: all seemed OK except that the startup 2D civ graphic was missing (go figure). Sometimes, also, I saw the starting warrior replaced by something else (e.g., mech infantry) but I don't remember whether that was from unit deleting or something else.
 
Thanks lemmy101! :goodjob:

For everyone's benefit, I get crashes when deleting either Improvements or Builds as well.
 
Top Bottom