Currently, GMP files store event condition types using a four-byte integer. "YTD company <cargo> hauled" conditions, for example, occupy the codes from 000000FDh through 00000139h. This allocation scheme is what limits the game to 60 different cargoes, of which 41 are currently defined.
For locomotives, it looks as if RT3 is smart enough to assign user-created content indices that start after built-in content, so installing new engines doesn't break existing scenarios (though it could quite possibly cause problems for scenarios already using custom engines).
JSS discovered that the same rule does not apply to cargoes. Those seem to be assigned values based on their names - 'milk' comes after 'meat', for example. When one installs a new cargo, it causes all the other cargoes after it in the list to shift down a spot - so a 115h event that originally counted "YTD company milk hauled" might now count "YTD company meat hauled".
The name used to sort the list is an "internal" name, rather than one out of RT3.lng. Because the last resource is 'wool', I think someone suggested fixing the reordering problem simply by assigning custom cargoes names like 'xxyCrystals'. So here's the project for you avid modders:
- Construct a tiny test map.
- Test the naming idea by creating a new cargo with an 'xxyBlah' internal name. Does it work?
- If so, is there a way to keep multiple new cargoes from colliding with each other? If I install xxyCrystals and then later decide to install xxxPigs, it disrupts scenario references to crystals, doesn't it?
- Do we have to limit cargo releases to patches, in which we can control the installed cargo set? If so, which standard cargoes should we add?
- Is anyone up for creating new railroad cars to go with our shiny new locos? :)