I'm trying to make every UFO potentially be crewed by a different set of aliens with an equal chance of any specific race being used.
At first I thought this could be achieved just by using raceWeights: but from what I've read the alien crew race can also be set to match the occupants of the base that launched it.
So as more alien bases are added to the map more non-randomized UFO crews will be generated.
I think that to prevent this the variable genMissionRaceFromAlienBase: can be set to false which will cause all UFOs to use the raceWeights: values to determine their crew instead of using the race of their origin base.
alienMissions:
# [=] Example Mission [=]
- type: STR_EXAMPLE_MISSION
points: 0
genMissionRaceFromAlienBase: false # <-- Now it will pick one of the four below options instead of the base's race
raceWeights:
0:
STR_AQUATOID: 25
STR_GILLMAN: 25
STR_LOBSTERMAN: 25
STR_TASOTH: 25
waves:
- ufo: STR_SURVEY_SHIP
count: 1
trajectory: P0
timer: 9000
- ufo: STR_ESCORT
count: 1
trajectory: P2
timer: 7800
- ufo: STR_CRUISER
count: 2
trajectory: P4
timer: 9000
I'm unsure of exactly how raceWeights: functions though.
For example when making all aliens have an equal chance of spawning if there are ten different possible entries in the raceWeights: section do the combined values all need to add up to 100%?
alienMissions:
# [=] Example Mission [=]
- type: STR_EXAMPLE_MISSION
points: 0
raceWeights:
0:
STR_ALIEN_ONE: 10
STR_ALIEN_TWO: 10
STR_ALIEN_THREE: 10
STR_ALIEN_FOUR: 10
STR_ALIEN_FIVE: 10
STR_ALIEN_SIX: 10
STR_ALIEN_SEVEN: 10
STR_ALIEN_EIGHT: 10
STR_ALIEN_NINE: 10
STR_ALIEN_TEN: 10
waves:
- ufo: STR_SURVEY_SHIP
count: 1
trajectory: P0
timer: 9000
- ufo: STR_ESCORT
count: 1
trajectory: P2
timer: 7800
- ufo: STR_CRUISER
count: 2
trajectory: P4
timer: 9000
Or should they all be set at 50 for 50% chance of each race being picked?
alienMissions:
# [=] Example Mission [=]
- type: STR_EXAMPLE_MISSION
points: 0
raceWeights:
0:
STR_ALIEN_ONE: 50
STR_ALIEN_TWO: 50
STR_ALIEN_THREE: 50
STR_ALIEN_FOUR: 50
STR_ALIEN_FIVE: 50
STR_ALIEN_SIX: 50
STR_ALIEN_SEVEN: 50
STR_ALIEN_EIGHT: 50
STR_ALIEN_NINE: 50
STR_ALIEN_TEN: 50
waves:
- ufo: STR_SURVEY_SHIP
count: 1
trajectory: P0
timer: 9000
- ufo: STR_ESCORT
count: 1
trajectory: P2
timer: 7800
- ufo: STR_CRUISER
count: 2
trajectory: P4
timer: 9000
Also if each has a 50% chance wouldn't the entries higher on a list have more of a chance of being chosen then the lower ones as the coin toss would need to be lost by the previous entries before later ones are considered for their own shot at 50% odds?