Modifying the XML of Civics (check my code?)

Zen Blade

Warlord
Joined
Oct 31, 2008
Messages
247
Hey folks,

I have been altering some of the civics/social policy branches for my Sengoku mod.

The current problem I am coming upon is that I don't seem capable of disabling other branches. In game, a Civ that starts with Branch A, can still choose Branch B (even though Branch B should be disabled).

The normal xml is:

Spoiler :
<!-- MODDERS:The default game rules are designed to support simple, mirrored relationships (e.g. Piety blocks Rationalism, and Rationalism blocks Piety). The Further from this you stray the less likely it is to work. You have been warned!-->
<PolicyBranch_Disables>
<Row>
<PolicyBranchType>POLICY_BRANCH_LIBERTY</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_AUTOCRACY</PolicyBranchDisable>
</Row>
<Row>
<PolicyBranchType>POLICY_BRANCH_AUTOCRACY</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_LIBERTY</PolicyBranchDisable>
</Row>
<Row>
<PolicyBranchType>POLICY_BRANCH_PIETY</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_RATIONALISM</PolicyBranchDisable>
</Row>
<Row>
<PolicyBranchType>POLICY_BRANCH_RATIONALISM</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_PIETY</PolicyBranchDisable>
</Row>
<Row>
<PolicyBranchType>POLICY_BRANCH_FREEDOM</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_AUTOCRACY</PolicyBranchDisable>
</Row>
<Row>
<PolicyBranchType>POLICY_BRANCH_AUTOCRACY</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_FREEDOM</PolicyBranchDisable>
</Row>
</PolicyBranch_Disables>



I have made a couple of changes:

Spoiler :
<PolicyBranch_Disables>
<Delete PolicyBranchType="POLICY_BRANCH_RATIONALISM"/>
<Update>
<Where PolicyBranchType="POLICY_BRANCH_PIETY"/>
<Set PolicyBranchDisable="POLICY_BRANCH_PATRONAGE"/>
</Update>

<Row>
<PolicyBranchType>POLICY_BRANCH_PATRONAGE</PolicyBranchType>
<PolicyBranchDisable>POLICY_BRANCH_PIETY</PolicyBranchDisable>
</Row>
</PolicyBranch_Disables>



If anyone sees an obvious error, let me know.
Or, if you have done something similar and it worked, please let me know what you changed. Any other ideas are welcome.

thanks,

-Zen Blade
 
Remove the deletion of Rationalism.
 
One problem that I can see is that you've got one Delete but not the other. So taking Rationalism no longer locks out Piety, but taking Piety still locks out Rationalism. (You'd need a second delete, either on PolicyBranchType=Piety, or PolicyBranchDisabled=Rationalism. Preferably on the disable, to prevent a conflict with your addition.)
 
Removing deletion did not solve the problem.

also, it appears that none of the disables are currently working.
I am going to try a few things... but if anyone else has had experience with the disables, let me know what you have found.
 
Okay. Well...um, is your XML being referenced by Actions?
 
putmalk,

yes. If you look at my sengoku thread, you can see the civic changes. I think the issue is specific to disables (in the xml there is even a warning that it can be tricky).
 
FYI,

for any interested, what eventually worked was deleting both strings of a relationship (disable) that I was trying to get rid of. AND then, introducing new relationships. Updates did not work.

-Zen Blade
 
Glad everything's working out!
 
Top Bottom