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

    Relationship Problems

    Scheduled Pinned Locked Moved Map Making
    relationship
    8 Posts 4 Posters 1.5k Views 4 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.
    • RogerCooperR Offline
      RogerCooper
      last edited by RogerCooper

      I am trying to add some political relationships from a mod. I just copied code from ww2global.

      So I have code.

      <relationshipTypes>
          <relationshipType name="War"/>
      </relationshipTypes>
      

      and

      <attachment name="relationshipTypeAttachment" attachTo="War" javaClass="games.strategy.triplea.attachments.RelationshipTypeAttachment" type="relationship">
          <option name="archeType" value="war"/>
       </attachment>
      

      I receive the error "GameParseException: Could not find relationship type:War"

      Is there something else I need to set the make this work?

      wc_sumptonW 1 Reply Last reply Reply Quote 2
      • B Online
        beelee
        last edited by

        @rogercooper

        Idk if it matters but the archetype "war" is in lower case

        1 Reply Last reply Reply Quote 3
        • wc_sumptonW Offline
          wc_sumpton @RogerCooper
          last edited by wc_sumpton

          @rogercooper

          Looks good, are the attachment within the <attachmentList> section of the xml. "relationshipTypeAttachment" are the same as "unitAttachment" and "territoryAttachment" and that they are contained within the <attachmentList></attachmentList> part or the xml.

          You do not need the <relationshipInitialize> within the <initialize> section for the xml to run.

          @beelee
          The "archType" can be mixed case as long as it is set to one of the three types, "war", "neutral" or "allied".

          Cheers...

          RogerCooperR 1 Reply Last reply Reply Quote 3
          • RogerCooperR Offline
            RogerCooper @wc_sumpton
            last edited by

            @wc_sumpton Yes, relationshiptypeattachment is in the attachment list. There is no relationshipinitialize yet.

            wc_sumptonW 1 Reply Last reply Reply Quote 0
            • wc_sumptonW Offline
              wc_sumpton @RogerCooper
              last edited by

              @rogercooper
              Are you still having problems? I have tested the above and it worked fine.

              Cheers...

              RogerCooperR 1 Reply Last reply Reply Quote 0
              • RogerCooperR Offline
                RogerCooper @wc_sumpton
                last edited by

                @wc_sumpton I am still having the issue. I will try using a simple mod to test my code and see what happens.

                1 Reply Last reply Reply Quote 0
                • LaFayetteL Offline
                  LaFayette Admin
                  last edited by

                  If you can upload a zip of the map somewhere; I can run it through with a debugger.

                  RogerCooperR 1 Reply Last reply Reply Quote 0
                  • RogerCooperR Offline
                    RogerCooper @LaFayette
                    last edited by

                    @lafayette said in Relationship Problems:

                    If you can upload a zip of the map somewhere; I can run it through with a debugger.

                    I will keep that in mind. For now, I removed the code and will see if I can work without it.

                    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