Table of Contents

Struct ArchetypeR1

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Persisted archetype schema. One entity per registered archetype. Enables load-time validation: mismatch between persisted and runtime archetype definitions → hard error.

[Component("Typhon.Schema.Archetype", 1)]
public struct ArchetypeR1
Inherited Members

Fields

ArchetypeId

Per-process catalog id (from [Archetype] today; generator-assigned after Phase 5). Identity re-match on reopen is by Name, not this value — it is not stable across processes once the generator owns numbering.

public ushort ArchetypeId

Field Value

ushort

AssemblyId

AssemblyR1 row id (chunkId) of the assembly that declares this archetype. 0 = core engine assembly (implicit, never in the manifest).

public ushort AssemblyId

Field Value

ushort

ClusterSegmentSPI

Root page index of the ClusterSegment (0 = no cluster storage).

public int ClusterSegmentSPI

Field Value

int

ComponentCount

Total component count (own + inherited).

public byte ComponentCount

Field Value

byte

ComponentNames

Component schema names in slot order, stored in VSBS.

public ComponentCollection<String64> ComponentNames

Field Value

ComponentCollection<String64>

EntityMapSPI

Root page index of the EntityMap segment (0 = not persisted, rebuild from PK indexes).

public int EntityMapSPI

Field Value

int

Name

Archetype CLR type name (e.g., "Building").

public String64 Name

Field Value

String64

NextEntityKey

Resume entity key counter on reopen (avoids scanning PK indexes).

public long NextEntityKey

Field Value

long

NoParent

Sentinel ParentArchetypeId value meaning "no parent" (a root archetype).

public const ushort NoParent = 65535

Field Value

ushort

ParentArchetypeId

Parent archetype ID (0xFFFF = no parent).

public ushort ParentArchetypeId

Field Value

ushort

Revision

Schema revision from [Archetype(Revision)].

public int Revision

Field Value

int

RoutingId

Per-DB, engine-assigned archetype routing id — the value embedded in every EntityId of this archetype. Assigned monotonically (dense) on first registration into this database, persisted here, and restored by Name match on reopen so existing EntityIds keep resolving. This is the durable per-DB archetype identity used for EntityId routing.

public ushort RoutingId

Field Value

ushort

SchemaName

Fully-qualified schema name of this record ("Typhon.Schema.Archetype").

public const string SchemaName = "Typhon.Schema.Archetype"

Field Value

string

_pad0

Reserved padding to preserve field alignment; unused.

public byte _pad0

Field Value

byte