Multiplayer
Multiplayer copied to clipboard
Scenarios are incorrectly handled in Multifaction
Scenarios aren't handled on a per-faction basis, and as such the scenario data (besides starting data, like starting items) will be shared between all players.
Example of features that won't work properly, since they are tied to a scenario:
- Automatic activation of the monolith (The Anomaly scenario)
- Guaranteed ghoul drop pod (The Anomaly scenario)
- Guaranteed any incident (custom scenarios)
- Pursuing mechanoids (The Gravship scenario)
- Disabled mechanoid signal quest (The Gravship Scenario)
- Disabled any quest (custom scenarios)
- Other ScenParts added by different mods
Long story short, since all the players will share the same scenario, it'll either disable specific ScenParts for players with specific scenarios, or force everyone else to be affected by them. Possibly it could break some other stuff instead.
The fix would require:
- Add
Scenarioas a field inFactionWorldData, and save/load it (expose data) - Modify the faction creation to use the
FactionWorldDatafor storing the scenario - Use
FactionRepeaterto make repeat all the relevantScenariocode for each player faction- For example,
Scenario:TickScenario
- For example,
- Make sure only the relevant factions have their
Scenariocode called by usingPush/PopFactionmethods- For example,
Scenario:GetStatFactoris called fromStatWorker- we need to make sure it's called only by relevant faction, or all factions will be affected by those stat factors
- For example,
- Consider how to handle other methods that are even less obvious on how to handle them
- For example,
Pawn:Notify_PawnDiedis used byScenPart_OnPawnDeathExplode- do we want to only apply it to pawns of relevant faction? On all pawns that are on the map owned by such a faction? Both?
- For example,