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.
    • B Online
      beelee @Numetalfan
      last edited by

      @Numetalfan so the "isFactory" is what is allowing that. I'm not 100% sure how to do what you want but it may be possible. I have something similar but probably not quite what you want.

      So make your Shipyard without "isFactory" and require the Naval units to have it and you will only be able to build where a Factory and Shipyard are. Then make something that the Armor requires as well, I'll just call it "ArmorProduction" for now. So then you can only build the Armor with a factory and a ArmorProduction.

      I don't remember what you had for smallFactory. But if you don't want something being built there just make sure you don't have the required unit there.

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

        Thx. I will try that. I coded them with "is factory" to allow enemy bombers to do SBR.
        Means to remove that that strategic bombing is no longer possible to that units?

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

          @Numetalfan yea so you need to have "isInfrastructure" so they can be bombed. Here's an example:

          <!-- Harbour12 -->
          <attachment name="unitAttachment" attachTo="harbour12" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType">
          <option name="isInfrastructure" value="true"/>
          <option name="canBeDamaged" value="true"/>
          <option name="maxDamage" value="6"/>
          <option name="maxOperationalDamage" value="2"/>
          <option name="repairsUnits" value="battleship:carrier:battleship-damaged"/>
          <option name="isConstruction" value="true"/>
          <option name="constructionType" value="harbour12_structure"/>
          <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
          <option name="maxConstructionsPerTypePerTerr" value="1"/>
          <option name="movement" value="0"/>
          <option name="givesMovement" value="1:transport"/>
          <option name="givesMovement" value="1:transportC8"/>
          <option name="givesMovement" value="1:submarine"/>
          <option name="givesMovement" value="1:destroyer"/>
          <option name="givesMovement" value="1:destroyerC5"/>
          <option name="givesMovement" value="1:cruiser"/>
          <option name="givesMovement" value="1:carrier"/>
          <option name="givesMovement" value="1:EscortCarrier"/>
          <option name="givesMovement" value="1:EscortCarrierASW"/>
          <option name="givesMovement" value="1:battleship"/>
          <option name="isAAforBombingThisUnitOnly" value="true"/>
          <!--<option name="canBeGivenByTerritoryTo" value="British"/>-->
          </attachment>

          So isConstruction allows it to be placed without a Factory. You can have it do it's move support and be bombed etc...but if you don't have a Factory there as well you can't build units there. And if the unit has the requiresUnits thingy you would need both present.

          You need all the images too. The "_hit image" etc..

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

            Also for requiresUnits I don't think you need to have factory. In this case just the "harbour12" in your unitAttachment. If you do need it, do it like "factory:harbour12" in one line. It'll require both then. Separate lines is either/or.

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

              @Numetalfan

              Did you reset this property:

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

              With the requiresUnits on seperate lines as in the example, means Shipyard or factory for the cruiser. If you use one entry '"requiresUnits" value="factory:Shipyard" would require both to place the cruiser.

              Cheers...

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

                no they were set false,

                now - after changing it - the smallfactory and the shipyard work,

                solved one problem - created the next one:
                now placing chinese infantry rewards does not work anymore !!

                the infantry was coded this way:

                   <!-- Infantry -->
                

                <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="isAirTransportable" value="true"/>
                
                  <option name="attack" value="1"/>
                
                  <option name="defense" value="2"/>
                
                  <option name="artillerySupportable" value="true"/>
                

                <option name="requiresUnits" value="FactoryUpgrade"/>

                <option name="requiresUnits" value="factory"/>

                <option name="requiresUnits" value="SmallFactory"/>

                <option name="requiresUnits" value="barracks"/>

                after removing the <option name="requiresUnits" value= codes

                things changed:

                now it is possible to place those chinese infantry...

                but - solved one, created the next ones:

                • it is possible to place more than 3 units in a chinese country - that is forbidden by the rules
                • it is now possible to build infantry in a shipyard as infantries have no coding that forbids that

                damn, this is a hard task.

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

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