[WIP] Reducing Road Maintance Mod- HELP!

James009

Warlord
Joined
Nov 13, 2002
Messages
278
So, I've been waiting for the ModBuddy tool so that it could properly implement my reduced maintance mod. Unfortunately, it's kinda confusing and didn't really change much for me, I still can't get this to work.

Here is my code:
Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<!-- Mod: Reduces road maintance by 75% and railroad maintance by 50%. -->
<GameData>
<Routes>
<Row>
<ID>0</ID>
<Type>ROUTE_ROAD</Type>
<Description>TXT_KEY_ROUTE_ROAD</Description>
<Value>1</Value>
<AdvancedStartCost>12</AdvancedStartCost>
<Movement>30</Movement>
<FlatMovement>30</FlatMovement>
<GoldMaintenance>0.25</GoldMaintenance>
<Civilopedia>TXT_KEY_CIV5_IMPROVEMENTS_ROAD_TEXT</Civilopedia>
<PortraitIndex>40</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
</Row>
<Row>
<Type>ROUTE_RAILROAD</Type>
<Description>TXT_KEY_ROUTE_RAILROAD</Description>
<Value>2</Value>
<AdvancedStartCost>18</AdvancedStartCost>
<Movement>20</Movement>
<FlatMovement>6</FlatMovement>
<GoldMaintenance>0.5</GoldMaintenance>
<Industrial>true</Industrial>
<Civilopedia>TXT_KEY_CIV5_IMPROVEMENTS_RAILROAD_TEXT</Civilopedia>
<PortraitIndex>41</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
</Row>
</Routes>
<Route_TechMovementChanges>
<Row>
<RouteType>ROUTE_ROAD</RouteType>
<TechType>TECH_MACHINERY</TechType>
<MovementChange>-10</MovementChange>
</Row>
</Route_TechMovementChanges>
<Route_Yields>
<Row>
<RouteType>ROUTE_ROAD</RouteType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>0</Yield>
</Row>
<Row>
<RouteType>ROUTE_ROAD</RouteType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>0.75</Yield>
</Row>
<Row>
<RouteType>ROUTE_RAILROAD</RouteType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>0</Yield>
</Row>
<Row>
<RouteType>ROUTE_RAILROAD</RouteType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>0.75</Yield>
</Row>
</Route_Yields>
</GameData>

This SHOULD make 4 roads cost 1 tile upkeep but it doesn't seem to be working. Perhaps the "value" must be changed for it to work properly?

Here is the .modinfo file:
Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<Mod id="5b40f7de-41ec-42e7-a5f8-5a4f3589203e" version="1">
<Properties>
<Name>MaintanceMod</Name>
<Stability>Alpha</Stability>
<Description>This simple mod reduces road maintance by 75% and railroad maintance by 50%.

TO-DO:
- Building maintance
- Unit maintance</Description>
<Authors>James009</Authors>
<SpecialThanks>Firaxis Games</SpecialThanks>
<AffectsSavedGames>1</AffectsSavedGames>
<MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>1</SupportsMultiplayer>
<SupportsMac>1</SupportsMac>
<ReloadLandmarkSystem>0</ReloadLandmarkSystem>
<ReloadUnitSystem>0</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="0BFA52DB900D6816A636A53398467CEE">Routes.xml</File>
</Files>
</Mod>


Anyways, I hope I can fix this soon. I'd like to be using a few more roads and not have them DESTROYING my economy just for trade routes and fort access.

Thanks!
 
Well, the code to modify route costs would be this:

Code:
<GameData>
	<Routes>
		<Update>
			<Set GoldMaintenance="0.25" />
			<Where Type="ROUTE_ROAD" />
		</Update>
		<Update>
			<Set GoldMaintenance="0.5" />
			<Where Type="ROUTE_RAILROAD" />
		</Update>		
	</Routes>
</GameData>

However, I've tested it and it appears that you cannot have decimal costs. Meaning you might as well set maintenance to 0, there. :lol:
 
In doing this you would drastically reduce the bonus gained from the trade unions social policy. If you somehow figure out how to do this don't forget to update the social policy as well.
 
Yeah, I've felt the social policy needed a upgrade as well, just feels too weak as it usually saves you something like 4-6 gold.

Thanks for the <updated> code Valkrionn, I'll try that.
 
You can try the following :
Leave the Road/RR-maintenance at -1/-2 Gold.
Change Road/RR to +1 Gold per Road/RR-Tile when worked. The +1 Gold is influenced by market, bank, ... and by Golden Age.

Spoiler :

<GameData>
<Route_Yields>
<Row>
<RouteType>ROUTE_ROAD</RouteType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<RouteType>ROUTE_RAILROAD</RouteType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>1</Yield>
</Row>
</Route_Yields>
</GameData>
 
In your modinfo file, you need to put this below </Files>: (probably)
Code:
  <Actions>
    <OnModActivated>
      <UpdateDatabase>NameOfYourFile.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>
 
Top Bottom