Ok: my first, super-simple mod is a change in the way research treaties and trade treaties work.
Instead of each trade or research treaty giving each person involved a 1.1 multiplier, these treaties will now give a bonus equal to .1 of the other parties income or research.
I was very lucky in making this, because the very first change I made achieved my goal. The new problem, however, is that I cannot get the modified treaties to change the old treaties. I would be very grateful if someone helped me with this.
Here is the current code. Right now, since the old treaties currently replace my new ones, to actually try them you will need to give each treaty a new internal name or display name, or both (I haven't tested that out). For testing, it also speeds things up to remove the prerequisites.
Code: xml
- <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
- <Treaties>
- <DataChecksum NoParse="1">
- <Ignore>DisplayName,Description</Ignore>
- <Translate>DisplayName,Description</Translate>
- </DataChecksum>
- <Treaty InternalName = "TradeTreaty" Type = "Trade">
- <DisplayName>Trade Treaty</DisplayName>
- <Image>Action_Treaty.png</Image>
- <Description>Both parties get a bonus to their per-turn income equal to 10% of the other party's income.</Description>
- <TreatyValueDescription><![CDATA[[Player_1] will receive an additional [TreatyValue1WithUnits] and [Player_2] will receive an additional [TreatyValue2WithUnits]]]></TreatyValueDescription>
- <Units>gp/turn</Units>
- <Duration>-1</Duration>
- <BasePerceivedValue>10000</BasePerceivedValue>
- <MinimumRelations><![CDATA[[RELATIONS_NEUTRAL]]]></MinimumRelations>
- <Calculate InternalName = "IncomeBonus" ValueOwner="Player_2">
- <Expression><![CDATA[0.<img src="//web.stardock.net/images/smiles/themes/digicons/1 Star.png" alt="" />[Income]]]></Expression>
- </Calculate>
- <!-- Any one of these prereqs can be fulfilled to unlock this treaty -->
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Treaties_Amarian</Attribute>
- <Value>0</Value>
- </Prereq>
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Treaties_Trogs</Attribute>
- <Value>0</Value>
- </Prereq>
- </Treaty>
- <Treaty InternalName = "TechTreaty" Type = "Trade">
- <DisplayName>Technology Treaty</DisplayName>
- <Description>Both parties get a bonus to their tech research equal to 10% of the other party's tech research.</Description>
- <TreatyValueDescription><![CDATA[[Player_1] will receive an additional [TreatyValue1WithUnits] and [Player_2] will receive an additional [TreatyValue2WithUnits]]]></TreatyValueDescription>
- <Duration>-1</Duration>
- <Image>Action_Treaty.png</Image>
- <Units>Tech Knowledge per turn</Units>
- <OneUnit>Tech Knowledge per turn</OneUnit>
- <BasePerceivedValue>10000</BasePerceivedValue>
- <MinimumRelations><![CDATA[[RELATIONS_NEUTRAL]]]></MinimumRelations>
- <Calculate InternalName = "ResearchPointsBonus" ValueOwner="Player_2">
- <Expression><![CDATA[[ResearchPoints]*0.1]]></Expression>
- </Calculate>
- <!-- Any one of these prereqs can be fulfilled to unlock this treaty -->
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Treaties_Amarian</Attribute>
- <Value>0</Value>
- </Prereq>
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Treaties_Trogs</Attribute>
- <Value>0</Value>
- </Prereq>
- </Treaty>
- </Treaties>
To get the treaties to work differently, all I had to do was change "ValueOwner" from "Player_1" to "Player_2"!
Also, if anyone knows where the other diplomatic option files are located (if xml files exist), like for trading or marriage, I would be grateful for the information.