Unique Ability that changes fallout yield

Chuckleluck

Chieftain
Joined
Aug 12, 2014
Messages
7
Hi, I'm new to modding Civ 5 so I apologize if this is something simple or if it's already been covered (I did some googling but didn't find anything on this topic).

I'm making a mod that adds a new civilization. For the unique ability, I'm trying to change the yield of fallout tiles to be +1 food (and no negative production or gold effects). I've been looking at the CIV5Traits.xml file, but I can't find anything for fallout or other "feature" terrain tiles. I'd appreciate it if someone could point me in the right direction on how I could accomplish this unique ability. :)
 
Hey Chuckleluck, without using LUA scripts or messing around in the DLL, you can only modify the yield of unimproved features. As regular improvements are destroyed after an nuclear explosion (and as you need to scrub out the fallout to re-improve the tile anyways), that should not be a problem unless you are adding in a new improvement that can build on fallouts.

The table you will want to use is Trait_UnimprovedFeatureYieldChanges. Sample SQL code template below:
Code:
INSERT INTO Trait_Unimproved_FeatureYieldChanges VALUES ("TRAIT_MY_TRAIT_NAME", "FEATURE_FALLOUT", "YIELD_FOOD", 4);
INSERT INTO Trait_Unimproved_FeatureYieldChanges VALUES ("TRAIT_MY_TRAIT_NAME", "FEATURE_FALLOUT", "YIELD_PRODUCTION", 3);
INSERT INTO Trait_Unimproved_FeatureYieldChanges VALUES ("TRAIT_MY_TRAIT_NAME", "FEATURE_FALLOUT", "YIELD_GOLD", 3);

Replace "TRAIT_MY_TRAIT" with your civilization's trait name... we give +4 Food and +3 Gold/Production because of the inherent -3F/-3P/-3G so that it equalizes out to +1F/+0P/+0G.

And no, you do not need to specify column names when using an INSERT command - that is only necessary when you wish to initialize only some of the column values.

Edit: fixed table name
 
Hi, I'm new to modding Civ 5 so I apologize if this is something simple or if it's already been covered (I did some googling but didn't find anything on this topic).

I'm making a mod that adds a new civilization. For the unique ability, I'm trying to change the yield of fallout tiles to be +1 food (and no negative production or gold effects). I've been looking at the CIV5Traits.xml file, but I can't find anything for fallout or other "feature" terrain tiles. I'd appreciate it if someone could point me in the right direction on how I could accomplish this unique ability. :)

One way to do it is to create an invisible "dummy building" that would use <Building_FeatureYieldChanges> to cancel out the negative yields Fallout has (and add the extra +1 Food). Since I believe Fallout yields -3 Food, Production, and Gold, then you'd want to have your dummy building add +4 Food, +3 Production, and +3 Gold. Then, under <Traits> you can use <FreeBuilding> to give each of your cities the dummy building.

If you want to see an example of this, look up Huitzil's Palace of the Earth Spirits civ -- it does something similar with Fallout using a dummy building.
 
There is a mistake in ThorHammerz' post - the table name is actually Trait_UnimprovedFeatureYieldChanges (without the second _). But generally I think his solution is better than bouncymischa's, because, as far as I know, the AI will be aware that Fallout gives more food, which will affect its decisions where to found cities.

Btw the fact that you haven't found anything about Features in the Traits xml file suggests that you probably checked the vanilla version of the file instead of the BNW version, which is located in assets\DLC\Expansion2\Gameplay\XML\Civilizations.
 
Back
Top Bottom