Project

General

Profile

Feedback #25962

Respect GameParameters Preset Values in GAMEPARAMETERS ConfigNode

Added by DRVeyl over 3 years ago.

Status:
New
Severity:
Low
Assignee:
-
Category:
Modding
Target version:
-
Version:
Platform:
Windows
Expansion:
Core Game
Language:
English (US)
Mod Related:
Yes
Votes:
Arrow u r green
Arrow d r red

Description

Not sure if this is a bug report or a feature request. The relevant code is intentional, but the side-effects are maybe unintended.

Some stock GameParameters.ParameterNode subclasses implement their own override of SetDifficultyPreset(Preset preset) which has hardcoded difficulty values for some of the parameters. Thus they ignore any preset configured in a GAMEPARAMETERS ConfigNode, only for these values.

Examples:
GameParameters.AdvancedParams sets BuildingImpactDamageMult, AllowNegativeCurrency, and ResourceTransferObeyCrossfeed in its override of SetDifficultyPreset()
CommNet.CommNetParams sets requireSignalForControl, rangeModifier, occlusionMultiplierVac, occlusionMultiplierAtm, and plasmaBlackout in its override of SetDifficultyPreset()

From a ModuleManager patch, it is not possible to set the default values of only these parameters for a given difficulty preset. All other parameters defined in GameParameters.AdvancedParams and CommNet.CommNetParams can be adjusted. This issue may be specific to GameParameters.CustomParameterNode subclasses.

Would it be feasible to refactor code in GameParameters to set defaults via SetDifficultyPreset() between creating the CustomParameterNode and calling its Load() method, instead of triggering calls each time a different preset is selected? Or if it is still desired to make that call as a notification, then avoid the behaviour of resetting fixed defaults in the stock AdvancedParams and CommNetParams nodes?

Also available in: Atom PDF