Skip to main content

Stat and Actor UI

General Expansions ships a small, composable UI layer that reads Power Stats. Every view is a base element plus extensions, each extension drawing one part — so a health bar, an inspector row and a tooltip are built from the same pieces.

Stat Display Element​

StatDisplayElementBase (core) is bound to one Stat and raises updates when it changes. StatDisplayElementExtension_* components (General Expansions) draw it:

ExtensionsShow
_ValueText, _RawText, _ModifiedText, _CurrentMaxText, _MinMaxText, _PercentageText_Float, _MinMaxOffsetText_Float / _Int, _StringStatValue, _DefaultTextthe value in different forms
_ProgressBar_Float / _Inta fill bar between the Stat's min and max
_StatDefinitionName, _StatId, _StatIdInner, _StatKey, _Icon, _Icon_StringStat, _HostText, _SourceTextwhich Stat it is and whose
_Modifiers, _Injectors, _RelativeStats, _SigSepStats, _SrcSepStatsthe Stat's internals: active Modifiers, Injectors / Linkers, relations, inner Stats — a runtime inspector
_UpdateTextByConditionswitches a text when a condition passes
_StatInspectorRouteropens a nested inspector for a related Stat

StatIconContainerModel (Create › Power Demos › Stat › Display Icon Container) maps Stat Keys to sprites for the icon extensions.

Actor Element​

ActorElement is bound to one Actor. Its extensions:

ExtensionShows
ActorElementExtension_HealthView_Float / _Int / _WithShielda health bar (with a shield overlay)
ActorElementExtension_Name, _NameDisplaythe Actor's name
ActorElementExtension_StatIndicator, _PredefinedStatDisplay, _StatDisplayLinkerchosen Stats as Stat Display Elements
ActorElementExtension_StatPagepages of Stat packages — a character sheet
ActorElementExtension_HoverStateTrackerhover state (tooltips)
ActorElementExtension_ExtendActorElementnests another Actor Element
ActorElementExtension_ActiveSkillDisplayViewthe Actor's Skills — see Skill Controller

Localization​

A minimal key-based localization used by the samples: LocalizationController (loads the PowerLocalizationDatabase LocalizationPackagesModel from Resources), LocalizedTextBehaviour (a TextMeshPro text by key), LocalizedText_Parameters / LocalizedParameterInjector (texts with $P-style parameters filled in, themselves localized) and LocalizedText_ImageEmbeded / TextExtension_ImageEmbeder (inline icons). Replace it with your project's localization freely.

Log settings with skills​

PowerLogSettings_WithSkill (Create › Power › World › Log Settings (With Skill)) extends the Log Settings with a Filter Skills name filter, so Skill logs can be narrowed to the Skills you are debugging.