MassBattle Docsv1.19.20

UMassBattleLootConfigDataAsset

UCLASS

Source/MassBattle/Public/DataAssets/MassBattleLootConfigDataAsset.h

概述 Overview

loot(战利品)配置数据资产,派生自 UMassBattleDataAssetBase。承载 loot 的策划可调参数:主/子类型、通用参数(FLootParams:分数值、收集延迟等)、事件参数、生成配置(Birth/Collect/Destroy 的 FX/音效)、出生运动模式(ELootMoveMode,默认 Ballistic)与三组运动参数(弹道 / 插值出生 / 插值收集,经 EditCondition 按模式互斥显示)、补充数据;另含一组运行时 fragment(无 UPROPERTY,直接成员):FLootParamsRT、三种移动运行时、FDeterminism、FLocating/FRotating/FScaling。运行时经 UMassBattleLootSubsystem::MakeLootTemplateFromDataAsset 组装进实体模板。PostLoad 执行版本门控的 LootSpawn FX 配置迁移(1.20.1 / 1.20.2)。

Loot configuration data asset, derived from UMassBattleDataAssetBase. Carries designer-tunable loot parameters: main/sub types, general parameters (FLootParams: score value, collect delay, etc.), event parameters, spawn config (FX/Sound on Birth/Collect/Destroy), the birth movement mode (ELootMoveMode, default Ballistic) with three movement parameter groups (ballistic / interped spawn / interped gather, mutually exclusive via EditCondition per mode), and extra data; plus a group of runtime fragments (plain members, no UPROPERTY): FLootParamsRT, three movement runtimes, FDeterminism, and FLocating/FRotating/FScaling. At runtime UMassBattleLootSubsystem::MakeLootTemplateFromDataAsset assembles it into the entity template. PostLoad runs version-gated LootSpawn FX config migrations (1.20.1 / 1.20.2).

继承 Inheritance

UDataAsset → UPrimaryDataAsset → UMassBattleDataAssetBase → UMassBattleLootConfigDataAsset

公开方法 Public Methods

PostLoad virtual void (override)

资产加载后的版本门控迁移:① DataVersion < 12001 时对 LootSpawn 的 OnBirth / OnCollectBegin / OnCollectEnd / OnDestroy 四处 SpawnFx 执行 MigrateFxConfigSubType(EESubType 枚举 → int32 SubType_Index),置版本 12001 并 MarkPackageDirty();② DataVersion < 12002 时对同样四处执行 MigrateFxConfigStyleType(EEStyleType 枚举 → int32 StyleType_Index),置版本 12002 并 MarkPackageDirty()。

Version-gated post-load migration: ① when DataVersion < 12001, runs MigrateFxConfigSubType (EESubType enum → int32 SubType_Index) on the four SpawnFx sites of LootSpawn (OnBirth / OnCollectBegin / OnCollectEnd / OnDestroy), sets version 12001 and calls MarkPackageDirty(); ② when DataVersion < 12002, runs MigrateFxConfigStyleType (EEStyleType enum → int32 StyleType_Index) on the same four sites, sets version 12002 and calls MarkPackageDirty().

Input

无参数。

No parameters.

Output

无返回值。副作用:按需迁移 FX 配置、推进 DataVersion、标记资产脏。

No return value. Side effects: migrates FX configs when needed, advances DataVersion, marks the asset dirty.

成员变量 Members

名称 Name类型 Type默认值说明 Description
LootFLootTag—主类型标签。Primary type tag.
SubTypeFSubType—子类型。SubType.
LootParamsFLootParams—通用参数(分数值、收集延迟等)。General parameters (score value, collect delay, etc.).
LootEventFLootEvent—事件参数。Event parameters.
LootSpawnFLootSpawn—战利品生成配置(Birth/Collect/Destroy 上的 FX/音效)。Loot spawn configuration (FX/Sound on Birth/Collect/Destroy).
SpawnMovementModeELootMoveModeBallistic生成运动模式,决定下方哪组出生运动参数可编辑。Spawn movement mode, deciding which birth-movement parameter group is editable.
LootMove_BallisticFLootMove_Ballistic—抛物线出生运动参数(仅 SpawnMovementMode == Ballistic 时可编辑)。Ballistic spawn movement parameters (editable only when SpawnMovementMode == Ballistic).
LootMove_Interped_SpawnFLootMove_Interped_Spawn—插值出生运动参数(仅 SpawnMovementMode == Interped 时可编辑)。Interpolated spawn movement parameters (editable only when SpawnMovementMode == Interped).
LootMove_Interped_GatherFLootMove_Interped_Gather—插值收集运动参数(始终可编辑,收集阶段总是插值)。Interpolated gather/collection movement parameters (always editable; gathering is always interpolated).
ExtraDataFMassBattleTemplate—补充数据。Extra data.
LootParamsRTFLootParamsRT—运行时参数(无 UPROPERTY):Spawner/Collector、状态机 State、收集倒计时等。Runtime params (no UPROPERTY): Spawner/Collector, state-machine State, collect countdown, etc.
LootMoving_BallisticFLootMoving_Ballistic—抛物线运动运行时。Ballistic movement runtime.
LootMoving_Interped_SpawnFLootMoving_Interped_Spawn—插值出生运动运行时。Interped spawn movement runtime.
LootMoving_Interped_GatherFLootMoving_Interped_Gather—插值收集运动运行时。Interped gather movement runtime.
DeterminismFDeterminism—确定性数据(UID / 随机流)。Determinism data (UID / random stream).
LocatingFLocating—位置运行时。Location runtime.
RotatingFRotating—旋转运行时。Rotation runtime.
ScalingFScaling—缩放运行时。Scale runtime.

管线角色 Pipeline Role

加载时 PostLoad 执行版本门控 FX 迁移;运行期由 UMassBattleLootSubsystem::MakeLootTemplateFromDataAsset 组装进实体模板(含 FLootVisualizing),经 UMassBattleLootComponent::SpawnLootFromTemplate(本地路径,UID 本地分配、SeedAtSpawn 播种随机流、按 SpawnMovementMode 初始化出生运动)或 LootComponent.Spawn 锁步指令(双端)生成。锁步指令载荷以数据资产路径引用本资产。

On load PostLoad runs the version-gated FX migrations; at runtime UMassBattleLootSubsystem::MakeLootTemplateFromDataAsset assembles it into the entity template (including FLootVisualizing), spawned via UMassBattleLootComponent::SpawnLootFromTemplate (local path: UID allocated locally, random stream seeded via SeedAtSpawn, birth movement initialized per SpawnMovementMode) or the LootComponent.Spawn lockstep command (both peers). Lockstep command payloads reference this asset by path.