Navigation

    TripleA Logo

    TripleA Forum

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

    Relationship Problems

    Map Making
    relationship
    4
    8
    113
    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.
    • RogerCooper
      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?

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

        @rogercooper

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

        1 Reply Last reply Reply Quote 3
        • W
          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...

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

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

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

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

              Cheers...

              RogerCooper 1 Reply Last reply Reply Quote 0
              • RogerCooper
                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
                • LaFayette
                  LaFayette Admin last edited by

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

                  RogerCooper 1 Reply Last reply Reply Quote 0
                  • RogerCooper
                    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
                    • 1 / 1
                    • First post
                      Last post
                    Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums