I'm trying to figure out how to create a random group spawn system.
I already have a good random unit spawn system, but I'm struggling figuring out how exactly to set a group of units as a variable, or series of variables, and then creating those specific units as a pre-made unit group.
I'm not sure that makes sense so here is an example:
Right now I have a system that creates random units based upon a pre-defined set of monsters that is either randomly selected or set based upon the level. So lets say I wanted 10 units, for each unit it would create a random unit from a list of possible units allowed by that monster group.
What I want is to be able to set different groups up, so instead of having randomly chosen units, it would have randomly chosen groups. So now those ten units would be 5 gnolls and 5 assassins, or 2 overlords and 8 ghouls...
This is basically to avoid unpleasant randomness like 10 of the same, very strong unit (however unlikely based upon the array), and also allows me to set up more interesting random encounters because I can guarantee that with each overlord there are 8 ghouls, and they could provide interesting synergy because I know the group make up.
I hope this is understood, If not I can try to clarify.
I already have a good random unit spawn system, but I'm struggling figuring out how exactly to set a group of units as a variable, or series of variables, and then creating those specific units as a pre-made unit group.
I'm not sure that makes sense so here is an example:
Right now I have a system that creates random units based upon a pre-defined set of monsters that is either randomly selected or set based upon the level. So lets say I wanted 10 units, for each unit it would create a random unit from a list of possible units allowed by that monster group.
What I want is to be able to set different groups up, so instead of having randomly chosen units, it would have randomly chosen groups. So now those ten units would be 5 gnolls and 5 assassins, or 2 overlords and 8 ghouls...
This is basically to avoid unpleasant randomness like 10 of the same, very strong unit (however unlikely based upon the array), and also allows me to set up more interesting random encounters because I can guarantee that with each overlord there are 8 ghouls, and they could provide interesting synergy because I know the group make up.
I hope this is understood, If not I can try to clarify.