TripleA Logo TripleA Forum
    • TripleA Website
    • Recent
    • Popular
    • Register
    • Login

    Transfer of Unit Ownership

    Scheduled Pinned Locked Moved Map Making
    5 Posts 2 Posters 1.0k 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.
    • StohrmS
      Stohrm
      last edited by

      Re: captureUnitOnEnteringBy , changeUnitOwners and canBeGivenByTerritoryTo , canBeCapturedOnEnteringBy

      Can someone provide me with better clarification on how to use these, please? For instance: I want the UK_Pacific to be able to transfer ownership of Armour units to the Chinese open entering (and remaining in) Yunnan. But I also want the British to be able to transfer all units that it sends to 78 Sea Zone.

      I seem to have 78 Sea Zone working, but not Yunnan.

      So, any guidance someone can give would be greatly appreciated.

      SK

      StohrmS 1 Reply Last reply
      Reply Quote 0
      • B
        beelee
        last edited by

        @stohrm in "territoryAttachment" go to Yunnan and make sure you have
        <option name="changeUnitOwners" value="Chinese"/>

        Under "unitAttachment' go to armour and make sure you have

        <option name="canBeGivenByTerritoryTo" value="Chinese"/>

        You will also need to have the "gameProperty" turned on

        <property name="Give Units By Territory" value="true" editable="false">

        and the "playerAttachment' "giveUnitControl"

        <attachment name="playerAttachment" attachTo="British" javaClass="games.strategy.triplea.attachments.PlayerAttachment" type="player">
        <option name="giveUnitControl" value="Chinese"/>
        </attachment>

        This from Pact of Steel2
        <!-- allows a player to give units to another player if true. units must have canBeGivenByTerritory and territories must have changeUnitOwners and the players must have the player attachment giveUnitControl -->
        <property name="Give Units By Territory" value="true" editable="false">
        <boolean/>
        </property>

        StohrmS 1 Reply Last reply
        Reply Quote 1
        • StohrmS
          Stohrm
          last edited by

          @beelee said in Transfer of Unit Ownership:

          <option name="changeUnitOwners" value="Chinese"/>

          Thanks, I had everything but the changeUnitOwners value right. It's working now.

          SK

          1 Reply Last reply
          Reply Quote 1
          • StohrmS
            Stohrm @beelee
            last edited by

            @beelee I realize this topic is now almost five years old, but what was working isn't working and I'm trying to figure out why.
            I've been modifying the Churchills_1939_ww2_ptv and added the Canadians as their own player. I was trying to use this same information so that when they moved units to Scotland they become British.
            All the elements are there, but the Canadian units are not becoming British.
            So, I was wondering if there's now another factor involved that wasn't there before?

            SK

            1 Reply Last reply
            Reply Quote 0
            • StohrmS
              Stohrm @Stohrm
              last edited by

              You can ignore my previous post, as the issue was having more than one playerAttachment per player. I combined them and resolved the issue.

              SK

              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
              Powered by NodeBB Forums