Fix for stat forge, setup a test character

This commit is contained in:
2026-09-19 15:46:26 +02:00
parent ff35738d78
commit 1fe94cfa7a
11 changed files with 83 additions and 36 deletions

View File

@@ -1,6 +1,4 @@
#pragma once
#include "StatDefinitions.h"
STATFORGE_MAKE_STAT(Health)

View File

@@ -1,6 +1,13 @@
#pragma once
#include "CoreMinimal.h"
// These FNames are defined in this module but are meant to be usable from other modules/plugins. Without an
// export specifier they end up hidden on macOS, so any cross-module reference would break there while
// Windows kept working. PROJECTELERI_API is supplied by this module's generated Definitions header.
#define STATFORGE_STAT_API PROJECTELERI_API
#include "Data/StatForgeRegistry.h"
// -Flat Stats-

View File

@@ -42,9 +42,14 @@ ABaseCharacter::ABaseCharacter()
// Resident wherever the player is, because a schedule is driven by the clock rather than by
// proximity, and the whole point is that the NPC is already in the right place by the time the
// player arrives. Being frozen in place by the schedule component while out of range is what
// makes that affordable. Assigned as a plain member because SetIsSpatiallyLoaded() only exists in
// editor builds and this has to hold in a packaged one too.
// makes that affordable.
// In UE 5.8 this flag (and SetIsSpatiallyLoaded with it) is editor-only data on AActor, which is
// why it can only be set here and why the guard is needed for a packaged build to compile at
// all. That is enough for the intent to survive cooking: the flag is not read by the packaged
// game, the cook bakes this value into the actor descriptor that World Partition streams from.
#if WITH_EDITORONLY_DATA
bIsSpatiallyLoaded = false;
#endif
WidgetComponent = CreateDefaultSubobject<UInteractionWidgetComponent>(TEXT("WidgetComponent"));
WidgetComponent->SetupAttachment(RootComponent);