Ticket #869 (closed defect: fixed)
Handle or prevent invalid player IDs in scenarios
|Reported by:||historic_bruno||Owned by:|
|Priority:||Nice to Have||Milestone:||Alpha 6|
It's possible to place units in Atlas for up to 8 players, but if the number of players is changed (either by manually editing the XML or with the player editor) then some units may have invalid player IDs. This causes errors when the scenario is loaded. Part of the problem can be addressed in Atlas itself, perhaps not saving units that are not assigned to a valid player. Or the player can be notified with a message "Player X has units assigned which will be lost. Continue?" It can also be solved by the map reader, e.g. not adding entities that have invalid player IDs.
Otherwise the game logic fails unpredictably.