Upgrading Factories
-
In 1888 SAS (Steam & Steel) you can upgrade Factories
Barracks to Industry to Industry-HvyBut I only want 1 factory per TT
To allow a factory upgrade this maxFactoriesPerTerritory property must be set to 2
But this also allows an unwanted Barracks to be placed, as below;
Checking TripleA-2.5.22294 the same thing happens.
So any help/suggestions would be appreciated to resolve this.
-
Yes, but the upgrade unit does not have to be called "factory".
Use a dummy to upgrade, have the upgrade "spawn" the real unit, then remove the upgrade after endTurn. endTurn is where "createsUnitsList" happens.
Use playerAttachment/placementLimit to insure that the dummy upgrade and lesser unit cannot be placed at the same time.
Lesser unit "Barracks"/"factory" is ungraded by "Industry-Upgrade"/"Upgrade" which create "Industry"/"factory" which can be upgraded by "Industry-Heavy-Upgrade"/"Upgrade" which in turn creates "Industry-Heavy"/"factory".
And "maxFactoriesPerTerritory" can be left at 1, because the upgrade unit is there only as a placeholder for the final unit.
Tried to do this with GCD '41 and Shogun Advanced, so it does work.
Cheers...
-
Wow, so quick, thanks!
I guess its always been like that.
-
And so, I got some things a little mixed up there, sorry.
The Barracks, Industry, Industry_Upgrade, Industry-Hvy, Industry-Hvy_Upgrade should all be called "factory" and look like this:
<option name="constructionType" value="factory"/> <option name="maxConstructionsPerTypePerTerr" value="2"/> <!-- This will allow 2 of the same type to occupy the territory at once --> <!-- This will allow the upgrade unit to be placed --> <option name="constructionsPerTerrPerTypePerTurn" value="1"/> <!-- Only 1 per turn, will prevent a upgrade and other to be placed during the same turn -->
The upgrades will still need to replace/create. In the playerAttachment:
<option name="placementLimit" value="owned:Barracks:Industry:Industry-Hvy" count="1"/> <!-- Note no upgrade units, and this should stop the second placement of a production unit -->
Then the cleanup, but I see that you have only an endTurn at the beginning of the round. This is what is used to spawn the upgraded unit prior to removal, but I sure you can handle this.
Again, sorry for the mix up.
Cheers...
-
As always very helpful, thanks!