System Layer
The system layer is the boot entry point for any game built on CrimsonCore. It runs before GameInstance::Init, before any map is loaded, and before the experience pipeline starts.
UCrimsonCoreSettings
Project Settings class (Project Settings → Crimson → Crimson Core). Stores the values UCrimsonAssetManager and CrimsonCoreLog.h read at boot:
| Property | Type | Description |
|---|---|---|
| Game Data Path | TSoftObjectPtr<UCrimsonGameData> | Global config data asset. Loaded once at engine startup. |
| Default Pawn Data | TSoftObjectPtr<UCrimsonPawnData> | Fallback pawn data when no PlayerState-level PawnData is assigned. |
| Verbose Logging | bool | Master switch for non-failure CrimsonCore logs. When false, CRIMSON_LOG_VERBOSE/_INFO/_DISPLAY are no-ops; _WARN/_ERROR/_FATAL always emit. Default: false. |
Readable at runtime via UCrimsonCoreSettings::Get() (i.e. GetDefault<UCrimsonCoreSettings>()). Writes to DefaultGame.ini under [/Script/CrimsonCore.CrimsonCoreSettings].
CrimsonCoreLog.h #undefs the standard macros and redefines them to consult bVerboseLogging. Other Crimson plugins that include CrimsonLogging.h directly are not affected — their CRIMSON_LOG_INFO calls always emit at their configured verbosity. If you need the same gate elsewhere, redeclare the macros in that plugin's log header.UCrimsonAssetManager
Subclass of UAssetManager. Activated by setting AssetManagerClassName in Project Settings → Engine → General Settings (or DefaultEngine.ini). On StartInitialLoading it runs two ordered startup jobs:
| Job | Weight | What it does |
|---|---|---|
InitializeGameplayCueManager() | 1.0 | Calls UCrimsonGameplayCueManager::Get()->LoadAlwaysLoadedCues(). GAS cues cannot fire until this runs. |
GetGameData() | 25.0 | Synchronously loads UCrimsonGameData from the path configured in DefaultEngine.ini. Blocks only on the first call. |
Public API
| Function | Description |
|---|---|
UCrimsonAssetManager::Get() | Returns the singleton. Fatals with a descriptive error if AssetManagerClassName points at the wrong class. |
GetGameData() | Returns the loaded UCrimsonGameData. Sync-loads on first call. Prefer UCrimsonGameData::Get() at call sites. |
GetDefaultPawnData() | Returns the fallback UCrimsonPawnData used when no PlayerState-level PawnData is set. Configured in Project Settings → Crimson → Crimson Core. |
GetAsset<T>(SoftPtr, bKeepInMemory) | Template helper: sync-loads a soft object ptr and optionally keeps it resident. Safe to call at any time after boot. |
GetSubclass<T>(SoftClassPtr, bKeepInMemory) | Same as GetAsset but for class references. |
ReScanPrimaryAssets() | Re-reads PrimaryAssetTypesToScan from config. Call after mounting a new GameFeature plugin to register its content. |
DumpLoadedAssets() | Logs all assets currently held resident by the manager. Also bound to console command Crimson.DumpLoadedAssets. |
FCrimsonBundles::Equipped is a named bundle constant used when loading primary assets that need their equipped-state data. Pass it to LoadPrimaryAsset calls that require the equipped bundle to be cooked.UCrimsonGameData
Immutable global config data asset. Loaded once at boot and held resident. Contains soft references to the project-wide GameplayEffects and the attribute metadata registry.
// Access from anywhere after boot:const UCrimsonGameData& Data = UCrimsonGameData::Get();TSubclassOf<UGameplayEffect> DmgGE = UCrimsonAssetManager::GetSubclass(Data.DamageGameplayEffect_SetByCaller);
| Property | Type | Purpose |
|---|---|---|
DamageGameplayEffect_SetByCaller | TSoftClassPtr<UGameplayEffect> | GE applied by damage executions. Uses a SetByCaller magnitude keyed to Data.Damage. |
HealGameplayEffect_SetByCaller | TSoftClassPtr<UGameplayEffect> | GE applied by heal executions. Uses a SetByCaller magnitude keyed to Data.Healing. |
ShieldRegenCooldownEffect | TSoftClassPtr<UGameplayEffect> | Applied when shield regen starts its cooldown window. |
DynamicTagGameplayEffect | TSoftClassPtr<UGameplayEffect> | Infinite GE used to dynamically add and remove gameplay tags at runtime without baking them into abilities. |
AttributeMetadata | TSoftObjectPtr<UCrimsonAttributeMetadata> | Optional registry mapping attribute tags to their UI display rules (icon, name, format). |
UCrimsonAttributeMetadata
Data asset that maps a FGameplayTag to display rules for any attribute. Systems that render attribute values (tooltips, comparison panels, stat sheets) use this to format numbers without knowing which plugin owns the attribute.
// In any UI system:if (UCrimsonAttributeMetadata* Meta = UCrimsonAssetManager::GetAsset(UCrimsonGameData::Get().AttributeMetadata)){const FCrimsonAttributeFormattingRule& Rule = Meta->GetRuleForTag(Tag);// Rule.DisplayName, Rule.FormatPattern, Rule.DisplayMode, Rule.IconKey ...}
| Field on FCrimsonAttributeFormattingRule | Description |
|---|---|
DisplayName | Localized user-facing label, e.g. "Bleed Damage". |
FormatPattern | Rich Text format string. Tokens: {Icon}, {Style}, {Name}, {Value}. Default: <{Style}>{Name}</>: <Bold>{Value}</> |
IconKey | Key in the Rich Text image table, e.g. Icon_Bleed. |
TextStyleKey | Key in the Rich Text style table, e.g. Text.Debuff. Default: Text.Default. |
DisplayMode | Flat / Percentage / Multiplier / Time / Override — controls suffix and scaling. |
bMultiplyForPercentage | If true, multiplies the raw value by 100 before display (0.5 → 50%). |
bInvertGoodBadColor | If true, negative deltas are shown in green (good) rather than red. |
Attribute.Health.Current). This lets any system look up display rules for any attribute without importing the attribute set header.