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

    Trouble capturing friendly units

    Scheduled Pinned Locked Moved Map Making
    3 Posts 2 Posters 873 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.
    • Jason Green-LoweJ Offline
      Jason Green-Lowe
      last edited by Jason Green-Lowe

      I'm trying to create additional minor powers that function similarly to the "Neutral_Axis" in ww2global40. For example, if Germany sends a tank into Spanish territory during Germany's non-combat move, then Germany should gain control of the territory and the Spanish units in that territory should be replaced by equivalent German units.

      However, this replacement is only working for my Neutral_Axis countries. It is not working for the Spanish. German tanks can enter Spain and take it over on non-combat, but the Spanish units remain Spanish. I do not want the Spanish units to remain Spanish; instead, they should become German.

      I have double-checked my game properties, player attachments, territory attachments, and unit attachments. What else could I be missing that is causing the Spanish units to refuse to change sides?

      GAME PROPERTIES

      <property name="Capture Units On Entering Territory" value="true" editable="false">
            <boolean/>
          </property>
          <property name="On Entering Units Destroyed Instead Of Captured" value="false" editable="false">
            <boolean/>
          </property>
          <!-- specific rules -->
          <!-- land related -->
          <property name="Units Can Be Destroyed Instead Of Captured" value="true" editable="false">
            <boolean/>
          </property>
          <property name="Units Can Be Changed On Capture" value="true" editable="true">
            <boolean/>
          </property>
      

      PLAYER ATTACHMENTS

          <attachment name="playerAttachment" attachTo="Spanish" javaClass="games.strategy.triplea.attachments.PlayerAttachment" type="player">
            <option name="captureUnitOnEnteringBy" value="Germans:Italians:Japanese"/>
          </attachment>   
      

      ILLUSTRATION
      ffb24536-ff4d-4520-8f16-e98a4b581a38-image.png

      UNIT ATTACHMENTS

          <attachment name="unitAttachment" attachTo="infantry" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="movement" value="1"/>
            <option name="transportCost" value="2"/>
            <option name="isInfantry" value="true"/>
            <option name="attack" value="1"/>
            <option name="defense" value="2"/>
            <option name="artillerySupportable" value="true"/>
            <option name="isAirTransportable" value="true"/>
            <option name="canBeCapturedOnEnteringBy" value="French:Americans:British:Russians:Germans:Italians:Japanese:Commonwealth:Chinese"/>
            <option name="canBeGivenByTerritoryTo" value="Turkish:Russians:Spanish:Portuguese:British:Germans:Italians:Americans:French:Commonwealth"/>
          </attachment>
      

      TERRITORY ATTACHMENTS

          <attachment name="territoryAttachment" attachTo="Aragon" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
            <option name="production" value="1"/>
            <option name="captureUnitOnEnteringBy" value="Germans:Italians:Japanese"/>
            <option name="changeUnitOwners" value="Spanish"/>
          </attachment>
          <attachment name="territoryAttachment" attachTo="Galicia Navarra" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
            <option name="production" value="0"/>
            <option name="captureUnitOnEnteringBy" value="Germans:Italians:Japanese"/>
            <option name="changeUnitOwners" value="Spanish"/>
          </attachment>
          <attachment name="territoryAttachment" attachTo="Castilla" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory">
            <option name="production" value="1"/>
            <option name="captureUnitOnEnteringBy" value="Germans:Italians:Japanese"/>
            <option name="changeUnitOwners" value="Spanish"/>
          </attachment>
      
      W 1 Reply Last reply Reply Quote 0
      • W Offline
        wc_sumpton @Jason Green-Lowe
        last edited by

        @jason-green-lowe

        Just had a similar discussion with @SlendyMcTendies. Chech this out and see if it helps you: https://forums.triplea-game.org/topic/3600/change-unit-ownership-resolved/15.

        Cheers...

        Jason Green-LoweJ 1 Reply Last reply Reply Quote 2
        • Jason Green-LoweJ Offline
          Jason Green-Lowe @wc_sumpton
          last edited by

          @wc_sumpton Thank you, ensuring there was only one playerAttachment per Player did the trick! The Spanish are now truckling under as ordered. 🙂

          1 Reply Last reply Reply Quote 2

          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