Social Policy Prereqs

Jagged1971

Chieftain
Joined
Jun 28, 2009
Messages
35
Location
The US
I'm using a small mod that ends the technology at the Renaissance, as such a couple of the social policies end up never being used and personally, I think they are two of the most effective. I'd like to either enable those two earlier in the game or perhaps even removes the policy prereqs altogether.

This is what I came up with:

<PolicyBranchTypes>
<Update>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_PIETY"/>
</Row>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_PATRONAGE"/>
</Row>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_COMMERCE"/>
</Row>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_RATIONALISM"/>
</Row>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_FREEDOM"/>
</Row>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_ORDER"/>
</Row>
<Row>
<Set EraPrereq="ERA_ANCIENT"/>
<Where Type="POLICY_BRANCH_AUTOCRACY"/>
</Row>
</Update>
</PolicyBranchTypes>

But it's not working at all. Can anyone tell what I'm doing wrong? And thanks in advance if you can be of any help!

Edit- Also, if I may ask, When you have already built a mod, and you go back and change an existing XML code sheet, but you don't add or remove anything else, is it necessary to go back and rebuild it?
 
Okay, when it comes to update syntax, this is the appropriate form:

Code:
<Update>
 <Where>
  <X></X>
  <Y></Y>
 </Where>
 <Set>
  <Z></Z>
  </A></A>
 </Set>
</Update>
<Update>
 <Where>
  <X></X>
  <Y></Y>
 </Where>
 <Set>
  <Z></Z>
  </A></A>
 </Set>
</Update>

There are variations of this:
Code:
<Update>
 <Where X="Y"/>
 <Set Z="A" B="C"/>
</Update>
<Update>
 <Where X="Y"/>
 <Set Z="A" B="C"/>
</Update>

So a full update file would look like:

Code:
<GameData>
  <Units>
    <Update>
       <Where Type="UNIT_GREEK_HOPLITE"/>
       <Set>
          <Combat>9999</Combat>
       </Set>
    </Update>
    <Update>
       <Where Type="UNIT_INFANTRY"/>
       <Set>
          <Combat>1</Combat>
       </Set>
    </Update>
  </Units>
</GameData>

or

<GameData>
  <Units>
     <Where Type="UNIT_INFANTRY"/>
     <Set Combat="9999" Moves="4"/>
  </Units>
</GameData>
 
Thank you so much for that bit of coding above though, I will keep that handy for other uses! You're a gentleman and a scholar!

As to my issue..Ha ha...

OMG, I'm an idiot! I didn't realize I'd put those <row> tags in when I did this late at night!

Removing them fixed it perfectly. NVM!

*feels stupid*
 
Thank you so much for that bit of coding above though, I will keep that handy for other uses! You're a gentleman and a scholar!

As to my issue..Ha ha...

OMG, I'm an idiot! I didn't realize I'd put those <row> tags in when I did this late at night!

Removing them fixed it perfectly. NVM!

*feels stupid*

Ya I figured if I told you the correct update syntax you'd find that <Row> shouldn't be there. XD
 
So, I'm also trying to move 6 industrial era techs back to the renaissance, but a strange thing is happening.

The techs do not actually show up in the game, but I get three "???" techs that are not playable or usable.

I'm using a basic code that looks like this:
Spoiler :

<Row>
<Type>TECH_BIOLOGY</Type>
<Era>ERA_RENAISSANCE</Era>
</Row>


I went back to the <row> tags because other variations were simply not working!

Again, thanks if you can offer any assistance, I see from the hub that you're a busy man...
 
You have to update again. Using <Row> is adding to the table, you're essentially adding a new tech called TECH_BIOLOGY, with the only attributes being its era. This is completely incorrect and will break the UI and the gameplay.

Use the update syntax. The form is:

Code:
<GameData>
 <Technologies>
  <Update>
   <Where Type="TECH_BIOLOGY"/>
   <Set>
    <Era>ERA_RENAISSANCE</Era>
    <GridX>x</GridX> <!-- set to whatever x coordinate you want. this is the column. agriculture is 0, the next column is 1, etc. -->
    <GridY>y</GridY> <!-- set to whatever y coordinate you want. this is the row. sailing is 0, iron working is 9, etc. -->
   </Set>
  </Update>
 </Technologies>
 <Technology_PrereqTechs>
  <Delete TechType="TECH_BIOLOGY"/>
  <Row>
   <TechType>TECH_BIOLOGY</TechType>
   <PrereqTech>TECH_whatever</PrereqTech>
  </Row>
 </Techology_PrereqTechs>
</GameData>

You see what I mean by this? You have to carefully plan your tree so that when you place the techs and prereqs so it flows smoothly. I'd recommend excel.

Now, if you're not playing with prereqs and just with the eras, then all you have to do is replace the first column of the era you're trying to push back with the era before it. For example, Biology, Steam Power, and Dynamite (?) are the first techs in the Industrial era. If you want to move them back, then simply update their era to ERA_RENAISSANCE and the tree's UI will automatically update to fit the new era scale!
 
Spoiler :
<GameData>
<Technologies>
<Update>
<Where Type="TECH_BIOLOGY"/>
<Set>
<Era>ERA_RENAISSANCE</Era>
<GridX>x</GridX> <!-- set to whatever x coordinate you want. this is the column. agriculture is 0, the next column is 1, etc. -->
<GridY>y</GridY> <!-- set to whatever y coordinate you want. this is the row. sailing is 0, iron working is 9, etc. -->
</Set>
</Update>
</Technologies>


Thanks for the response! The above snippet of the code you provided is close to what I had the first time, that I was having trouble getting to work in the mod.

However, it doesn't quite look exactly like it, plus I didn't know to mess with the grid, so that helps too.

I am actually not changing any prereqs, so while that part might be helpful, and I will keep it in mind for other uses, I don't need that now!:D

Literally, All I want to do is nab those first six starting techs (Actually I removed the AT-gun from one of em too)and keep them available in the Renaissance era.

Anyway, thanks again, you've helped me understand quite a bit already! I'll try to help those who are bigger n00bs than me in order to repay! :goodjob:
 
Back
Top Bottom