[New Feature] Building random variants of the same unit or multiple units at once #891
Damfoos
started this conversation in
Ideas and feedback
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
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
By 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.
Beta Was this translation helpful? Give feedback.
All reactions