Modded Trading Posts

Joined
Apr 16, 2020
Messages
1
I've been making a bunch of tweaks to the improvements and worker system for my own amusement and everything has come together except for one thing, my new modded trading posts don't work. It was to be a simple clone of the trading post that produced +1 food and later, with tech, +1 production called a market.

To try and narrow down the issue I made a testing mod that does just one thing and one thing only. It makes a duplicate of the trading post called trading post 2. Everything about them is exactly the same. Still these trading posts are invisible when constructed in the game just like my markets. Can anyone explain what I am missing that is preventing them from appearing in-game?

I've made new terrace farms and polders using this method, where I keep the original IconAtlas, and they appear perfectly fine. The trading posts will not. I assume it has something to do with the more dynamic nature of trading posts, that they have a cultural and technological variance in their appearance, but I don't know how this is managed in the code or even if that has anything to do with it at all.

I know from using the In-Game Editor mod that applying an improvement to the wrong terrain causes it to not appear either, such as adding work boats to a plains tile, they will be invisible. So perhaps something about the terrain and build entries is causing the game to consider the improvement invalid but I can't parse what it could be. As far as I know I copied the same conditions as exist for the trading post.

I'm hoping someone knows.

Code:
<GameData>

   <Improvements>
       <Row>
           <Type>IMPROVEMENT_TRADING_POST_2</Type>
           <Description>TXT_KEY_IMPROVEMENT_TRADING_POST_2</Description>
           <Civilopedia>TXT_KEY_CIV5_IMPROVEMENTS_TRADING_POST_2_TEXT</Civilopedia>
           <ArtDefineTag>ART_DEF_IMPROVEMENT_TRADING_POST</ArtDefineTag>
           <PillageGold>20</PillageGold>
           <PortraitIndex>32</PortraitIndex>
           <IconAtlas>TERRAIN_ATLAS</IconAtlas>
       </Row>
   </Improvements>

   <Improvement_Yields>
       <Row>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <YieldType>YIELD_GOLD</YieldType>
           <Yield>1</Yield>
       </Row>
   </Improvement_Yields>

   <Improvement_ValidTerrains>
       <Row>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <TerrainType>TERRAIN_GRASS</TerrainType>
       </Row>
       <Row>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <TerrainType>TERRAIN_PLAINS</TerrainType>
       </Row>
       <Row>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <TerrainType>TERRAIN_DESERT</TerrainType>
       </Row>
       <Row>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <TerrainType>TERRAIN_TUNDRA</TerrainType>
       </Row>
   </Improvement_ValidTerrains>

   <Improvement_TechYieldChanges>
       <Row>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <TechType>TECH_ECONOMICS</TechType>
           <YieldType>YIELD_GOLD</YieldType>
           <Yield>1</Yield>
       </Row>
   </Improvement_TechYieldChanges>

   <Builds>
       <Row>
           <Type>BUILD_TRADING_POST_2</Type>
           <PrereqTech>TECH_GUILDS</PrereqTech>
           <Time>700</Time>
           <ImprovementType>IMPROVEMENT_TRADING_POST_2</ImprovementType>
           <Description>TXT_KEY_BUILD_TRADING_POST_2</Description>
           <EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
           <HotKey>KB_K</HotKey>
           <OrderPriority>95</OrderPriority>
           <IconIndex>41</IconIndex>
           <IconAtlas>UNIT_ACTION_ATLAS</IconAtlas>
       </Row>
   </Builds>

   <BuildFeatures>
       <Row>
           <BuildType>BUILD_TRADING_POST_2</BuildType>
           <FeatureType>FEATURE_JUNGLE</FeatureType>
           <PrereqTech>TECH_BRONZE_WORKING</PrereqTech>
           <Time>700</Time>
       </Row>
       <Row>
           <BuildType>BUILD_TRADING_POST_2</BuildType>
           <FeatureType>FEATURE_FOREST</FeatureType>
           <PrereqTech>TECH_MINING</PrereqTech>
           <Time>400</Time>
       </Row>
       <Row>
           <BuildType>BUILD_TRADING_POST_2</BuildType>
           <FeatureType>FEATURE_MARSH</FeatureType>
           <PrereqTech>TECH_MASONRY</PrereqTech>
           <Time>600</Time>
       </Row>
   </BuildFeatures>

   <Unit_Builds>
       <Row>
           <UnitType>UNIT_WORKER</UnitType>
           <BuildType>BUILD_TRADING_POST_2</BuildType>
       </Row>
   </Unit_Builds>

   <Language_en_US>
       <Row Tag="TXT_KEY_IMPROVEMENT_TRADING_POST_2">
           <Text>Trading Post 2</Text>
       </Row>
       <Row Tag="TXT_KEY_CIV5_IMPROVEMENTS_TRADING_POST_2_TEXT">
           <Text>A Trading Post 2.</Text>
       </Row>
       <Row Tag="TXT_KEY_BUILD_TRADING_POST_2">
           <Text>Build a Trading Post 2</Text>
       </Row>       
   </Language_en_US>


</GameData>
 
Back
Top Bottom