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.

Prerequisites
CrimsonCore + CrimsonSettings in the project, with your PlayerController derived from 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.

UCrimsonSettingsDataAsset -> a NumberPop entry with bPersistToSharedStore ticked and StorageKey = NumberPop.WidgetScale.
StorageKeyDescriptor typeDrives
NumberPop.WidgetScaleScalar, range 0.5 - 2.0WidgetScale
NumberPop.NumberFormatDiscrete, options in this order: Project Default, Comma Separated, Abbreviated, RawNumberFormatOverride (option index - 1 maps to -1..2)
NumberPop.ShowMyDamageDiscrete boolbShowMyDamageDealt
NumberPop.ShowAllyDamageDiscrete boolbShowAllyDamageDealt
NumberPop.ShowEnemyDamageDiscrete boolbShowEnemyDamageDealt
NumberPop.ShowIncomingDamageDiscrete boolbShowIncomingDamage
NumberPop.ShowHealsDiscrete boolbShowHeals
NumberPop.CritsOnlyDiscrete boolbShowCritsOnly
NumberPop.MaxDisplayDistanceScalar, cm (0 = unlimited)MaxDisplayDistance
Untouched keys keep authored defaults
The component's current property values double as the fallback when a key has never been written, so players who never open the menu keep whatever defaults you authored on the component (or the class defaults).
Verify
Change the Widget Scale slider in your options screen - the next pop renders at the new scale immediately, and the value survives a restart (shared store persistence).

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).

The team bridge is separate
This page covers the display knobs. The ally/enemy relationship itself comes from the 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.