How-To: Expose Pop Options as User Settings (Optional)
Goal: surface the per-player pop options (scale, number format, category toggles, distance cap) in a saved options menu. On the full Crimson stack this is data-only: CrimsonCore ships UCrimsonCoreNumberPopSettingsComponent as a default component on ACrimsonPlayerController, and it applies the CrimsonSettings keyed-store NumberPop.* values to the local player's UCrimsonNumberPopPlayerSettings - creating that component on demand, so you don't even add it yourself.
ACrimsonPlayerController. Standalone (without CrimsonCore), skip this page and set the UCrimsonNumberPopPlayerSettings properties from your own options UI instead - they are all BlueprintReadWrite.1. Author the settings descriptors
Add one descriptor per option to a UCrimsonSettingsDataAsset (see the CrimsonSettings wiki -> How-To: Expose Another Plugin's Settings). The recipe for every entry: set bPersistToSharedStore = true and set StorageKey to the exact key name below (the DevName is used as the key only when StorageKey is unset). The glue component is event-driven - it re-applies whenever a shared setting changes, so sliders update live.
| StorageKey | Descriptor type | Drives |
|---|---|---|
NumberPop.WidgetScale | Scalar, range 0.5 - 2.0 | WidgetScale |
NumberPop.NumberFormat | Discrete, options in this order: Project Default, Comma Separated, Abbreviated, Raw | NumberFormatOverride (option index - 1 maps to -1..2) |
NumberPop.ShowMyDamage | Discrete bool | bShowMyDamageDealt |
NumberPop.ShowAllyDamage | Discrete bool | bShowAllyDamageDealt |
NumberPop.ShowEnemyDamage | Discrete bool | bShowEnemyDamageDealt |
NumberPop.ShowIncomingDamage | Discrete bool | bShowIncomingDamage |
NumberPop.ShowHeals | Discrete bool | bShowHeals |
NumberPop.CritsOnly | Discrete bool | bShowCritsOnly |
NumberPop.MaxDisplayDistance | Scalar, cm (0 = unlimited) | MaxDisplayDistance |
2. Ordering the Number Format options
The NumberPop.NumberFormat discrete stores an option index, and the glue maps index - 1 onto NumberFormatOverride. The options must therefore be authored in exactly this order: Project Default (0 -> -1), Comma Separated (1 -> 0), Abbreviated (2 -> 1), Raw (3 -> 2).
IsInstigatorFriendly team hook (Blueprint override or C++ delegate) - see How-To: Bind Your Team System.See also
- CrimsonSettings wiki -> How-To: Expose Another Plugin's Settings - authoring descriptors, widgets, and screens.
- How-To: Filter Pops Per Player - what each driven property does.