How to add political relations to your own map?
-
Greetings! When creating my own map, I ran into a problem, I can’t add relations between the players, as in the example of the Napoleonic_Empires_FFA_8player game. I tried just adding lines of code from "Napoleonic_Empires_FFA_8player.xml" to my xml file, but that didn’t change anything. In the political panel, "default_war_relation" is also displayed. Please tell me how to add relationships or where I can find the information I need. (maybe the language is lame, translated by the translator) Thank you for your understanding.
-
@Denisco-Dion The easiest thing would probably be to upload your XML here and describe what you are trying to do so we can take a look at what you have so far.
There are 3 main parts to how politics/relationships work in the XML:
- Defining the possible relationships nations can have (relationshipType and relationshipTypeAttachment):
https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml#L678
https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml#L1612 - Defining political actions that can change a nation's relationships (politicalActionAttachment):
https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml#L4064 - Initializing starting relationships for all nations (relationship):
https://github.com/triplea-maps/the_pact_of_steel/blob/master/map/games/pact_of_steel_2.xml#L4523
- Defining the possible relationships nations can have (relationshipType and relationshipTypeAttachment):
-
@redrum thank you for such a quick response, here is my xml file, maybe you point out my mistakes
rise_of_aio.xml -
@Denisco-Dion So here is a summary of what you have in that XML so far:
Here are the relationship types you have defined:
<relationshipTypes> <relationshipType name="Allied"/> <relationshipType name="War"/> <relationshipType name="Ceasefire"/> <relationshipType name="Open_Borders"/> </relationshipTypes>
You don't have a relationshipInitialize section though so aren't initializing any relationships. You need to add something like this after the resourceInitialize section:
<relationshipInitialize> <relationship type="War" player1="France" player2="UnitedKingdom" roundValue="-2"/> <relationship type="Ceasefire" player1="France" player2="Spain" roundValue="-1"/> <relationship type="War" player1="France" player2="KingdomOfPrussia" roundValue="-2"/> <relationship type="Ceasefire" player1="France" player2="Sweden" roundValue="-1"/> <relationship type="War" player1="France" player2="AustrianEmpire" roundValue="-2"/> <relationship type="War" player1="France" player2="OttomanEmpire" roundValue="-2"/> <relationship type="War" player1="France" player2="Russia" roundValue="-2"/> <relationship type="War" player1="UnitedKingdom" player2="Spain" roundValue="-2"/> <relationship type="Ceasefire" player1="UnitedKingdom" player2="KingdomOfPrussia" roundValue="-1"/> <relationship type="War" player1="UnitedKingdom" player2="Sweden" roundValue="-2"/> <relationship type="Ceasefire" player1="UnitedKingdom" player2="AustrianEmpire" roundValue="-1"/> <relationship type="Ceasefire" player1="UnitedKingdom" player2="OttomanEmpire" roundValue="-1"/> <relationship type="Ceasefire" player1="UnitedKingdom" player2="Russia" roundValue="-1"/> <relationship type="War" player1="Spain" player2="KingdomOfPrussia" roundValue="-2"/> <relationship type="Ceasefire" player1="Spain" player2="Sweden" roundValue="-1"/> <relationship type="War" player1="Spain" player2="AustrianEmpire" roundValue="-2"/> <relationship type="Ceasefire" player1="Spain" player2="OttomanEmpire" roundValue="-1"/> <relationship type="War" player1="Spain" player2="Russia" roundValue="-2"/> <relationship type="Ceasefire" player1="KingdomOfPrussia" player2="Sweden" roundValue="-1"/> <relationship type="Ceasefire" player1="KingdomOfPrussia" player2="AustrianEmpire" roundValue="-1"/> <relationship type="War" player1="KingdomOfPrussia" player2="OttomanEmpire" roundValue="-2"/> <relationship type="Ceasefire" player1="KingdomOfPrussia" player2="Russia" roundValue="-1"/> <relationship type="War" player1="Sweden" player2="AustrianEmpire" roundValue="-2"/> <relationship type="War" player1="Sweden" player2="OttomanEmpire" roundValue="-2"/> <relationship type="War" player1="Sweden" player2="Russia" roundValue="-2"/> <relationship type="Ceasefire" player1="AustrianEmpire" player2="OttomanEmpire" roundValue="-1"/> <relationship type="Ceasefire" player1="AustrianEmpire" player2="Russia" roundValue="-1"/> <relationship type="War" player1="OttomanEmpire" player2="Russia" roundValue="-2"/> </relationshipInitialize>
But replace the Napoleonic Empires player names with your player names:
<player name="Miana" optional="false"/> <player name="Pirata" optional="false"/> <player name="Condottieri" optional="false"/> <player name="Tarona" optional="false"/> <player name="MonteLaguna" optional="false"/> <player name="Wasteland" optional="false"/> <player name="Venucci" optional="false"/> <player name="Feligno" optional="false"/>
-
@redrum thank you very much, now more or less figured it out and managed to integrate the relationship into my game.