How to limit the number of units purchased in a turn ?
I am looking for a solution to limit the number of units which can be purchased.
Ex: Japanese player can only build a maximum of 1 carrier per turn and has a piece limit of 6 armor.
Is there a way to display the summary of a players unit count per unit type ?
The maxBuiltPerPlayer unitType option can be used to implement piece limits:
- However unlike when you don't have enough PUs, maxBuiltPerPlayer isn't directly applied to the purchase interface. You only get an error message (informing about the current limit) after the purchasing is complete, and the purchase interface is then reset to 0, which isn't user friendly.
- I suppose it would be possible to implement this with a system of unit tokens (as a ressource) but it would be rather complicated
<attachment name="unitAttachment" attachTo="artillery" javaClass="games.strategy.triplea.attachments.UnitAttachment" type="unitType"> <option name="maxBuiltPerPlayer" value="15"/> <option name="placementLimit" value="owned" count="10"/> </attachment>
Would it be possible to implement a maxBuiltPerPlayerPerTurn unitType option which could be applied to the Purchasing interface ?
A placementLimit can be used to avoid huge stacks, but it doesn't prevent from purchasing the units (you just can't place them).
TheDog last edited by
#4. For avoiding huge stacks Im a big fan of upkeep/maintenance using
<option name="createsResourcesList" value="-1:PUs"/>
for each unit.
TorpedoA last edited by
@thedog Not only to avoid huge stacks. The whole game is much more open. In the sense that if you loose a big army, you free up alot of PUs per turn.
Because without upkeep, one big battle loss or win, is too cruicial. I had alot of those situations in the far past, where i did still play without upkeep vs AI on NWO maps, and if you loose that one battle where the most hp/units clashed, if i then lost this, i just started a new game. There was often no chance coming back.
With upkeep now, i have no huge stacks and every battle is just a battle and not the war that you can loose.
Furthermore, the gap between cost per hp is much more dimished, the longer the game goes.
Never again without upkeep.
@butterw You could create a specialized factory type, with a capacity of 1 that can only build carriers and don't let regular factories build carriers.
Sounds correct: a custom Factory can be used.
The extra complexity is maybe not warranted in this example, given the high cost of purchasing an aircraft carrier.
My main issue is that maxBuiltPerPlayer piece limits aren't applied in the Purchase interface (the purchase is reset if you have gone beyond the limit) and there doesn't seem to be any way to get info on the current number of pieces used.
By contrast, when you buy more units than you can place you get the following warning after the purchase (the purchase info is not reset):
End Purchase: You have purchased 13 units, and can only place 8 of them. Continue with Purchase ?
@butterw I agree that a better interface would be good, but build limits work and are even supported by the AI. The original 1981 edition of A&A limited players to the counter mix.
- Is there a way to display the summary of a players unit count per unit type ?
Per player Unit type count history is available in the export game stats csv file. This info doesn't seem to be available anywhere else.