Forest <YieldNotAdditive>

Jackkyl

Chieftain
Joined
Feb 20, 2010
Messages
7
Need help with this one.

I'm trying to disable the <yieldnotadditive> for forest in the Civ5features.xml.

I've created a file to change all the yield values (which works) but forests do not "add" they simply rewrite whatever they are on.

I'm trying to make it so a forest will add 1 production only to whatever the base yield is. This seems to be the string that I need to change.

Right now it is set to

<yieldnotadditive>true</yieldnotadditive>

I've tried false and deleting it (in the mod files) and nothing seems to overwrite the actual game line.

I don't want to have to hack the actual game file to change it.

Any suggestions? Here is the actual text from the mod file:

Spoiler :
<GameData>
<Features>
<Row>
<Type>FEATURE_FOREST</Type>
<Description>TXT_KEY_FEATURE_FOREST</Description>
<Civilopedia>TXT_KEY_CIV5_FEATURES_FOREST_TEXT</Civilopedia>
<ArtDefineTag>ART_DEF_FEATURE_FOREST</ArtDefineTag>
<Movement>2</Movement>
<SeeThrough>1</SeeThrough>
<Defense>25</Defense>
<InfluenceCost>1</InfluenceCost>
<Growth>8</Growth>
<WorldSoundscapeAudioScript>ASSS_AMBIENCE_FOREST</WorldSoundscapeAudioScript>
<EffectType>EFFECT_BIRDSCATTER</EffectType>
<EffectProbability>15</EffectProbability>
<EffectTypeTag>LEAVES</EffectTypeTag>
<Rough>true</Rough>
<PortraitIndex>3</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
</Row>
</Features><Feature_YieldChanges>
<Row>
<FeatureType>FEATURE_LAKE</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_LAKE</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>-1</Yield>
</Row>
<Row>
<FeatureType>FEATURE_JUNGLE</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>-1</Yield>
</Row>
<Row>
<FeatureType>FEATURE_OASIS</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_FOREST</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>0</Yield>
</Row>
<Row>
<FeatureType>FEATURE_FOREST</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>
<Row>
<FeatureType>FEATURE_FLOOD_PLAINS</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_CRATER</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_CRATER</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_CRATER</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_FUJI</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_FUJI</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_FUJI</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_MESA</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_MESA</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_MESA</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_REEF</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_REEF</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_REEF</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_VOLCANO</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_VOLCANO</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_VOLCANO</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_GIBRALTAR</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_GIBRALTAR</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_GIBRALTAR</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
<Row>
<FeatureType>FEATURE_GEYSER</FeatureType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_GEYSER</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>2</Yield>
</Row>
<Row>
<FeatureType>FEATURE_GEYSER</FeatureType>
<YieldType>YIELD_GOLD</YieldType>
<Yield>3</Yield>
</Row>
</Feature_YieldChanges>
</GameData>


Here is the modinfo file
Spoiler :

<?xml version="1.0" encoding="utf-8"?>
<Mod id="a2887fd8-0e01-4464-a5d3-932f391db08c" version="4">
<Properties>
<Name>DMF Tile Improvement Mod 1</Name>
<Stability>Beta</Stability>
<Description>Changes tile bonuses and improvements. Creates a more Civ 4 experience.</Description>
<Authors>Kalas</Authors>
<AffectsSavedGames>1</AffectsSavedGames>
<MinCompatibleSaveVersion>1</MinCompatibleSaveVersion>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>1</SupportsMultiplayer>
<SupportsMac>1</SupportsMac>
<ReloadLandmarkSystem>1</ReloadLandmarkSystem>
<ReloadUnitSystem>0</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="4371976F7D09699F777B556D808B64D7">Features.xml</File>
<File md5="F72B8B9C733943AC23CAC87884447305">Improvements.xml</File>
<File md5="52C60AF07234155D4215A28CAA4522E5">Resources.xml</File>
<File md5="A6CDAE5649ABC33012409E15AA1B27B8">Terrains.xml</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>Features.xml</UpdateDatabase>
<UpdateDatabase>Improvements.xml</UpdateDatabase>
<UpdateDatabase>Resources.xml</UpdateDatabase>
<UpdateDatabase>Terrains.xml</UpdateDatabase>
</OnModActivated>
</Actions>
</Mod>
 
delete the existing forest first. It won't automatically overwrite it. If it finds a Feature_Forest already defined, it will just ignore your changes.
 
This is all your mod XML need to contain to make that change.

Code:
<GameData>
	<Features>
		<Update>
			<Where Type="FEATURE_FOREST"/>
			<Set YieldNotAdditive="false"/>
		</Update>
	</Features>
</GameData>

Of course you will probably need to modify the actual yield values also.
 
<File md5="4371976F7D09699F777B556D808B64D7">Features.xm l</File>
<File md5="F72B8B9C733943AC23CAC87884447305">Improvement s.xml</File>
<File md5="52C60AF07234155D4215A28CAA4522E5">Resources.x ml</File>
<File md5="A6CDAE5649ABC33012409E15AA1B27B8">Terrains.xm l</File>

Those look odd. see the spaces. Might have just been a cut and paste glitch though.

You need to read some modding guides in the tutorials and reference section, it appears your trying to do things the civ4 way.

In civ5 you do not ever directly edit the xml files, only the tables and rows that read from them.

So to do what you want to do you would need to do something more like this;
Code:
<GameData>
<Update>
<Where Type="FEATURE_FOREST"/>
<Set YieldNotAdditive="false">
</Update>
<GameData>

that may not be exactly right, still a new to this method as well, but at least your on the right track.

oops got Emu'd
 
<Row>
<FeatureType>FEATURE_FOREST</FeatureType>
<YieldType>YIELD_PRODUCTION</YieldType>
<Yield>1</Yield>
</Row>

Forest Production yield is a flat 1, where it should probably be a +1 if you want it to be additive. Not sure how you would go about changing the actual yield though.

My guess would be something along the lines of:
<Feature_YieldChanges>
<Update>
<Where FeatureType="FEATURE_FOREST" YieldType= "YIELD_PRODUCTION"/>
<Set Yield="+1"/>
</Update>
</Feature_YieldChanges>

and it would probably have to be done in addition to changing the additive quality.
 
The question I have is not should the file be modified, but rather, does it need to be in 'this' circumstance. If a forest rests on a rocky crag, as opposed to a fertile grassland, the people who dwell gain the benefits provided by ... the forest, as the underlaying topography is covered over & unaccessible. One can still mine into the tile, and gain the benefits of the mine, as well as the forest, yes? I'm only a few evenings in the game, and still learning.
 
The question I have is not should the file be modified, but rather, does it need to be in 'this' circumstance. If a forest rests on a rocky crag, as opposed to a fertile grassland, the people who dwell gain the benefits provided by ... the forest, as the underlaying topography is covered over & unaccessible. One can still mine into the tile, and gain the benefits of the mine, as well as the forest, yes? I'm only a few evenings in the game, and still learning.

I'm pretty sure that if you have a forest on a hill tile, when you select Build Mine the first thing the worker does is chop down the forest. I think the way to get extra production out of any forested tile is with the lumber camp.
 
Back
Top Bottom