Remote dungeons type selection with fallbacks #2682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, for a dungeon required for a quest, a quest writer can either pick a dungeon type, or just any random dungeon. If a dungeon type is specified but no dungeon of that type can be found in the current region, the engine picks a random dungeon instead.
That fallback means sometimes the quest writer intentions are not followed, including some very bad cases in my opinion (reward map for a rare dungeon type that can be replaced by a map for a random dungeon).
So this PR removes the automatic fallback to "any dungeon". On the other hand, it introduces the possibility to provide more than one target dungeon type, as a list:
The engine will pick in priority dungeons of type dungeonA, then dungeonB, etc, enlarging the pool of dungeons to select from until it reaches the new setting DungeonsPoolSizeTarget (default 3), or no more fallback types have been specified.
Of course, "dungeon" can be specified as a last fallback type to get the equivalent of current Daggerfall Unity behavior for some place.
DungeonsPoolSizeTarget=0 will totally disable the fallback mechanism
DungeonsPoolSizeTarget=999 (or large values in general) will take all fallback dungeons into consideration no matter what, if player prefers randomization over quests consistency.
I also edited existing quests to benefit from this feature, but did not spend a lot of time carefully picking the best set of dungeon types for each one, so there's more likely room for improvement.