[BNW] Adding Food Penalties as a Trait

Silvermyr

Chieftain
Joined
May 15, 2019
Messages
22
I have been trying to give a food penalty to my new civ. My idea was to add a dummy building to every city with the script from the Floating Gardens from the Aztec, like so:

<Building_YieldModifiers>
-<Row>
<BuildingType>BUILDING_TRAIT_RINFAC</BuildingType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>-25</Yield>
</Row>
</Building_YieldModifiers>


Then use the "freebuilding" command under the trait table to give one to every city. However, for some reason the civ does not show when I start up my game. Looking through the databse log does not reveal any issues from what I can see. Since this is the first time I use a dummy building I figured I should ask what went wrong.
 

Attachments

Okay, so after that fiasco, let's try again.

I also tinkered a little bit with this and while it still does not work I now have the messages:

[417.421] columns StrategicViewType, TileType are not unique
[417.421] While executing - 'INSERT INTO ArtDefine_StrategicView(StrategicViewType, TileType, Asset) VALUES(?,?,?)'
[424.421] no such table: ContentPackage.LocalizedText

in the data log. Does anyone know what to do about these messages? I can't recall seeing them before.
 

Attachments

You get those quoted errors you show above even with no mods enabled and running. They're Firaxis problems which they never fixed because it actually has no negative effect other than to clutter Database.log.

Database.log shows the following, however:
Code:
[2832.921] Invalid Reference on Civilization_BuildingClassOverrides.CivilizationType - "CIVILIZATION_FAC" does not exist in Civilizations
[2832.968] Invalid Reference on Civilization_Leaders.LeaderheadType - "LEADER_FACTORYDASH" does not exist in Leaders
[2833.000] Invalid Reference on Civilization_UnitClassOverrides.CivilizationType - "CIVILIZATION_FAC" does not exist in Civilizations
Your code:
Code:
<GameData>
	-<Civilizations>


		-<Row>
			<Type>CIVILIZATION_FCT</Type>
and
Code:
	<Civilization_BuildingClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_FAC</CivilizationType>
			<BuildingClassType>BUILDINGCLASS_FACTORY</BuildingClassType>
			<BuildingType>BUILDING_RINBUILDING</BuildingType>
		</Row>
	</Civilization_BuildingClassOverrides>
-------------

Code:
	<Civilization_UnitClassOverrides>
		<Row>
			<CivilizationType>CIVILIZATION_FAC</CivilizationType>
			<UnitClassType>UNITCLASS_MARINE</UnitClassType>
			<UnitType>UNIT_FIELDMEDIC</UnitType>
		</Row>
	</Civilization_UnitClassOverrides>
-------------------------------------------

From your modinfo file:
Code:
    <OnModActivated>
      <UpdateDatabase>Art/Factory_Scene.xml</UpdateDatabase>
      <UpdateDatabase>XML/City Names.xml</UpdateDatabase>
      <UpdateDatabase>XML/Factory Building.xml</UpdateDatabase>
      <UpdateDatabase>XML/Field Medic.xml</UpdateDatabase>
      <UpdateDatabase>XML/Rainbow Factory.xml</UpdateDatabase>
      <UpdateDatabase>XML/Sound.xml</UpdateDatabase>
      <UpdateDatabase>XML/Spy Table.xml</UpdateDatabase>
      <UpdateDatabase>XML/TraitBuilding.xml</UpdateDatabase>
      <UpdateDatabase>XML/Atlas.xml</UpdateDatabase>
    </OnModActivated>
The "FactoryDash.xml" is not listed so is never being activated and added into the game's database. Your civ therefore has no leader so the game refuses to show it as a valid civ.
 
Back
Top Bottom