@Ulixes, No, you understood perfectly. Your observation tells us that these IDs are generated (somehow) from external data. Or possibly a mix of external data and hard-coded data.
Edit: @bane_, well, what comes after 100...?
So the list is a strange mix of improvements, features (including but not only natural wonders), resources, and unknowns. And it's not complete so who knows what? Improvements and resources are linked to graphic model (fxsxml file) in ArtDefine_Landmarks. But there is a lot in that list that is not in this table at all. I wonder if including fxsxml file alone (with vfs=true) is sufficient to end up in this list? But that's hard to understand because then we would see units too (although maybe they are there past 100?).
Don't have access now, but does anyone know if these variants are all in the ArtDefine_Landmarks table?:
58: trading post
59: trading post (ver 2)
60: trading post (ver 3)
61: trading post (ver 4)
To get back to your original request for cultural variation of improvements:
OK, this is a "hack", but the basic outline for modding improvements with cultural variation is:
- Add the improvement art assets for the cultural variants you want in each era (by assets I mean gr2, fxsxml, dds files), with VFS=true
- Get them to "show up" as an ID in that mysterious list somehow. That may or may not require adding them to the ArtDefine_Landmarks table (we just don't know). Unless someone figures out the logic behind this list, it is simply a search and find effort.
- Write down ID in that list for the "base" improvement (the one that workers actually build) and all of your cultural variants.
- Make code (analogous to my OP code) that listens for the base improvement and (when detected) immediately replaces it with the cultural variant.
The step I can help with is #4.
Let me repeat again that this is a "hack". One problem is that it would stop working if the IDs changed, which would be the case for many mods or for each of the expansions. To deal with this properly we would have to understand the logic behind this list so that we could generate the proper ID ourselves given game data.
----------------------------------------
No answers, but more questions if anyone wants to pursue:
I'm just curious if the createResourceType in the args list below is identical to the ID list above. In other words, if you set up a listener with this Events, then plopped a resource (as above), then played with arg #6, would it be the same exact list as above?
Code:
SerialEventRawResourceCreated(float hexX, int hexY, ArtStyleType continent, ArtStyleType continent, PlayerID player, int arg5, int createResourceType, int arg7, int arg8)
Same question again for "routeType":
Code:
SerialEventRoadCreated(int hexX, int hexY, PlayerID player, int routeType)
Same question again for "unitType" (I know from testing that this is not ID from Units table; i.e., not equal to unit:GetUnitType()):
Code:
SerialEventUnitCreated(PlayerID player, UnitID unitID, int hexVec, int unitType, int cultureType, int civID, int primaryColor, int secondaryColor, int unitFlagIndex, int fogState)