TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    How to add political relations to your own map?

    Scheduled Pinned Locked Moved Map Making
    5 Posts 2 Posters 864 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Denisco DionD Offline
      Denisco Dion
      last edited by

      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.😺

      redrumR 1 Reply Last reply Reply Quote 0
      • redrumR Offline
        redrum Admin @Denisco Dion
        last edited by

        @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:

        1. 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
        2. 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
        3. 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

        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

        Denisco DionD 1 Reply Last reply Reply Quote 1
        • Denisco DionD Offline
          Denisco Dion @redrum
          last edited by Denisco Dion

          @redrum thank you for such a quick response, here is my xml file, maybe you point out my mistakes
          rise_of_aio.xml

          redrumR 1 Reply Last reply Reply Quote 0
          • redrumR Offline
            redrum Admin @Denisco Dion
            last edited by

            @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"/>
            

            TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

            Denisco DionD 1 Reply Last reply Reply Quote 1
            • Denisco DionD Offline
              Denisco Dion @redrum
              last edited by

              @redrum thank you very much, now more or less figured it out and managed to integrate the relationship into my game.:grinning_cat_face:

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post
              Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums