Help with Resource Output BTS

Poc

Chieftain
Joined
Jul 11, 2008
Messages
5
God I hate the XML/Python way of creating scenarios. :mad: Scenarios were much easier to create in Civ3 and its other predecessors. Sure modding was limited, as was the level of creative control, but at least people like me, who have difficulty with XML/Python could get simple stats changes done without having to scroll through endless tags in notepad...

Now on with the help; could someone aid me with changing food/production/commerce output of bonus resources in BTS? I have no clue how to achieve this despite all the reading I have done. Thanks in advance for your help.
 
The file you need to modify is CIV4BonusInfos.XML. BTS didn't modify that file, so you will find it in your Warlords directory.

For each Bonus, there is a set of values that control the extra output.

Code:
			<YieldChanges>
				<iYieldChange>0</iYieldChange>
				<iYieldChange>0</iYieldChange>
				<iYieldChange>0</iYieldChange>
			</YieldChanges>

The first is food, 2nd is production, 3rd is commerce. Those are the automatic increases for just working the tile.

To change what you get from improving the tile, you need to change CIV4ImprovementInfos.XML

Each improvement type has a block like this (Farm values shown):
Code:
			<BonusTypeStructs>
				<BonusTypeStruct>
					<BonusType>BONUS_CORN</BonusType>
					<bBonusMakesValid>1</bBonusMakesValid>
					<bBonusTrade>1</bBonusTrade>
					<iDiscoverRand>0</iDiscoverRand>
					<YieldChanges>
						<iYieldChange>2</iYieldChange>
						<iYieldChange>0</iYieldChange>
						<iYieldChange>0</iYieldChange>
					</YieldChanges>
				</BonusTypeStruct>
				<BonusTypeStruct>
					<BonusType>BONUS_RICE</BonusType>
					<bBonusMakesValid>1</bBonusMakesValid>
					<bBonusTrade>1</bBonusTrade>
					<iDiscoverRand>0</iDiscoverRand>
					<YieldChanges>
						<iYieldChange>1</iYieldChange>
						<iYieldChange>0</iYieldChange>
						<iYieldChange>0</iYieldChange>
					</YieldChanges>
				</BonusTypeStruct>
				<BonusTypeStruct>
					<BonusType>BONUS_WHEAT</BonusType>
					<bBonusMakesValid>1</bBonusMakesValid>
					<bBonusTrade>1</bBonusTrade>
					<iDiscoverRand>0</iDiscoverRand>
					<YieldChanges>
						<iYieldChange>2</iYieldChange>
						<iYieldChange>0</iYieldChange>
						<iYieldChange>0</iYieldChange>
					</YieldChanges>
				</BonusTypeStruct>
			</BonusTypeStructs>

The YieldChanges entries are just like the ones for the bonus itself - Food/Production/Commerce
 
Thanks a million for the help, zyphyr. Much appreciated!

More:

Now how about the health?

Code:
<iHealth>1</iHealth>

I know the above tags change my health value for wheat with a farm (in BTS), but I can't find where to change the value to increase/decrease health with a granary. Would I have to change the value under the building?

Also, I haven't played CIV 4 much yet, but I've recently finished playing CIV 3 for the millionth time and I was wondering if some strategic resources deplete over time such as oil, uranium, etc.? If so, where do I increase/decrease the chance the resource will disappear? Thanks again for your help.
 
Yes, the change from the Granary is controlled by the Granary itself.

CIV4BuildingInfos.xml

Code:
			<BonusHealthChanges>
				<BonusHealthChange>
					<BonusType>BONUS_CORN</BonusType>
					<iHealthChange>1</iHealthChange>
				</BonusHealthChange>
				<BonusHealthChange>
					<BonusType>BONUS_RICE</BonusType>
					<iHealthChange>1</iHealthChange>
				</BonusHealthChange>
				<BonusHealthChange>
					<BonusType>BONUS_WHEAT</BonusType>
					<iHealthChange>1</iHealthChange>
				</BonusHealthChange>
			</BonusHealthChanges>

Resources do not deplete in Civ4, though I do believe that there are mods floating around that add such a function.

BTW, the 'iDiscoverRand' listed under improvements is a chance ( 1 in X per turn) for the listed resource to appear spontaneously in a tile that has the improvement but no resource.
 
Back
Top Bottom