How is $(TERRAIN) defined? Can we make one for Civilzations?

Skajaquada

Crazy Engineer
Joined
Mar 4, 2007
Messages
134
I'm working on ways to manage really big mods. There is that $(TERRAIN) they use a lot, I've seen it in the unitmembers- and effects-files how they type for example "ART_DEF_GUN_IMACT_$(TERRAIN)".

It's prety easy to imagine they loop through all the terrain pieces making copies wherever that's used. In the viseffects-file they've even got all the full names of those effects that replace a part with the $(TERRAIN) with words DIRT, CITY etc. instead (so it's not the normal terrain-pieces like grass, plains etc.). Then in the Civ5Terrrain-file for all the terrain-pieces they've got a ArtDefTag with those very words DIRT, CITY etc. showing how that's tied together.

Anyone know how that works if we can add our own $(CIVILIZATION) or if it's built-in already? I tried replacing some copies of unit-definitions I've got for two civilizations with $(CIVILIZATION) just to check but it didn't work. In the Civ5Civilizations-file there are some ArtDefTypeTags I think with words like ART_DEF_CIVILIZATION_AMERICA etc. that kind of seem similar to ArtDefType. Anyone know how they're used? Have anyone seen them being used? I've tried searching through the file but didn't find anything other than $(TERRAIN) being used as a possible variable.

Btw, I went through the GlobalDefines-file and found a tag "PostDefines", the description kind of sounded like it could control these but it appeared more likely is was just about replacing one key with an alias.

EDIT: After reading the tags a little more carefully I noticed that both the Civilizations- and Terrain-definitions have ArtDefineTag-tags with ART_DEF_SOMETHING. Then the Terrain-tag that was replaced by $(TERRAIN) is called EffectTypeTag and the Civilization-definitions have nothing like this. However the question remains: Have anything any idea how those are defined and if we can make our own?

I would use $(CIVILIZATION) mainly to battle that there are no team-textures. I could then probably with relative ease define separate units with names like CIVILIZATION_REAL_NAME and just loop through them in the unitmember-file, when assigning free units for civilization or where-ever.
 
Back
Top Bottom