-
-
Notifications
You must be signed in to change notification settings - Fork 125
Description
In Generals, you are able to build infantry in pairs or in any specified numbers. Also, you can have multiple appearances for a unit you build, which are selected randomly upon its creation from a list of its possible appearances.
As far as I know, in Generals in this case you technically build not the unit itself but an object that creates it, following its own list of things to create (for example, it can specify the amount of infantry to create or the list of "skins" the unit can have). Maybe something like this can be achieved here as well. Here's a draft how it can look like:
[SOLDIER] ; essentially a dummy unit if the tag below is enabled
BuildAs=SOL1,SOL2,SOL3 ; a list of UnitTypes from which the actual unit to create is picked, each "skin" is its own entry, so AlternateTheaterArt, Convert.Deploy and convert on promotion can be specified properly for each one
BuildAs.Priority=20,30,50 ; a chance in percent for each unit from the list to be picked, so rare skins are possible
BuildAmount=2 ; creates the given amount of specified unit upon its creation. VehicleTypes exit the factory one after another to prevent the next unit being stuck. Each of the created units is randomized according to BuildAs list, if it is present.By using this approach, you have 20% chance to get 1 SOL1, 30% to get 1 SOL2 and 50% to get 1 SOL3 when you build SOLDIER per each BuildAmount. With BuildAmount=2 you get 2 units at once, like: SOL1, SOL2; SOL1, SOL1; SOL2, SOL3 etc. Cloning is respected, CloneAs should be defined for each UnitType in the list.
Alternatively, you can define BuildAmount per each actual unit instead
[SOLDIER] ; essentially a dummy unit if the tag below is enabled
BuildAs=SOL1,SOL2,SOL3 ; a list of UnitTypes from which the actual unit to create is picked, each "skin" is its own entry, so AlternateTheaterArt, Convert.Deploy and convert on promotion can be specified properly for each one
BuildAs.Priority=20,30,50 ; a chance in percent for each unit from the list to be picked, so rare skins are possible
[SOL1]
BuildAmount=1 ; Build Amount is defined as a property of the actual unit to create
[SOL2]
BuildAmount=2 ; each variation from the list can be created in its own different amount
[SOL3]
BuildAmount=5 ; in this case, you can randomly get 1 strong infantry, 2 weaker infantry or 5 weak infantry when you build just one type of infantryBy using this approach, you have 20% chance to get 1 SOL1, 30% to get 2 SOL2 and 50% to get 5 SOL3 when you build one SOLDIER. If SOLDIER has its own BuildAmount >1, the game picks a unit from BuildAs list as many times as the value tells it to, then builds as many of them as this unit's own BuildAmount tells it to. With BuildAmount=2 defined for SOLDIER, you can get: 1x SOL1, 5x SOL3; 1x SOL1, 2x SOL2; 2x SOL2, 2x SOL2, etc. Units exit from the factories one after another and no new units are built until the last unit is created.