Trying to have two different types of factories, each independent of the other

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to have two different types of factories, each independent of the other

BeornTheBold
I have created a "city" unit, which can only produce infantry, militia, and marines and then a "factory" unit, which can produce only other types of units.  Each has multiple levels, but at the lowest level each is limited to producing three units.  However, when a territory has both a city1 and a factory1, instead of being able to produce up to 3 infantry units plus up to 3 other units, only 3 units overall can be made.

Here is my code; am I missing something?

<attatchment name="unitAttatchment" attatchTo="factory1" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                         <option name="isFactory" value="true"/>
                        <option name="canOnlyBePlacedInTerritoryValuedAtX" value="1"/>
                        <option name="isAAforBombingThisUnitOnly" value="false"/>
                        <option name="canProduceXUnits" value="3"/>
                        <option name="maxDamage" value="3"/>
                        <option name="maxOperationalDamage" value="1"/>
                        <option name="isConstruction" value="true"/>
                         <option name="constructionType" value="factory"/>
                         <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
                         <option name="maxConstructionsPerTypePerTerr" value="1"/>
                         <option name="requiresUnits" value="city1"/>
                         <option name="requiresUnits" value="city2"/>
                         <option name="requiresUnits" value="city3"/>
                         <option name="requiresUnits" value="city4"/>
                         <option name="requiresUnits" value="city5"/>
</attatchment>


<attatchment name="unitAttatchment" attatchTo="city1" javaClass="games.strategy.triplea.attatchments.UnitAttachment" type="unitType">
                         <option name="isFactory" value="true"/>
                         <option name="canOnlyBePlacedInTerritoryValuedAtX" value="1"/>
                         <option name="isAAforBombingThisUnitOnly" value="true"/>
                         <option name="canProduceXUnits" value="3"/> 
                         <option name="maxDamage" value="3"/>
                         <option name="maxOperationalDamage" value="1"/>
                         <option name="constructionType" value="city"/>
                         <option name="constructionsPerTerrPerTypePerTurn" value="1"/>
                         <option name="maxConstructionsPerTypePerTerr" value="1"/>
</attatchment>
Reply | Threaded
Open this post in threaded view
|

Re: Trying to have two different types of factories, each independent of the other

Cernel
No, you are not missing anything.

Only the highest placement limit counts, and this is intended.
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Trying to have two different types of factories, each independent of the other

Frostion
In reply to this post by BeornTheBold
Reply | Threaded
Open this post in threaded view
|

Re: Trying to have two different types of factories, each independent of the other

Cernel
In reply to this post by BeornTheBold
Also, the requireUnits limits are related to the territories, not to the units (you need having that unit in that territory; you don't need that unit being the one that it is producing it); so, even if they would stack (which they don't), you would be able to produce the union of all units allowed by any (thus whatever up to the total limit, if the factory allows whatever).

So, what you want to do is twice unsupported (yet, you can obtain it via massive triggering and produce / consume units).
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Trying to have two different types of factories, each independent of the other

Cernel
In reply to this post by Frostion
No, it doesn't, and that Wiki is either misleading or obsolete.

There is no point whatsoever in having multiple factories stacks (as long as the factories have no other purpose but being factories, that is).
History plays dice
Reply | Threaded
Open this post in threaded view
|

Re: Trying to have two different types of factories, each independent of the other

Frostion
Thats a shame. It would be nice to have production limit also being able to be dependent on the sum of the max production capability of several factories/producing units.
Reply | Threaded
Open this post in threaded view
|

Re: Trying to have two different types of factories, each independent of the other

Cernel
Related to:
http://sourceforge.net/p/triplea/bugs/1102/
History plays dice