thombran

Chieftain
Joined
Aug 18, 2006
Messages
25
Location
Toronto, Ontario.
Hi all,

Currently working on a mod, mostly tweaking Expansion1_Governments.xml

The flat inherent bonuses to governments (not replicated in their wildcard policies) are set as "GOVERNMENTBONUS_X" Values. The xml file in question allows you to modify their percentage values, but not the type of value itself. I want to create some entirely new values for some governments, but I cannot find where "GOVERNMENTBONUS" is defined in Assets/Gameplay (since presumably I would have to find the mother file and manually define the new GOVERNMENTBONUS Types to reference upon). It seems unlikely this is defined in Governments.xml itself, since it does not specifiy what the value does or what it targets*, it seems only to be a reference to the value which should be defined elsewhere (I'm guessing another .xml file but I cannot find it).

Does anybody know where the GOVERNMENTBONUS values are defined?

*In the case that they are indeed defined in Governments.xml, where does it define what they target? For example, in
Code:
<Value>GOVERNMENTBONUS_ENVOYS</Value>
it sets the percetange rate in the following row but does not specify any further, such as if it refers to envoy points, treshold, or tokens. Similarly,
Code:
<Value>GOVERNMENTBONUS_WODER_CONSTRUCTION</Value>
does not define whether the parameter is global to all player cities and what it means by "wonder" - leading me to conclude that these values are defined elsewhere.

Many thanks, :thumbsup:
TB.
 
You need to look at the modifier definitions for the type of government that is assigned the bonus. In the case of GOVERNMENTBONUS_WONDER_CONSTRUCTION this is attached to GOVERNMENT_AUTOCRACY, which then has modifiers assigned to GOVERNMENT_AUTOCRACY that define the modifier-type. For the accumulating effect, this is defined as:
Code:
<Row>
	<ModifierId>AUTOCRACY_WONDERS_ACCUMULATING</ModifierId>
	<ModifierType>MODIFIER_PLAYER_GOVERNMENT_ACCUMULATING_BONUS</ModifierType>
</Row>
GOVERNMENTBONUS_WONDER_CONSTRUCTION is then assigned as a modifier argument to this modifierID to tell the game which of the Firaxis-defined bonues effects should be applied to AUTOCRACY_WONDERS_ACCUMULATING.

Government effects for the bonuses are generally applied at the player level so affect all the player's cities or units that qualify for the effect. The effects themselves for the extra government bonus (such as the flat wonder construction and the accumulating bonus to wonder construction) appear to be defined in the game's core DLL to which we have no access. All that is done in the xml files is to define the various types of bonuses Firaxis applied, and what their flat and accumulating intervals and percentages should be, but not the effect itself.

Autocracy also has direct effects applied only to the player capital, such as
Code:
<Row>
	<ModifierId>AUTOCRACY_CULTURE</ModifierId>
	<ModifierType>MODIFIER_PLAYER_CAPITAL_CITY_ADJUST_CITY_YIELD_CHANGE</ModifierType>
</Row>
but this modifier and it's affect is not tied into the bonus system. So you could create different effects for a given government than those types of effects for the flat and accumulating bonuses, but you would not be able to implement them as accumulating effects -- you would have to directly give the static set effect to the government-type like is given to the capital city under autocracy.
 
You need to look at the modifier definitions for the type of government that is assigned the bonus. In the case of GOVERNMENTBONUS_WONDER_CONSTRUCTION this is attached to GOVERNMENT_AUTOCRACY, which then has modifiers assigned to GOVERNMENT_AUTOCRACY that define the modifier-type. For the accumulating effect, this is defined as:
Code:
<Row>
    <ModifierId>AUTOCRACY_WONDERS_ACCUMULATING</ModifierId>
    <ModifierType>MODIFIER_PLAYER_GOVERNMENT_ACCUMULATING_BONUS</ModifierType>
</Row>
GOVERNMENTBONUS_WONDER_CONSTRUCTION is then assigned as a modifier argument to this modifierID to tell the game which of the Firaxis-defined bonues effects should be applied to AUTOCRACY_WONDERS_ACCUMULATING.

Government effects for the bonuses are generally applied at the player level so affect all the player's cities or units that qualify for the effect. The effects themselves for the extra government bonus (such as the flat wonder construction and the accumulating bonus to wonder construction) appear to be defined in the game's core DLL to which we have no access. All that is done in the xml files is to define the various types of bonuses Firaxis applied, and what their flat and accumulating intervals and percentages should be, but not the effect itself.

Autocracy also has direct effects applied only to the player capital, such as
Code:
<Row>
    <ModifierId>AUTOCRACY_CULTURE</ModifierId>
    <ModifierType>MODIFIER_PLAYER_CAPITAL_CITY_ADJUST_CITY_YIELD_CHANGE</ModifierType>
</Row>
but this modifier and it's affect is not tied into the bonus system. So you could create different effects for a given government than those types of effects for the flat and accumulating bonuses, but you would not be able to implement them as accumulating effects -- you would have to directly give the static set effect to the government-type like is given to the capital city under autocracy.

Hi LeeS, thank you very much for your response.

It's a pity we can't access those bonus effects, since the main point of the mod I'm working on is to overhaul those bonuses. My workaround is to disable all governmentbonuses that don't have a place in my changes (change them to Chiefdom's NO_GOVERNMENTBONUS), and instead give static effect bonuses as separate entries to the Modifier list. I'm not sure how this would appear in-game on the civics tree info view (the new 'inherent' bonus lumped together with the accumulating, I suppose). Then tie the new legacy policy to the new modifier. It would be like bypassing accumulating government bonuses to instead have two inherent bonus effects, which I think should be fine.

Would it be possible to add more than one inherent effect, but only tie the wildcard policy to one of those? Will the game apply both inherent effects consecutively?

Thanks again for your help, very insightful,

TB.
 
Top Bottom