Navigation

    TripleA Logo

    TripleA Forum

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

    Transferring Unit Control

    Map Making
    3
    4
    18
    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

      I am working on a mod where major powers gain control of unaligned nations through random events. For example

      <attachment name="triggerAttachmentSpainUnited_States" attachTo="United_States" javaClass="games.strategy.triplea.attachments.TriggerAttachment" type="player">
      <option name="conditions" value="conditionAttachmentEveryTurn"/>
      <option name="players" value="United_States"/>
      <option name="chance" value="1:80"/>
      <option name="chanceIncrementOnFailure" value="1"/>
      <option name="when" value="before:United_StatesPurchase"/>
      <option name="changeOwnership" value="Spain:Non_Aligned:United_States:false"/>
      <option name="uses" value="1"/>
      </attachment>
      

      Is there any way to change the ownership of the units directly. I would rather avoid having to specify for each territory removing each unit and adding a new units.

      B W 2 Replies Last reply Reply Quote 0
      • B
        beelee @RogerCooper last edited by beelee

        @rogercooper

        Hi Roger

        What I did was a little different as I had all units from all their TTys change at once and I don't remember 100% of how I did it but you already have the "changeOwnership" .

        You need to use "GiveUnitControl" and then specify the TTy. So you'd still need a trigger for each TTy but not individual units. You need to add it in multiple places.

        From POS2

        Screenshot from 2026-03-01 10-09-55.png

        @wc_sumpton may know of a better way.

        Edit

        Screenshot from 2026-03-01 10-03-25.png

        Idk. Maybe that won't work as it Might activate all the TTys that have that attachment

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

          @rogercooper

          Try reviewing here.

          @beelee is pointing you in the right direction.

          Cheers...

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

            @wc_sumpton said in Transferring Unit Control:

            @rogercooper

            Try reviewing here.

            @beelee is pointing you in the right direction.

            Cheers...

            Thanks. I will give that a try.

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