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

    new production unit - barracks

    Scheduled Pinned Locked Moved Map Making
    84 Posts 6 Posters 31.5k 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.
    • N Offline
      Numetalfan
      last edited by

      even more bad news

      <!-- SmallFactory -->

      <attachment name="unitAttachment" attachTo="SmallFactory" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">

      <option name="isFactory" value="true"/>

      </attachment>

      I can build it in any countries

      --

      <!-- Barracks -->

      <attachment name="unitAttachment" attachTo="barracks" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">

      <option name="isFactory" value="true"/>

      </attachment>

      <attachment name='unitAttachment' attachTo='barracks' javaClass='UnitAttachment' type='unitType'>

      <option name='canProduceXUnits' value='2'/>

      </attachment>

      I can build it only in countries containing a factory - why??WW2v4-1941.xml

      B 2 Replies Last reply Reply Quote 0
      • B Online
        beelee @Numetalfan
        last edited by

        @Numetalfan yea it can be frustrating but don't get discouraged. I think you're close to being there. Just to make sure were on the same page, would you summarize how you want the factories, shipyard and barracks to work again.

        I'll look at what you have so far

        1 Reply Last reply Reply Quote 0
        • N Offline
          Numetalfan
          last edited by

          sure

          factory - builds any unit
          small factory - any ground unit, no ships, no aircraft
          shipyard - any naval unit, no air, no ground
          barracks - only infantry

          and chinese placement should work as always

          1 Reply Last reply Reply Quote 0
          • B Online
            beelee
            last edited by

            @Numetalfan right on. I'm having trouble accessing your xml. Can you put it in a zip file an upload it ? I forget how to change it the way it currently is 🙂

            F 1 Reply Last reply Reply Quote 0
            • N Offline
              Numetalfan
              last edited by

              sure, thxWW2v4-1941.zip

              B 1 Reply Last reply Reply Quote 1
              • B Online
                beelee @Numetalfan
                last edited by

                @Numetalfan hey you wanna just upload the whole game ? The new units will be needed for testing. It's a World War II v3 1941 mod correct ?

                1 Reply Last reply Reply Quote 0
                • N Offline
                  Numetalfan
                  last edited by

                  the zip file has now a size of 13,6 MB - too large to attach it here -any idea what to do?

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    ff03k64
                    last edited by

                    I use google drive (or something similar) for things like that.

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      Numetalfan
                      last edited by

                      yes, its a v3-41 mod - I did not get the meaning of the google drive , how to use it?

                      B F 2 Replies Last reply Reply Quote 0
                      • B Online
                        beelee @Numetalfan
                        last edited by

                        @Numetalfan hmm...just send the units folder for now. That and the xml only thing different ? No objectives ?

                        Don't have any type of right click compress button ? I don't really know much about computer stuff really. Just push a bunch of buttons till it works lol. Not a recommended process.

                        I used to put stuff in sendspace and send it that way too but probably not a lot of changes. Just send what's different and all add it

                        1 Reply Last reply Reply Quote 0
                        • F Offline
                          ff03k64 @Numetalfan
                          last edited by

                          @Numetalfan Google drive is basically a storage space on the internet. Other versions are dropbox, microsoft onedrive, and apple has icloud. I am sure there are a million other ones as well, you could do a search for cloud storage and probably find a few of those other options.

                          1 Reply Last reply Reply Quote 0
                          • F Offline
                            ff03k64 @beelee
                            last edited by ff03k64

                            @beelee

                            @ Numetalfan right on. I'm having trouble accessing your xml. Can you put it in a zip file an upload it ? I forget how to change it the way it currently is 🙂

                            I think you would want to just copy and paste it into a text editor, but you will need the new icons and graphics anyway. Though i think it will play without them, it will just be annoying.

                            B 1 Reply Last reply Reply Quote 1
                            • B Online
                              beelee @ff03k64
                              last edited by

                              @ff03k64 yea if you don't have the image it'll keep throwing the error but yea units folder should be all that's really needed. Can ignore the other stuff

                              1 Reply Last reply Reply Quote 0
                              • B Online
                                beelee @Numetalfan
                                last edited by

                                @Numetalfan this will take a bit to go through but one thing is when you do your unitAttachment do them all at once. So instead of this:

                                <!-- Barracks -->

                                <attachment name="unitAttachment" attachTo="barracks" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">

                                <option name="isFactory" value="true"/>

                                </attachment>

                                <attachment name='unitAttachment' attachTo='barracks' javaClass='UnitAttachment' type='unitType'>

                                <option name='canProduceXUnits' value='2'/>

                                </attachment>

                                it'd be:

                                <!-- Barracks -->
                                <attachment name="unitAttachment" attachTo="barracks" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
                                <option name="isFactory" value="true"/>
                                <option name='canProduceXUnits' value='2'/>
                                </attachment>

                                we probably don't want barracks as a factory as mentioned previously but will get to that 🙂

                                1 Reply Last reply Reply Quote 0
                                • wc_sumptonW Offline
                                  wc_sumpton
                                  last edited by

                                  @ff03k64

                                  You want to require different production facilities to produce different units. You have that worked out. But you also want China to be able to place units without production facilities. Triggers will need to be created that '-reset-' the 'requiresUnits' values prior to China's placement, and then reassign those values. Or China will need a different set of units.

                                  Cheers...

                                  1 Reply Last reply Reply Quote 1
                                  • N Offline
                                    Numetalfan
                                    last edited by

                                    the online help has an example

                                    <attachment name='conditionAttachment_Americans_Aid_UK' attachTo='Americans' javaClass='RulesAttachment' type='player'>
                                    <option name='switch' value='true'/>
                                    </attachment>
                                    <attachment name='triggerAttachment_Americans_Aid_UK' attachTo='Americans' javaClass='TriggerAttachment' type='player'>
                                    <option name='resource' value='PUs'/>
                                    <option name='resourceCount' value='6'/>
                                    <option name='players' value='British'/>
                                    </attachment>
                                    <attachment name='userActionAttachment_Americans_Aid_UK' attachTo='Americans' javaClass='UserActionAttachment' type='player'>
                                    <option name='conditions' value='conditionAttachment_Americans_Aid_UK'/>
                                    <option name='activateTrigger' value='triggerAttachment_Americans_Aid_UK:1:false:false:false:false'/>
                                    <option name='text' value='AMERICANS_AID_UK'/>
                                    <option name='chance' value='6:6'/>
                                    <option name='costPU' value='10'/>
                                    <option name='attemptsPerTurn' value='1'/>
                                    <option name='actionAccept' value='Americans'/>
                                    </attachment>

                                    1 Reply Last reply Reply Quote 0
                                    • N Offline
                                      Numetalfan
                                      last edited by

                                      OK, I need help doing that.

                                      first I added triggers to my properties:

                                      <property name='Use Triggers' value='true' editable='false'>
                                      <boolean/>
                                      </property>

                                      now in the attachment section I need the correct coding. the trigger should be activated when it is the Chinese to play and the trigger has to be switched back when the Germans start at the latest, even better when the Chinese end their turn.

                                      my first code lines are

                                      <attachment name='conditionAttachment_Chinese_Infantry_placement' attachTo='Chinese' javaClass='RulesAttachment' type='player'>
                                      <property name="Unit Placement Restrictions" value='true'/>
                                      </attachment>

                                      <attachment name='triggerAttachment_Chinese_Infantry_placement' attachTo='Chinese' javaClass='triggerAttachment' type='player'>
                                      <option name='switch' value='true'/>
                                      </attachment>

                                      but I know this is just crap - I have no idea how to program such a trigger - please help

                                      F 1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        ff03k64 @Numetalfan
                                        last edited by

                                        @Numetalfan There is probably a game property that you need to set as well but i think you need some rulesattachments as well. Maybe not all of these, but some depending on exactly what you are trying.

                                            <attachment name="rulesAttachment" attachTo="Chinese" javaClass="games.strategy.triplea.attachments.RulesAttachment" type="player">
                                              <option name="movementRestrictionTerritories" value="Chinghai:Ningxia:Sikang:Yunnan:Hupeh:Fukien:Suiyuan:Manchuria:Kiangsu:Kwangtung"/>
                                              <option name="movementRestrictionType" value="allowed"/>
                                              <option name="productionPerXTerritories" value="2"/>
                                              <option name="placementAnyTerritory" value="true"/>
                                              <option name="placementCapturedTerritory" value="true"/>
                                              <option name="placementPerTerritory" value="3"/>
                                            </attachment>
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • N Offline
                                          Numetalfan
                                          last edited by

                                          @ff03k64

                                          I have all this already, as my game is a derivate of the wwii v3-41 where the chinese are part of

                                          the problem is:

                                          with my

                                          <property name="Unit Placement Restrictions" value="true" editable="false">
                                          <boolean/>
                                          </property>

                                          the Chinese functions are blocked, especially

                                          <option name="placementAnyTerritory" value="true"/>

                                          now Infantry require a factory or SmallFactory or barracks and the Chinese have none of it

                                          thats why I need a trigger for the Chinese to deactivate the placment restrection for them, the reactivate that

                                          F 1 Reply Last reply Reply Quote 0
                                          • F Offline
                                            ff03k64 @Numetalfan
                                            last edited by ff03k64

                                            @Numetalfan edit: deleted a bunch of stuff.

                                            I would make a new unit for chinese infantry

                                            B 1 Reply Last reply Reply Quote 1

                                            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
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 4 / 5
                                            • First post
                                              Last post
                                            Copyright © 2016-2018 TripleA-Devs | Powered by NodeBB Forums