• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Mod: Resources require route

dmieluk

Chieftain
Joined
Feb 15, 2007
Messages
28
As a test project, I thought I'd try to make it so that the Horse resource required a road before you had access to Horses.

I have been able to alter the tile yield based upon the presence of a road. There is a table called "Improvement_RouteYieldChanges" which has this effect. I verified this functionality using the following code:

Spoiler :
Code:
<GameData>
	<Improvement_RouteYieldChanges>
		<Row>
			<ImprovementType>IMPROVEMENT_FARM</ImprovementType>
			<RouteType>ROUTE_ROAD</RouteType>
			<YieldType>YIELD_GOLD</YieldType>
			<Yield>10</Yield>
		</Row>
		<Row>
			<ImprovementType>IMPROVEMENT_TRADING_POST</ImprovementType>
			<RouteType>ROUTE_ROAD</RouteType>
			<YieldType>YIELD_SCIENCE</YieldType>
			<Yield>1</Yield>
		</Row>
	</Improvement_RouteYieldChanges>
</GameData>

Using this code, a farm does yield an extra 10 gold after a road is placed to it, and the trading post does yield the extra science when it has a route.

However, I can't see any table which might alter the access to the strategic resource based upon a road to the improvement which accesses the strategic resource. The only thing I can change based upon roads are tile yields (eg. gold, production, etc.), and not strategic resource yields (horse, iron etc)

Can anyone help?
 
Code:
	<Improvement_ResourceTypes>
		<Row>
			<ImprovementType>IMPROVEMENT_MANUFACTORY</ImprovementType>
			<ResourceType>RESOURCE_IRON</ResourceType>
		</Row>
		<Row>
			<ImprovementType>IMPROVEMENT_MANUFACTORY</ImprovementType>
			<ResourceType>RESOURCE_COAL</ResourceType>
		</Row>
	</Improvement_ResourceTypes>
Makes the Manufactory both give you iron and coal, and also be buildable on top of it independent of terrain (but not feature). I don't think you can use routes with that though.
 
Back
Top Bottom