[GS] No surprise War modifier not working

Riker13

King
Joined
Nov 9, 2001
Messages
853
Location
UK
Hi all and Happy New Year,
As the title suggests this modifier does not work, is it because I need requirements?

Code:
<TraitModifiers>
<Row TraitType="TRAIT_CIVILIZATION_UNITED_WE_STAND" ModifierId="TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA"/>

<Row TraitType="TRAIT_CIVILIZATION_UNITED_WE_STAND" ModifierId="TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA"/>
</TraitModifiers>

<Modifiers>
Row>
<ModifierId>TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA</ModifierId>
          <ModifierType>MODIFIER_PLAYER_ADJUST_BANNED_DIPLOMATIC_ACTION</ModifierType>
</Row>
<Row>
<ModifierId>TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_BANNED_DIPLOMATIC_ACTION_SPECIFIC_CIVILIZATION</ModifierType>
</Row>
</Modifiers>

<ModifierArguments>
<Row>
<ModifierId>TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA</ModifierId>
<Name>Banned</Name>
<Value>true</Value>
</Row>
<Row>
<ModifierId>TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA</ModifierId>
<Name>DiplomaticActionType</Name>
<Value>DIPLOACTION_DECLARE_SURPRISE_WAR</Value>
</Row>
<Row>

<ModifierId>TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA</ModifierId>
<Name>CivilizationType</Name>
<Value>CIVILIZATION_BRITANNIA</Value>
</Row>
<Row>
<ModifierId>TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA</ModifierId>
<Name>DiplomaticActionType</Name>
<Value>DIPLOACTION_DECLARE_SURPRISE_WAR</Value>
</Row>
</ModifierArguments>
 
Last edited:
If this is directly-copied from your actual code, and you actually do have this, then your 1st major problem is right here:
Code:
<TraitModifiers>
<Row TraitType="TRAIT_CIVILIZATION_UNITED_WE_STAND" ModifierId="TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA"/>

<Row TraitType="TRAIT_CIVILIZATION_UNITED_WE_STAND" ModifierId="TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA"/>
</TraitModifiers>
You are causing a Unique Constraint error by entering the same exact data twice into the same table, which the game will never accept for any game-table. It ceases reading anything further from within the same file.

Snipped from the definition of the table
Code:
TABLE "TraitModifiers" (
		"TraitType" TEXT NOT NULL,
		"ModifierId" TEXT NOT NULL,
		PRIMARY KEY(TraitType, ModifierId),
The combination of data in Primary Key columns must always be unique to all other combinations of data within the same table for those Primary Key columns.
 
Hi LeeS,
Nope one Trait is
TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA
The other is
TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA
FOR and ON.
 
Part of your issue is here:
Code:
	<TraitModifiers>
		<!--Canada-->
		<Row>
			<TraitType>TRAIT_CIVILIZATION_FACES_OF_PEACE</TraitType>
			<ModifierId>TRAIT_NO_SUPRISE_WAR_FOR_CANADA</ModifierId>
		</Row>
		<Row>
			<TraitType>TRAIT_LEADER_MAJOR_CIV</TraitType>
			<ModifierId>TRAIT_NO_SUPRISE_WAR_ON_CANADA</ModifierId>
		</Row>
</TraitModifiers>
While you are using
Code:
<TraitModifiers>
	<Row TraitType="TRAIT_CIVILIZATION_UNITED_WE_STAND" ModifierId="TRAIT_RIKER_NO_SUPRISE_WAR_FOR_BRITANNIA"/>

	<Row TraitType="TRAIT_CIVILIZATION_UNITED_WE_STAND" ModifierId="TRAIT_RIKER_NO_SUPRISE_WAR_ON_BRITANNIA"/>
</TraitModifiers>
The "ON" modifier needs to be applied to the TRAIT_LEADER_MAJOR_CIV. Not sure why the "FOR" modifier would not be working since it appears to be a direct copy of what is used by Firaxis for Canada.

Is TRAIT_CIVILIZATION_UNITED_WE_STAND directly attached to CIVILIZATION_BRITANNIA in table <CivilizationTraits> ?

No RequirementSetId's are used by Firaxis for the Canada effect so you should not need a RequirementSetId either.
 
I wonder if it's because War On is a Leader trait not a Civilization trait?
 
Probably has to do with the way they coded the effect-type for MODIFIER_PLAYER_ADJUST_BANNED_DIPLOMATIC_ACTION_SPECIFIC_CIVILIZATION
It's probably done differently in the DLL than for the effect-type of MODIFIER_PLAYER_ADJUST_BANNED_DIPLOMATIC_ACTION

But we cannot know: we can only guesstimate.
 
After going through with my magnifying glass I noticed that the Original Canadian version has TRAIT_NO_SUPRISE_WAR_FOR_CANADA (SUPRISE) and DIPLOACTION_DECLARE_SURPRISE_WAR (SURPRISE).
Two different spellings.
 
The miss or inconsistent spelling of surprise won't make any difference in the names of ModifierId's or TraitType's so long as the missed spelling is used consistently everywhere the ModifierId or TraitType is given. Even an incorrect spelling in the Diploaction name would not make any difference so long as the selected spelling is used consistently throughout the game. It's whether or not the game DLL is looking for DIPLOACTION_DECLARE_SURPRISE_WAR or DIPLOACTION_DECLARE_SUPRISE_WAR. You should use exactly the diplo-action tag name as Firaxis does for Canada's trait effect.

Firaxis could have labelled the diplo-action DIPLOACTION_CONSUME_CHEESEBURGER so long as they hooked it up that way in the game's DLL: it just wouldn't be very easy for anyone including themselves to remember when a "DIPLOACTION_CONSUME_CHEESEBURGER" is needed as opposed to a "DIPLOACTION_TAKE_A_NAP".
 
Top Bottom