Skip to content

Disable choosing The Anomaly scenario#564

Closed
Tick-git wants to merge 1 commit intorwmt:devfrom
Tick-git:Disable-The-Anomaly-Scenario
Closed

Disable choosing The Anomaly scenario#564
Tick-git wants to merge 1 commit intorwmt:devfrom
Tick-git:Disable-The-Anomaly-Scenario

Conversation

@Tick-git
Copy link

Label: Bug, Anomaly

The Anomaly scenario spawns an additional Monolith, likely via ScenPart_MonolithGeneration, resulting in multiple Monoliths being present in the game. This leads to problems, so this commit disables the scenario entirely instead of warning the user.

89 ScenariosInCategory(ScenarioCategory.FromDef)  This might disable any modded scenarios; I haven’t investigated it yet. In the future, it would be great to support modded ones - I'll note that for later.

The Anomaly scenario spawns an additional Monolith, likely via ScenPart_MonolithGeneration, resulting in multiple Monoliths being present in the game. This leads to errors, so this commit disables the scenario entirely.
@SirrWilliam
Copy link

Hello @Tick-git !

Instead of completely removing the scenario from the list, wouldn't it be better to warn the user? If we do remove it, we should at least notify them somehow. Otherwise, they might think their DLC/Mod is broken.

Page_SelectScenario_Multifaction class is basically a copy of Page_SelectScenario. When I previously tried the Android Tiers mod, calling ScenariosInCategory(ScenarioCategory.FromDef) correctly listed the scenarios added by the mod.

If we’re not going to warn the player, we don’t really need the DrawOptionBackgroundReplacement() method (Line 98) we could just use Widgets.DrawOptionBackground() instead.

@notfood notfood added enhancement New feature or request. anomaly Fix or bugs relating to Anomaly (Not 1.5) labels Jul 15, 2025
@notfood notfood moved this to In review in 1.6 and Odyssey Jul 15, 2025
@notfood notfood moved this to In review in Backports Jul 15, 2025
@Tick-git
Copy link
Author

.. correctly listed the scenarios added by the mod.

Ok, nice :)

Instead of completely removing the scenario from the list, wouldn't it be better to warn the user? If we do remove it, we should at least notify them somehow. Otherwise, they might think their DLC/Mod is broken.

Yeah, I see your point. I’m not really sure what happens if two Monoliths are in the game, apart from an error I found while testing and the text in #known-issues on Discord. In my view, we should keep the MP mod as protected against exceptions as possible, and if a user wants to go down that multiple Monolith route, they can do it themselves with the debug tool.
But I don’t know if this is the correct way at all - just wanted to bring the Monolith situation back to how it was before the scenario choosing changes.

Open to suggestions @notfood and @SokyranTheDragon - don’t mind if we scrap the PR entirely.

@notfood
Copy link
Member

notfood commented Jul 15, 2025

I don't play multifaction, but I believe it's important to provide users with clear explanations when something isn't working as expected.

@SokyranTheDragon
Copy link
Member

For Anomaly, I think it may be just better to make sure no extra monoliths are spawned, rather than disabling an entire scenario. On top of that we'll have to handle scenarios that add monolith that aren't the built-in one - there's a chance someone will just make a custom scenario that does this as well.

However, we may potentially have to do something with Odyssey's gravship start. If I'm not mistaken, the game supports a maximum of 1 gravship in the game, so for safety we may need to disable it (possibly only if there's no gravships in the game already?). Or perhaps some extra check to make sure that the selected scenarios don't use the gravship either, again for custom scenarios.

@Tick-git
Copy link
Author

Going to look into that again more deeply. I might have even tested something wrong in the first place - currently, on the dev branch and on 1.6-working by reznal, no extra monolith can be spawned with the scenario (probably #563 is enough - even though I could swear I tested it with that). If that’s really the case - sorry for the confusion and the time spent thinking about it.

@Tick-git
Copy link
Author

I'm also going to test whether the "Strange Signal" quest (which appears when there's no monolith in the game and triggers the drop of a new one) can still spawn an extra monolith if it's already active, then a map with a monolith is generated, and only after that the quest is accepted.

@Reznal
Copy link

Reznal commented Jul 16, 2025

For Anomaly, I think it may be just better to make sure no extra monoliths are spawned, rather than disabling an entire scenario. On top of that we'll have to handle scenarios that add monolith that aren't the built-in one - there's a chance someone will just make a custom scenario that does this as well.

However, we may potentially have to do something with Odyssey's gravship start. If I'm not mistaken, the game supports a maximum of 1 gravship in the game, so for safety we may need to disable it (possibly only if there's no gravships in the game already?). Or perhaps some extra check to make sure that the selected scenarios don't use the gravship either, again for custom scenarios.

I tested this this morning and in vanilla singleplayer you can have multiple gravships :)

@Tick-git
Copy link
Author

Going to look into that again more deeply. I might have even tested something wrong in the first place - currently, on the dev branch and on 1.6-working by reznal, no extra monolith can be spawned with the scenario (probably #563 is enough - even though I could swear I tested it with that). If that’s really the case - sorry for the confusion and the time spent thinking about it.

Sooo, I looked into that again. I must have tested this without the GenStep_Monolith.GenerateMonolith patch (#563). ScenPart_MonolithGeneration.PostMapGenerate uses the patched GenStep_Monolith.GenerateMonolith. I should've looked into the code first. Sorry for the confusion.

@Tick-git
Copy link
Author

I'm also going to test whether the "Strange Signal" quest (which appears when there's no monolith in the game and triggers the drop of a new one) can still spawn an extra monolith if it's already active, then a map with a monolith is generated, and only after that the quest is accepted.

I'll look into that now and create a separate PR if it's possible to generate two monoliths simultaneously via quest.

@Tick-git Tick-git closed this Jul 19, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in Backports Jul 19, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in 1.6 and Odyssey Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

anomaly Fix or bugs relating to Anomaly (Not 1.5) enhancement New feature or request.

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants