- Error: "Dungeon data keys are missing for gen" occurring on second round
- Cause: Round persistence system clears missions but doesn't regenerate them properly
- Result: Fallback mission generation creates incomplete missions missing dungeon/biome/faction data
-
Modified
RoundPersistenceSystem.cs(line 396):- Before:
expeditionComp.Missions.Clear(); // Clear invalid missions - system will regenerate - After:
_salvageSystem.ForceGenerateMissions(expeditionComp);
- Before:
-
Added
ForceGenerateMissions()method toSalvageSystem.Expeditions.cs:- Public method that calls the proper
GenerateMissions()method - Ensures missions are regenerated using the correct system logic
- Public method that calls the proper
- Start server
- Start first round - verify expeditions work
- Restart round (admin command or natural restart)
- On second round, check expedition console:
- Should show missions without errors
- Should be able to claim and start expeditions
- Dungeon generation should work without "missing keys" error
- Before Fix: Second round shows "Dungeon data keys are missing for gen" error, FTL fails
- After Fix: Second round expeditions work normally, no dungeon errors
Content.Server/_HL/RoundPersistence/Systems/RoundPersistenceSystem.csContent.Server/Salvage/SalvageSystem.Expeditions.cs
The issue was that round persistence correctly saved and restored expedition data, but when invalid missions were detected, it only cleared them without properly regenerating new ones. This caused the expedition console to fall back to GenerateLocalMissions() which creates incomplete missions that lack the dungeon configuration data needed for proper dungeon generation.
The fix ensures that when missions are cleared due to invalid state, they are immediately regenerated using the proper GenerateMissions() method that creates complete mission parameters.