Question about removing unit placement limit



  • Hello,

    I've made a simple map (1.9x, ww2v3 ruleset) and I wish to remove the default unit placement limitation for factories, so for example a 3pu territory with a factory can place more than 3 units

    I tried a lot of property names and combinations, and looked around Pact of Steel 2 xml for clues but I didn't find it anything that worked

    What variable controls this? Thanks.



  • @Kao Hi Kao
    Go to Territory Attachments and add "unitProduction" value="x" to the territory you want to produce and see if that works. There's also a "canProduceXUnits" value ="X" that you might try as a unitAttachment to your factory.

    Post back if you still have trouble


  • Admins

    yes its been awhile but if you look at each territory

    example

    <!-- Territory Attachments -->

    -<attachment name="territoryAttachment" javaClass="games.strategy.triplea.attachments.TerritoryAttachment" type="territory" attachTo="Afghanistan">

    <option name="production" value="0"/>

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

    </attachment>

    the production value = what a factory can produce if there is one there

    new factories will still follow the ter prod value where they are placed



  • Thanks guys, but no luck

    This is what I tried so far that did not work:

    Rules Attachment:
    <option name="placementPerTerritory" value="100"/>
    <option name="maxPlacePerTerritory" value="100"/>
    <option name="unlimitedProduction" value="true"/>

    Territory Attachment:
    <option name="unitProduction" value="100"/>

    Property List:
    Placement Restricted By Factory = false
    Placement Per Territory Restricted = false
    Territory Turn Limit = false
    Unit Placement Restrictions = false
    Production Per Valued Territory Restricted = false

    But there is a Territory Attachment that almost worked:
    <option name="originalFactory" value="true"/>

    It allowed me to place any number of units there, but the documentation says that only removes the limit for the original owner, if captured the controller can only place the normal amount of units there

    My intention is to remove the limit for all the players

    Any more ideas?

    Thanks!


  • Admins

    @Kao change the production value to what u want that territories factory to produce

    <option name="production" value="0"/>

    in each ter
    of original factories

    new factories still follow original production rules



  • @Kao Try putting placement restricted by factory to true.
    Add <option name="canProduceXunits" value="100"/> to your factory.
    Then add <option name="unitProduction" value="100" to a territory in territoryAttachments.
    There's probably a way to do it w/out having to do that to all TTys. Idk. But having the "placement restricted by factory" is set to true it will override "original factory".

    This is a good place showing all the properties link text



  • @prastle I tried that but didn't work, it appears to work at first but when i click ok It gives me that error "cannot place x more units in <territory> "

    @beelee Tried that as well, didn't work, I always receive the message that I'm buying more than i can place, and never allows me to place more than the territory value, I'm looking at the wiki now to check if I missed something

    Offtopic, this new forum is amazing, such a pleasant interface.


  • Admins

    @Kao and @beelee oh well e for effort been years since i looked. I guess ask frost or cernel etc



  • @Kao Hmm...pretty sure there's a way to do it. Did you put "unitProduction" below "production" ? Here's some info from POS2:

    <!-- Territory Attachments -->
    <!-- <option name="unitProduction" value="x"/> must be placed under <option name="production" value="x"/> if it is being used.
    This is because a recent update to TripleA had the setting of 'production' automatically set 'unitProduction' to be equal to it.
    If you want to set "production" without also setting "unitProduction", then please use "productionOnly"
    -->

    Something else you could try is getting rid of "isFactory" and go with "isConstruction". You have to add the factory stuff separate. So something like this:
    *<!-- MilitaryBase -->
    <attachment name="unitAttachment" attachTo="MilitaryBase" 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="isConstruction" value="true"/>
    <option name="constructionType" value="MilitaryBase_structure"/>
    <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
    <option name="maxConstructionsPerTypePerTerr" value="1"/>
    <option name="movement" value="0"/>
    <option name="isAAforBombingThisUnitOnly" value="true"/>
    <option name="unitPlacementRestrictions" value="...

    then add to unitAttachment to the units that can be built :
    <option name="isConstruction" value="true"/>
    <option name="constructionType" value="infantry_structure"/>
    <option name="constructionsPerTerrPerTypePerTurn" value="10"/>
    <option name="maxConstructionsPerTypePerTerr" value="999"/>
    <option name="requiresUnits" value="MilitaryBase"/>

    kinda sloppy but should work. I think you need "Unlimited Constructions" on as well.


  • Admins

    @Kao

    Since the developer forum has a history much bigger than its present, instead of waiting for days for answers of dubious value that may or may not arrive, you can just imput what you want, like "unitProduction" or "canProduceXUnits", then click the search button, and you will easily find a lot of answers in a few minutes, as pretty much everything has been discussed, over and over again. For example:

    http://tripleadev.1671093.n2.nabble.com/Allow-unlimited-number-of-placements-at-factory-tp7590224p7590253.html
    http://tripleadev.1671093.n2.nabble.com/270BC-updates-can-someone-make-a-relief-image-td7582022i80.html#a7585132

    If that is not your answer, of course, keep searchin / asking.



  • Aaaaaand it worked!

    As per Cernel second link, I had to set the property Damage From Bombing Done To Units Instead Of Territories to true and them canProduceXUnits suddenly started working

    Thank you Prastle, Beelee and Cernel! :).



  • @Kao
    Right on Kao ! Love it when a plan comes together :) Cernel is pretty sharp with the xml program


Log in to reply
 

Looks like your connection to TripleA Forum was lost, please wait while we try to reconnect.