Modding Policies Question

Balaak

Chieftain
Joined
Dec 23, 2002
Messages
14
Hello:

I have ModBuddy up and have made some personal mods. I have an XML Policy question.

Here is the current XML on the Policy section that I want to change:

Code:
	<Policy_BuildingClassCultureChanges>
		<Row>
			<PolicyType>POLICY_TRADITION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
			<CultureChange>3</CultureChange>
		</Row>
		<Row>
			<PolicyType>POLICY_FREE_RELIGION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_MONUMENT</BuildingClassType>
			<CultureChange>1</CultureChange>
		</Row>
		<Row>
			<PolicyType>POLICY_FREE_RELIGION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_TEMPLE</BuildingClassType>
			<CultureChange>1</CultureChange>
		</Row>
		<Row>
			<PolicyType>POLICY_FREE_RELIGION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_MONASTERY</BuildingClassType>
			<CultureChange>1</CultureChange>
		</Row>
	</Policy_BuildingClassCultureChanges>


Here is what I was thinking/asking: if I put in the following into a ModBuddy XML, would it change all 3 BuildingClassTypes for Policy Free Religion?

Code:
	<Policy_BuildingClassCultureChanges>
		<Update>
			<Where PolicyType="POLICY_FREE_RELIGION"/>
			<Set CultureChange="2"/>
		</Update>
	</Policy_BuildingClassCultureChanges>

Thanks in advance!
 
Hello:

I have ModBuddy up and have made some personal mods. I have an XML Policy question.

Here is the current XML on the Policy section that I want to change:

Code:
	<Policy_BuildingClassCultureChanges>
		<Row>
			<PolicyType>POLICY_TRADITION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_PALACE</BuildingClassType>
			<CultureChange>3</CultureChange>
		</Row>
		<Row>
			<PolicyType>POLICY_FREE_RELIGION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_MONUMENT</BuildingClassType>
			<CultureChange>1</CultureChange>
		</Row>
		<Row>
			<PolicyType>POLICY_FREE_RELIGION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_TEMPLE</BuildingClassType>
			<CultureChange>1</CultureChange>
		</Row>
		<Row>
			<PolicyType>POLICY_FREE_RELIGION</PolicyType>
			<BuildingClassType>BUILDINGCLASS_MONASTERY</BuildingClassType>
			<CultureChange>1</CultureChange>
		</Row>
	</Policy_BuildingClassCultureChanges>


Here is what I was thinking/asking: if I put in the following into a ModBuddy XML, would it change all 3 BuildingClassTypes for Policy Free Religion?

Code:
	<Policy_BuildingClassCultureChanges>
		<Update>
			<Where PolicyType="POLICY_FREE_RELIGION"/>
			<Set CultureChange="2"/>
		</Update>
	</Policy_BuildingClassCultureChanges>

Thanks in advance!
Yup.

This is both the good and the bad with the way <Updates> work. You can change multiple pieces of info in the game's database with one <Update>, but if that isn't what you intend you can go a little wallbash-crazy trying to understand why all those other game-effects got changed.
 
Excellent, thanks!

I was aware by reading some of the modding basics threads that such a change can be too general when you want to be specific, and thus multiple "where"s need to be used to narrow it down.

In this case, though, I wanted to do all three without having to specify which building-type.

:goodjob:
 
and thus multiple "where"s need to be used to narrow it down.

For future reference ...

Not multiple <Where>s but multiple conditions (attributes) on a single <Where>

The following is an error

Code:
<Policy_BuildingClassCultureChanges>
    <Update>
        <Where PolicyType="POLICY_FREE_RELIGION"/>
        <Where BuildingClassType="BUILDINGCLASS_MONASTERY"/>
        <Set CultureChange="2"/>
    </Update>
</Policy_BuildingClassCultureChanges>

The following is correct

Code:
<Policy_BuildingClassCultureChanges>
    <Update>
        <Where PolicyType="POLICY_FREE_RELIGION" BuildingClassType="BUILDINGCLASS_MONASTERY"/>
        <Set CultureChange="2"/>
    </Update>
</Policy_BuildingClassCultureChanges>
 
Many thanks! That saves me a future headache, for sure. I would have done it wrong.
 
Top Bottom