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. |
UCrimsonAssetManager 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). |
Ability system layer
CrimsonAbilitySystem ships no attributes and no gameplay effect assets - it defines the machinery and leaves the numbers to the game. These are CrimsonCore's answers to the hooks it leaves open.
| Type | Purpose |
|---|---|
UCrimsonCoreAbilitySystemComponent | The ASC every CrimsonCore actor uses. Overrides GetCooldownRecoveryRate to read CooldownReduction, and supplies DynamicTagGameplayEffectClass so AddDynamicTagGameplayEffect works. |
UCrimsonHasteSet | ActionSpeed and CooldownReduction. Grant it alongside UCrimsonCombatSet. |
UCrimsonCoreAbilityStatics | GetActionSpeedForActor and GetCooldownRecoveryRateForActor. Null-safe: returns the neutral value when the actor has no ability system or no haste set. |
UCrimsonCoreGameplayAbility | Project ability base. Overrides GetEffectiveComboPlayRate, GetCooldownRecoveryRate, and SetBaseValuesForSpec. |
UCrimsonCoreGameplayAbility_FromEquipment | Base for abilities granted by a piece of equipment (a definition's AbilitySetsToGrant). Adds GetAssociatedEquipment(), GetEquipmentSourceObject() (the inventory item behind the equip - read its rolled stat tags), and GetEquipmentActor() (this machine's spawned weapon - montages, muzzle sockets). Must be instanced. The dependency-free sibling for standalone CrimsonEquipment use is UCrimsonGameplayAbility_FromEquipment in that plugin. |
ActionSpeed is one attribute driving two things: it divides cast duration and scales montage play rate, so a single haste buff moves both. Do not add a second speed attribute beside it.A value of
0 fails silently - ComputeModifiedCastTime guards with if (SpeedMod <= 0) return BaseCastTime, so every cast quietly ignores the attribute forever with no warning. The constructor seeds 1.0; if you add an attribute-init effect, seed it there too.GetCooldownRecoveryRate is not enough on its own. bEnableCooldownRecoveryTick is EditDefaultsOnly and off by default on the plugin ASC, because the base rate is a constant 1.0 and ticking every ASC for an inert feature is wasteful. UCrimsonCoreAbilitySystemComponent turns it on in its constructor.Base damage: contract property to SetByCaller
UCrimsonDamageExecution reads its base magnitude from the SetByCaller.Damage.Base tag. UCrimsonCoreGameplayAbility::SetBaseValuesForSpec writes it from the ability's Ability.Property.Damage contract property, so an augment that mutates that property changes the damage with no extra wiring. An ability that declares no damage property writes nothing.
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.