Navigation

    TripleA Logo

    TripleA Forum

    • Register
    • Login
    • Search
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags

    Relationships Last Extra Rounds - Resolved -

    XML Options Browser
    3
    6
    1253
    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.
    • Mahks
      Mahks last edited by Mahks

      Relationships Last Extra Rounds

      Mentions a default relationship duration.

      I can not find where that default is set, closest I see is roundValue in relationshipInitialize, but that appears to be something else.

      redrum General_Zod 2 Replies Last reply Reply Quote 0
      • redrum
        redrum Admin @Mahks last edited by

        @mahks POS2 XML:

            <!-- If this is set, it adds or subtracks from any conditions that require a relationship to last for X rounds -->
            <property name="Relationships Last Extra Rounds" value="0" editable="true">
              <number min="-1" max="2"/>
            </property>
        

        Here is the only code that uses it:

          private boolean relationShipExistsLongEnnough(final Relationship r, final int relationshipsExistance) {
            int roundCurrentRelationshipWasCreated = r.getRoundCreated();
            roundCurrentRelationshipWasCreated += Properties.getRelationshipsLastExtraRounds(getData());
            return getData().getSequence().getRound() - roundCurrentRelationshipWasCreated >= relationshipsExistance;
          }
        

        So it appears if that is set then its added to the "round a relationship was created" when checking conditions. I honestly have no idea what map uses that.

        1 Reply Last reply Reply Quote 0
        • General_Zod
          General_Zod Moderators @Mahks last edited by General_Zod

          @mahks

          Typically relationships last 1 round and utilize endRound delegate to determine when that is. But the condition option (conditionAttachment option) for custom diplomacy is below.

          relationship     values: a relationship that needs to be present in the game: "player1:player2:relationship" (will set #rounds to -1 by default) OR "player1:player2:relationship:numberOfRoundsThisRelationshipMustExistForMinimum" for example: "Japan:China:War" or "Japan:China:War:-1" or "Japan:China:War:3".  It will accept "anyWar", "anyNeutral" and "anyAllied" as well.
          

          Some games use multi rounds relationships. They probably use the simple game property "relationship last extra rounds" to just add on versus creating new political actions using the condition ^^.

          Note the condition would likely be used to activate triggerAttachment option, such as below.

          relationshipChange	values: the change in relationship for these players, format: "player1:player2:oldRelation:newRelation" example: "Russians:Americans:coldWar:allOutWar" oldRelation may be "any", "anyWar", "anyNeutral", "anyAllied", or an actual relationshipType used in this xml. You can enter multiple relationshipChanges in the trigger and it will perform every change in the trigger which is valid.
          
          1 Reply Last reply Reply Quote 0
          • Mahks
            Mahks last edited by Mahks

            @general_zod said in Relationships Last Extra Rounds:

            conditionAttachment

            when set to -1 does that equal permanent?

            It says (will set #rounds to -1 by default)

            General_Zod 1 Reply Last reply Reply Quote 0
            • General_Zod
              General_Zod Moderators @Mahks last edited by

              @mahks

              Not sure, I always enter a value. @redrum would have to delve into code to give a definitive answer.

              1 Reply Last reply Reply Quote 0
              • redrum
                redrum Admin last edited by

                @Mahks So relationship is part of a condition, so if its set to -1 then it means it'll essentially ignore duration unless "Relationships Last Extra Rounds" is set.

                Essentially this is what the condition checks:
                (currentRound - roundRelationshipWasCreated - "Relationships Last Extra Rounds") >= numberOfRoundsThisRelationshipMustExistForMinimum

                So if "Relationships Last Extra Rounds" isn't used then the -1 will make it so the duration check is always true.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums