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

    is requiresUnits still a valid property?

    Scheduled Pinned Locked Moved Map Making
    12 Posts 6 Posters 3.4k Views 6 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.
    • MahksM Offline
      Mahks
      last edited by

      Newbie trying to learn the xml file properties...

      Trying to create a bunker that needs an engineer present in order to construct.
      But, game permits placement when no engineer in territory. What have I done wrong?

      <attachment name="unitAttachment" attachTo="bunker" javaClass="games.strategy.triplea.attachments.UnitAttachment"
      type="unitType">
      <option name="isConstruction" value="true"/>
      <option name="constructionType" value="bunker"/>
      <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
      <option name="maxConstructionsPerTypePerTerr" value="3"/>
      <option name="attack" value="0"/>
      <option name="defense" value="0"/>
      <option name="movement" value="0"/>
      <option name="requiresUnits" value="engineer"/>
      </attachment>

      C B 2 Replies Last reply Reply Quote 0
      • C Offline
        Cernel Moderators @Mahks
        last edited by

        @mahks When options are ineffective, that probably means they are enabled by a property you don't have true.
        In this case, "Unit Placement Restrictions".

        MahksM 1 Reply Last reply Reply Quote 0
        • C Offline
          Cernel Moderators
          last edited by

          Moving to Mapmaking, if I'm guessing correctly that's the right place for the help and questions about mapmaking.

          MahksM 1 Reply Last reply Reply Quote 0
          • B Offline
            beelee @Mahks
            last edited by

            @mahks in case you're not aware of it here's a link explaining what they all do:

            properties

            Pact of steel 2 explains some of them as well.

            MahksM 1 Reply Last reply Reply Quote 0
            • MahksM Offline
              Mahks @Cernel
              last edited by

              @cernel I'm kind of surprised there are not more questions about the properties. The only 2 resources I have found are those beelee mentions. I did see something about an old reference (from hithub site maybe) but have not found that.

              Would it be useful to have a separate forum (category) for developer help?

              prastleP 1 Reply Last reply Reply Quote 0
              • prastleP Offline
                prastle Moderators Admin @Mahks
                last edited by

                @mahks This is mapmaking. Development is the engine / etc which is done on GitHub. Have a look at TWW xml since entrenchments and bunkers can't be placed without an engineer if I recall correctly.

                If we open a quarrel between past and present, we shall find that we have lost the future! Sir Winston Churchill

                1 Reply Last reply Reply Quote 0
                • MahksM Offline
                  Mahks @beelee
                  last edited by

                  @beelee Thanks, I have been using both those. The POS xml has been very useful.
                  The fandom wiki, less so, while it is good finding what is available, very few entries actually show how to implement the property. For example, in my case the entry for requiresUnits does not mention "Unit Placement Restrictions".

                  Another thread mentioned a new developers guide. Yes, much need for that.

                  I can help. My ignorance can be useful to counter the natural reduction of perspective experienced developers have when creating such a guide. It is so easy to miss stuff newbies do not understand when you already know the whole framework.

                  prastleP 1 Reply Last reply Reply Quote 3
                  • prastleP Offline
                    prastle Moderators Admin @Mahks
                    last edited by

                    @mahks Really it should be called a map makers guide. hopefully all of you can get together and we collaborate all of it in one spot. 🙂 Gd stuff!

                    If we open a quarrel between past and present, we shall find that we have lost the future! Sir Winston Churchill

                    1 Reply Last reply Reply Quote 2
                    • MahksM Offline
                      Mahks @Cernel
                      last edited by

                      @cernel said in is requiresUnits still a valid property?:

                      @mahks When options are ineffective, that probably means they are enabled by a property you don't have true.
                      In this case, "Unit Placement Restrictions".

                      I have found a unitAttachment property named unitPlacementRestrictions but seems not to be needed (in TWW xml) for what I want.

                      The wiki mentions "Unit Placement Restrictions" is a game option. Does that mean it should show under "Map Options" on the game play panel? Do not see it there and none of the xml files I have looked in seems to have a way to enable. What am I missing?

                      General_ZodG redrumR 2 Replies Last reply Reply Quote 0
                      • General_ZodG Offline
                        General_Zod Moderators @Mahks
                        last edited by

                        @mahks The game properties are usually listed towards the end of the xml itself. They are also listed in game options but only if set to be there via "editable" in the xml.

                        MahksM 1 Reply Last reply Reply Quote 1
                        • redrumR Offline
                          redrum Admin @Mahks
                          last edited by

                          @mahks Here is the example POS2 XML for the necessary property:

                              <!-- Unit Placement Restrictions are restrictions on the placement of units: unitPlacementRestrictions, unitPlacementOnlyAllowedIn, canOnlyBePlacedInTerritoryValuedAtX, requiresUnits, -->
                              <property name="Unit Placement Restrictions" value="true" editable="false">
                                <boolean/>
                              </property>
                          

                          You need to set that to 'true' and if you make editable='true' then it will appear in the game options as a checkbox.

                          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 0
                          • MahksM Offline
                            Mahks @General_Zod
                            last edited by

                            @general_zod Hmmm, faulty search on my part. Found the section "propertyList" as you predicted, Thanks!

                            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