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[]

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

Sequence

Server-side send counter, one increment per reconcile actually WRITTEN by Server_SendReconcileRpc (stamped there through ReconcileSequenceStamper), wrapping at 255. Reconciles that are created but not sent do not advance it.

public byte Sequence

Field Value

byte

Remarks

The delta chain's loss detector. Reconciles ride the unreliable StateUpdate datagram and each delta is encoded against the previous state the server SENT. A lost datagram used to leave every later delta decoding against a baseline the client never received — a wrong position applied to the owner for up to a second, until the periodic absolute snapshot. The reader now requires prev.Sequence + 1 and rejects the packet otherwise, so a loss costs "no correction until the next snapshot" instead of "a wrong correction for up to a second". Only a datagram loss (or a client-side state drop) can break the chain: the server's baseline and this counter both advance only on states that were written.

A counter rather than a fingerprint of the previous state, because FishNet's Vector3 delta quantises to a millimetre and the two sides' baselines legitimately drift apart by rounding between absolute snapshots — any hash of float fields would fire constantly. One byte, sent in both the delta and the absolute form.

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.