Mods which share level names with the main game will experience strange errors about UniqueIDs being non-unique for buildings that don't even exist in the mod. I've figured out what the game engine is doing, and it may explain why ILB never affected the original game. It also means that if you reuse the original level names, you must be careful about your building IDs. For example, this behavior will affect your hidden "generator" level if you use Start Pylons in your mods.
In a nutshell, if you have a mod level called "escort", the game engine will read in your map and mission files, AND THEN it will also read in the mission file for the original "escort" level. If the building IDs in the original mission conflict with your mod's building IDs, you will get errors. The errors will complain about the dynamic buildings from the *original* game mission, so you will see errors about the Incubators, Triffids, etc. which you might not have in your own level.
The old-mission buildings are not instantiated in your mod level. But if the original mission lists global Incubators, these will get game.txt entries in your mod, using the original building IDs, but your own mod's level IDs. This seems to be the only purpose for this behavior. Besides the UniqueID errors, it is the only effect.
This may be why ILB didn't affect the original game (it didn't, did it?). The affected level names are not hardcoded in the executable, so they must either be coming from the levels directory in the main.dat package, the original game.txt, or from the location strings in the language.txt file. I haven't checked which one it is. But clearly there is a built-in mechanism for scanning these mission files and adding their dynamic global buildings to game.txt. Isn't that the entire issue with ILB?
This may just be a linux thing. I'm running 1.4.0b9 under linux. Maybe this was IV's way of patching the ILB bug? Can anyone verify this on another platform? I don't have Darwinia running on my XP partition yet.
EDIT: to verify this behavior, just create an empty level called "escort". Then exit and erase your game.txt, re-enter the WorldMap, exit the game, and redshirt the game.txt. If you see the following two lines in your game.txt, they came from the original escort mission file. The level ID (locId) will be different.
Code: Select all
Buildings_StartDefinition
# Id teamId locId type link online
# =======================================
14 2 2 29 -1 0
15 2 2 29 -1 0
Buildings_EndDefinition
In any case, if you use StartPylons you will want to be aware of this. The original "generator" level lists four buildings in it's mission file:
Code: Select all
Triffid 72 3562.97 1688.75 1 0.07 -1.00 0
Triffid 73 3620.10 1655.57 1 0.99 0.15 0
Incubator 50 1139.57 1278.63 1 -0.61 -0.79 1 0
Incubator 53 3114.28 473.76 1 0.02 1.00 1 0
These building IDs are effectively taken and unavailable to your mod. Since they are high numbers, your hidden "generator" level probably won't bump into them. But be aware that you will get global entries for the two Incubators in your game.txt, even if you don't place any in your level.
The upshot is: if you want to avoid mysterious UniqueID errors, you should avoid using level names that appeared in the original game.
If this behavior is cross-platform, and if the engine is taking the level names from the locations listed in language.txt, then there is a possibility this mechanism can be used to fix any ILB problems that might come up in mods. I haven't tried this yet, but you could try adding location entries in your strings_default.txt for each of your own level names. The engine might scan those missions for global dynamics (or maybe just Incubators?) and make the appropriate entries in game.txt. I'm not sure how to test this since my 1.4.0b9 seems to be free of ILB at the moment.