SML Mod, SML Session Settings, and Base Game Mod Configs Types#419
SML Mod, SML Session Settings, and Base Game Mod Configs Types#419porisius wants to merge 1 commit into
Conversation
| .Cons: | ||
| ** Not per-installation, settings have to be re-configured for every new session. | ||
| ** Must be registered in the mod's GameInstanceModule to be registered. | ||
| ** Not visible in Dedicated Servers, as the User Interface is not loaded there. |
There was a problem hiding this comment.
This is absolutely a bug and a missing feature, not really a "con"
| *** Carries over between saves | ||
| ** Can use the icon functionality offered by FGUserSettingCategory | ||
| ** Allows Dedicated Server and clients to have different settings for the same mod | ||
| ** Automatically replicated in multiplayer if `Is Session Setting Wide` is checked |
There was a problem hiding this comment.
That is not the case. User Settings are never replicated unless you manually write the code for your specific setting to replicate (like base game does for some of its settings)
|
|
||
| .Cons: | ||
| ** Not per-save, changes affect all save files using the same installation | ||
| ** Mod must be a GameFeature to use Game User Settings, and settings must be registered in the mod's FGGameFeatureData to be registered. No newline at end of file |
There was a problem hiding this comment.
Worth adding that they are added to the "Options" menu and not "Mod Options" or any other SML-related menu, so you need to be careful to group your settings reasonably well to avoid overwhelming the user.
| @@ -0,0 +1,234 @@ | |||
| = User Settings | |||
|
|
|||
| Game User Settings are a feature that is used by the base game's Creative Mode and Game Mode Settings | |||
There was a problem hiding this comment.
I think you are confusing two separate systems here.
The first system is User Settings (entry points in C++ are FGUserSetting, IFGOptionInterface and IFGOptionInterfaceImpl, as well FGOptionsLibrary)
User settings are just a framework that allows data-driven setting creation and management, as well as automatic UI support out of box. The only thing you need to do to implement your "options-like" UI is to implement IFGOptionInterface (or more commonly, IFGOptionInterfaceImpl)
The second system is Game User Settings. Game User Settings are User Settings implementation that uses the ini file in saved data directory to persist the setting values, shows them in Options menu (and in Server Options), and is global to the install of the game/server.
Creative Mode (aka Advanced Game Settings) are another implementation that stores the data on a per save game basis and does some additional handling to marshal it and pass it from session creation to the game logic on the loaded game map.
Game Modes are another implementation similar to Creative Mode, but with its own gameplay differences.
What your User Setting does and how it behaves heavily depends on what Manager class it actually belongs you (such as UFGGameUserSettings, UFGAdvancedGameSettings, or another implementation for game modes), because all of these behaviors are manager-specific.
|
|
||
| ==== Level Whitelist | ||
|
|
||
| When values are present in this array, the User Setting is restricted to only appear when playing in one of the specified game levels. |
There was a problem hiding this comment.
This is not a vanilla functionality, I do not recall vanilla FGUserSetting assets having these feature. Are you sure you are not confusing them with SML Session Settings (which are a subclass of FGUserSettings)?
|
|
||
| Not all properties inherited from UFGGameUserSettings are relevant to User Settings. | ||
| You will have to experiment to see which ones have an effect. | ||
| Please update this documentation page via "Edit This Page" in the top right with your findings. |
There was a problem hiding this comment.
Again, behavior depends on a manager you are using, as I mentioned in the comment above.
| Please update this documentation page via "Edit This Page" in the top right with your findings. | ||
|
|
||
| Checking the "Use CVar" field is only required | ||
| if you wish to allow modifying the value of the User Setting via the game console. |
There was a problem hiding this comment.
Note that Use CVar is only supported for Game User Settings (not for game modes, AGS or anything else). Additionally, as a rule of thumb, you want to have all Game User Settings that are relevant for Dedicated Servers have a CVar (this is the convention that vanilla follows)
| next time the asset is loaded. | ||
|
|
||
| * ShowInBuilds: `Public Builds` to ensure that User Settings are visible to the user | ||
| * ManagerAvailability: `USM MAX`, which is an invalid value, ensuring that the setting never displays in base-game options menus. |
There was a problem hiding this comment.
This is deprecated, no need to explain this or even mention it
|
|
||
| * ShowInBuilds: `Public Builds` to ensure that User Settings are visible to the user | ||
| * ManagerAvailability: `USM MAX`, which is an invalid value, ensuring that the setting never displays in base-game options menus. | ||
| * IsSettingSessionWide: `true` to ensure that multiplayer clients are able to modify User Settings and have their changes stored with the save file. |
There was a problem hiding this comment.
this only controls a little visual UI icon next to the setting, it has zero impact on the actual behavior of the setting.
| Registering a User Setting makes it available to be configured in Satisfactory's Settings menu | ||
| which is available at both world creation and in the pause menu. | ||
|
|
||
| == Reading and Writing User Settings |
There was a problem hiding this comment.
This is all good info, but specifically for Game User Settings, not for User Settings overall
Documentation for different Mod Configuration options in Satisfactory as of Version 1.2.