lots working good, minimap / rotation / follow / entities

This commit is contained in:
Boki 2026-03-01 21:29:44 -05:00
parent 69a8eaea62
commit 1ba7c39c30
11 changed files with 2496 additions and 99 deletions

View file

@ -32,15 +32,23 @@ public sealed class TerrainOffsets
public int StateStride { get; set; } = 0x10;
/// <summary>Offset within each state entry to the actual state pointer.</summary>
public int StatePointerOffset { get; set; } = 0;
/// <summary>Total number of state slots (ExileCore: 12 states, State0-State11).</summary>
public int StateCount { get; set; } = 12;
/// <summary>Which state index is InGameState (typically 4).</summary>
public int InGameStateIndex { get; set; } = 4;
/// <summary>Offset from controller to active states vector begin/end pair (ExileCore: 0x20).</summary>
public int ActiveStatesOffset { get; set; } = 0x20;
/// <summary>Offset from controller to the active state pointer. When it != InGameState, we're loading. 0 = disabled, use ScanAreaLoadingState to find.</summary>
public int IsLoadingOffset { get; set; } = 0;
/// <summary>If true, states are inline in the controller struct. If false, StatesBeginOffset points to a begin/end vector pair.</summary>
public bool StatesInline { get; set; } = true;
/// <summary>Direct offset from controller to InGameState pointer (bypasses state array). 0 = use state array instead. CE confirmed: 0x210.</summary>
public int InGameStateDirectOffset { get; set; } = 0x210;
// ── InGameState → sub-structures ──
// Dump: InGameStateOffset { [0x298] AreaInstanceData, [0x2F8] WorldData, [0x648] UiRootPtr, [0xC40] IngameUi }
// Dump: InGameStateOffset { [0x208] EscapeState flags, [0x298] AreaInstanceData, [0x2F8] WorldData, [0x648] UiRootPtr, [0xC40] IngameUi }
/// <summary>InGameState → EscapeState int32 flag (0=closed, 1=open). Diff-scan confirmed: 0x20C. 0 = disabled.</summary>
public int EscapeStateOffset { get; set; } = 0x20C;
/// <summary>InGameState → AreaInstance (IngameData) pointer (dump: 0x298, CE confirmed: 0x290).</summary>
public int IngameDataFromStateOffset { get; set; } = 0x290;
/// <summary>InGameState → WorldData pointer (dump: 0x2F8).</summary>
@ -102,8 +110,16 @@ public sealed class TerrainOffsets
public int ComponentListOffset { get; set; } = 0x10;
/// <summary>Entity → ObjectHeader pointer (for alternative component lookup via name→index map). ExileCore: 0x08.</summary>
public int EntityHeaderOffset { get; set; } = 0x08;
/// <summary>ObjectHeader → NativePtrArray for component name→index lookup. ExileCore: 0x40.</summary>
public int ComponentLookupOffset { get; set; } = 0x40;
/// <summary>EntityDetails → ComponentLookup object pointer. Confirmed: 0x28 (right after wstring path).</summary>
public int ComponentLookupOffset { get; set; } = 0x28;
/// <summary>ComponentLookup object → Vec2 begin/end (name entry array). Object layout: +0x10=Vec1(ptrs), +0x28=Vec2(names).</summary>
public int ComponentLookupVec2Offset { get; set; } = 0x28;
/// <summary>Size of each entry in Vec2 (bytes). Confirmed: 16 = { char* name (8), int32 index (4), int32 flags (4) }.</summary>
public int ComponentLookupEntrySize { get; set; } = 16;
/// <summary>Offset to the char* name pointer within each lookup entry.</summary>
public int ComponentLookupNameOffset { get; set; } = 0;
/// <summary>Offset to the component index (int32) within each lookup entry.</summary>
public int ComponentLookupIndexOffset { get; set; } = 8;
/// <summary>Index of Life component in entity's component list. -1 = auto-discover via pattern scan.</summary>
public int LifeComponentIndex { get; set; } = -1;
/// <summary>Index of Render/Position component in entity's component list. -1 = unknown.</summary>
@ -134,24 +150,25 @@ public sealed class TerrainOffsets
public int PositionZOffset { get; set; } = 0x140;
// ── Terrain (inline in AreaInstance) ──
// Dump: TerrainStruct (at AreaInstance + 0xCC0) {
// [0x18] StdTuple2D<long> TotalTiles,
// [0x28] StdVector TileDetailsPtr,
// [0xD0] StdVector GridWalkableData,
// [0xE8] StdVector GridLandscapeData,
// [0x100] int BytesPerRow,
// [0x104] short TileHeightMultiplier
// }
// Scan-confirmed TerrainStruct (at AreaInstance + 0xCC0):
// [0x90] StdTuple2D<long> TotalTiles (cols, rows as int64)
// [0xA0] StdVector TileDetailsPtr (56 bytes/tile)
// [0x100] int32 cols, int32 rows (redundant compact dims)
// [0x148] StdVector GridWalkableData (size = bytesPerRow * gridHeight)
// [0x160] StdVector GridLandscapeData
// [0x178] StdVector Grid3
// [0x190] StdVector Grid4
// [0x1A8] int BytesPerRow = ceil(cols * 23 / 2)
/// <summary>Offset from AreaInstance to inline TerrainStruct (dump: 0xCC0).</summary>
public int TerrainListOffset { get; set; } = 0xCC0;
/// <summary>If true, terrain is inline in AreaInstance (no pointer dereference). If false, follow pointer.</summary>
public bool TerrainInline { get; set; } = true;
/// <summary>TerrainStruct → TotalTiles offset (dump: 0x18, StdTuple2D of long).</summary>
public int TerrainDimensionsOffset { get; set; } = 0x18;
/// <summary>TerrainStruct → GridWalkableData StdVector offset (dump: 0xD0).</summary>
public int TerrainWalkableGridOffset { get; set; } = 0xD0;
/// <summary>TerrainStruct → BytesPerRow (dump: 0x100).</summary>
public int TerrainBytesPerRowOffset { get; set; } = 0x100;
/// <summary>TerrainStruct → TotalTiles offset (scan: 0x90, StdTuple2D of long).</summary>
public int TerrainDimensionsOffset { get; set; } = 0x90;
/// <summary>TerrainStruct → GridWalkableData StdVector offset (scan: 0x148).</summary>
public int TerrainWalkableGridOffset { get; set; } = 0x148;
/// <summary>TerrainStruct → BytesPerRow (scan: 0x1A8).</summary>
public int TerrainBytesPerRowOffset { get; set; } = 0x1A8;
/// <summary>Kept for pointer-based terrain mode (TerrainInline=false).</summary>
public int TerrainGridPtrOffset { get; set; } = 0x08;
public int SubTilesPerCell { get; set; } = 23;