Get the subsystem
The settings nodes are on the Rolly Settings Subsystem, a local player subsystem (category Rolly|Settings). Get it with the Get RollySettingsSubsystem node (the action menu’s name; the placed node shows Rolly Settings Subsystem) from a widget or a player controller; a GameMode or a level actor has no local player. Every node takes the setting’s Gameplay Tag. Tags are not limited to Rolly.Settings: the built-in settings use Rolly.Settings.*, your own may use any tag.
Read and change values
A value has three states: the value (what the player chose and the screen shows), the applied value (what took effect) and the saved value (what the save file holds).
Blueprint
| Node | Notes |
|---|---|
| Get Setting Value, Set Setting Value | Any kind, in its text form (see Add your own settings) |
| Get Bool Value, Set Bool Value | Toggle (another kind is reported; Get gives false, Set changes nothing) |
| Get Float Value, Set Float Value | Slider (another kind is reported; Get gives 0, Set changes nothing) |
| Get Option Value, Set Option Value, Get Options | Choice (another kind is reported; Get gives None, Set changes nothing). Options from a binding (resolutions, monitors) are read when asked, so they follow what the player has chosen: the Resolution list follows the Window Mode and Monitor before Apply |
| Get Display Value | The value as the player reads it (On, 75 %, an option’s name) |
| Get Default Value, Find Setting, Get Settings Collection | Definitions |
| Is Setting Visible, Is Setting Enabled | Conditions, platforms and binding support |
| Execute Action | Action settings; proposed values wait for Apply |
| Refresh Values | Reads again the values the engine saves itself; call it when a settings screen of your own opens |
| Has Pending Changes, Is Confirmation Pending, Get Confirmation Seconds Remaining, Is Restart Required | State |
| Get Settings Awaiting Confirmation | The settings an Apply left waiting for the player’s answer, each with the value it goes back to, for a keep-or-revert question of your own |
| Register Setting User, Unregister Setting User, Is Setting In Use | Your code that uses a setting the engine knows nothing about (narration, cue sounds, a subtitle display); such a setting shows only while it has a user (see Set up audio settings) |
| Resolve Subtitle Text | A line in the player’s Subtitle Language (see Let players choose their languages) |
Bind On Setting Changed (tag, value) to react to changes. It also fires for shared values another player changed and for values the engine changed itself. On Settings Availability Changed fires when settings show or hide because of what the game has: a setting’s user registered, an audio device plugged in.
The game instance subsystem Rolly Settings Shared Subsystem has Get Settings Collection and Is Using Built In Library. The Blueprint nodes reference lists every node with its pins.
C++
#include "RollySettingsTags.h"
#include "Subsystems/RollySettingsSubsystem.h"
void AMyPlayerCameraManager::ApplyFieldOfView(const ULocalPlayer& Player)
{
if (const URollySettingsSubsystem* Settings = Player.GetSubsystem<URollySettingsSubsystem>())
{
SetFOV(Settings->GetFloatValue(RollySettingsTags::Gameplay_FieldOfView));
}
}Bind OnSettingChanged to follow the value’s changes.
Apply, confirm, revert and reset
| Call | Effect |
|---|---|
| Set (any Set node) | Immediate: takes effect at once and is written to disk after Immediate Save Delay (2 seconds by default), when a settings screen closes or when the game window loses focus. On Apply and Requires Restart: waits |
| Apply Settings | Applies the waiting values and saves them; Requires Restart values are saved for the next start. Settings with Needs Confirmation are applied but wait for Confirm Settings; the node returns true then, and On Confirmation Started fires |
| Confirm Settings | Keeps and saves the values that waited for confirmation |
| Revert Settings | Puts back the values from before that Apply. The same happens when the timeout passes (TimedOut), and when the player or the game leaves before an answer (Cancelled) |
| Discard Pending Changes | Forgets values that wait for Apply (for Back without applying). Immediate values stay |
| Reset All To Defaults, Reset Category To Defaults | Sets the settings back to their defaults and applies them like Apply, with a confirmation when one of them needs it (a category needs a tag for this node). A setting without a value resets through its binding: Key Mappings puts the player’s keys back to the mapping contexts’ defaults (and saves them) |
| Execute Action | Runs an Action’s binding. When the binding proposes values (Auto-Detect), they become values that wait for Apply: the player sees them first and keeps them with Apply or drops them with Discard Pending Changes |
The confirmation countdown (Project Settings > Plugins > Rolly Settings > Confirmation Timeout Seconds, 15 by default) counts real time, so it keeps counting while the game is paused.
Events: On Settings Applied (restart required), On Confirmation Started (seconds) and On Confirmation Ended (Confirmed, Reverted, TimedOut, Cancelled, or Superseded; see below). Close a keep-or-revert question of your own on every result; only Reverted, TimedOut and Cancelled mean the previous values are back. The settings screen shows its own keep-or-revert dialog (see Open the settings screen).
Shared values and several players. A Shared confirmation belongs to the player whose Apply started it: only that player is asked, and only that player can confirm or revert it. If another player applies Shared changes before that player answers, the confirmation moves to the other player: the first player’s On Confirmation Ended fires with Superseded and nothing is reverted. The values stay applied, and the other player’s answer decides for all of them, the first player’s included: Confirm keeps them, while Revert, the timeout or leaving puts back the values from before the first unanswered Apply. When the first player also had Per Player values waiting, their confirmation stays open for those, and their later result (Reverted, TimedOut or Cancelled) covers only those values.
Values that wait for Apply are shared too: a Shared value one player changed but did not apply is applied by another player’s Apply and dropped by another player’s Discard Pending Changes. Per Player values wait for their own player only.
One group, one engine apply. An Apply, a Revert (by call, timeout or leaving), a Reset, a Set of an Immediate value and the start each apply their values as one group. At the end of the group every binding it used gets Finish Applying once. The engine bindings use it to apply each kind of change once (one window change, one scalability change, one frame rate change) and to save GameUserSettings.ini once, however many values changed.
Keep up with values the engine changes
Alt+Enter, dragging the window to a new size, a scalability console command or another plugin can change engine values behind Rolly Settings’ back. Rolly Settings reads the values the engine saves again when the engine reports such a change (a new resolution, new scalability levels, the engine’s own video mode revert) and after every group, and On Setting Changed fires for each value that changed. Refresh Values does the same on demand. A value that waits for Apply or for a confirmation is left alone.
Options that follow other settings
A binding may build its options from another setting of the same scope, as the player sees it: the Resolution list is for the Window Mode and Monitor the player has picked, before Apply too. Rolly Settings notes which settings a binding reads while it builds the options. When the player changes one of them, the dependent options follow at once, and a value they no longer offer becomes the dependent setting’s default (a size the newly picked monitor lacks becomes that monitor’s native size), with On Setting Changed for both. Discard Pending Changes brings back both values, and Apply applies them together. A Reset computes such defaults again once every setting it covers is back at its default, so Resolution gets the native size of the monitor the reset picked, not of the monitor before it. Settings follow each other up to four deep: when a longer chain, or two settings whose options read each other, would still change a value there, Rolly Settings stops and reports a setup warning.
Try values from the console
The console commands (rolly.settings.dump, .set, .apply, .reset, .confirm, .revert) work on the first local player of the console’s game, or on another one with player=<index>. rolly.settings.dump lists every setting with its kind, scope, value, applied and saved value, and whether it is hidden or disabled. The commands are not cheats, so game code can run them in any build through the engine’s Exec.