Modding Global Defines

Balaak

Chieftain
Joined
Dec 23, 2002
Messages
14
I made some changes in the Global Defines, but these appear to not be having an effect, except perhaps the Build on River change. Not sure. But specifically, the barbarian allowable experience has not changed in the game. Here's my XML in ModBuddy:

Code:
<GameData>
	<Defines>
		<Update>
			<set	 PLOT_VISIBILITY_RANGE="2"
				 RIVER_SOURCE_MIN_SEAWATER_RANGE="4"
				 SETTLER_BUILD_ON_COAST_PERCENT="10"
				 BUILD_ON_RIVER_PERCENT="75"
				 BARBARIAN_MAX_XP_VALUE="120"/>
		</Update>
	</Defines>
</GameData>

Is there anything wrong in it?
 
There's <set just under <Update> which needs to be deleted, as it will cause it to not work. You also have /> after the barbarian max value, which shouldn't be there.

Personally, I've updated the details via .sql. Here's an example (which actually includes the barbarian max xp value, as it's something I have in my mod:

Code:
--------------------------------------------------------------------------------------------------
-- EXPERIENCE DEFINES 
--------------------------------------------------------------------------------------------------
UPDATE Defines				 SET Value = 100						WHERE Name = 'BARBARIAN_MAX_XP_VALUE';

--------------------------------------------------------------------------------------------------
-- TRADE SHIP DEFINES 
--------------------------------------------------------------------------------------------------
UPDATE Defines				 SET Value = 10						WHERE Name = 'EXOTIC_GOODS_GOLD_MIN';
UPDATE Defines				 SET Value = 50						WHERE Name = 'EXOTIC_GOODS_GOLD_MAX';
UPDATE Defines				 SET Value = 2						WHERE Name = 'EXOTIC_GOODS_XP_MIN';
UPDATE Defines				 SET Value = 10						WHERE Name = 'EXOTIC_GOODS_XP_MAX';


--------------------------------------------------------------------------------------------------
-- BUILDING RESOURCE PREREQUISITE DEFINE 
--------------------------------------------------------------------------------------------------
UPDATE Defines				 SET Value = 7						WHERE Name = 'NUM_BUILDING_RESOURCE_PREREQS';

--------------------------------------------------------------------------------------------------
-- CITY COMBAT DEFINES 
--------------------------------------------------------------------------------------------------
UPDATE Defines				 SET Value = 500						WHERE Name = 'CITY_STRENGTH_DEFAULT';
 
Ah... And then also the > at the end of all the "sets."

Very good, thanks!
 
Hmm, doesn't like this, either.

Code:
<GameData>
	<Defines>
		<Update>
			   	 PLOT_VISIBILITY_RANGE="2"
				 RIVER_SOURCE_MIN_SEAWATER_RANGE="4"
				 SETTLER_BUILD_ON_COAST_PERCENT="10"
				 BUILD_ON_RIVER_PERCENT="75"
				 BARBARIAN_MAX_XP_VALUE="120"
		</Update>
	</Defines>
</GameData>

It should work...
 
Check the log files (see the first link in my sig), you'll be getting all kinds of errors about unknown columns

Look at the actual definition of the Define table, it only has "Name" and "Value" columns.

Code:
<GameData>
	<Defines>
		<Update>
			<Where Name="PLOT_VISIBILITY_RANGE"/>
			<Set Value="2"/>
		</Update>
		<Update>
			<Where Name="RIVER_SOURCE_MIN_SEAWATER_RANGE"/>
			<Set Value="4"/>
		</Update>
		<Update>
			<Where Name="SETTLER_BUILD_ON_COAST_PERCENT"/>
			<Set Value="10"/>
		</Update>
		<Update>
			<Where Name="BUILD_ON_RIVER_PERCENT"/>
			<Set Value="75"/>
		</Update>
		<Update>
			<Where Name="BARBARIAN_MAX_XP_VALUE"/>
			<Set Value="120"/>
		</Update>
	</Defines>
</GameData>
 
Ah, I was wondering if there was a "Set Value=" type of command. Been poring over the tutorials and examples but not seeing that specific Global as an example.

Was just reading another post of yours about Common Mistakes - was just looking at the "Definitions" and figuring to look at the top of the table.

Thanks!
 
In using the Database Log you recommended, I came across an error I don't grasp.

In attempting to give the Colosseum a bit of the previous Civ games flavor, I attempted to add 1 culture.

I did the following:

Code:
<GameData>
	<Buildings>
		<Replace>
			<Type>BUILDING_COLOSSEUM</Type>
			<BuildingClass>BUILDINGCLASS_COLOSSEUM</BuildingClass>
			<FreeStartEra>ERA_INDUSTRIAL</FreeStartEra>
			<Cost>100</Cost>
			<GoldMaintenance>1</GoldMaintenance>
			<PrereqTech>TECH_CONSTRUCTION</PrereqTech>
			<Help>TXT_KEY_BUILDING_COLOSSEUM_STRATEGY</Help>
			<Description>TXT_KEY_BUILDING_COLOSSEUM</Description>
			<Civilopedia>TXT_KEY_CIV5_BUILDINGS_COLISEUM_TEXT</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_COLOSSEUM_STRATEGY</Strategy>
			<ArtDefineTag>COLESSEUM</ArtDefineTag>
			<MinAreaSize>-1</MinAreaSize>
			<Culture>1</Culture>
			<ConquestProb>100</ConquestProb>
			<Happiness>2</Happiness>
			<HurryCostModifier>25</HurryCostModifier>
			<DisplayPosition>2</DisplayPosition>
			<ArtInfoCulturalVariation>true</ArtInfoCulturalVariation>
			<IconAtlas>BW_ATLAS_1</IconAtlas>
			<PortraitIndex>23</PortraitIndex>
		</Replace>
	</Buildings>	
</GameData>

That's from my Modbuddy ShrinesTs.XML file. However, this turns up the following error:

Code:
[182703.953] table Buildings has no column named Culture
[182703.953] In Query - insert or replace into Buildings('Type', 'BuildingClass', 'FreeStartEra', 'Cost', 'GoldMaintenance', 'PrereqTech', 'Help', 'Description', 'Civilopedia', 'Strategy', 'ArtDefineTag', 'MinAreaSize', 'Culture', 'ConquestProb', 'Happiness', 'HurryCostModifier', 'DisplayPosition', 'ArtInfoCulturalVariation', 'IconAtlas', 'PortraitIndex') values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);
[182703.953] In XMLSerializer while updating table Buildings from file ShrinesTs.xml.
[182703.953] no such column: Culture
[182703.953] In Query - UPDATE Buildings SET "Culture" = ? WHERE "Type" = ?;
[182703.953] Database::XMLSerializer (Buildings.xml): There was an error executing the update statement! See Database.log for details.
[182703.953] In XMLSerializer while updating table Buildings from file Buildings.xml.

I see there it also objected to my Buildings file, where I attempted to give The Great Library a culture boost with a where/type and set culture command. Well, I'll post it so you can see.

Code:
<GameData>
	<Buildings>
		<Update>
			<Where Type="BUILDING_GREAT_LIBRARY"/>
			<Set Culture="3"/>
		</Update>
	</Buildings>
</GameData>

Not sure why it's returning column errors when I am using existing definitions, as in the latter case.
 
Culture was a column in Vanilla, but turned into a yield in G&K/BNW - make sure you are looking at the correct set of xml files for the game you are playing

Vanilla - C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\Assets\Gameplay\XML
G&K - C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\Assets\DLC\Expansion\Gameplay\XML
BNW - C:\Program Files (x86)\Steam\SteamApps\common\Sid Meier's Civilization V\Assets\DLC\Expansion2\Gameplay\XML
 
Very good, thank you. Yes, I knew there were some different name-types floating around in my head. Didn't know they switched file types in the expansions.

Thanks! I'll be looking there.
 
This might sound like a stupid question, since it's a global define, but is there any way to edit these values for a specific civilization?
 
Top Bottom