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.