Hi all, not sure how many are still modding Civ5 but I'm having a little resurgence in the game and finishing up a small mod I started a while back and was hoping for some help.
I'm making a mod the prevents certain units from moving over rough terrain (forests, hills, rivers etc) unless there is a road/railroad over them whilst at the same time removing the movement bonus the units receive from the road/rail - so in essence very slow units that have to travel over road/rail or flat, unobstructed terrain.
Now I've managed to figure out how to do this for terrain features such as Forests, Marshes etc by giving the units the same promotion as the Helicopter Gunship (all terrain costs 1 movement) so they ignore the movement bonus from road/rail and with a promotion coded like this:
<UnitPromotions_Features>
I tried the following code to do the same with Hills and Rivers:
<UnitPromotions_Features>
<UnitPromotions_Terrains>
But the river code doesn't seem to work at all (which I guess makes sense a river is not its own tile) and the hill code doesn't seem to work in conjunction with the 'all terrain costs 1 movement' promotion.
Any workarounds anyone knows or a different approach that could be taken for this?
I'm making a mod the prevents certain units from moving over rough terrain (forests, hills, rivers etc) unless there is a road/railroad over them whilst at the same time removing the movement bonus the units receive from the road/rail - so in essence very slow units that have to travel over road/rail or flat, unobstructed terrain.
Now I've managed to figure out how to do this for terrain features such as Forests, Marshes etc by giving the units the same promotion as the Helicopter Gunship (all terrain costs 1 movement) so they ignore the movement bonus from road/rail and with a promotion coded like this:
Spoiler :
<UnitPromotions_Features>
<Row>
</UnitPromotions_Features><PromotionType>PROMOTION_WIDE_LOAD</PromotionType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<Impassable>true</Impassable>
</Row><FeatureType>FEATURE_JUNGLE</FeatureType>
<Impassable>true</Impassable>
I tried the following code to do the same with Hills and Rivers:
Spoiler :
<UnitPromotions_Features>
<Row>
</UnitPromotions_Features><PromotionType>PROMOTION_WIDE_LOAD</PromotionType>
<FeatureType>FEATURE_RIVER</FeatureType>
<Impassable>true</Impassable>
</Row><FeatureType>FEATURE_RIVER</FeatureType>
<Impassable>true</Impassable>
<UnitPromotions_Terrains>
<Row>
</UnitPromotions_Terrains><PromotionType>PROMOTION_WIDE_LOAD</PromotionType>
<TerrainType>TERRAIN_HILL</TerrainType>
<Impassable>true</Impassable>
</Row><TerrainType>TERRAIN_HILL</TerrainType>
<Impassable>true</Impassable>
But the river code doesn't seem to work at all (which I guess makes sense a river is not its own tile) and the hill code doesn't seem to work in conjunction with the 'all terrain costs 1 movement' promotion.
Any workarounds anyone knows or a different approach that could be taken for this?