Navigation

    TripleA Logo

    TripleA Forum

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

    is requiresUnits still a valid property?

    Map Making
    6
    12
    2164
    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.
    • Mahks
      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
        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".

        Mahks 1 Reply Last reply Reply Quote 0
        • C
          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.

          Mahks 1 Reply Last reply Reply Quote 0
          • B
            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.

            Mahks 1 Reply Last reply Reply Quote 0
            • Mahks
              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?

              prastle 1 Reply Last reply Reply Quote 0
              • prastle
                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.

                1 Reply Last reply Reply Quote 0
                • Mahks
                  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.

                  prastle 1 Reply Last reply Reply Quote 3
                  • prastle
                    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!

                    1 Reply Last reply Reply Quote 2
                    • Mahks
                      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_Zod redrum 2 Replies Last reply Reply Quote 0
                      • General_Zod
                        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.

                        Mahks 1 Reply Last reply Reply Quote 1
                        • redrum
                          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.

                          1 Reply Last reply Reply Quote 0
                          • Mahks
                            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
                            • 1 / 1
                            • First post
                              Last post
                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums