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

    Add Option for Major/Minor Nation System for All Territories

    Scheduled Pinned Locked Moved Feature Requests & Ideas
    3 Posts 2 Posters 1.4k 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.
    • redrumR Offline
      redrum Admin
      last edited by redrum

      Problem
      If I want all minor units of certain types to always transform to be owned by major nation in all territories then right now I need to add changeUnitOwners to every territory attachment. Add a simple boolean property that makes it so every territory defaults to checking for these for all players.

      Details
      Add new player attachment boolean option: giveUnitControlInAllTerritories. Setting this to true makes it so all territories will check if units should be given to another player. This is primarily just an XML short cut to avoid having to put the changeUnitOwners option on every territory when using major-minor nation system like in TWW.

      Example

      Can do this:

              <attachment name="playerAttachment" attachTo="French_Africa" javaClass="PlayerAttachment" type="player">
                  <option name="giveUnitControl" value="France"/>
                  <option name="giveUnitControlInAllTerritories" value="true"/>
              </attachment>
      

      Avoids having to have this on every territory:

              <attachment name="territoryAttachment" attachTo="Morocco" javaClass="TerritoryAttachment" type="territory">
                  <option name="production" value="2"/>
                  <option name="changeUnitOwners" value="France:Germany:Austria-Hungary:Ottomans:Italy:Usa"/>           
              </attachment>
      

      Still need to define which units will change ownership using canBeGivenByTerritoryTo:

          <attachment name="unitAttachment" attachTo="frenchInfantry" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
            <option name="movement" value="1"/>
            <option name="attack" value="2"/>
            <option name="defense" value="3"/>
            <option name="canBeGivenByTerritoryTo" value="France"/>
          </attachment>
      

      TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

      1 Reply Last reply Reply Quote 3
      • redrumR Offline
        redrum Admin
        last edited by

        Here is the PR: https://github.com/triplea-game/triplea/pull/4808

        TripleA Developer with a Passion for AI: https://forums.triplea-game.org/topic/105/ai-development-discussion-and-feedback

        HeppsH 1 Reply Last reply Reply Quote 2
        • HeppsH Offline
          Hepps Moderators @redrum
          last edited by

          @redrum Now there's a nice short cut.

          "A joyous heart sours with the burden of expectation"
          Hepster

          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