Table of Contents

Struct CharacterReconcileData

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll
public struct CharacterReconcileData : IReconcileData
Implements
IReconcileData
Inherited Members

Fields

AbilityID

The ID of the ability instance, or consumable template ID. Typed as long to match ID (database-generated). A value of 0 (NO_ABILITY) indicates idle state.

public long AbilityID

Field Value

long

Attributes

Snapshot of all non-resource character attributes (base value + external modifier) at the reconcile tick. Null when the controller is uninitialized or has no attributes.

Resource attributes (HP/MP/Stamina) are NOT included here — they ride ResourceState because they also carry CurrentValue and RegenTickAccum which non-resource attributes do not have.

Producers MUST emit entries sorted by TemplateID ascending so the index-delta serializer in CharacterReconcileDataDeltaSerializer can keep indices stable across ticks.

public AttributeReconcileEntry[] Attributes

Field Value

AttributeReconcileEntry[]

Buffs

Snapshot of all active buffs at the reconcile tick. Null when no buffs are active.

public BuffReconcileEntry[] Buffs

Field Value

BuffReconcileEntry[]

ChargedHoldTicks

How many ticks a charged ability has been held past full charge.

public uint ChargedHoldTicks

Field Value

uint

Remarks

Predicted state, and it has to travel for the same reason RemainingTicks does. The owner increments it once per invocation of the replicate body, and a reconcile replays every tick since the correction — so without an authoritative value the owner counts each replayed tick a second time, runs two to four times the server's rate, and cancels its own charge well before the server does. What the player sees is the cast bar dropping and the ability then firing by itself when the server's own counter expires.

Carried rather than derived: it counts ticks since RemainingTicks reached zero, and the tick that happened on is not in the reconcile either.

Cooldowns

Snapshot of all active cooldowns at the reconcile tick. Null when no cooldowns are active.

public CooldownReconcileEntry[] Cooldowns

Field Value

CooldownReconcileEntry[]

Equipment

Snapshot of equipped items at the reconcile tick. Only filled slots are included — empty slots are omitted. Null when no items are equipped.

public EquipmentReconcileEntry[] Equipment

Field Value

EquipmentReconcileEntry[]

Exposure

Weather exposure levels — how wet, how chilled — one entry per state the character is carrying. Null when the controller is absent or every state is at zero.

These are timers, and that is why they reconcile. Exposure builds over tens of seconds from the weather where the character stands, so the owner predicts it to have the buff land the moment it should; without the level in the reconcile the owner's idea of how wet it is would wander from the server's and never be pulled back.

Producers MUST emit entries sorted by TemplateID ascending, as Attributes does, so the index-delta serializer keeps indices stable.

public ExposureReconcileEntry[] Exposure

Field Value

ExposureReconcileEntry[]

MotorState

Full kinematic character motor state (position, rotation, velocity, grounding, etc.). Populated by the movement controller, restored during reconcile to correct misprediction.

public KinematicCharacterMotorState MotorState

Field Value

KinematicCharacterMotorState

PackedFlagsAndSlot

Packed field combining activation flags and consumable slot to reduce bandwidth.

  • Bits 0–15: persistent activation flags (IsHeld, IsConsumable, IsMount, etc.). Maps to AbilityController.replicatedFlags. Local input flags are intentionally NOT included so that inputs queued between ticks survive reconcile.
  • Bits 16–31: consumable inventory slot as a signed short, or -1 if none.

Use UnpackFlags and UnpackConsumableSlot to read.

public int PackedFlagsAndSlot

Field Value

int

RemainingTicks

The remaining activation time in ticks (deterministic, avoids float drift).

public uint RemainingTicks

Field Value

uint

ResourceState

The resource state associated with the ability.

public CharacterAttributeResourceState ResourceState

Field Value

CharacterAttributeResourceState

RngS0

Full xoshiro128** internal state of the ability seed generator. Required because the 128-bit RNG state cannot be reconstructed from the 32-bit Seed output alone. Without this, a single prediction mismatch permanently desynchronizes the generator, causing a cascade of mismatches on every subsequent ability activation.

public uint RngS0

Field Value

uint

RngS1

Second xoshiro128** state word. See RngS0.

public uint RngS1

Field Value

uint

RngS2

Third xoshiro128** state word. See RngS0.

public uint RngS2

Field Value

uint

RngS3

Fourth xoshiro128** state word. See RngS0.

public uint RngS3

Field Value

uint

Seed

The current deterministic RNG seed for ability spawning. Used by the client to detect prediction mismatches and roll back predicted ability objects.

public int Seed

Field Value

int

Properties

UnpackConsumableSlot

Extracts the consumable slot from the upper 16 bits of PackedFlagsAndSlot as a signed short. Returns -1 when no consumable is active. This is a computed property — each access performs a shift operation.

public short UnpackConsumableSlot { get; }

Property Value

short

UnpackFlags

Extracts the activation flags from the lower 16 bits of PackedFlagsAndSlot. This is a computed property — each access performs a bitmask operation.

public int UnpackFlags { get; }

Property Value

int

Methods

Dispose()

Disposes the reconcile data (no-op).

public void Dispose()

GetTick()

Gets the network tick value.

public uint GetTick()

Returns

uint

The tick value.

Pack(int, int)

Packs activation flags (lower 16 bits) and consumable slot (upper 16 bits) into a single int.

public static int Pack(int flags, int consumableSlot)

Parameters

flags int

Activation flags. Only the lower 16 bits are used.

consumableSlot int

Inventory slot, or -1 if none.

Returns

int

The packed int.

SetTick(uint)

Sets the network tick value.

public void SetTick(uint value)

Parameters

value uint

Tick value.