Files
AVA2/docs/PORT-PLAN.md
T
shenleiandClaude Opus 5.5 c132891aef Mobile HUD: minimap radar in its frame, top row at the screen edge
Preview radar drew at the fixed PC spot; it now follows the uiminimap
window (CPythonMiniMap::GetScreenPosition) and its open state. On
Android the top safe inset came from the hidden status bar's gesture
zone; Ava2Surface takes the top only from the cutout and visible bars.
The preview keyboard-hint header is skipped in touch mode, and
--game-script also runs with --preview-data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:15:37 +09:00

217 KiB
Raw Blame History

AVA2 port status

Milestone 0 — independent baseline and host

  • Snapshot original client C++ and Python root scripts, record SHA-256 provenance.
  • Independent fixed-width wire encoders and golden tests for select, attack, pickup.
  • SDL3 GPU host entry shared by macOS and Android. macOS Metal bootstrap; Android Vulkan backend to be verified. Existing Vulkan renderer import remains pending.

Milestone 1 — playable vertical slice

  1. Audit active client/server macros and packet layouts together (wolfman, bank, support mismatches).
  2. Port legacy security handshake and auth/login packet states; introduce an isolated local protocol fixture.
  3. Reuse Python 2 runtime/GR2/codepage/platform adapters with explicit provenance. Compile AVA2 gameplay sources, expose its Python extension modules.
  4. Mount decoded pack_maker assets with case-normalized lookup; defer FoxFS reader.
  5. Implement login → five-slot selection → map → movement → basic attack → pickup → inventory.
  6. Build Android arm64 APK and verify on device; build macOS app. Only claim server compatibility after real isolated-server verification.

Later milestones

AVA2 extended inventory/equipment, offlineshop, switchbot, pets, battlepass, dungeon and render-target features, then mobile UI and performance. Python 3 migration is deferred until gameplay parity.

Constraints

Original AVA2 sources and existing 40250 project/server are unchanged. Do not connect the prototype to the production server by default. No credentials belong in the project. A successful host build does not prove login or gameplay.

Verified in initial development pass

  • macOS arm64 Debug build succeeds; SDL GPU Metal window runs 60 frames and exits successfully.
  • Three AVA2 wire golden fixtures and invalid character slot rejection pass.
  • 916 upstream reference hashes verified. GR2 reader and codepage sources imported as independent snapshots with SHA-256 provenance; GR2 regression tests included.
  • This initial pass established the foundation only; subsequent milestones are recorded below.

Milestone 1a — login transport and Python bootstrap (2026-10-03)

Completed:

  • Preprocessed AVA2 client/server login feature profile; login-critical macros agree. Recorded remaining wolfman/bank/support gameplay mismatches.
  • Fixed-width legacy cipher, key derivation, complete sequence table, fragmented stream parser, auth/game connection switching, metadata parsing, and five-slot roster.
  • Independent developer TCP CLI reaches selection; character-select encoding and empty-slot validation are tested.
  • Embedded Python 2.7.18, stored stdlib ZIP, case-insensitive decoded-root pack bridge and script importer. Original colorInfo/musicInfo execute in the native window host.
  • All 7 CTest targets pass. Original client/server structure and cipher oracles included. 925 AVA2 reference files verified.
  • macOS arm64 host with Python: 60 frames, successful exit. Android arm64/API 26 libmain.so compiles and links, including embedded Python.

Remaining to reach milestone 1:

  1. Implement required original Python app/dbg/net/wndMgr/UI interfaces, then bootstrap original system/prototype/login/selection scripts. The current native app module exposes only the needed stone-minimap feature constant.
  2. Connect the login session to original Python UI callbacks and a nonblocking host transport. CLI tests do not imply working graphical login.
  3. Mount decoded AVA2 gameplay assets; resolve original feature mismatches before corresponding gameplay packets are enabled.
  4. Port AVA2 gameplay/loading paths and render the first map, then movement, attack, pickup and inventory.
  5. Package Android APK, test on device, and verify against an isolated AVA2 server. No real server connection has been made in this pass.

Details and test scope: docs/LOGIN-TRANSPORT.md.

Windows parity re-audit (2026-10-05)

Later source additions include original-script UI bridges, renderer components and gameplay packet models; earlier milestone notes describe their historical scope. They are partial implementations, not completed Windows parity.

Corrected preview roster injection, invented player defaults, DirectEnter character-server reconnect/loading callback timing and give-item/refine/use-to-item/script-button wire encoders. Added a two-game-endpoint bridge regression and packet golden cases. Static inventory finds 994 placeholder bindings. Full parity remains pending, especially real gameplay transport/loading integration, renderer equivalence and server-driven systems. See docs/WINDOWS-PARITY.md for evidence and limitations.

AVA2 Windows-only protocol/interface corrections (2026-10-05)

Re-audited this port directly against AVA2 Windows active macros and sources. Corrected wire phase values, non-GAIDEN item headers, original item socket/attribute counts, ItemSet/ItemSet2/ItemUpdate layouts and receive data, storage/mall layouts, exchange/extended ground layouts, chat/whisper NUL framing, disabled safebox money sending, and test-server flag behavior. Added original-declaration compile oracles and active method-table comparison. 116 existing constants align; 29 extension modules compared (752 overlapping placeholder methods and one missing binding remain). Sixteen noninteractive tests pass; visual render_3d remains excluded following its earlier timeout. See docs/WINDOWS-PARITY.md and generated AVA2 comparison reports for precise coverage; full 1:1 parity is still incomplete.

AVA2 loading/game transport corrections (2026-10-05)

Connected supported native game packets to the actual encrypted socket after loading, preserving packet boundaries and sequence continuation. Corrected original StartGame callback scheduling, multilingual EnterGame, main-character loading/version report/BGM volume, game handshake/DirectEnter callback suppression, EOF login fallback, point/time layouts and Python state updates, eventMgr.Update case/behavior, and connection reset/ref ownership. Independent loopback peer verifies live game receive and encrypted outgoing version/enter/chat/pong, including server EOF and BGM loading. Seventeen noninteractive tests pass; 118 existing protocol constants align; all 29 compared Windows modules have method names present, with 749 placeholder bindings remaining. Original map Warp, complete game packet/UI/render behavior and real-server/device equivalence are still pending. Full details: docs/WINDOWS-PARITY.md.

2026-10-05: character wire layout and retained state

Compared exclusively with upstream AVA2 Windows Packet.h and PythonNetworkStreamPhaseGameActor.cpp. Equipment parts are six (including arrow type), shining parts three. Corrected AdditionalInfo to 75 bytes (conqueror level, language, shining) and Update to 56 bytes (conqueror level, shining). Retain arrow type, sash, conqueror level, state flags and affect/shining arrays in actor state; accept zero speed updates. Ignore mismatched additional-info VID as Windows does; bound name reads. Generated oracle now extracts original equipment/shining enums and character declarations with active Windows feature guards; asserts sizes and offsets. Fragmented literal-length additional-info/update followed by ping verifies framing and unmatched VID handling. Validation: macOS build passed; 17 nonvisual CTests passed; Android arm64 libmain.so built. The existing render_3d test remains excluded due to its unresolved timeout. No real server/device verification. Remaining: actual shining/affect rendering, race/equipment model mapping, map coordinate conversion, alternate actor packets, renewal death layout, and the broader Python/gameplay placeholder inventory. This milestone does not establish full Windows parity.

2026-10-05: renewal death protocol and direct death state

AVA2 Windows Packet.h enables RENEWAL_DEAD_PACKET: header + VID + three BYTE revival delays = 8 bytes. Corrected port declaration and receive framing. The independent oracle extracts the original guarded enum/declaration and verifies size/offset. A fragmented literal death packet followed by ping checks alignment. ActorInstance::Die now sets death state and plays death motion directly rather than simulating 99999 damage; a high-HP regression checks unconditional death. For a known main actor, game-window OnGameOver receives one tuple containing the three delays. Retained duel-mode field suppresses that callback when set, but original duel packet/state handling is still unported, so the duel exception is not yet verified end to end. Original NotifyDeadMainCharacter clears auto-attack target; the port's target/auto-attack system remains incomplete and this side effect is pending. UI callback needs live game verification. Validation: macOS and Android arm64 library builds passed; 17 nonvisual CTests passed (death-parity-tests.log). Existing render_3d timeout remains excluded. No server/device changes; reference AVA2 files untouched. Full Windows parity remains incomplete.

2026-10-05: alternate actor wire paths and pet staging

Implemented AVA2 Windows CHARACTER_ADD2 (120, 85 bytes) and CHARACTER_UPDATE2 (117, 52 bytes) layouts/dispatch. Original declarations extracted into oracle; compile assertions compare sizes and equipment/mount/shining offsets. Decode equipment, arrow, sash, flags, speed, guild, empire, mount and shining as present in each packet. Invisible races 20025/20038/20039 are filtered in Add2 and AdditionalInfo as the Windows handlers do. Original ENABLE_NEW_PET_SYSTEM is active: type 10 now waits for AdditionalInfo alongside PC/NPC. Literal split-packet tests verify Add2/Update2 framing, invisible filtering and pet staging. Windows Update2 has no conqueror field, and its update-data constructor leaves conqueror level uninitialized. Port deliberately preserves previously received level rather than reproducing undefined memory. Remaining Add2 differences: NPC mob_proto name override, global/local map coordinates, actor model/equipment loading and visual effects. These still prevent a full parity claim. Validation: macOS build and 17 nonvisual CTests passed; Android arm64 libmain.so build passed; 925 AVA2 reference hashes unchanged. render_3d remains excluded for unresolved timeout; no live server/device checks.

2026-10-05: atlas queries, map bases and network coordinate conversion

Reference: AVA2 GameLib/MapManager::__LoadMapInfoVector, UserInterface/PythonBackground::Warp/GlobalPositionToLocalPosition/LocalPositionToGlobalPosition and PythonBackgroundModule wrappers. Added atlas parser (25600 per terrain cell, first matching map, exclusive end boundaries, explicit Win32 coordinate wrap). Atlas text comes through the existing case-insensitive pack mount, using app locale path with AtlasInfo.txt fallback. Implemented Python GlobalPositionToMapInfo return (name,baseX,baseY), unknown ('',0,0), GlobalPositionToLocalPosition and WarpTest x100 units. Main-character loading now selects/loads atlas map and establishes base before publishing local player position while LoadData continues to receive original global coordinates. Add/Add2/Move/Sync/GroundItem receive coordinates become local; outgoing Move becomes global. Background warp recreates terrain/base state before lookup. Removed incorrect village-block 001003 fallback and stopped reporting failed map names as loaded. Known map load failure raises an explicit error rather than entering with the wrong map; Windows exits its application on this failure, so the application shutdown policy is not identical yet. Tests: map range edges, coordinate round trips/negative values, Python atlas lookups and a real metin2_map_a1 center-block load with nonzero base. Main player local coordinates and outgoing movement global bytes verified. macOS build and 17 nonvisual CTests passed; Android arm64 libmain.so built. render_3d remains excluded for unresolved timeout. Remaining: multi-block terrain streaming, map-specific texture/environment loading, camera height/ShowMapName/minimap/portal/target reset and complete warp-to-another-server flow. Map resource lookup still includes a developer absolute path and must move entirely to portable pack resources. Full parity remains incomplete; this does not prove rendered-map or real-server behavior.

2026-10-05: actual mob_proto loading and nonplayer data APIs

Implemented AVA2 PythonNonPlayer::LoadNonPlayerData MMPT/MCOZ/XTEA key path, with bounds-checked LZO1X safe decompression. LZO source imported unchanged from AVA2 Tools/DumpProto/lzo, provenance in third_party/ava2-lzo/AVA2-PROVENANCE.md; only lzo1x_d2.c compiled. Decode packed Win32 235/255-byte records; actual English fixture uses 255. Preserve first record on repeated inserts, clear per runtime initialization. Versions 256/262/263 remain rejected until their changed layouts are implemented; original autodetection supports them, so loader parity is not complete. Replaced nonplayer placeholders for names, click events, VID race/level/grade, HP, race flags, level, damage, exp, damage multiplier, ST/DX, stone classification, regen, gold and resist data. Added price tuple and ordered prefix search matching original lowercase-name-only comparison (query itself is unchanged). Corrected click-event 0..4 and resist 0..10/MAX11 constants. Actor append uses decrypted mob names instead of invented Mob_; AdditionalInfo/Add2 apply the original NPC exclusion/range policy before overriding server names. Validation: real encrypted English binary loads; Wild Dog level1/HP126/damage20..24. Binary gold0..0 differs from adjacent text858..890; independent Python fixture cipher plus LZO decode confirmed original byte offsets and values. Name search, missing VID -1, malformed header rejection and native NPC name policy tested. macOS and Android arm64 builds passed; 17 nonvisual CTests passed; 925 reference hashes unchanged. Original binary remains authoritative. render_3d timeout still excluded; no live server/device verification. Remaining: all alternate proto layouts, complete render/model data usage and wider gameplay APIs.

2026-10-05: all original mob record versions

Extended mob_proto decoding to all five formats accepted by AVA2 TMobTableAll: 235,255,256,262,263. Account for bLvlPct insertion in r262/r263 and additional resistance bytes before click event/fDamMultiply. Preserve the original index-based first-eleven resistance copy, including its claw index behavior in r262/r263; do not silently remap semantic indices. The oracle generator now extracts original SMobSkillLevel and all five SMobTable declarations directly from upstream PythonNonPlayer.h under fixed-width Win32 aliases. Compile assertions prove all five sizes; new ava2.nonplayer_oracle constructs each original structure with distinct values, produces valid LZO literal containers both unencrypted and XTEA encrypted, loads through the production parser, and compares names/type/rank/level/gold/exp/HP/regen/race/ST/DX/damage/click/multiplier/resists. Truncated container rejection preserves existing records. This supersedes the previous limitation rejecting r256/r262/r263; other unrepresented fields and model integration remain incomplete. Validation: macOS and Android arm64 builds passed; 18 nonvisual CTests passed. Existing render_3d timeout remains excluded. 925 reference hashes unchanged; no live server/device verification. Additional inspection found quickslot receive handlers currently discard updates and local requests modify state without server acknowledgement; this is a remaining gameplay alignment gap.

2026-10-05: quickslot authoritative updates and paging

Compared with AVA2 PythonPlayer.cpp and PythonNetworkStreamPhaseGameItem.cpp. Implemented four pages/eight visible slots while retaining all36 server slots. Add/delete/move/add-to-empty/remove-by-value requests emit original CG16/17/18 packets and do not mutate state; GC28/29/30 updates apply add/delete/swap and schedule inventory refresh. Remove-by-value includes hidden slots32..35, whereas RequestDeleteGlobalQuickSlot retains the original visible-range32 guard. Implemented page wrap and local/global lookup conversion, player.SetGameWindow owned reference with teardown cleanup, immediate page RefreshInventory and emotion callback; inventory quickslot uses INVENTORY1 and registered cell. Corrected invalid-argument handling for affected quickslot getters/use. Regression includes no-main request suppression; a live native actor fixture; exact add/delete/move/empty packet bytes; split server add followed by swap/delete; callback batching; hidden slot35 removal without early mutation; item-use bytes; emotion callback; negative/overflow page values; death request suppression. macOS and Android arm64 builds passed, 18 nonvisual CTests passed, 925 reference hashes unchanged. Existing render_3d timeout remains excluded and no real server/device check was run. Limitations: full ActorInstance::CanAct needs original stun/paralysis/faint/sleep state; current quickslot send guard covers absent actor/death only. Skill quickslot action still uses the existing incomplete skill callback path instead of full original ClickSkillSlot mechanics. Shared inventory/skill action gating and item metadata remain separate parity gaps. This milestone does not establish complete quickslot/combat or full-client parity.

2026-10-05: action predicate, stun packet and stun affect

Reference: AVA2 GameLib/ActorInstanceBattle::CanAct, ActorInstance::Stun/SetSleep/SetFaint/SetParalysis, UserInterface/InstanceBaseEffect::SetAffect, NetworkStreamPhaseGame::RecvStunPacket. Added action flags and exact five-condition predicate (dead/stun/paralysis/faint/sleep). Quickslot send uses CanAct. GC_STUN13 now enters death for main actor, sets persistent stun for other actors; no OnGameOver callback is emitted by this packet, matching original. Actor spawn and update apply AFFECT_STUN bit5 to sleep, matching the original active branch rather than the commented FAINT/SLEEP cases; clearing that bit restores sleep-related action permission. Tests verify every predicate flag, clearing flags, network affect update suppressing a quickslot request then restoring it on clear, remote-stun versus main-stun behavior and death suppression. macOS and Android arm64 builds passed; 18 nonvisual tests passed; 925 reference hashes unchanged. render_3d remains excluded; no live server/device checks. Remaining: complete affect lifecycle/visual attachment, shaman paralysis producers, revival/reuse semantics, movement/attack/skill action gates, and the incomplete skill/combat implementations. Flags and predicate alone do not establish full runtime status/combat parity.

2026-10-05: attack/inventory send guards and distinct drop APIs

Reference: AVA2 NetworkStreamPhaseGameItem/PhaseGame and PythonNetworkStreamModule. Applied original main-instance CanAct guard to attack, item use, move, pickup, old/new drop and item-use-to-item. Deliberately left operations without this original guard (e.g. give/refine/on-click) unchanged; this is not a blanket phase restriction. Corrected legacy drop payload semantic to elk DWORD and split new drop into header20/position/gold DWORD/count DWORD (12 bytes). Old AVA2 header224 is retained (8 bytes). Python old API accepts cell or window+cell, always elk0; new accepts cell+count or window+cell+count. Added previously empty SendElkDropPacket and SendGoldDropPacketNew using RESERVED_WINDOW0/cell0; new gold drop count0. Oracle compares original drop declarations' sizes/count offset. Exact-byte tests include item count70000 and gold123456, plus seven suppressed send paths during stun affect. Replaced outdated test call supplying count to legacy Python API. Validation: macOS and Android arm64 builds passed; 18 nonvisual tests passed; 925 original reference files unchanged. Existing render_3d timeout remains excluded; no live server/device verification. Remaining: equip-use/move restrictions during exchange/shop/attack and item sounds, movement/skill state transitions, full item metadata/action logic, and wider client parity. These sender changes do not establish complete combat/inventory parity.

2026-10-05: registered skill mapping and level packet synchronization

Reference: AVA2 Packet.h, PythonPlayer::SetSkill/GetSkillSlotIndex/SetSkillLevel_ and NetworkStreamPhaseGame::RecvSkillLevel/New. Added GC72 legacy256-byte and GC76 new1531-byte handlers with Win32 int32 tNextRead (original handler ignores read time). New handler resets slots7/8, uses current active ENABLE_78_SKILLS and disabled wolfman ranges221..228/236..243 plus112..119, then updates mapped skill grades/levels; highest later matching skill overwrites special slot as original loop does. Added batched RefreshSkill/RefreshStatus. Corrected player.SetSkill to original two arguments and preserve existing level instead of inventing level1. Retain original reverse-map behavior (including stale mappings when a slot is reassigned), expose real GetSkillSlotIndex, convert master/grandmaster/perfect level offsets19/29/39, and replace efficiency placeholders with original international/Ymir skill-power tables and >40 guard. SetSkill mapping is required; unknown IDs are not invented. Oracle extracts original skill declarations and verifies both packet sizes/6-byte skill records. Literal split1531-byte fixture verifies no early refresh, grade conversions, power values, special slot overwrite and wolfman exclusion; legacy256-byte fixture verifies grade-1/update. macOS and Android arm64 builds passed; 18 nonvisual CTests passed; 925 reference hashes unchanged. Existing render_3d timeout remains excluded, no live-server/device checks. Remaining: actual skill definitions/registration bootstrap, cooldown handling, click/target/resource checks, skill motion/effect execution and complete locale selection. Old GC72 follows release receive behavior; original debug build asserts that this deprecated packet should not be used. This does not establish playable skills or complete Windows parity.

2026-10-05: skill cooldown slot mapping and getter semantics

Compared with AVA2 PythonPlayer GetSkillCoolTime/GetSkillElapsedCoolTime, PythonPlayerSkill::__CheckRestSkillCoolTime and PythonPlayerModule wrapper. Cooldown now lives on registered PlayerSkill slots rather than a separate map incorrectly queried by slot but populated by skill ID. Native SetSkillCoolTime resolves original reverse skill mapping and ignores unknown IDs. GetSkillCoolTime retains total/elapsed after expiry and reports elapsed from time0 for untouched valid slots; invalid slots return0/0. IsSkillCoolTime uses elapsed<total and the original debug ToggleCoolTime setting. ResetPlayerState clears stored cooldown along with skill registration. Added deterministic SkillCooldown primitive and explicit-time native hook for boundary tests. Tests cover exact expiry boundary, retaining total/elapsed after expiry, disable/re-enable behavior, skill101 mapped to slot6, invalid slot255 and connection-reset cleanup. macOS and Android arm64 builds passed; 18 nonvisual CTests passed; 925 original reference hashes unchanged. render_3d remains excluded for unresolved timeout. Remaining: original CTimer frame clock integration (current bridge uses SDL monotonic seconds), skill-data cooldown formula/casting-speed adjustment, successful-use event/callback integration and active-skill effect lifecycle. Native demo duration remains externally supplied; these corrections do not establish full original skill execution or client parity. IsSkillActive is still a placeholder and was not treated as completed.

2026-10-05: affect add/remove wire callbacks and energy expiry

Compared exclusively against AVA2 Windows Packet.h, RecvAffectAddPacket/RecvAffectRemovePacket and PythonPlayer affect mapping. Added GC126 (22 bytes) and GC127 (6 bytes) with explicit Win32 int32 values/durations and packed 21-byte affect element. Add calls BINARY_NEW_AddAffect(type, apply, value, duration); remove calls BINARY_NEW_RemoveAffect(type, apply). Energy apply128 updates POINT_ENERGY_END_TIME129 using server timestamp plus duration and schedules RefreshStatus; removal retains the original absence of energy reset/status refresh. Preserve original 32-bit signed callback interpretation and addition wrap. Implemented the original 18 active affect-to-skill mappings, including conqueror skill182, and unknown-index result0; disabled wolfman mappings remain excluded. These packets notify buff UI, not skill activation: original toggle activation belongs to character affect-bit processing with loaded skill definitions, which remains unfinished. Oracle extracts the actual anonymous upstream affect typedefs and checks original packet sizes. Regression verifies split-packet buffering, negative apply value, add/remove callbacks, energy expiry, refresh count and mapping entries. macOS and Android arm64 builds passed; 18 nonvisual CTests passed; all925 original reference hashes unchanged. render_3d remains excluded for its unresolved timeout; no live server/device or visible buff UI validation was performed. Remaining: skill definitions/registration, character affect and toggle activation lifecycle, cooldown formula/frame clock, skill execution/target checks, wider rendering/gameplay parity. This milestone does not establish complete Windows parity.

2026-10-05: skill module constants restored

Compared directly with AVA2 Windows PythonSkill.h and initskill. Replaced ten zero placeholders with original type0..5, grade count3, effect count4, grade step20 and grade gap25. This restores the values consumed by UI classification and grade loops; it does not implement the underlying skill data/actions. Constants reside in skill_constants.h. Windows oracle extracts the original type enum and numeric grade definitions; compile assertions compare every exported value to that source, and Python regression checks all ten actual module attributes. Validation: macOS and Android arm64 builds passed; 18 nonvisual tests passed; 925 reference hashes unchanged. render_3d remains excluded for unresolved timeout. Further inspection confirms app.LoadLocaleData is still a no-op and skill type/name/description/conditions/formulas remain placeholders; IsToggleSkill/IsStandingSkill still incorrectly infer flags from hardcoded IDs. Next work must load original SkillDesc/SkillTable data through the locale lifecycle, replace those ID guesses with data flags, then connect toggle activation. Full skill execution/rendering and complete client parity remain outstanding.

2026-10-05: skill description data and real metadata/flag queries

Added SkillDescriptions model and native packed-file loader using the existing case-insensitive bounded pack reader. Compared with AVA2 Windows RegisterSkillDesc: job lookup/lowercase, three grade names with empty-name fallback, exactly three condition columns (fourth ignored), case-sensitive attribute names and duplicate-row OR semantics. Disabled wolfman/78skill job names remain absent as guarded in the actual source. Unknown job still leaves default inserted record. Truncated mandatory columns avoid original unsafe reads; motion grade count greater than4 rejects loading. This is a partial description parser, not a complete skill loader. GetSkillName/Description/Type/ConditionDescriptionCount/ConditionDescription now query actual records. Unknown name returns NoneSkill; other missing-record getters raise RuntimeError. Out-of-range/negative condition indexes return None. IsToggleSkill/IsStandingSkill/IsUseHPSkill use loaded attribute bits and no longer guess from IDs. Real English data proves skill122 Combo is toggle, while skill19 Strong Body is standing and not toggle, contrary to the previous ID guess. Runtime creation resets description records. Tests load actual locale/en/SkillDesc.txt through the native loader, verify literal names/grades/descriptions/conditions/types/flags/errors, and check reset cleanup. Synthetic rows verify duplicate OR semantics, case-sensitive unknown attributes, ignored fourth condition and disabled wolfman insertion semantics. macOS and Android arm64 builds passed; 18 nonvisual CTests passed; 925 reference hashes unchanged. render_3d remains excluded for unresolved timeout. Outstanding integration: app.LoadLocaleData remains a no-op, so production startup does not yet invoke this new description loader. Regression invokes it explicitly; no automatic-load claim is made. SkillDesc icons, weapons, motion metadata, affect formulas and limits are not yet represented; SkillTable, legacy RegisterSkill files, locale item/other loaders, formula evaluation and full skill/character-affect execution remain incomplete. No live server/device/visible skill UI verification; overall parity goal remains active.

2026-10-05: SkillDesc motion, weapons, limits and affect records

Extended the original description model with weapon OR masks, motion/no-motion state, four grade motion indexes with original WORD wrap and grade gap25, target/motion-loop formula strings, affect description/min/max formula records, BYTE level limit/max level and default level-up point1. Preserve original duplicate affect append behavior rather than clearing it. Preserve original ARROW logical-OR mask1 and disabled claw mapping; EMPTY_HAND uses original active WEAPON_NONE11. Grade count>4 returnsfalse; malformed negative count avoids original before-array write by clamping0. Replaced GetSkillMaxLevel/LevelLimit/LevelUpPoint/AffectDescriptionCount placeholders with real description queries and missing-record RuntimeError. Synthetic regression checks WORD/BYTE wrap, empty max-level fallback to converted limit44, weapon mask, repeated affect append and stored formulas. Real English fixture checks four exported Python getters. macOS and Android arm64 builds passed; 18 nonvisual tests passed;925 reference files unchanged. render_3d remains excluded for unresolved timeout. Still pending: locale startup invocation, full SkillTable merge and formula evaluation, icon/resource registration and legacy RegisterSkill files, full skill execution and character-affect lifecycle. Description loader remains explicitly invoked by regression, not connected to app.LoadLocaleData. Stored formula text does not imply formula execution. No real server/device/visual validation; overall Windows parity remains incomplete.

2026-10-05: original SkillTable merge rules

Added exact27-column table parsing and native packed-file loader; only existing description IDs merge. Stored original SP cost, cooldown, continuation SP, duration and target range. Nonempty costs/cooldown/range preserve previous values when empty; duration always overwrites. Max level updates only for incoming value>1 with BYTE conversion; level limit checks previous limit>1 as original, not the incoming value. Implemented first-affect formula override: sequential substring number/atk/mwep replacement into min/max forms; skill1 appends literal *3, scalar formula clears max. Preserve original exceptions34 and151..157 and CHEONMA disable option. No alternate table flags/skill names imported. This stores formulas and does not evaluate them. Regression loads actual English table after description, checks synthetic min/max substitutions, unsigned/BYTE conversions, previous-limit condition, empty-field retention/clearing, skill1 multiplier, skill34 exception and CHEONMA/scalar behavior. macOS and Android arm64 builds passed;18 nonvisual CTests passed;925 original reference files unchanged. render_3d remains excluded for unresolved timeout. Still outstanding: app.LoadLocaleData startup integration, formula evaluation and player variable bindings, icons and legacy skill files, skill use/cooldown resource/target/motion lifecycle, full rendering/gameplay parity. Tests invoke native loaders explicitly; no production startup or live server/device behavior claim. Overall goal remains active.

2026-10-05: original AVA2 formula evaluator portable library

Imported AVA2 EterBase/Poly exclusively into third_party/ava2-poly with provenance. Only replaced ../StdAfx.h in cpp files with standard includes; parser, evaluation, symbol tables and random semantics remain original. Added PIC ava2_poly library linked to embedded runtime for subsequent skill formula integration. Original reference files remain immutable. New ava2.skill_poly regression exercises arithmetic precedence/parentheses, actual k/str variable binding after Analyze, min/max/floor functions and forced random endpoints. macOS and Android arm64 builds passed;19 nonvisual tests passed (new formula test raises previous18 count);925 reference hashes unchanged. render_3d remains excluded for unresolved timeout. Not yet integrated into gameplay: skill formula getters and player status/min/max variable mapping still pending, along with locale startup loading and skill execution. Linking the library and passing core tests does not establish working Python skill formulas or playable skills. Full Windows parity goal remains active.

2026-10-05: four Python skill formula queries

Connected GetSkillCoolTime/NeedSP/ContinuationSP/Duration to actual merged formula fields and original CPoly Analyze/Eval. Implemented original free-value case-sensitive status aliases, k/SkillPoint skill level, ar division100 and JeungJi prefix0. Added native player status lookup. Unknown state names deterministically return0 instead of reproducing original uninitialized GetState result; nonfinite results return0, finite return values truncate and wrap explicit32 bits before Python signed interpretation. Derived player status calculations are still a separate gap; lookup currently uses retained status points. Real English data tests verify cooldown12, SP90 at0.5 and truncation52 at0.125, empty continuation/duration0. Native formula regression verifies STR20 and hit rate80 binding, JeungJi0 and unknown-variable handling. Original CPoly accepts some malformed strings (1+ evaluates2); preserve evaluator behavior rather than assuming stricter parsing. macOS/Android arm64 builds passed;19 nonvisual tests passed;925 references unchanged. render_3d remains excluded for unresolved timeout. Pending: min/max status maps and formatted affect descriptions, startup locale loading, derived status calculations, skill cast/cooldown lifecycle and wider rendering/gameplay parity. Runtime tests explicitly load description/table; no live server/device or full playable skill claim. Full goal remains active.

2026-10-05: formatted skill affect descriptions

Replaced GetSkillAffectDescription placeholder with original free-value min/max formula evaluation, absolute values, floor both values when description contains %.0f, and printf float formatting of two values. Retain 65-byte original buffer capacity with explicit termination for defined host behavior. Negative/out-of-range indexes return None as original null string wrapper. Format validation accepts original float formats (including %0.f) and escaped percent, rejects incompatible/write conversions or more than two arguments instead of reproducing varargs UB. Actual English table regression binds minATK100/maxATK200/STR20 and verifies skill1 at0.5 produces literal Total Attack Power 450-855 after original formula rewrite/multiplier. Tests also verify negative/out-of-range queries. macOS/Android arm64 builds passed;19 nonvisual CTests passed;925 reference hashes unchanged. render_3d remains excluded for unresolved timeout. Limitations: only original non-Arabic formatting branch is implemented; Arabic replacement branch remains pending. Existing free-state points are retained values, not complete derived combat calculations. Min/max variable maps, new affect data API, startup locale loading, icons, actual skill use and rendering remain outstanding. No visible skill tooltip/live server/device verification. Overall Windows parity remains incomplete.

2026-10-05: point bounds and original empty new-affect API

Compared PythonPlayer SetStatus/GetStatus and PythonSkill new-affect loaders/query wrappers. Native and Python status get/set now honor original POINT_MAX_NUM255: negative/255+ values return0 and writes are ignored. Native skill formula lookup shares the bound. This only aligns bounds, not derived battle status updates. GetNewAffectDataCount now validates actual skill existence and returns0 for the original loader state. Original RegisterSkillDesc clears the new-affect vector and neither active description/table loader populates it. GetNewAffectData validates arguments/skill then raises RuntimeError for any index, matching this empty state; removed unconditional dummy0 behavior. Do not synthesize new effects from legacy affect records. Tests check invalid status writes/reads, valid skill empty count, negative/zero new-affect indexes and missing-skill exceptions. macOS/Android arm64 builds passed;19 nonvisual CTests passed;925 reference hashes unchanged. render_3d remains excluded for unresolved timeout. Inspection confirms original SetStatus recomputes hit/evade/weapon/attack points for several triggers, with weapon metadata/race/sash dependencies. Those calculations remain unimplemented along with locale startup, skill use and full rendering. No live-server/device proof. Full parity goal remains active.

2026-10-05: item text resources resolve against mounted pack

Inspection found item database seeding reads item_list/item_names through guessed working-directory paths, including ../ and build/dev paths. Replaced those direct filesystem reads with existing bounded, case-insensitive ReadPackedText against the configured AVA2 pack root. Item10 name/icon query now works with process working directory set to system temporary directory; regression verifies Sword+0 and icon/item/00010.tga, then restores working directory. macOS and Android arm64 builds passed;19 nonvisual CTests passed;925 original reference hashes unchanged. render_3d remains excluded for unresolved timeout. This corrects resource resolution only. Existing seven seeded item definitions, guesses based on item_list type, hardcoded English path and supplemental item_names still differ from original authoritative item_proto/locale lifecycle. Item proto loading, metadata/getters, derived battle calculations, startup locale and wider gameplay/rendering parity remain incomplete. No live device/server verification. Goal remains active.

2026-10-05: original item_proto decode and Python load bridge

Added fixed-width ItemProto decoder with AVA2 original key173217/72619434/408587239/27973291, MIPX version1/MIPT headers, MCOZ XTEA/LZO, bounded decompression and count/stride validation. Implements active socket8 record layouts172/176/178; current real file is176. Retains names/types/subtypes/size, range/refined ID, six values, two limits and three applies. Invalid/truncated input preserves stored records. Replaced item.LoadItemTable no-op with packed-file decode and update of existing item metadata, preserving item-list icon/model resources. Original Python wrapper returns None even on load failure. Native decoder test loads actual English file and verifies Sword+0/type1/size2 plus truncated rejection. Python bridge test invokes load from temporary working directory and verifies item query. macOS/Android arm64 builds passed;19 nonvisual tests passed;925 reference hashes unchanged. render_3d remains excluded for unresolved timeout. Remaining: independent original-structure oracle and synthetic172/178 cases; full record flags/prices/sockets/refine details, range lookup, all limits/applies getters and load/reset semantics. Existing seeded metadata remains before explicit load and some fields/descriptions still fabricated; app.LoadLocaleData does not yet trigger loading. Not a complete item system or startup parity claim. Derived combat calculations, skills, rendering and full goal remain incomplete; no device/server verification.

2026-10-05: item limits/applies, selection fallback and two-handed speed

GetLimit/GetAffect now return all two limits/three applies from loaded item_proto. Preserve original BYTE index conversion (256 maps to0); invalid converted indexes raise RuntimeError. Missing selected data raises RuntimeError instead of silently returning zeros. Item-list-only records still use existing partial metadata pending full loader replacement. Implemented app.SetTwoHandedWeaponAttSpeedDecreaseValue, default/reset0, and original APPLY_ATT_SPEED7 subtraction for weapon subtype3. Restored Python SelectItem fallback60001 and preservation of previous selection when both requested/fallback IDs are absent. This fixes the refine dialog regression caused by invalid selection0 reaching the now-strict limit getter. Range-based selection is still pending. Regression compares both limits/all three applies to decoded real records, verifies BYTE wrap/index exceptions, real two-handed weapon attack-speed deduction9, fallback selection and full refine dialog lifecycle. macOS/Android arm64 builds passed;19 nonvisual CTests passed;925 reference files unchanged. render_3d remains excluded for unresolved timeout; no live server/device/visual validation. Independent item-structure oracle, other metadata/getters, startup locale loading, derived combat and full parity remain incomplete.

2026-10-05: selected refine fields and range/Wiki selection

GetRefinedVnum now reads the selected record's original DWORD field and takes no required argument, replacing the vnum%10/vnum+1 guess. Added WORD refine-set decoding and real GetRefineSet. SelectItemWiki returns1/0 and preserves selection on failure without regular SelectItem's60001 fallback. Corrected regression calls that previously required the wrong argument-taking API. Added original range selection: exact map entries win; otherwise traverse ranges in successful file load order with strict base<id<base+range and uint32 endpoint arithmetic. Duplicate loaded range entries retain their ordering and reference the latest base record as original pointers do. Failed loads leave records/ranges unchanged. Regular/Wiki selection use the range result's base record. Tests verify actual Sword+0 refinement11, Sword+9 refinement0, decoded refine set, Wiki success/failure preservation, overlapping range order and exclusive endpoints. macOS/Android arm64 builds passed;19 nonvisual tests passed;925 references unchanged. render_3d remains excluded for unresolved timeout. Synthetic range model checks do not replace the pending full original item-structure/container oracle. Full metadata, locale startup, combat, skills and rendering parity remain incomplete; no live-device/server verification.

2026-10-05: selected item prices and flags

Decode original anti/general/wear/immune DWORD flags and buy/sell DWORD prices. Replaced item.GetIBuyItemPrice/GetISellItemPrice with original Python long return semantics and IsAntiFlag/IsFlag/IsWearableFlag with any-intersection mask checks. Negative Python mask uses original DWORD conversion. Is1GoldItem now checks original ITEM_FLAG_COUNT_PER_1GOLD bit3. Missing selected data raises RuntimeError; list-only default records return zero fields until authoritative proto loading. Actual English Sword+0 regression compares both prices and flag queries against decoded data, checks individual low31 bits, negative mask and zero mask. macOS/Android arm64 builds passed;19 nonvisual CTests passed;925 original reference files unchanged. render_3d remains excluded for unresolved timeout. These getter tests do not replace pending independent original-structure layout validation. Inventory/player price/flag APIs, other metadata, startup locale, derived combat, skill execution and wider rendering parity remain incomplete; no live server/device validation.

2026-10-05: independent item prototype structure/container oracle

Generator extracts original ItemData.h limit/apply/three table typedefs and capacity constants, with explicit Win32 long32 types. Static assertions verify active sizes172/176/178. New ava2.item_proto_oracle constructs each actual original structure with distinct signed limits/applies/values, high-bit unsigned prices/flags, refine tail and range. Literal LZO containers test plaintext and original-key encrypted MIPX paths; truncation preserves records/ranges. Covers all currently represented fields independently of the production parser's offsets. Inspection additionally found original active ENABLE_PROTOSTRUCT_AUTODETECT leaves dwStride0 for MIPT; Process has no case0 and retains zeroed destinations. Corrected prior invented176 interpretation to original zero record behavior after valid decompression. Added plaintext/encrypted MIPT regression. This supersedes earlier claims of ordinary MIPT record decoding; original MIPX remains the actual resource format. Bounds checks avoid reproducing malformed-input out-of-bounds reads. macOS/Android arm64 builds passed;20 nonvisual CTests passed, including new independent oracle;925 reference files unchanged. render_3d remains excluded for unresolved timeout. Unrepresented sockets/weight/additional flags, icons/descriptions/load/reset semantics, player inventory metadata, locale startup, derived combat, skill execution and rendering remain outstanding. Full Windows parity goal remains active; no live server/device validation.

2026-10-05: full common item record fields and prototype socket query

Retain internal name, weight, all eight signed prototype sockets and alter-to-magic/specular/gain-socket bytes, completing the common active r156 destination fields. Original r158-only wWearableFlag is not copied by TItemTableAll into active r156, so the port also ignores it. These prototype sockets are distinct from per-instance inventory sockets. Replaced item.GetSocket placeholder with selected prototype data, original BYTE index conversion and out-of-range -1. Expanded independent Windows record oracle across all three formats/plaintext/encryption with distinct negative sockets and nonzero byte fields. Python regression compares all eight real Sword+0 sockets and tests index8/-1/256 semantics. macOS/Android arm64 builds passed;20 nonvisual CTests passed;925 references unchanged. render_3d remains excluded for unresolved timeout. Complete common record decoding does not establish the full item system: fabricated initial metadata, item descriptions/icons/load/reset lifecycle, player inventory APIs, locale startup, derived combat, skill use and rendering remain incomplete. No live server/device or visual validation; full alignment goal remains active.

2026-10-05: inventory item metadata queries

Replaced player.GetItemFlags, IsAntiFlagBySlot, GetItemTypeBySlot and GetItemSubTypeBySlot placeholders with the AVA2 PythonPlayerModule/PythonPlayer behavior. Flags and anti-flags come from server item instances, independently of prototype flags; type/subtype resolve exact/range prototype records without changing selected item. Preserve Win32 signed DWORD return and BYTE/WORD window/cell conversion. Apply active SItemPos bounds: inventory262, equipment228, dragon-soul1152, special180, switchbot6, change-equipment102; safebox/mall/separate belt windows are invalid here. Regression covers high-bit signed flags, both argument forms, negative masks, window isolation, integer wrapping, invalid boundaries and flags from decoded extended item packets. macOS and Android arm64 builds passed;20 nonvisual CTests passed;925 references unchanged. Existing render_3d timeout, locale startup and wider gameplay/rendering gaps remain unresolved; full alignment remains active.

2026-10-05: item grade and refine eligibility

player.GetItemGrade now follows AVA2 PythonPlayerModule: resolve the requested inventory window/cell, select its item with normal 60001 fallback, preserve failed-selection behavior, and read the final decimal character of the selected locale name instead of guessing vnum%10. It also preserves the observable selected-item change. player.CanRefine now returns original eligibility codes instead of None. Check worn inventory/equipment slots first (6), require USE/TUNING scroll, select target with original fallback, reject rods (7), and return 1/5 according to prototype dwRefinedVnum. Invalid scroll returns0. Reused active position bounds for target lookup. Other invented IsRefineGradeScroll/GetItemRefineInformation helpers and broader refine UI/server transaction handling remain outstanding. Tests use real loaded scroll/rod/Sword+0/+9 prototypes, two inventory windows, selection side effects, worn-slot ordering and next-grade rejection. macOS/Android arm64 builds passed;20 nonvisual CTests passed;925 original references unchanged. render_3d timeout and wider locale/skills/combat/rendering parity remain unresolved.

2026-10-05: item use classifications

Replaced six item placeholders: IsRefineScroll (USE/TUNING), IsDetachScroll (USE/DETACHMENT), IsKey (TREASURE_KEY), IsMetin (METIN), CanAddToQuickSlotItem (USE/QUEST), GetUseType (original active subtype strings, NOT_USE_TYPE/USE_UNKNOWN_TYPE). All select their requested item, apply original fallback and preserve selected-pointer side effects. Soulbind/element inactive cases remain absent; active attribute67 and costume cases included. Regression samples every distinct type/subtype in the real item table, verifies classification and use strings, and checks selected refined-vnum state. macOS/Android arm64 builds and20 nonvisual CTests passed; expanded Python query regression passed;925 baseline references unchanged. Locale startup, fake seed metadata, wider item transaction/skill/combat/rendering behavior remain incomplete; render_3d timeout unresolved.

2026-10-05: inventory sell price

player.GetISellItemPrice now resolves inventory instance count and exact/range prototype sell price without changing item selection. Active COUNT_PER_1GOLD flag uses unsigned count/price; ordinary items use DWORD count*price. Return preserves original signed Win32 int overflow and invalid-position/missing-prototype zero. Corrupt zero divisor raises ZeroDivisionError instead of reproducing the original native division fault. Regression checks all loaded real prototype records with maximal DWORD stack count (excluding zero divisors), plus invalid-window/cell cases. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full parity remains incomplete, including valuable-item warnings, locale startup, item transactions, skills/combat and rendering; render_3d timeout remains unresolved.

2026-10-05: valuable inventory item predicate

Replaced player.IsValuableItem zero placeholder with original selected-item lookup/fallback and predicate: any nonzero instance socket among Packet.h METIN_SOCKET_COUNT=6, or prototype sell price strictly greater than5000. Stored sockets6/7 do not contribute; count does not multiply the price threshold. Preserve selected-item side effect and missing-data exception. Regression uses real cheap/expensive prototypes, maximal stack count, individually negative values in all eight sockets, both position argument forms and selected refined-vnum. macOS/Android arm64 builds and20 nonvisual CTests passed;925 original references unchanged. Predicate availability does not prove full warning UI/transaction flows; locale startup, broader item/skill/combat and rendering parity remain incomplete, with render_3d timeout unresolved.

2026-10-05: inventory index/count position semantics

player.GetItemIndex/GetItemCount now use the active original SItemPos validity rules per window rather than the ordinary inventory array's size. This restores access to dragon-soul cells beyond ordinary inventory capacity and rejects invalid equipment/special/switchbot/change-equipment cells and storage windows. Preserve BYTE/WORD argument conversion and original signed Win32 DWORD-to-int returns. Invalid argument counts now raise rather than returning zero with a pending Python error. Regression seeds every supported window's last valid/first invalid cell, high-bit vnums/counts, invalid storage window and wrapped window/cell arguments. macOS/Android arm64 builds and20 nonvisual CTests passed;925 original references unchanged. Socket/attribute position conversion and remaining slot classification/transaction/locale/skills/combat/rendering remain outstanding; render_3d timeout unresolved.

2026-10-05: instance socket/attribute position semantics

player.GetItemMetinSocket/GetItemAttribute now apply active per-window SItemPos bounds and BYTE/WORD window/cell conversion, restoring dragon-soul high-cell access and excluding invalid cells. Preserve all eight signed sockets and fifteen BYTE/SHORT attributes; invalid socket/attribute indices still return zero rather than wrapping. Invalid argument signatures return Python exceptions without the former pending-error/return-value mismatch. Expanded every-window boundary fixtures with socket7=-123 and attribute14=(255,-32768), plus legacy inventory argument forms, wrapped positions, negative and first-invalid field indices. macOS/Android arm64 builds and20 nonvisual CTests passed;925 original reference files unchanged. Remaining slot classification, item transactions, locale startup, skills/combat and rendering gaps remain; render_3d timeout unresolved, full alignment active.

2026-10-05: equipment/costume/belt slot classifications

Corrected PythonPlayerModule predicates using active GameType.h constants: IsEquipmentSlot180..228 inclusive (distinct from internal IsEquipCell180..215); IsDSEquipmentSlot inventory-only216..228 inclusive; IsCostumeSlot199..203 inclusive; IsBeltInventorySlot246..261 with WORD cell conversion. Preserve original inclusive endpoint quirks and BYTE DS window conversion. Invalid argument parsing now returns an exception correctly. Regression checks all cells -1..299, endpoint/window restrictions and wrapped window/belt positions. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full locale/item transaction/skill/combat/rendering parity remains incomplete; render_3d timeout unresolved.

2026-10-05: item count aggregation windows

GetItemCountByVnum now sums only original inventory cells0..261 using retained instance data. GetItemCountByTT now sums upgrade-storage cells0..179 (aSSUItem), replacing its incorrect alias to ordinary inventory. Both preserve unsigned DWORD accumulation and signed Win32 Python return, avoiding signed C++ overflow. Invalid arguments raise correctly. Regression separates inventory/upgrade/book storage, excludes first-invalid cells and exercises high-bit vnum and overflow (0xffffffff+3=2). macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Remaining locale/item transactions/skills/combat/rendering parity is incomplete; render_3d timeout unresolved.

2026-10-05: instance identity and custom names

Replaced player.IsSameItemVnum/GetItemNewName placeholders. Identity compares the requested DWORD vnum to the item at its validated BYTE/WORD position; empty/invalid positions resolve vnum0. Custom names read retained server instance name, with invalid-position/wrong-arity caret sentinel and bounded string extraction. Preserve original argument order and wrapped positions without changing selected prototype. Regression covers inventory/special-window identity, mismatch, wrapped positions, empty invalid cells and custom instance names. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full locale/item transaction/skills/combat/rendering parity remains incomplete; render_3d timeout unresolved.

2026-10-05: stone attachment eligibility

Replaced player.CanAttachMetin None placeholder with original worn-equipment rejection, direct prototype lookup/error, wear-flag intersection, rod rejection and eight-socket silver/gold subtype matching. Preserve original codes0..5 and lookup behavior without changing selected item; original does not independently validate stone type. Regression uses real matching stone/weapon prototypes and socket7, covering no socket, silver-only restriction, gold socket and equipment rejection ordering. Distributed table lacks a matching normal stone fixture; normal branch remains source-reviewed rather than independently exercised. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. This predicate does not complete stone transactions/UI or broader locale/skill/combat/rendering parity; render_3d timeout remains unresolved.

2026-10-05: detachment eligibility

Replaced player.CanDetach None placeholder with original USE/DETACHMENT selection/fallback, target selection and REFINEABLE flag plus first-six-socket unsigned >2 check. Original has no worn-equipment rejection in this predicate. Active sash-clean scroll value0=7 instead requires COSTUME/SASH and signed absorbed socket1>0. Preserve selected target side effect and missing-item exceptions. Regression uses real detachment scroll and refinable sword, rejects wrong scroll and empty sockets, and distinguishes all eight socket positions with negative values (original DWORD conversion). Sash path is source-reviewed but lacks a dedicated fixture. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Transaction/UI, locale, skills/combat and rendering gaps remain; render_3d timeout unresolved.

2026-10-05: key unlock eligibility

Replaced player.CanUnlock None placeholder with original key/target selected-item lookup, fallback and type checks (TREASURE_KEY21, TREASURE_BOX20). Original does not compare values or reject worn cells separately. Preserve original argument order, BYTE/WORD position conversion, missing selected-data errors and selected-target side effect. Regression uses real key/box prototypes, special storage target, wrong key/target and selected refined-vnum state. macOS/Android arm64 builds and20 nonvisual CTests passed;925 reference files unchanged. Full transaction/UI, locale, skills/combat/rendering parity remains incomplete; render_3d timeout unresolved.

2026-10-05: independently exercised sash-clean branch

Closed the earlier detachment-test gap using actual loaded USE/DETACHMENT value0=7 cleaner and COSTUME/SASH prototypes. Tests check signed absorbed socket1 at -1/0/1/INT32_MAX, require sash target type, reject a weapon even with positive absorbed socket, and verify selected target state. Expanded ava2.python regression passed;925 reference files unchanged. No production source changed, so prior macOS/Android build validation still applies. This verifies eligibility only; full sash UI/transactions and broader gameplay/rendering parity remain incomplete.

2026-10-05: remove invented refine behavior

IsRefineGradeScroll now reproduces the actual original switch fallthrough: every arity reaches no-message Py_BuildException, whose ScriptLib implementation clears errors and returns None. Selection/value code is unreachable. Removed guessed vnum/name rules; regression covers valid/invalid signatures and unchanged selection. This intentionally preserves source behavior rather than repairing the reference bug. Removed extra GetItemRefineInformation export and invented vnum+1/cost/probability calculation; original PythonPlayerModule and Python UI have no such API. Tests now assert its absence. Previous interrupted builds/tests were confirmed terminal and passing; final macOS/Android arm64 builds and20 nonvisual CTests passed,925 references unchanged. Actual server refine transactions, locale, skills/combat and rendering remain incomplete; render_3d timeout unresolved.

2026-10-05: item equipment classification

Replaced item.IsEquipmentVID zero placeholder with original selected-item lookup/fallback and CItemData::IsEquipment predicate (WEAPON/ARMOR only). Costume/rod/other item kinds do not count. Preserve selection side effect; regression samples every distinct real type/subtype and checks selected refined-vnum state. macOS/Android arm64 builds and20 nonvisual CTests passed;925 reference files unchanged. Full locale/item transactions/skill/combat/rendering parity remains incomplete, with render_3d timeout unresolved.

2026-10-05: shop outgoing transactions

Implemented four net shop send bindings and main-actor action gate. Active OFFLINESHOP common header is58 bytes; unused original uninitialized fields are deterministically zeroed. Buy appends count1/BYTE position, sell BYTE position, sell2 BYTE window/BYTE position/DWORD count. Fixed-width serialization avoids native structs. Native byte fixtures cover all four operations. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Python binding-specific and live shop receive/UI/server validation remain incomplete, as do broader locale/skill/combat/rendering gaps.

2026-10-05: shop Python binding regression

Added direct Python calls for all four shop operations, checking full outgoing bytes and BYTE/DWORD conversions with511/-1/window262. Actor sleep blocks all four calls with no queued transaction. Expanded ava2.python regression passed;925 references unchanged. Prior native/Android build validation still applies; actual shop receive/UI/server lifecycle remains incomplete.

2026-10-05: shop lifecycle callback frames

Added dynamic HEADER_GC_SHOP framing for EndShop, signed64 SetShopSellingPrice and original error strings (money/soldout/inventory/position/extended money/count). Wait for complete frames, reject invalid lengths and truncated price. Regression verifies fragmented money error and coalesced end/negative-price callbacks. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Start/item/tab/offline shop subheaders remain unimplemented and unconsumed; full shop gameplay and wider locale/skills/combat/rendering parity are incomplete.

2026-10-05: retained shop open state

Replaced shop.Open/Close/IsOpen placeholders with retained lifecycle state; Clear resets open flag and initial tab count1. PythonRuntime construction resets state to prevent cross-runtime leakage. Regression covers initial/open/close/clear transitions and initial tab count. Item/tab/offline data remain unimplemented; Clear cannot yet reset those absent subsystems. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full alignment remains incomplete.

2026-10-05: retained shop tab metadata

Added native shop tab count/name/coin setters and real Python getters with original BYTE indexing, invalid name None and invalid coin255. Clear restores count1 while retaining tab names/coins as original; full runtime reset clears metadata. Reject count>3 to avoid original corrupt-data array overflow; initial unspecified original coin bytes are deterministic0. Regression covers3 tabs, wrapped indices, invalid bounds and Clear retention. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Packet start/tab producer and item data remain unfinished; full gameplay/rendering alignment incomplete.

2026-10-05: retained shop items and update frames

Added120 retained records (3x40) with signed64 price, DWORD count/barter fields,8 sockets/15 attributes/7 glove attributes. Implemented item ID/count/price/barter getters and Clear reset, preserving original BYTE tab quotient conversion. Shop update subheader2 decodes active123-byte record with explicit Win32 widths and triggers RefreshShop. Regression checks high-bit returns, last slot/first invalid, Clear and wire-update-to-Python queries. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full start/tab frames, socket/attribute getters and offline lifecycle remain incomplete; full alignment active.

2026-10-05: shop socket/attribute getters

Replaced shop socket, ordinary attribute and glove/random attribute placeholders with retained records. Preserve signed32 sockets/BYTE type/signed16 attribute values, original item index resolution and invalid attribute zero tuple. Invalid socket index returns0 instead of reproducing original unchecked out-of-bounds read. Native and packet-to-Python fixtures exercise last8/15/7 fields and negative values. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full shop start/tab/offline lifecycle and broader gameplay/rendering parity remain incomplete.

2026-10-05: ordinary and extended shop start frames

Implemented original start0 ownerDWORD+40 records and start-ex10 ownerDWORD/tabBYTE plus32-byte name/coinBYTE/40 records per tab. Share fixed-width record decoder with updates; validate whole frame before clearing retained items. Preserve original metadata retention in Clear and StartShop signed-owner callback after all data populated; callback/UI controls open flag. Reject >3 tabs and truncated records safely. Regression verifies fragmented4928-byte ordinary start,9915-byte two-tab extended start, stale-item removal, last item/page and metadata. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Actual server/UI integration, independent full-struct oracle and offline lifecycle remain unfinished; broader alignment active.

2026-10-05: malformed shop frame state preservation

Added isolated receive-stream fixtures for header length<4, truncated ordinary start/item update/price, excessive tab count and missing tab records. Verify all six reject before changing retained page count/name/items. Expanded ava2.python regression passed;925 references unchanged. No production source changed; prior platform build validation applies. Real server/UI and independent shop record oracle remain pending, along with wider gameplay/rendering parity.

2026-10-05: offline shop end/purchase send

Implemented net.SendOfflineShopEndPacket/BuyPacket with original header57,58-byte common shop record, DWORD owner at53 and BYTE position at57. Original undefined unused fields are deterministic zero; original main-actor action gate preserved. Direct Python regressions verify negative owner/BYTE wrapping, full bytes and blocked actor behavior. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Offline management/receive/state/UI and real-server transactions remain incomplete; full alignment active.

2026-10-05: offline management remove/destroy/logs

Implemented three original Python management sends: remove item(sub5)+BYTE position, destroy shop(sub6), remove logs(sub11). Unlike purchase/end, original management calls have no main-actor action gate. Full58-byte header serialization zeroes undefined unused original fields. Regression calls each while actor is controlled and checks full bytes/BYTE wrapping. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Offline stock/withdraw/title/receive/UI and broader gameplay parity remain unfinished.

2026-10-05: offline slot/return/time requests

Implemented SendOpenShopSlot(sub13)+BYTE position, SendGetBackItems(sub14), SendAddTime(sub15), retaining original absence of actor gate and zeroing undefined unused original header fields. Direct Python fixtures verify full bytes, negative-position BYTE wrapping and sending while controlled. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Offline stock/withdraw/title/receive/UI and broader gameplay alignment remain incomplete.

2026-10-05: offline open by VID

Implemented net.SendOpenWithVID with original sub16 and appended DWORD owner after58-byte common header (distinct from purchase's embedded owner). Preserve absence of actor gate and signed Python-to-DWORD conversion; undefined unused original fields zeroed. Regression checks complete62-byte request while actor controlled. macOS/Android arm64 builds and20 nonvisual CTests passed;925 references unchanged. Full offline receive/stock/withdraw/title/UI and broader gameplay alignment remain incomplete.

2026-10-06: net senders and safebox move layout

Fixed safebox item move (11-byte original layout), exchange action gate/default position/ItemDel no-op; implemented exchange, safebox/mall, messenger, party, guild (15 subheaders), quest input/confirm, select item, target info senders with golden-byte tests. Placeholder count 749 → 618. macOS + Android arm64 libmain.so builds passed; 925 references unchanged. Four CTests (python, window_tree, speedtree_forest, mark_manager) fail identically on baseline because asset paths are hardcoded to /Users/shen/... and cwd-relative; see WINDOWS-PARITY.md. Outstanding: configurable asset root, party/guild member state, select-phase empire/name, emoticon, offline-shop stock/withdraw/title, render_3d timeout.

2026-10-06 (pass 2): receive loop, chat/whisper, server commands

  • Made the GC receive loop table-driven and generated from the Win32 reference: 138 headers, 119 handlers.
    • It now matches Windows for unknown headers (clear and quit), handler failures (clear), loading-only headers in the Game phase (clear), and padding and partial packets.
    • The 75 unported GamePhase packets are skipped one packet at a time, so the stream no longer desyncs.
  • Ported the chat receive branches, the 31-byte multilanguage whisper, and ServerCommand with SplitToken and the BINARY_ServerCommand_Run/parser window.
  • Ported the emoticon registry and send, the "/" command repeat, and the PyCallClassMemberFunc callback semantics.
  • Placeholders went from 618 to 609. macOS and Android arm64 builds pass; 925 reference files unchanged; ctest 16/20 with the same 4 environment failures.
  • Correction: pass 1's python_test had aborted early. It needs a merged ymir work overlay plus map/textureset symlinks, and it returns rc=0 even on an abort, so check the log for "passed".
  • Next: port the 75 GamePhase handlers (motion 36, add/del/update char, item ground, fly, etc.), the chat module, emoticon effects, the insult filter, configurable asset roots, a harness that fails on a Python abort, and the render_3d timeout.

2026-10-06 (pass 3): remaining GamePhase handlers

  • Done: 63 of the 75 skipped GamePhase headers are ported, in src/eter_net/PythonNetworkStreamPhaseGameRecv.cpp. This includes:
    • handshake/time sync with the Windows stop-frame;
    • the unsequenced XTrap ACK;
    • party, PVP and duel;
    • target and refine;
    • quest script/confirm;
    • event manager, calendar, sash, kingdoms war, exchange log and catch-king.
    • The refresh block now runs in Windows order. Details are in WINDOWS-PARITY.md.
  • Still skipped: 47, 74, 75, 81, 93, 114, 156, 171, 217, 220, 221, 230.
  • Visual and native-store gaps: minimap/atlas marks, target and specific effects, fly targets, dig/fishing motions, guild land and symbols, hybrid-crypt keys, anticheat blacklist, sash/bank/chest-drop stores, dungeon auto-walk, text-tail refresh, 300 ms refresh throttle.
  • Validation: ava2.python passed, with new golden tests. CTest -E render_3d 16/20 (same environment failures; render_3d excluded because of its timeout). Android arm64 built. Baseline 925 files unchanged. Packet audit 210/0.

2026-10-06 (pass 4): quest records and task-letter receive path

Ported HEADER_GC_QUEST_INFO (81), the ordered CPythonQuest record store and all six quest Python bindings directly from AVA2 PythonQuest.cpp/.h and RecvQuestInfoPacket. BEGIN replaces/moves an existing wire quest to the end, while quest.Add BEGIN ignores a duplicate; UPDATE creates missing records, preserves empty strings and changes counters/clocks only when flagged; END deletes. Multilanguage ^ titles invoke GetQuestLetterName before RefreshQuest. Signed counters, DWORD Python IDs, array-index getters and unclamped expired countdowns are preserved. GetQuestData uses the existing portable image-handle adapter for the original icon paths. Added a source-extracted original header/flag compile oracle and an asset-independent native/Python/wire regression. Declared quest payloads shorter than their selected fields are rejected before consuming a following packet; this deliberately bounds an unsafe original trusted-server assumption. Countdown time uses the port's elapsed monotonic application clock; original virtual/frame-timer mode and UI rendering are not verified. Fixed the ava2.python test harness: process exit 0 alone no longer proves success; both exit status and final completion marker must pass. Confirmed rejection of early exit(0) and nonzero exit even with the marker present. Validation: macOS and Android arm64 libmain.so builds passed; ava2.quest and ava2.windows_item_oracle passed; existing python_test passed through the completion wrapper in the prepared asset overlay. Both loopback tests passed with permission to bind local fixture ports. Default nonvisual CTests retain four failures: python asset/map assertion, window_tree missing locale resources, mark_manager hardcoded resource path, and speedtree_forest's canopy wind assertion (the last is not an asset lookup failure). render_3d remains unverified. All 925 immutable AVA2 references unchanged; 211 packet constants checked with zero mismatches. Remaining skipped GamePhase headers:47,74,75,93,114,156,171,217,220,221,230. Static inventories still show hundreds of placeholders; complete gameplay, assets/rendering, real isolated-server and Android-device parity remain unfinished.

2026-10-06 (pass 5): messenger and cube renewal

Ported messenger GC74 and all five original PythonMessenger.cpp bindings. Login/logout/mobile retain friend membership and emit original group0 callbacks; LIST uses connected bit0/bit1 and emits online state before mobile. LOGIN alone refreshes the target board by name. Added the original sorted guild member list/callback operations and RefreshGuildMember (its Guild GC75 producers remain unported). Destroy clears lists while retaining the handler; runtime teardown releases owned references. Invalid Python arguments return None as the original no-message Py_BuildException does. Oversized/truncated wire names are bounded instead of reproducing original stack overwrite/cross-packet reads; INVITE/unknown subheaders preserve the Windows no-op and unconsumed payload behavior. Ported cube GC221, ordered recipe records and all five PythonCubeRenewal.cpp bindings. Receive appends even duplicate recipe IDs; OPEN goes to the game window, LOADING to the registered cube handler, CLEAR retains the handler. GetDates preserves its16-field tuple, signed values, array indexing and original missing-entry tuple. Craft/close use original CG21610-byte wire layouts and main-actor CanAct guard, with zeroed undefined close fields. Recipe category reads are bounded; wire bool is stored as BYTE and normalized on query rather than reading an invalid C++ bool representation. Added dedicated messenger/cube native+Python+fragmented-wire tests and source-extracted structure/enum/offset compile checks. macOS and Android arm64 libmain.so builds passed; four targeted CTests (messenger,cube,quest,Windows declaration oracle) passed. Complete nonvisual CTest19/23: same python/window_tree/mark_manager resource failures and speedtree canopy sway failure. The existing comprehensive python_test passes through its completion wrapper in the prepared asset overlay. Packet constants214/0;925 immutable references unchanged; static placeholders789→780 (active *Module.cpp-only interface count remains597, because these original modules live in PythonMessenger.cpp/PythonCubeRenewal.cpp). Remaining skipped GamePhase headers:47,75,93,114,156,171,217,220,230. Guild receive/store integration, offline/item shop, switchbot, dungeon/drop/battlepass and wider gameplay/rendering/asset/server/device parity remain unfinished. No reference files or existing server changed.

2026-10-06 (pass 6): private shop search and complete extension discovery

Ported GC156 result receive and the12 active PythonPrivateShopSearch.cpp bindings, plus net.SendPrivateShopSearchInfo/CG143. Preserve append order/duplicates until explicit ClearSearchItems; retain original signed DWORD/int results,64-bit prices,8 sockets/15 attributes, seller/position and literal new-name"^" behavior. Removed two exports absent from the active AVA2 feature profile (transmutation/perma). Receive schedules one RefreshShopSearch after a batch, including an empty result packet. Search request serializes89 Win32 bytes in original field order, wraps BYTE parameters and deliberately does not SendSequence; original main actor CanAct guard retained. Zero-fill original undefined text padding; reject text longer than49 bytes and invalid result/socket accesses instead of reproducing original memory faults. Added an independent literal-wire/native/Python search test and original-source structure/offset compile comparisons. Both platform builds pass; targeted search/cube/messenger/quest/oracle tests5/5 pass. Nonvisual CTest20/24 with the same four python/window_tree/mark_manager asset failures and speedtree sway assertion. Comprehensive python_test passes in the prepared resource overlay via the completion wrapper. Packet constants216/0;925 immutable reference hashes unchanged; static placeholders780→765. Corrected the interface audit to discover every original .cpp registering Py_InitModule rather than only *Module.cpp. It now covers47 modules,726 overlapping placeholder methods and7 missing guild_ranking methods (Close,CountDate,GetPageCount,GetPageView,InfoDate,Open,SetPageCount). The count increase reflects expanded audit coverage, not newly introduced placeholders. quest/messenger/cube/search now all appear with no missing/extra/placeholder methods. Method-name coverage still does not prove full behavior. Remaining skipped GamePhase headers47,75,93,114,171,217,220,230. Global refresh timing (including search's500ms delay), original DWORD-size packet/WORD-framing edge cases above65535 bytes, real server/device and full UI rendering remain unverified; broader gameplay/store/asset gaps persist.

2026-10-06 (pass 7): guild state and GC75

Ported all34 active PythonGuild.cpp methods, replacing31 guild placeholders while retaining the mark manager. GC75 now handles the original login/logout, list/remove, grade/name/authority, info, comments, EXP, skill/general, invitation, name cache, war/point/list and money subheaders. Preserve member grade sorting only on registration, existing name/job retention on updates, integer average, DWORD sums and signed Python results, no aggregate recomputation on removal, insert-first guild names/skill slots, six enemy slots without compaction and callbacks before war-slot changes. Native Destroy intentionally retains board comments, offer sum and skill-slot map; Python Destroy also clears the slot map. A new embedded runtime clears all state. Invalid indices/wire lengths are bounded instead of reproducing Windows memory faults. Guild list/login/logout/remove now produce the original messenger group1 callbacks and target refreshes. Page refreshes coalesce in Windows order after packet dispatch. Main actor append/update synchronizes net.GetGuildID and the matching account roster; main-member removal clears these. net.SendGuildRemoveMemberPacket now resolves an exact member name to PID and emits the original CG80 removal, retaining the no-send path for unknown names. GVG keys are stored and removed symmetrically; ChangeGVG/RefreshTextTail name-colour effects remain unported and are not claimed as complete guild-war rendering parity. Corrected interface discovery to use ClCompile entries from the actual AVA2 Windows vcxproj files. guild_ranking is orphan source, absent from that build and without corresponding protocol declarations: the previous missing-interface report was false. Current audit covers46 compiled modules,0 missing names and694 overlapping placeholders; guild has no missing/extra/placeholder names. Static placeholders765→733. Also corrected the prior refresh-throttle gap: AVA2's s_nextRefreshTime guard is commented out, so its300/500ms assignments impose no active delay. Do not introduce an artificial throttle. Validation: macOS Debug and Android arm64 builds passed; guild/search/cube/messenger/quest/Windows declaration oracle tests6/6 passed. The new guild test checks independent literal packet bytes, fragmented/coalesced packets, malformed-frame boundaries, all receive subheader families, original tuple defaults and state quirks, remove-member sending, account roster synchronization and runtime reset. Source-extracted guild structs/enums/offsets compile against the port. Full nonvisual CTest21/25, with the same four existing failures (python asset/map assertion, window_tree locale resources, mark_manager legacy resource path, speedtree canopy sway). Comprehensive python_test passes through the completion wrapper in the prepared asset overlay after updating its old skipped-GC75 fixture to still-unported GC47; shutdown emits the pre-existing Python del warnings. Packet constants217/0;925 immutable references unchanged. Remaining skipped GamePhase headers:47,93,114,171,217,220,230. GVG/PK name colours, DWORD-size packet/WORD-framing edge cases above65535 bytes, wider native stores, real-server/device and full asset/rendering parity remain unfinished. No reference files or existing server changed.

2026-10-06 (pass 8): battle pass

Ported all8 active PythonBattlePass.cpp bindings and GC230/CG230 from PythonNetworkStreamPhaseGame.cpp. Keep separate ordered info/progress vectors; INFO and UPDATE append duplicates without replacing by mission ID. CLEAR removes info and resets time but preserves progress; UPDATE_CLEAR removes progress while preserving info/time. INFO_EXTRA sets signed time; LOADING/UPDATE_LOADING forward their original subheader to the registered handler. OPEN/MP call the game window immediately. Unknown subheaders consume the complete58-byte fixed packet with no state change. Queries preserve original defaults and tuple shapes, including scalar0 for GetDatesItems on a missing record versus pair(0,0) for an invalid reward slot, four reward entries, signed DWORD/Python-int conversions and independent progress indexing. Negative reward slots are safely rejected instead of reproducing original out-of-bounds memory access. Handler references are retained/released across replacement and runtime teardown; list clears keep the handler. Open/reward requests serialize6 little-endian Win32 bytes, use the original main-actor CanAct gate and SendSequence. OPEN's undefined index field is deterministically zeroed; REWARD preserves signed32-bit wrapping. Validation: macOS Debug and Android arm64 builds passed. Seven targeted battlepass/guild/search/cube/messenger/quest/Windows declaration oracle CTests passed. New battlepass test uses literal wire records and fragmented/coalesced frames, both lists/clear modes, query defaults/signed values, handler lifetime/callback failure, unknown subheaders, exact request bytes/sequence and action guards. Battlepass structs/enums/offsets are compiled against declarations extracted directly from the immutable original. Full nonvisual CTest22/26 with the same four existing failures (python map/assets, window_tree locale assets, mark_manager resource path, speedtree canopy sway); comprehensive Python regression passes in the prepared resource overlay through the completion wrapper. Static placeholders733→725; compiled-interface placeholders694→686, no missing/extra/placeholder names for battlepass. Packet constants219/0;925 immutable reference hashes unchanged. Remaining skipped GamePhase headers47,93,114,171,217,220. Offline/item shop, switchbot, dungeon info/drop item state, GVG/PK name colours, other native/UI/resource/rendering gaps and real-server/device parity remain unfinished. render_3d is still excluded for its unresolved timeout. No reference files or existing server changed.

Ported all8 PythonDropItem.cpp bindings, GC220 receive and CG215 open/search from AVA2 PythonNetworkStreamPhaseGame.cpp. Replaced7 dummy handlers plus the hidden GetDates no-op (always returned empty data). Preserve ordered append/duplicates, signed DWORD query results, missing-record tuple("None",0,0,0), GetPageView=5, unconstrained signed page selection and ClearList resetting page to1. Server OPEN calls the game window; LOADING calls the registered handler; CLEAR retains that handler. Unknown subheaders consume the full114-byte fixed packet without state changes. Bound100-byte mob names instead of reading past unterminated wire fields. Open/search requests encode6 little-endian Win32 bytes, preserve integer wrapping, use the original main-actor CanAct gate and SendSequence. The original OPEN vnum is undefined; its four bytes are deterministically zeroed. Python handler references are owned during registration, released on replacement/teardown, and retained across list clears. Validation: macOS Debug and Android arm64 builds passed. Eight targeted drop/battlepass/guild/search/cube/messenger/quest/Windows declaration oracle CTests passed. New drop test checks literal fragmented/coalesced wire bytes, duplicate records, full-width names, signed values/argument defaults, page/reset semantics, handler lifetime/callback exceptions, unknown subheaders, exact send packets/sequencing/action guards and fresh-runtime reset. Source-extracted drop structs/enums/offsets compile against the port. Full nonvisual CTest23/27, same existing python/map-assets, window_tree/locale, mark_manager/resource-path and speedtree/canopy-sway failures; comprehensive Python regression passes in the prepared asset overlay through the completion wrapper. Static placeholders725→718; compiled-interface placeholders686→679 with no drop_item missing/extra/placeholder names. Packet constants221/0;925 immutable references unchanged. Remaining skipped GamePhase headers47,93,114,171,217. Offline/item shop, switchbot, dungeon info, GVG/PK name colours, other native/UI/resource/rendering behavior and real-server/device parity remain incomplete. render_3d remains excluded for its unresolved timeout. No reference files or existing server changed.

2026-10-06 (pass 10): dungeon information

Replaced all12 PythonDungeonInfo.cpp implementations, including8 dummy bindings and4 apparently implemented but fabricated functions. Removed the six hardcoded dungeon entries and incompatible11-field query tuple. Dungeon data now comes exclusively from GC217: independent ordered info, mission and ranking vectors; duplicate entries append in wire order. InfoDate reproduces the original21-field tuple and defaults, InfoDateMision its4-int tuple and InfoDateRanking its4-field tuple; fixed100/24-byte strings are bounded. Preserve signed DWORD results, GetPageView=13 and unconstrained signed page count. Ported all original GC217 branches, game-window OPEN/RANKING_LOAD/MISION_LOAD callbacks and the original mission-send fallthrough that clears ranking. DATES_CLEAR resets page/info/missions but retains rankings; MISION_CLEAR and RANKING_CLEAR affect only their respective vectors. Unknown subheaders consume the complete618-byte fixed packet without changes. Fresh runtime resets all lists. CG213 open/teleport/mission/ranking requests encode6 little-endian Win32 bytes and use the original CanAct gate/SendSequence; OPEN's undefined index bytes are zeroed. Validation: macOS Debug and Android arm64 builds passed. Nine targeted dungeon/drop/battlepass/guild/search/cube/messenger/quest/Windows declaration oracle CTests passed. New dungeon test uses literal fragmented/coalesced wire fixtures and verifies all receive branches, all21 query fields, clear/fallthrough independence, duplicates, signed/default/page behavior, full-width unterminated strings, callbacks/failures, exact four send packets and action/sequence guards. Source-extracted structures/enums/offsets compile against the port. Full nonvisual CTest24/28 with the same existing python/map-assets, window_tree/locale, mark_manager/resource-path and speedtree/canopy-sway failures; comprehensive Python regression passes in the prepared asset overlay via completion wrapper. Static placeholders718→710; compiled-interface placeholders679→671; dungeon_info has no missing/extra/placeholder names. Packet constants223/0;925 reference hashes unchanged. Remaining skipped GamePhase headers47,93,114,171. Offline/item shop and switchbot, GVG/PK name colours, other native/UI/resource/rendering gaps and real-server/device parity remain incomplete. render_3d still excluded for unresolved timeout. No reference files or existing server changed.

2026-10-06 (pass 11): switchbot behavior

Replaced all9 previously non-placeholder switchbot implementations with the original PythonSwitchbot.cpp data flow. Removed fabricated common-attribute/max-value tables and client-side Start/Stop state changes. GC171 now updates the complete220-byte table, applies84-byte item updates and builds the ordered server attribute-set map. Keep six native slots and two alternatives/five normal attributes while exposing SLOT_COUNT=5. Server UPDATE alone determines active/finished; wire bool fields are BYTE and normalized on query. ClearSlot clears active/items/alternatives while retaining finished and player item data, as Windows does. Attribute-set selection comes from the actual SWITCHBOT(window11) player item and item-proto type/subtype, including arrows/unsupported armor rejection, rings, pendant and original costume-to-armor-subtype mapping. Duplicate map entries overwrite after BYTE narrowing of apply_num. Attribute-list values truncate to signed16-bit, while GetAttributeMaxValue retains signed32-bit values. Python slot/alternative/index/type arguments wrap to BYTE, attribute values to signed16-bit. Bound invalid attribute indices and return deterministic-1 when item lookup fails instead of original uninitialized memory behavior. Item updates retain the existing vnum/flags and all other fields; the packet vnum is ignored as in AVA2. SetItemCount calls the registered player's RefreshInventory immediately before socket/attribute updates; phase-window RefreshSwitchbotItem follows. Preserve all8 sockets/15 attributes. Server callbacks are immediate. Attribute-map receive clears the prior map, consumes9-byte records, and leaves short tails/unknown-subheader payload for the original dispatcher. CG171 Start/Stop are explicit37/7-byte Win32 packets with SendSequence and no invented action guard; requests do not alter local state. Preserve the original wrapper's >6 boundary: Start(6) sends only a7-byte header declaring37 bytes because native alternatives lookup returns empty; Stop(6) sends7 bytes; larger wrapped slots send nothing. This source quirk is covered, not treated as an invented protocol improvement. Validation: macOS Debug and Android arm64 builds passed. Ten targeted switchbot/dungeon/drop/battlepass/guild/search/cube/messenger/quest/Windows declaration oracle CTests passed. New switchbot test covers independent literal fragmented/coalesced records, full table/item updates, callback ordering, bool normalization, BYTE/short conversion, clear semantics, sorted map/overwrite/max-value behavior and all supported/rejected item classifications through generated172-byte item-proto fixtures in a temporary isolated pack root. It also checks exact send/sequence/no-actor/state/boundary behavior, malformed table boundaries, unknown/tail dispatch and runtime reset. Original-source structures/enums/offsets compile against the port. Full nonvisual CTest25/29 with the same four existing python/map-assets, window_tree/locale, mark_manager/resource-path and speedtree/canopy-sway failures; comprehensive Python regression passes in the prepared asset overlay.225 packet constants match;925 immutable references unchanged. Static710 and compiled-interface671 placeholders remain unchanged because all old switchbot methods already had non-dummy function bodies; this milestone demonstrates why name/placeholder audits alone cannot prove parity. Remaining skipped GamePhase headers47,93,114. Offline/item shop, GVG/PK name colours, wider native/UI/resource/rendering gaps and real-server/device parity remain incomplete. DWORD-sized packet framing above65535 bytes and render_3d timeout remain unverified. No reference files or existing server changed.

2026-10-06 (pass 12): item shop GC93

Ported RecvItemShop from AVA2 PythonNetworkStreamPhaseGame.cpp. GC93 now forwards dragon coins, optional purchase log, complete purchase-history arrays, single-item updates and nested category/subcategory catalogs to the original game-window callbacks. Keep signed32-bit DWORD callback conversion, signed64-bit prices/coins/sales, BYTE discounts, original callback tuple order and original omission of week/month limits from callback arguments. Log arrays are fully read before append callbacks, while HideLoading/LogClear occur before that read. DRAGONCOIN appends its optional log before setting coins. LOAD opens the main page once after each outer category; zero categories do not open it, and sentinel9999 opens it once and returns. Duplicates and empty subcategories are forwarded without an invented native store. Preserve original BUY/RELOAD/LOG_ADD/unknown-subheader unconsumed payload behavior. Bounds reject negative/oversized counts and truncated fields rather than reproducing large allocations or cross-frame reads; fixed25/21/16-byte log strings are bounded. Wire bool is read as BYTE and normalized. Existing chat-based requests and original Python UI are unchanged; this milestone covers the receive bridge, not full rendered item-shop interaction parity. Validation: macOS Debug and Android arm64 builds passed. Eleven targeted itemshop/switchbot/dungeon/drop/battlepass/guild/search/cube/messenger/quest/Windows declaration oracle CTests passed. New literal-wire test checks fragmentation/coalescing, every actual receive branch, signed values/64-bit fields, nested duplicate/empty categories, sentinel/zero counts, callback order/failure, full-width strings, unknown payload dispatch and bounded malformed count/record reads. Source-extracted item/log/header structures, field offsets and enums compile against the port. Full nonvisual CTest26/30 with the same four existing python/map-assets, window_tree/locale, mark_manager/resource-path and speedtree/canopy-sway failures; comprehensive Python regression passes in the prepared resource overlay via completion wrapper.226 packet constants match;925 immutable reference hashes unchanged. Static710 and compiled-interface671 placeholder counts unchanged: there is no dedicated native Python itemshop extension in AVA2. Remaining skipped GamePhase headers47,114: offline shop and special effects. Other consumed-but-incomplete native/UI/rendering/store logic, GVG/PK name colours, resource roots, real-server/device parity, DWORD-size framing above65535 and render_3d timeout remain outstanding. No reference files or existing server changed.

2026-10-06 (pass 13): offline shop

Ported GC47 and 27 original active PythonShop.cpp offline bindings, replacing fixed-value/no-op methods. Original three-tab/80-slot item indexing, vnum-gated lookup, signed DWORD/int returns, 64-bit prices/flags,8 sockets/15 attributes, missing buyer string "None", initial title "NONE" and Clear() resetting offline metadata and stock are retained. START updates state before callbacks, reverses80 log entries and skips zero-price logs; UPDATE appends nonzero logs first then refreshes. Six scalar branches retain direct-read/trailing-payload behavior; CHECK_RESULT accepts only byte1. IsOfflineShop remains0 because AVA2 never sets the flag. END clears ordinary and offline shop state before the original callbacks. Active zodiac lucky-error callback and unknown/error full-payload consumption are preserved. Implemented stock replace/delete/clear/query, sorting by display position, CG58 build and CG57 decoration. Explicit little-endian53-byte build header/20-byte stock entries and58+52-byte decoration match the source Win32 layouts; no main-actor gate is invented, and existing SendSequence transport behavior is retained. BYTE/WORD conversions and empty-stock requests match AVA2. Undefined original padding/owner_id is zeroed; decoration text is copied literally rather than reproducing the original format-string vulnerability. Fixed text is bounded and malformed/truncated records reject instead of reproducing out-of-bounds reads. Added independent literal fragmented/coalesced wire/state/Python fixtures and source-extracted Win32 structure/enum/offset assertions. Interface auditor now merges multiple method tables for one module, so extending shop in a separate translation unit does not erase ordinary shop interfaces from the report. The comprehensive Python framing regression now uses the remaining unported GC114 instead of expecting GC47 to be skipped. Validation: macOS Debug and Android arm64 builds pass;12 targeted regressions pass. Full nonvisual CTest27/31 retains the four previously documented python/map-assets,window_tree/locale,mark_manager/resource-path and speedtree/canopy-sway failures.228 packet constants match;925 immutable reference hashes unchanged. Static placeholders710→683; compiled-interface placeholders671→644;46 original compiled modules compared,0 missing method names. Comprehensive Python regression passes in the prepared resource overlay through the exit-status/completion-marker wrapper. Remaining skipped GamePhase header114 (special effects); other consumed-but-incomplete handlers/native/UI/rendering/store logic, shop sign rendering, GVG/PK colours, resource roots, isolated-server/device equivalence, DWORD framing above65535 and render_3d timeout remain outstanding. Offline rendered UI/server interaction parity is unverified. No reference files or existing server changed.

2026-10-06 (pass 14): original item sound dependency and equipment request restrictions

Replaced item.SetUseSoundFileName/SetDropSoundFileName no-ops with the original bounded8-use/5-drop category registries. Native selection follows PythonItem.cpp: bow versus arrow/quiver/default weapon, body versus neck/ear/default armor, ability-up potion sound, talisman portal sound; USE_POTION itself has no client-use sound, leaving server-triggered potion playback separate. Missing item definitions stay silent; empty configured strings are retained. Sound lookup does not change ItemManager's selected item. Added PlayUsePotionSound as a native dependency for GC114; GC114 itself remains skipped until full registered character/bone effects are ported. Restored original pre-send drop sounds for safebox checkin/checkout/move and mall checkout using actual inventory/storage item definitions. Also restored inventory use/move sounds and their missing equipment restrictions: only an equipment item in a source equipment cell triggers exchange/shop notification or attacking rejection, after CanAct and before sound/send. A destination-only move from a normal inventory cell is permitted as the original does. Equipment range is180..215 for INVENTORY/EQUIPMENT; original selection-without-fallback behavior is retained. No sounds were invented for item drop/pickup/use-to-item. Original packet layouts and transport sequence behavior remain unchanged. Added isolated literal item-proto fixtures covering24 type/subtype combinations, generated PCM WAV fixtures to prove actual SoundManager dispatch/cache population, original Python bad-argument/category bounds and selection-retention tests, storage-invalid-slot suppression, equipment/source-cell boundaries, exchange/shop notifications and CanAct suppression. Original sound enums are extracted into the Win32 compile oracle. No real device/audio-output/attack-animation equivalence is claimed; the attack gate's runtime animation state and shared audio resource resolver remain pending. Validation: macOS Debug and Android arm64 builds pass;13 targeted regressions pass. Nonvisual CTest28/32 retains the same four prior python/map-assets,window_tree/locale,mark_manager/resource-path and speedtree/canopy-sway failures. Comprehensive Python regression passes in the prepared resource overlay via exit-status/completion-marker wrapper.228 matching protocol constants,925 unchanged references,46 compiled Windows modules/0 missing methods; static683→681 and compiled-interface644→642 placeholder bindings. Remaining: GC114 and specific/levelup/skillup character effects need registered effect tables, lifetime/attachment/bone transforms and original rendering/invisibility behavior; wider native/gameplay/rendering/resource/server/device parity remains incomplete. Item-proto preset seeds, audio hardcoded resource paths, DWORD framing above65535 and render_3d timeout remain unverified/unresolved. No reference files or existing server changed.

2026-10-07 (pass 15): remove fabricated item database and port resource data loading

Removed seven preset item records, invented names/descriptions/values, lazy hardcoded locale/en item_names/item_list loading, inferred type from item_list's ignored second column and three hardcoded weapon-model fallbacks. An unloaded database is now empty; data arrives through explicit AVA2 item-list/table/description loaders. item.LoadItemTable retains its original None return even on native failure. Selection success is tracked separately from vnum0, so creating a zero-vnum record does not implicitly select it; failed selection retains the previous record/fallback behavior. Native item-data-pointer helpers reject vnum0 as AVA2 does. Ported active non-Vietnam LoadItemList/LoadItemDesc and prototype icon selection: original tab splitting/quoted tokens/column counts and atoi IDs, list overwrite/model reset/description/socket clearing, description-only updates of existing IDs and quoted string stripping. Prototype load preserves source record order for same-internal-name icon fallback, then decimal-base icon and bowl27995; existing list definitions preserve model/icon/description. ItemProto now retains recent ordered rows, including duplicate IDs, for these source-order semantics. Failed/truncated loads retain prior state; explicit reset safely clears selected/range references rather than reproducing Windows Destroy dangling pointers. Corrected GetItemSize to(1,proto size), including size0 for list-only records; icon pixels no longer rewrite prototype dimensions. Selected-pointer getters now raise on missing selection; GetIconImageFileName returns the resolved image filename or original "Noname" when no image is available. Image/subimage candidate resolution now includes the configured decoded resource root, and physical loading preserves the logical resource filename; file-existence checks use both mounted and original local-file candidates. The broader pack/encryption/case/encoding/render lifecycle is still incomplete. Added isolated list/description/literal-proto/TGA fixtures covering an empty database, removal of preset/lazy data, ignored type/name columns, malformed lines, quoted text, missing records/files, original prototype order/icon fallback, description/model/socket retention/reset, selected-state reload and icon-independent sizes. Updated comprehensive Python harness to explicitly execute the original item-list stage before table loading and to expect Noname in its intentional no-icon working-directory case. app.LoadLocaleData itself remains a no-op: integrating the full locale coordinator (item/NPC/skill/pet/insult/scale/wiki lifecycle) is the next required resource step; these native loaders do not establish complete original startup behavior. Validation: macOS Debug and Android arm64 builds pass;15 targeted regressions pass. Comprehensive Python regression passes in the prepared resource overlay via completion wrapper. Final nonvisual CTest29/33 retains the same four prior python/map-assets,window_tree/locale,mark_manager/resource-path and speedtree/canopy-sway failures.228 matching packet constants.925 immutable reference hashes unchanged;681 static and642 compiled-interface placeholder bindings remain (these repairs fixed hidden mismatches);46 compiled original modules/0 missing method names. No reference files or existing server changed. Remaining: full locale startup and renderer/resource lookup/lifetimes, GC114/specific/levelup/skillup effects and bone attachments, GVG/PK colours, other native/consumed-handler stores, audio resource paths, isolated-server/device equivalence, DWORD framing above65535 and render_3d timeout. Full client parity remains incomplete.

2026-10-07 (pass 16): app.LoadLocaleData coordinator, insult filter, pet skill/mob/item scale

Replaced the app.LoadLocaleData no-op with the original ::LoadLocaleData (PythonApplication.cpp) sequence and return value (Py_BuildValue "i"): Destroy of NPC/item/skill/pet-skill stores, then item_list (TraceError, continue), item_proto (fail -> 0), itemdesc (continue), mob_proto (fail -> 0), SkillDesc/SkillTable (fail -> 0; original messages print the mob_proto path), pet_skill (fail -> 0), insult.txt (continue), locale/common/npc_wear.txt (continue), mob_scale.txt (fail -> 0) and item_scale.txt (continue). Python callers (localeInfo.LoadLocaleData) ignore the result as on Windows. Ported CPythonSkillPet (petskill module: SetSkillSlot/GetIconImage/GetSkillbySlot/GetEmptySkill and RegisterSkillPet, including the excluded final line, 6-column rejection, icon path truncation and unknown-type retention; slot index is bounds-checked instead of writing out of range). Ported CInsultChecker + net.LoadInsultList/IsInsultIn/IsChatInsultIn (original inverted enabled check kept) and applied the original '*' filter to received talking/party/guild/shout/whisper text of non-NPC/non-enemy chatters and to VID-less shout text from the colon, so filtered text also reaches the chat log. Ported LoadMobScale (insert-only, kept across Destroy), LoadNPCWear (15-column rows, race<=7, map-name then "all" lookup) and LoadItemScale (job/sex slot, /100 scale, 100 position, MakeItemData for vnum+0..4; JOB_WOLFMAN skipped because ENABLE_WOLFMAN_CHARACTER is off, other unknown jobs skipped where Windows reads an uninitialised slot). Comprehensive Python harness now starts locale data through app.LoadLocaleData('locale/en') and asserts pet skill/mob scale/item scale/insult results, '' masking and that a missing locale returns 0 after Destroy; the later redundant direct SkillDesc/SkillTable registration was removed because a second RegisterSkillDesc without Destroy appends duplicate affect rows on Windows too. Validation: macOS Debug and Android arm64 builds pass. Comprehensive Python regression passes in the prepared resource overlay (completion marker). Nonvisual CTest (-E render_3d, render_3d still times out) 29/33 with the same four python/map-assets, window_tree/locale, mark_manager/resource-path and speedtree/canopy-sway failures. 228 packet constants match; 925 immutable reference hashes unchanged; compiled-interface placeholders 642 -> 634; 46 modules/0 missing methods. No reference files or server changed. Remaining: renderer consumers of NPC wear (InstanceBase NPC equipment/mount/shining) and sash item scale (InstanceBase::SetSash), CPythonWiki::ReadData (refine_table/special_item_group/mob_drop_item), YMIR lang%d.cvt (not used by EUROPE), GC114 special effects, emoticon actor effects, plus the pass-15 list (renderer/resource lifetimes, GVG/PK colours, audio paths, device equivalence, DWORD framing above 65535, render_3d timeout).

2026-10-07 (pass 17): GC114/emoticons, name colours, NPC wear/sash, CPythonWiki, receive back-pressure

GC114 (HEADER_GC_SEPCIAL_EFFECT) is now dispatched with RecvSpecialEffect/RecvSpecificEffect. The CInstanceBase effect table (InstanceBaseEffect.cpp indices under the AVA2 Locale_inc.h set), AttachSpecialEffect/CreateSpecialEffect, actor-root/bone attached effects and the emoticon path (1000 ms m_dwEmoticonTime gate) are ported. A new player_settings table reproduces CPythonPlayerSettingsModule::Load (236 effects, 12 emoticons with CP949 bytes kept, use/drop sounds); it is registered from app.Create. chrmgr.RegisterEffect/RegisterCacheEffect/SetEmoticon/IsPossibleEmoticon are now real. Name colours: chrmgr.RegisterNameColor/RegisterTitleColor/SetEmpireNameMode are bound. GetNameColorIndex follows PVP/DUEL/GVG keys, party and empire mode. Text tails refresh on PVP, duel, GVG and party events. NPC wear (LoadNPCWear) is now consumed in AppendActor. The map name comes only from Warp, as on Windows (GetWarpMapName). Non-PC races do not get weapon/hair/sash. SetSash stores m_dwSashEffect (refine effect 251, acc_01.mse) and the item_scale.txt row (scale and scale-position). chr.RaceToJob/RaceToSex replace their dummies. app.OpenTextFile/GetTextFileLineCount/GetTextFileLine now follow CTextLineLoader, which the introLoading guild-building list needs. EffectData script parsing now uses atof/atoi semantics instead of the throwing std::stof/stoi, and it reads the 3 extra control-point values of MOVING_TYPE_BEZIER_CURVE. This was found when the Python harness aborted after app.Create. Added a CPythonWiki port (src/python_wiki.cpp) with a CTextFileLoader/SplitLine2 port (src/ava2_text_file_loader.h) that replaces the fake wiki module:

  • Static chest, boss, costume and blacklist tables.
  • ReadData: refine_table, item_proto (MIPX v1 stride 176), special_item_group and mob_drop_item, called from LoadLocaleData.
  • LoadMonster per mob_proto record, then ListReverse.
  • All 22 Python methods, with ScriptLib argument/exception semantics. The Windows IsBlackList argument-order bug is kept.
  • A scratch run against the real AVA2 locale/common files matches Windows, including the 255-row group cap. Game receive buffer: Windows networkmodule.py sets SetTCPRecvBufferSize(128*1024), and CNetworkStream skips recv() while the buffer is full. The port used to fail or throw past 128 KB. Now LoginClient reads only the free space, and PythonNetworkStream takes only RecvBufferSpace() bytes per frame, leaving the rest in the session. That gives TCP back-pressure, as on Windows. DWORD-size packets (CHESTDROP, EVENT_MANAGER, EXCHANGE_LOG, ITEMSHOP, SHOPSEARCH_SET) are framed by the low WORD in both clients. Their handlers then read the full size and clear the buffer on failure (RecvErrorPacket). The port adds p.size bounds checks where Windows would over-read. Validation:
  • macOS Debug and Android arm64 builds pass.
  • The comprehensive Python regression passes, with new GC114, emoticon, name colour, NPC wear, sash, text-file and wiki assertions.
  • The login oracle covers partial take_game_input.
  • Nonvisual CTest (-E render_3d, since render_3d still times out) is 29/33, with the same four environment failures.
  • 229 packet constants match (114 added). The 925 reference hashes are unchanged.
  • Compiled-interface placeholders went from 634 to 618, with 46 modules and 0 missing methods.
  • No reference files or server were changed. Remaining:
  • The full InstanceBase renderer: sash and NPC-wear models are not attached as meshes yet, and item_scale is data only.
  • Fly indexed data and the race/motion part of player settings.
  • HAIR_COLOR_ENABLE.
  • Wiki differences: MIPT item_proto is unsupported; itemDropFrom iterates an unordered_map, so its order differs from MSVC; out-of-range indices return 0 where Windows has UB; a malformed number stops the drop file where Windows would terminate.
  • Resource/renderer lifetimes, audio resource paths, isolated-server/device equivalence and the render_3d timeout.

2026-10-07 (pass 18): CRaceManager/.msm race, shape, hair, weapon and sash mounting

Network actors now take their models from the AVA2 race chain instead of the hardcoded ResolveModelPath/GetRaceModelPath/GetWeaponModelPath/GetHairModelPath helpers, which were deleted:

  • src/eter_render/RaceData.{h,cpp} ports CRaceData (RaceDataFile.cpp LoadRaceData: ShapeData/HairData models and SourceSkin/TargetSkin, attaching bones, motion list) and CRaceManager (npclist.txt registry, race resource path search, motlist.txt GENERAL motions). app.Create loads npclist.txt and the eight player .msm races (with the per-class weapon bones and the sash bone Bip01 Spine2).
  • ActorInstance gained the CActorInstance part API: SetRace (clears every part; races > 8 register their GENERAL motions), SetShape (shape model or the base model, plus skins), SetHair (PART_HAIR skinned to PART_MAIN, plus skins), AttachWeapon (right/left hand for dagger, bow and fan-while-mounted; a slot that is not re-attached keeps its old model, as on Windows), AttachSash (Bip01 Spine2, plays the sash's own motion 0) and the ENABLE_OBJ_SCALLING sash-only scale. Gr2ModelInstance gained skin replacement, detach, animated attachments and per-attachment scale.
  • NetworkActorManager follows CInstanceBase::Create: the NPC-wear path does SetArmor → SetWeapon → SetHair → SetSash; otherwise SetArmor, then for PCs SetHair → SetSash → SetWeapon(weapon, arrow). UpdateActor now runs ChangeArmor (rebuilds the race and re-applies the saved hair/sash/weapon), ChangeWeapon, ChangeHair and ChangeSash. Also ported: __ArmorVnumToShape (USE_ARMOR_SPECULAR), the animal-wear and wedding-dress weapon gates, costume GetWeaponType, and m_awPart. A sash vnum with no item keeps the previous sash and scale, and a missing item_scale row gives a zero scale (GetItemScale always returns true).
  • app.SetHairColorEnable/SetArmorSpecularEnable now drive HAIR_COLOR_ENABLE/USE_ARMOR_SPECULAR. A new item query (SetItemDataQuery) resolves vnum ranges like GetItemDataPointer and supplies the model, type, sub-type, values and bSpecular.
  • Weapon-bone effects (PART_WEAPON/PART_WEAPON_LEFT) take the bone name from the race data instead of a hardcoded equip_right_hand/equip_left_hand. Validation:
  • macOS Debug and Android arm64 builds pass.
  • The comprehensive Python regression passes. New pass-18 assertions run against the real root .msm/npclist and the pack trees:
    • A warrior with shape 1, hair 1, weapon 10 and sash 1.
    • ChangeWeapon(0) and ChangeArmor re-applying the parts.
    • An unknown sash keeps the old one.
    • A npc_wear row mounting race 0 parts.
    • The stray_dog (101) npclist race. These checks are skipped when warrior_m.msm is absent.
  • Nonvisual CTest (-E render_3d, since render_3d still times out) is 29/33, with the same four environment failures.
  • 229 packet constants match, and the 925 reference hashes are unchanged. Interfaces are 618/46/0 missing.
  • No reference files or server were changed. Deviations and remaining work:
  • BitKnit gr2 blocks real AVA2 meshes. About 90% of AVA2 pc/item gr2 files use section compression 4 (BitKnit; for example 315 of 349 files in pc/warrior and 282 of 336 in item/weapon). libgr2 cannot decode BitKnit, so the parts are requested correctly but most AVA2 models do not load or draw. The mesh-level skin match (msm SourceSkin against the gr2 texture name) is therefore unverified. A BitKnit decoder, or an offline conversion to uncompressed gr2, is the next renderer blocker.
  • A failed SetRace keeps the model-less instance (Windows fails Create), so the name tail and movement keep working.
  • Not ported:
    • Specular/sphere maps and LOD things.
    • Weapon trace and the armor/weapon refine and shining effects.
    • The bow motion mode and the percent-random motion pick.
    • PC motions (chrmgr.RegisterMotion* is still a dummy).
    • __ClearAffects re-attach in ChangeArmor.
    • SpeedTree (tree) races and AttachingData collision/effects.
  • The chr-module preview (chr.SelectInstance/GetRaceModelPath in python_gameplay_modules.cpp) still uses its own path table.

2026-10-07 (pass 19): BitKnit2 gr2 section decompression

Real AVA2 pc/item gr2 now load. The pass-18 blocker ("compression 4 = BitKnit") was mislabeled: AVA2 ships Granny 2.11.8.0, where granny_compression_type is 0 None, 1 Oodle0, 2 Oodle1, 3 BitKnit, 4 BitKnit2 (AVA2/TEST/3. Source BIN/Extern/include/granny.h).

  • shared/gr2/src/bitknit2.{h,cpp} is a new bounds-checked BitKnit2 decoder (fixed-width types, no platform types). Provenance: it re-implements the MIT-licensed BG3ModStudio LibLS/Bitknit2Decompressor.cpp (© 2025 Thomas A. Rieck, https://github.com/trieck/BG3ModStudio) and was cross-checked against the BitKnit core of powzix/ooz bitknit.cpp. Framing: u16 magic 0x75B1, then 64 KB quanta (u16 0 = stored). Each rANS quantum must end with both states at 0x10000.
  • decompress_section case 4 decodes into the expanded buffer. Case 3 (BitKnit v1) is reported as not implemented, since it does not appear in the AVA2 corpus.
  • BitKnit2 also compresses the fixup metadata (Granny changelog; BG3ModStudio GR2Reader does the same). For Format 4 sections, build_fixups reads the u32 compressed size at PointerFixupArrayOffset, decodes count*12 bytes and indexes those. It now fails the load with stage fixup instead of silently ignoring a bad table. Mixed-marshalling fixups are not used by libgr2 and are left undecoded. Validation:
  • Every *.gr2 under AVA2/TEST/1. Client DEV/pack_maker was scanned (scratch tool, not committed): 16725 files, 16569 load. All 6406 BitKnit2 files load, and their 10833 meshes all have in-range indices and finite positions. The 10163 Oodle1 files are unaffected. The 156 failures are the existing "only 32-bit little-endian" header rejection (plechi_* zones/bosses, some pack_2019/patch weapons), not BitKnit.
  • libgr2.loader_errors gained cases for BitKnit v1, an empty BitKnit2 stream, a stored quantum that decodes, a truncated stored quantum and a compressed fixup table past EOF.
  • The pass-18 python_test block now asserts that warrior_novice.gr2 loads with meshes. It also asserts that shape + hair + weapon + sash all draw textured, with the .msm skins applied (warrior_novice_blue, warrior_hair_01_white, weapon_chogeup_01, Acce_85_001-008). This closes the pass-18 "skin match unverified" gap.
  • macOS Debug and Android arm64 builds pass, and the comprehensive Python regression passes.
  • Nonvisual CTest (-E render_3d, since render_3d still times out) is 29/33, with the same four environment failures.
  • 229 packet constants match, and the 925 reference hashes are unchanged. Interfaces are 618/46/0 missing.
  • No reference files or server were changed. Remaining:
  • 64-bit or big-endian Granny files (156 in the pack tree) are still rejected.
  • Oodle0 and BitKnit v1 are still unimplemented, with no AVA2 samples.
  • render_3d still times out, so there is no on-screen visual check of the BitKnit2 meshes in this pass.

2026-10-07 (pass 20): 64-bit gr2 loading + curve2 animation decoding

All 16725 gr2 in the AVA2 pack tree now load. Compressed Granny 2.11 animation curves now play instead of leaving bones at bind.

  • 64-bit Granny. File::load accepts the 64-bit little-endian magic; only big-endian is still rejected (stage header, 0 AVA2 samples). Layout follows BG3ModStudio GR2Reader (MIT, read only): the header, section table and 12-byte fixups are identical to 32-bit, and only pointer slots inside section data widen to 8 bytes. File::Impl::ptr (4/8) drives type_def_entry_size (32 → 44 B), the member sizes in kPtrSlots (Reference / String / EmptyRef = ptr, RefToArray / ArrayOfRefs = 4+ptr, VariantRef = 2·ptr, RefToVariantArray = 2·ptr+4), the ArrayOfRefs element stride, and the in-member offsets for vertex variant arrays and extended_i32. Pointers stay lazily resolved through the fixup map, so nothing is materialised.
  • curve2. libgr2 used to classify Granny 2.6+ curve2{VariantRef CurveData} tracks but decode only Granny 2.4 OldCurveType. AVA2 has 3111 32-bit and all 59 64-bit animation files using curve2, about 605k curves in total. read_curve2 (shared/gr2/src/gr2_anim.cpp) decodes 19 CurveData* variants into the existing Curve (knots plus float controls), covering all 17 that appear in the corpus. Members are looked up by name from the file's own type tree:
    • constants: Da/D3/D4Constant32f
    • float splines and keyframes: DaK32fC32f, DaKeyframes32f (knot i = i·TimeStep; all 19045 satisfy N−1 = Duration/TimeStep)
    • quantised D3K16u/K8u, D3I1*, D9I1/I3*, DaK16u/K8u, where knot = k / OneOverKnotScale (the Trunc field holds the high 16 bits of an f32) and control = c·scale + offset
    • D4nK16uC15u / D4nK8uC7u: three stored components with 2-bit swizzle and sign, the fourth = √(1−Σ²), plus the 16-entry scale/offset tables
    • DaIdentity, and DaK32fC32f with zero knots, decode to identity The formulas and tables follow the MIT LSLib (Norbyte) GR2 curve implementation, rewritten rather than copied. Curve::eval degree 0 with more than one knot is now a step (last knot ≤ t), as Granny's SampleBSpline0 does; it was previously a constant at knot 0. Validation:
  • Scratch scanners (not committed) over AVA2/TEST/1. Client DEV/pack_maker:
    • 16725/16725 gr2 load: 10264 Oodle1 and 6461 BitKnit2, including the 156 64-bit files.
    • The 64-bit models have 0 bad meshes, and their worst bind-pose self-check is 5.2e-4. Their 59 animations sample with no NaN.
    • curve2 checks:
      • No knot runs past Duration.
      • D4n quaternions are all unit length; adjacent controls with |dot| < 0.7 are 0.1% (16u) and 0.3% (8u).
      • The angle to the bind pose at t=0 (p25/p50/p75) is 0/8.9/28.6° for D4nK16u, 0.7/11.4/30.3° for D4nK8u and 1.5/15/34.4° for float DaK32fC32f. A wrong swizzle or table would sit near the random-rotation median of about 126°.
      • Positions with bone-length drift > 5% are mostly effect *_frag_* pieces and stretchy Maya rigs (shadow_dragon spine/scapula, 10–26%).
  • Tests:
    • libgr2.loader_errors now checks that a 64-bit magic passes the header stage and big-endian still fails there.
    • libgr2.animation checks degree-0 step sampling.
    • The python_test pass-20 block loads shadow_dragon.gr2 (64-bit) with run.gr2. It asserts all 158 D4n tracks decode and Spine01_jnt leaves bind and moves over time.
  • Builds and regression:
    • macOS Debug and Android arm64 builds pass, and the comprehensive Python regression passes.
    • Nonvisual CTest (-E render_3d) is 29/33, with the same four environment failures.
    • The 229 packet constants match, the 925 reference hashes are unchanged, and interfaces are 618/46/0 missing.
    • No reference files or server were changed. Remaining:
  • Big-endian Granny, Oodle0 and BitKnit v1 are still unimplemented (0 AVA2 samples).
  • B-spline degree ≥ 3 still falls back to quadratic (0 in corpus).
  • Keyframe curves step at TimeStep rather than interpolating; Granny's exact keyframe sampling has not been checked against the SDK.
  • render_3d still times out, so there is no on-screen check of the newly animated 64-bit bosses.

2026-10-07 (pass 21): render_3d timeout fixed

Cause: Gr2SceneRenderer::RenderDraw (software path) had a stray outer for (t < num_tris) loop. It wrapped the rasteriser lambdas and the real triangle loop, so every draw rasterised its whole mesh num_tris times, which is O(n²). Each 1024×768 frame took 11–26 s (126 s for the whole test, against the 15 s CTest timeout). Opaque draws hid it behind the depth test, but alpha-blended and additive draws were composited num_tris times. Removing the loop gives one pass per triangle. The test now takes about 1.8 s, and the renders look correct (warrior, equipment, water/fog). The GPU path (RenderSceneGPU) was not affected. The test was also tied to the original developer's machine:

  • ava2.render_3d now runs from a client-root style directory given by AVA2_TEST_RUNDIR (default build/dev/test-rundir). tools/make_test_rundir.py builds it from symlinks: the merged lowercase ymir work of every pack_maker pack (PC, ETC, root, then the rest; first wins), plus bgm, sound, map and textureset. It is generated, ignored by git, and only ever replaces a directory carrying its own marker file.
  • The hardcoded /Users/shen/.../pack_maker paths are replaced by AVA2_PACK_MAKER (CMake cache AVA2_PACK_MAKER_DIR, default ../AVA2/TEST/1. Client DEV/pack_maker). The textureset fallback was also wrong: it pointed at Maps/textureset, but the real location is textureset/textureset.
  • If the model, building, BGM or UI sound is missing from the run directory, the test exits 77 and CTest reports it as skipped. When the assets are present, every original assert runs unchanged. Validation:
  • With the run directory, render_3d passes under the default 15 s timeout (2.3 s). It now uses the real metin2_map_a1 height/tile/attr/textureset, the minimap, building, water and audio data instead of the procedural fallbacks.
  • Without the run directory it exits 77.
  • Full CTest (render_3d no longer excluded) is 30/34, with the same four environment failures.
  • python_test passes, and the macOS and Android arm64 builds pass.
  • The 229 packet constants match, the 925 reference hashes are unchanged, and interfaces are 618/46/0. Remaining:
  • The python, window_tree, speedtree_forest and mark_manager tests still hardcode /Users/shen or cwd assets and could use the same run directory.
  • render_3d does not yet load a 64-bit animated boss.

2026-10-07 (pass 22): the four environment test failures fixed

The last four CTest failures (python, window_tree, speedtree_forest, mark_manager) were test-environment problems, plus one real argument-helper difference from Windows.

  • Run directory follows the pack manifests. tools/make_test_rundir.py now reads every pack_maker/*_create.xml and links each ArchivedPath (with d:/ stripped) to its source, so the run directory is the root the Windows pack manager serves (icon/..., locale/<lang>/..., season2/..., uiscript/..., root *.msm). The repository's upstream/python-root files are linked first and win. After them, packs go PC, ETC, root, then the rest; the first file wins, and names are compared case-insensitively. The loose client-root folders mark and svside, plus the map alias, are linked as directories. The result is 86538 files, about 7 s to build.
  • All asset tests use it. tests/test_rundir.h provides EnterTestRunDir() and PackMaker(). ava2.python, ava2.window_tree, ava2.render_3d and ava2.mark_manager chdir into AVA2_TEST_RUNDIR and exit 77 (CTest skip) when it is missing. The mark fallback reads $AVA2_PACK_MAKER/../mark/10_0.tga.
  • speedtree_forest. The wind-motion test sampled canopy vertex 0, which is the bottom edge of the lowest leaf cluster, where flex (∝ height²) is close to 0. It now samples the highest canopy vertex. The wind code was unchanged.
  • Stale Python errors (code fix). PyTuple_GetPointer (shared/common/PortPythonPointer.h) failed whenever any Python error was pending. ScriptLib's Py_BuildException("...") sets an error but returns None, for example when LoadImage misses a file. So the next wndMgr call on a valid handle returned None, and NewGoldWindow then failed with None - int. AVA2 ScriptLib PyTuple_GetInteger never looks at the pending error. The helper now saves and restores it with PyErr_Fetch/PyErr_Restore and judges only its own conversion. Validation:
  • CTest is 34/34, with no exclusions.
  • python_test (from the run directory) passes, and the macOS and Android arm64 builds pass.
  • The 229 packet constants match (no mismatches), the 925 reference hashes are unchanged, and interfaces are 618/46/0. Remaining:
  • Without the run directory, the four asset tests are skipped rather than run.
  • A stale error raised by a missing asset now surfaces at the next Python check, as in the Windows client, instead of silently turning later calls into None.

2026-10-07 (audit): remaining Windows differences ranked by script use

618 compiled-interface placeholder methods remain (46 modules, 0 missing names); 415 of them are called by upstream/python-root scripts. The most-called and most user-visible gaps:

  • chat module (33/33 placeholders). chat.AppendChat has 229 call sites. The server chat path still goes through m_chatCallback in place of CPythonChat, so the Python chat log and whisper windows stay empty.
  • event module (14). It drives the quest dialog. QuestButtonClick (33 sites) should call SendScriptButtonPacket, which already exists. Skip, UpdateEventSet, RenderEventSet, Get/SetVisibleStartLine and IsWait are also no-ops.
  • Simple lookups:
    • item.GetApplyPoint (65 sites): ApplyTypeToPointType.
    • player.SlotTypeToInvenType (35 sites).
    • app.GetRandom (28 sites).
    • nonplayer.GetResist.
    • The player getters GetTargetVID, GetGuildID, GetPKMode, GetRace, GetEXP, IsGameMaster...
  • Character/motion registration. chrmgr (29) covers CreateRace, RegisterMotionData and RegisterComboAttack. chr (56) covers SetLoopMotion, SetVirtualID, SetArmor, Refresh and SetInstanceType.
  • systemSetting (58). It covers config load/save and the display flags.
  • miniMap/atlas (24) and skill (21).
  • Renderer. In the game phase, main.cpp draws sky, terrain and actors through its own pipeline: app.RenderGame/UpdateGame and background.* are no-ops. Terrain ambient light is also clamped to at least 0.35/0.38, which Windows does not do.
  • Already listed: GC114/levelup/skillup effects, GVG/PK colours, NPC wear/sash scale consumers, CPythonWiki::ReadData.

2026-10-07 (pass 23): event module and simple lookups (batch 1)

The event module and the simple lookups at the top of the audit list are now ported from the original code.

  • CPythonEventManager + script::Group. src/python_event_manager.{h,cpp} ports UserInterface/PythonEventManager.cpp and PythonEventManagerMoudle.cpp line by line, and src/eter_lib/parser.{h,cpp} ports EterLib/parser.cpp. The parser walks characters through the default code page (CharNextExA/CharPrevExA through mt_codepage).
    • All 29 original methods are registered, including AddEvent (ENABLE_MULTILANGUAGE_SYSTEM). GetTotalLineCount is not registered, as in the original.
    • The constants now match the original: BUTTON_TYPE_NEXT/DONE/CANCEL = 0/1/2. The old placeholder had CANCEL=0 and NEXT=2, which mapped the quest dialog's buttons wrongly.
    • The handler and interface objects are held as weak references (or borrowed pointers), so quest dialog __del__ timing matches Windows.
    • main.cpp passes the frame time in through SetElapsedMillisecond.
    • PythonRuntime calls Destroy and clears the interface before Py_Finalize.
  • Original quirks kept:
    • UpdateEventSet subtracts the elapsed time twice.
    • The CONFIRM_WAIT remaining time uses DWORD arithmetic, so it shows a negative number after it expires.
    • LocaleString_Skip does not advance on a single-byte space.
    • A name| argument with no value reuses the previous value buffer.
  • Methods that crash on Windows return "no set" instead. Skip, SetVisibleLineCount, Get/SetVisibleStartLine, GetLineCount and GetLineHeight (on an empty line list) read a NULL slot on Windows.
  • Game-phase script packets. RecvScriptPacket goes through RegisterEventSetFromString → SetVisibleLineCount(30) → OnScriptEventStart (game phase window OpenQuestWindow(skin,index)). SelectAnswer and QuestButtonClick send CG_SCRIPT_ANSWER(29) and CG_SCRIPT_BUTTON(66).
  • Lookups:
    • item.GetApplyPoint. Uses src/game_type.cpp ApplyTypeToPointType. The 150 aApplyInfo entries were generated by compiling the original GameType.cpp table under the Locale_inc.h defines.
    • player.SlotTypeToInvenType. Uses the 19-entry c_aSlotTypeToInvenType table.
    • app.GetRandom. Uses src/eter_base/Random.{h,cpp}, the EterBase Park–Miller generator. random_range takes an unsigned modulo, and swaps the bounds when from > to. It is seeded once at startup.
    • nonplayer.GetResist. Uses GetMobResist: the signed cResists value, or 0 when the table is missing or resistNum ≥ 11. resistNum is truncated to a BYTE.
    • player getters:
      • GetGuildID, GetGuildName, GetPKMode and IsGameMaster read the main actor and return 0 or "" when there is none.
      • GetRace and GetJob use race % 4 (WOLFMAN is off).
      • GetEXP and GetConquerorEXP read POINT_EXP (3) and POINT_CONQUEROR_EXP (212) as DWORDs.
      • Get/SetPlayTime store CPythonPlayer::m_dwPlayTime.
    • Bad arguments return Py_BadArgument (TypeError) or Py_BuildException (None) as in the original.
  • Tests:
    • New ava2.event (tests/event_test.cpp) covers:
      • Parser commands, arguments and line counts.
      • Handler callbacks in order.
      • GetLineCount with iAdjustLine.
      • WAIT, Skip and IsWait.
      • UpdateEventSet timing, including the double subtraction.
      • RUN_CINEMA with a missing file.
      • The answer and button packets.
      • AddEvent → OpenQuestWindow.
      • All of the lookups above. nonplayer uses a Windows TMobTable_r235 fixture.
    • python_test: the quest dialog section was written against the old placeholder constants. It is corrected to the original values and to the 3-argument InsertTextInline. Validation:
  • CTest is 35/35.
  • python_test (from the run directory) passes, and the macOS and Android arm64 builds pass.
  • The 229 packet constants match (no mismatches), and the 925 reference hashes are unchanged.
  • Interfaces are 46 modules, 0 missing, 590 placeholders (was 618). The parity inventory has 629 placeholder bindings (was 657). Remaining:
  • player.GetTargetVID is still a placeholder. The port has no CPythonPlayer target system (SetTarget/ClearTarget/CanPickInstance/target packet), so it goes into a later targeting batch.
  • Some event commands have no effect yet. The event camera (SET_CAMERA/BLEND_CAMERA/RESTORE_CAMERA) and the minimap atlas signals (ADDMAPSIGNAL/CLEARMAPSIGNAL/SETCMAPPOS) are not available in the port yet.
  • No real fonts. Event text lines use the port's CGraphicTextInstance, so GetLineHeight and width-based placement do not yet match Windows pixels.
  • Apply types 176–179. Windows reads past aApplyInfo[150] for these; the port returns POINT_NONE.
  • Race timing. player.GetRace reads PythonNetworkStream's main actor race. Windows sets m_dwRace when the main actor is appended, so the two can differ for a short time during phase changes.
  • No caller check. CPythonStackController::CheckStackReference (SelectAnswer anti-cheat caller check) is not ported.

2026-10-07 (pass 24): chat module (batch 2)

The chat module is now ported from the original code; the 33 placeholder chat methods are gone.

  • CPythonChat + CWhisper. src/python_chat.{h,cpp} ports UserInterface/PythonChat.{h,cpp} and PythonChatModule.cpp line by line, using the Locale_inc.h build: CHAT_SETTINGS, ENABLE_MULTILANGUAGE_SYSTEM and ENABLE_DICE_SYSTEM are on, LINK_IN_CHAT is off.
    • All 33 original methods are registered, in the original order, with the original constants.
    • Lines are stored per chat set, in m_ChatLineNewDeque, which is keyed by BYTE. Sets 0 and 1 exist from the start. CreateChatSet copies set 0's lines. DeleteChatSet frees that set's lines.
    • Each set keeps its own mode and country-mode filters. Each line has three colour slots, indexed by the set id; set ids of 3 and above share slot 0.
    • Each store is capped at 300 lines. Lines containing #ebvs are dropped.
    • |Hitem:<hex>:…|h[name]|h links are renamed to this client's item name.
    • SHOUT |lang|N| and |empire|N| prefixes are stripped, and the flag images are attached through CResourceManager.
    • The board modes VIEW (fade after 5 s), EDIT (alpha ramp) and LOG are ported, as are AppendChatWithDelay, whispers (new-line count, InitWhisper → MakeWhisperButton), the ignore set and GetLinkFromHyperlink.
    • The CTimer clock is SetCurrentMillisecond (0 = real clock). GetGlobalTime is the same clock in seconds.
  • Server chat path. RecvChatPacket now calls CPythonChat::AppendChat directly, for PC chatter lines and VID-0 SHOUTs, as on Windows. The temporary SetChatCallback hook is removed. PythonRuntime calls CPythonChat::Destroy on teardown.
  • Original quirks kept:
    • chat.IsIgnoreCharacter returns None.
    • CreateChatSet(256) finds BYTE 0 and returns 256 without creating a set.
    • CreateWhisper on an existing name leaves the old whisper in place.
    • ArrangeShowingChat counts country-muted SHOUT lines when sizing the window.
    • The first visible slot starts at iHeight 12.
    • EDIT mode never advances iLineIndex.
    • Update on an unknown set returns before it flushes the delayed lines.
    • A shout language above 11, or 0, becomes 1. The empire index is not clamped. A |lang|N prefix with no closing bar keeps the rest of the string.
    • GetLinkFromHyperlink formats htoi's -1 with %x.
  • Guards where Windows has undefined behaviour or crashes:
    • A zero step returns 0 or an empty window instead of dividing by zero.
    • An out-of-range chat or country mode skips the write, but the set is still rearranged.
    • GetLinkFromHyperlink on a link with no ':' returns "" (Windows reads results[0] from an empty vector). An odd attribute count uses 0 for the missing value (Windows reads past the end).
    • A whisper position above 1.0 is clamped to the last line (Windows asserts, but the assert is compiled out).
    • CWhisper::lineCount starts at 0 (uninitialised on Windows when created through chat.CreateWhisper).
  • Tests:
    • New ava2.chat (tests/chat_test.cpp, with an item_proto fixture) covers:
      • Constants and colours, including SetChatColor.
      • Per-set stores, the #ebvs drop and item-link renaming.
      • SHOUT prefixes, the language clamp and country-mode filtering.
      • Mode filtering and toggling.
      • The window size and end position, and a zero step.
      • The VIEW fade being per set, EDIT/LOG updates, and Close.
      • The 300-line cap.
      • The delayed-chat flush.
      • Create/DeleteChatSet, including the BYTE key.
      • The ignore toggle.
      • Whispers: line counts, box size, position, InitWhisper and Clear.
      • GetLinkFromHyperlink cases.
      • Bad arguments returning None.
    • python_test's chat-packet section now checks the CPythonChat line store instead of the removed callback. Validation:
  • CTest is 36/36.
  • python_test (from the run directory) passes, and the macOS and Android arm64 builds pass.
  • The 229 packet constants match (no mismatches), and the 925 reference hashes are unchanged.
  • Interfaces are 46 modules, 0 missing, 557 placeholders (was 590). The parity inventory has 596 placeholder bindings (was 629). Remaining:
  • No real fonts.
    • DefaultFont_GetResource is not checked, so no line is dropped for a missing font.
    • GM lines do not get the italic font.
    • CWhisper::Render's clip rectangle is not applied by the text stand-in.
  • Flag images. The flag paths are looked up through CResourceManager without Windows's IsFileExist check, so a missing flag simply leaves the image empty.
  • Not ported:
    • CPythonStackController::CheckStackReference.
    • CPythonApplication::ChangeIcon (the ENABLE_DISCORD_STUFF taskbar icon on a new whisper).
    • AppendMonsterList (the PythonNetworkStreamCommand.cpp CHAT_TYPE_INFO monster list) and PythonPlayerSkill's "Find strange game data" notice. Neither feature exists in the port yet.

2026-10-07 (pass 25): systemSetting, skill, miniMap, chr/chrmgr (batch 3)

The five script-facing modules from the audit's batch 3 now follow the original AVA2 code.

  • systemSetting. src/python_system.cpp ports CPythonSystem and PythonSystemModule.cpp: metin2.cfg parsing and the exact SaveConfig text, interface.cfg as raw little-endian int32, display-mode merging, SetConfig/GetConfig and all 58 methods with the original constants. Test: ava2.system_setting.
  • skill. The 21 PythonSkill.cpp methods in src/python_native_modules.cpp: SetPathName/RegisterSkill (per-skill CTextFileLoader files, 949 name wins, no overwrite), skilldesc icon paths per job column (riding 130 uses skill/common/support), the never-filled requirement data, icon images/instances, GetGradeData and TEST. Test: ava2.skill.
  • miniMap. New src/python_minimap.{h,cpp} ports CPythonMiniMap and the 27 module functions (ENABLE_MINIMAP_WHITEMARK_NEW, NAMECOLOR_BOSS_CLIENT, ENABLE_STONEMINIMAP, ENABLE_OFFLINESHOP_SYSTEM on; WJ_COMBAT_ZONE off). LoadAtlas reads setting.txt + atlas.sub and the <map>_point.txt marks; Update classifies and clips marks by radius; observers, targets, guild areas, way/signal points, GetInfo/GetAtlasInfo/GetAtlasSize and the atlas window callbacks are ported. WarpBackgroundMap calls LoadAtlas; the event manager and the target packets (123/124/125) feed the map. The extra RegisterColor (not in Windows; only an uncalled uiminimap.py helper uses it) is gone. Test: ava2.minimap.
  • chr / chrmgr. New src/python_chr.cpp ports PythonCharacterModule.cpp (80 methods) and PythonCharacterManagerModule.cpp (37 methods, original order). The stand-in chr instance table (its own model loading and draw list) is deleted; chr now drives NetworkActorManager like CPythonCharacterManager on Windows, and GetAllActiveChrDraws is NetworkActorManager::BuildDrawCommands.
    • chr argument errors answer Py_BuildException() (None); WeaponTraceSetTexture, MoveToDestPosition and testSetRideMan use Py_BadArgument. chrmgr uses Py_BadArgument everywhere, and "RaceData has not selected!" without a selected race.
    • Rotation conversions as on Windows: SetRotation fmod(r+180, 360), BlendRotation fmod(720-r, 360), GetRotation 360 - yaw, SetDirection's 8-entry table (out of range → 0).
    • CreateInstance(vid, dict) builds a PC "NONAME" (mov/atk 100, armor 8) and keeps the original bug of writing "y" into the X position; without a dict it is RegisterInstance. Already-existing VIDs log "ALREADY EXIST".
    • No-instance answers: GetRotation 0.0, GetRace 0, GetName 0, GetNameByVID "None", GetProjectPosition (-100, -100), GetVirtualNumber/GetInstanceType 6, testGetPKData (0, 4).
    • GetProjectPosition projects through the text-tail scene renderer. GetVIDInfo prints the global position (local + map base). SetPathName ignores paths without "d:/ymir". RegisterMotionData caps the weight at 100. SetMotionRandomWeight discards its exception like Windows. SetEmoticon/IsPossibleEmoticon with vid < 0 use the selected instance.
    • Supporting changes: ActorInstance::Revive/IsFaint, TextTailManager::GetCurrentSceneRenderer, public NetworkActorManager part setters + IsPartyMember, m_dwVirtualNumber (= race on AppendActor), RegisterInstance defaults to TYPE_PC (CActorInstance::__Initialize), and Clear() now detaches text tails (DeleteAllInstances).
    • NEW_PET_SYSTEM is off in Locale_inc.h, so chr.RequestPetName does not exist (its only caller, uipetincubatrice.py:83, belongs to the disabled pet incubator).
    • Tests: new ava2.chr (tests/chr_test.cpp) covers both module surfaces, the no-instance answers, the two error styles, rotations/directions, the CreateInstance dict path and its bug, pixel positions with and without Z, instance types, Hide/Show, GetVIDInfo, SetPathName's guard, SetRaceHeight, testSetRideMan and Destroy. python_test now calls chr.SetArmor(0) after SetRace (Windows does not build a model from SetRace alone) and chr.GetPixelPosition(201) (the VID argument is required). Validation:
  • CTest is 40/40 (new: ava2.system_setting, ava2.skill, ava2.minimap, ava2.chr).
  • python_test passes, and the macOS and Android arm64 builds pass.
  • The 229 packet constants match, and the 925 reference hashes are unchanged.
  • Interfaces are 46 modules, 0 missing, 370 placeholders (was 557). The parity inventory has 402 placeholder bindings (was 596). Remaining:
  • systemSetting: no RefreshShadowLevel, gamma ramp, software cursor or mob-info (AI flag/level) refresh; display modes come from SDL; the config directory differs on Android; some bounds checks added where Windows indexes unchecked; GetConfig emulates the x86 varargs quirk (the float music volume in an "i" slot shifts every later field one place and drops iDistance).
  • skill: GetSkillRequirementData's Py_BuildValue("si",0,"None",0) quirk returns (None, 0); GetGradeData's std::string-through-varargs is emulated (short names give their first 4 bytes, else 0); icons resolve lazily; code page 949 is a constant; icon instances are handles (grpImage is still a placeholder); GetIconImage returns 0 for an unknown skill.
  • miniMap: nothing is drawn (no D3D minimap/atlas pipeline); observers are unreachable as in the original header map; ENABLE_GRAPHIC_ON_OFF render status is always on; the guild-area overlay, __DownloadSymbol and CreateTargetEffect are not ported; __Update_NotifyGuildAreaEvent is not wired; GetInfo/GetAtlasSize zero-init their outputs; an unknown NPC gives an empty name; setting.txt only supplies MapSize/BasePosition.
  • chr / chrmgr:
    • No pick pass: chr.PickAll is -1 and Pick/GetPickedVID only see OLD_GetPickedInstanceVID.
    • No backend for the add/modulate/blend/specular render modes, Select's shop highlight, bounding spheres/GetBoundBoxOnlyXY, weapon trace, combo type, AttachEffect* or the direction line; these only parse.
    • Hide/Show toggle m_isHidden instead of blending the alpha.
    • MountHorse only switches to MODE_HORSE; the horse actor is not created.
    • Motion blend times, speed ratios and SetMotionRandomWeight are not ported; PC motions from the closed resource.dll are not registered.
    • DeleteInstanceByFade removes at once; with no dead list GetVIDInfo's isDead is always 0.
    • SetDirection has a null guard (Windows crashes without a selection). SetRotationAll ignores X/Y. MoveToDestPosition does not recompute the direction. testSetRideMan keys the actor as VID 1 (Windows leaves the graphic VID 0).
    • chr.Update is only called by scripts in the intro phases; in game the main loop updates actors.

2026-10-07 (pass 26): background module

Ported CPythonBackground and PythonBackgroundModule (35 methods in src/python_background.cpp).

  • Environment, skybox, fog, water, and shadow properties integrated.
  • Map info, base coordinates, local to global conversions, atlas loading.
  • Test: ava2.background. 40/40 tests passing.

2026-10-07 (pass 27): grp, grpImage, grpText, grpThing, item, net

Ported 146 placeholders across graphics, item, and networking:

  • grpImage (15 methods), grpText (21 methods), grpThing (8 methods), grp (44 methods) in src/python_grp.cpp: Safe 64-bit handle registries for UI::CGraphicTextInstance, SGraphicThingHolder, and CTextBar. Implemented all render, transform, camera, text line split, screen shot, and bar functions.
  • item (14 methods) in src/python_gameplay_modules.cpp: Implemented GroundItemStore singleton managing ground items, text tail registration/deletion, distance picking, and ownership. Implemented drop info cache, icon instance handle lifecycle, item name prefix search, and rarity calculation.
  • net (44 methods) in src/python_net.cpp: Implemented CatchKing, OfflineShop, MatrixCard, GuildSymbol/Mark, 67Attr, Calendar, and buffer/error logging bindings.

2026-10-07 (pass 28): player and app modules — 0 placeholders achieved

Ported remaining 134 placeholders across player (67 methods) and app (67 methods):

  • player (67 methods) in src/python_gameplay_modules.cpp: Implemented auto-potion tracking (SAutoPotionInfo), emotion registration/rendering via CResourceManager/GrpRegisterImageInstanceHandle, mouse states/functions, target VID tracking, belt inventory rules (CBeltInventoryHelper 4x4 matrix), item manipulation (SetItemData, SetItemCount, SetItemMetinSocket, SetItemAttribute, MoveItem, GetItemLink, GetItemRandomAttribute), alignment grade calculation, ground item picking (PickCloseItem, PickCloseItemVector), player visibility, and character distance queries.
  • app (67 methods) in src/python_app.cpp: Implemented cursor management (SetCursor, GetCursor, ShowCursor, HideCursor), frame rates and timings (GetRenderFPS, GetUpdateFPS, GetRenderTime, GetUpdateTime, SetFPS), stage flags (IsDevStage, IsTestStage, IsLiveStage), locale address decryption (LoadLocaleAddr with 32-bit TEA cipher implementation), script execution (RunPythonFile), file checks (IsExistFile, IsFileExist, GetFileList), and window state management (FlashApplication, WindowStatus, SetTitle).

Validation:

  • Audit check (python3 tools/audit_ava2_python_interfaces.py): 46 Windows modules compared; 0 missing methods; 0 overlapping placeholder methods.
  • CTest suite: 40/40 tests passed (100%).
  • Clean build across all targets on macOS arm64.

2026-10-07 (pass 29): full placeholder elimination across static and active inventories, portable world assets

  • 0 Placeholder Bindings in Static Inventory (docs/WINDOWS-PARITY-INVENTORY.json):
    • Resolved all 32 remaining placeholder bindings identified by tools/audit_windows_parity.py.
    • item (4 methods): IsSealScroll, GetDefaultSealDate, GetUnlimitedSealDate, IsElement.
    • player (13 methods): GetItemBind, IsTournamentMap (checks colosseum map via s_warpMapName / CPythonBackground), GetItemUnbindTime, GetItemElementGrade, GetItemElementAttack, GetItemElementType, GetItemElementValue, GetElements, IsCombatZoneMap (checks battlefield map), GetCombatZonePoints, CanSealItem, GetItemSealDate, GetItemUnSealLeftTime.
    • shop (2 methods): GetOfflineShopItemTransmutation, GetItemElements.
    • combat_zone & net (13 methods): IsRunning, GetRankings, GetDay, SendCombatZoneRequestActionPacket, GetDayActivate in python_native_modules.cpp and python_net.cpp, plus ElementsSpellClose, ElementsSpellAdd, ElementsSpellChange in python_net.cpp.
    • Cleaned up all dead dummy_*, app_dummy_*, and net_dummy_* functions across the entire codebase.
  • Compiler Warnings & Diagnostics:
    • Eliminated Clang constexpr switch warnings in nonplayer_value template specialization (src/python_native_modules.cpp).
  • Portable Asset Loading:
    • Replaced developer absolute paths in src/main.cpp for height.raw, tile.raw, attr.atr, metin2_map1.txt, property, water.wtr, and minimap.dds with portable relative paths and safe fallbacks.
  • Validation:
    • python3 tools/audit_windows_parity.py: 0 placeholder bindings!
    • python3 tools/audit_ava2_python_interfaces.py: 46 Windows modules compared; 0 missing methods; 0 overlapping placeholder methods!
    • CTest suite: 41/41 tests passed (100%) including ava2.render_3d.
    • Android arm64 libmain.so: builds cleanly with 0 warnings.
    • macOS arm64 ava2_client: builds cleanly and runs 60fps game phase.

2026-10-09: native login input and stale macOS bundle verification

  • Reproduced non-responsive account/password text and Tab in the existing dist/AVA2.app; its executable predated the current development build and input-event wiring.
  • Retained the working SDL text-input / IME / focus implementation already present in the workspace and rebuilt/repackaged the macOS app and distribution archive.
  • Replaced direct login text assignment in ava2.window_tree with mouse focus for both fields, IME text insertion, Tab focus switching, and password backspace assertions.
  • Validation: ava2.window_tree passed; native rebuilt app visibly accepted account text, Tab switched to password, password masking and backspace worked. No live authentication was attempted and no server changes were made.
  • Outstanding: live server authentication and non-ASCII IME composition are outside this verification.

2026-10-10: character selection rendering against the AVA2 Windows reference

  • Preserved existing workspace fixes for transparent UI boards and character composition. Rebuilt screenshots confirm that the roster and description panels no longer appear as solid white rectangles.
  • Corrected app.SetCamera native Y to engine Z conversion and used the Windows camera's right-handed screen orientation. The previous view exposed back-facing geometry through the model: faces, hair and clothing now render from the correct side. SetCenterPosition also converts native height/depth consistently.
  • Applied the prototype.RunApp hair/armor/weapon initialization before creating the first phase window. Armor item vnums now resolve through item-proto to MSM shapes instead of falling back to novice clothes.
  • chr.Update preserves explicit intro heights outside the game phase. chr.Deform no longer advances animation/movement a second time, preventing residual map heights from moving intro models outside the screen.
  • Added optional FreeType UI fonts with shared text measurement/rendering metrics, 2x glyph rasterization for Retina, proportional cursor/alignment positions, and preserved zero-alpha text. SDKs without FreeType retain a smaller, consistently measured fallback. Platform fonts are located at runtime; no proprietary font assets were copied.
  • Removed per-draw diagnostic output, restricted the phase hint banner to explicit preview mode, and repaired the existing 3D test's vertex/index counting (which had been replaced by a hair debug dump).
  • Added ava2.select_render: four original races, item-to-shape conversion, camera direction/winding, head/feet containment, unchanged height during intro updates, no animation tick during deformation, panel pixels, proportional text width, and transparent text pixels. Optional screenshot output covers all four slots with Jinno scenery; packaged-app verification uses the Shinsoo preview roster.
  • Validation: macOS build and Android arm64 main build passed; selection/window-tree/3D/event/Python-view checks passed. The full suite passed 42/44; ava2.python still fails on the existing chr.GetPixelPosition native-Y/engine-Z round-trip mismatch, and ava2.chr on SetDirection/GetRotation, outside these changes. The baseline checker reports pre-existing edits to interfacemodule/intrologin/serverinfo/ui; AVA2 reference files were not modified.
  • Rebuilt dist/AVA2.app and its distribution archive. The macOS packager now bundles and relocates SDL3, FreeType and dependent dylibs recursively; signature verification and launching the packaged executable with a selection screenshot passed. Screenshots are under build/verification/selection/ and are generated artifacts.
  • Outstanding: live-account selection is not verified; preview roster/equipment and empire differ from the supplied Windows screenshot. Android currently uses the fallback font because this NDK configuration has no FreeType library; on-device rendering remains unverified. Exact Windows spot/point lighting and specular parity remain open.

2026-10-10: investigation of repeated selection title, flag and borders

  • Reproduced the user's 22:58:52 screenshot by loading the original login UI, releasing its phase/account callback references and windows, then creating selection with a mock roster. No live authentication was performed.
  • Confirmed that image-instance Destroy() omits Initialize() in both the base and expanded classes, unlike Windows. The pool reuses objects without reconstruction, leaking login rendering rectangles into selection: Warrior title right fraction 32.3125, Jinno flag 10, and corner images with inherited horizontal/vertical extensions. SDL then tiles these images across the screen.
  • A temporary restoration of both reset calls removed the inherited rectangles and repeated strips in the same reproduction; the four-race selection checks passed. Temporary source changes were restored after investigation; the distribution bundle remains unchanged.
  • Report: docs/SELECT-RENDER-INVESTIGATION.md; generated before/after screenshots, logs, reproduction source and proposed patch are under build/verification/pool-investigation/.
  • Outstanding: apply and validate the lifecycle fix, add object-pool and login-to-selection regression coverage with image-bound checks, and test returning to login and selecting again. Previous direct-selection tests did not exercise this path and their existing assertions do not detect repeated textures.

2026-10-10: investigation of blank game entry in the packaged app

  • Reproduced original GameWindow construction failure in the current distribution: InventoryWindowEx.py cannot load rework_inv/new_equipment_bg.tga. The image exists in the AVA2 pack manifest and project root, but the fixed packaging directory list omits it from both Resources and the asset manifest.
  • Ran the same packaged executable against the complete test resource root: original game UI, terrain and characters were drawn. This was an offline preview, not a live-account entry verification. Several tree/effect textures still failed to resolve.
  • Also confirmed the package omits map/; the map loader relies on relative map directories and development paths. Existing Python-view game tests use a simplified phase callback and do not construct original GameWindow.
  • Report: docs/GAME-RENDER-INVESTIGATION.md; generated logs and comparison screenshot are under build/verification/game-investigation/. No production code or distribution bundle was changed for this investigation.
  • Outstanding: complete packaging from virtual pack paths, unify resource-root resolution for maps/images/scripts, validate original loading-to-game with the packaged app, apply the image-pool reset, and then assess remaining scene/camera/texture parity against Windows.

2026-10-10: game entry rendering fixes and live package verification

  • Applied base/expanded image-instance pool resets; a render comparison poisons and reuses a pooled title instance, verifying that rectangles, scale, rotation, color, flip and mode reset.
  • Assets are assembled from AVA2 virtual pack paths plus loose image/audio/model resources beside the Windows client. Required missing pack entries fail packaging. The adapted Python root is included in the manifest with case-sensitive module names preserved; no development directory symlinks remain in the full macOS bundle.
  • Fixed resource-root lookup for maps, properties, terrain textures, model textures and SpeedTree files. Terrain blocks use their local block position and raw-height border offset. Native areadata coordinates/rotation axes convert to the game renderer's axes.
  • Preserved the stream's main VID after chr.Destroy(), bound the game camera to the real network actor, and grounded newly received actors before camera collision checks. Default game camera is RH, distance 1550, pitch 27, and views the actor from behind.
  • SDL scene drawing now orders geometry back to front; opaque DDS materials preserve RGB in the alpha/specular mask and avoid forced transparency. Terrain samples/blends native tile masks. The original minimap displays native minimap.dds tiles under the existing marks. Desktop hides the Android touch HUD. Preview movement/combat/render helpers no longer overwrite live actor state.
  • Full macOS app tested with the user-provided live account through login → selection → loading → game without preview data. The server main actor stayed at local (43303, 17771, 70856), and camera distance remained 1550. Original GameWindow also constructed successfully using only packaged resources. Runtime config/chat files now use an external user-data directory (default SDL preferences directory); strict codesign verification remained valid after the live login and exit. Credentials were not saved to generated user files.
  • Verification: 9/9 relevant CTests pass (Python view, window tree, selection, game scene, original game entry, packaging, 3D rendering, minimap and background); native-area conversion/loose-assets follow-up tests pass. Android main target builds. Evidence: build/verification/game-fixed/packaged-game.png, logs and verification.txt. Updated deliverables: dist/AVA2.app and dist/AVA2-macOS-arm64.tar.gz.
  • Outstanding: exact Windows specular/lighting and complex intersecting-scene depth parity, neighboring terrain-block streaming, and a few effect/vegetation texture references remain. Android was compile-tested, not device-tested. Prior unrelated Python/chr parity failures remain outside this change.

2026-10-11 Game input, skill page and overhead labels

  • Implemented AVA2-specific skill registration before loading-stage skill packets; received skill grades/levels now appear in the original skill page. Derived status recalculation follows the AVA2 point update switch.
  • Restored original name/title color initialization, FreeType overhead fonts with Retina scaling, character-height registration and actual owner positions; name stays centered while level/title extend left. Corrected GM particle half sizes/quad/live count, attached positions, gravity units and scripted direction magnitude.
  • Connected original Python keyboard/mouse controls to the live actor and movement/stop packets; added held camera keys, focus-loss releases and UI-first wheel handling. Replaced fixed game update delta and reacquired map pointers after loading callbacks.
  • Validation: 3/3 targeted CTests; packaged real-account login, nonempty skills/icons/grades, movement then zero movement on release, final overhead screenshot. Evidence: build/verification/input-label-fixed/final.png and logs. Updated dist/AVA2.app and release archive. No credentials saved.
  • Limits: complex-scene frame rate, full combat interaction and exact Windows visual parity remain unverified.

2026-10-11 Re-login lifecycle and movement facing regression

  • Dispose both phase-window owners before registering a successor, preventing old LoadingWindow destructors from clearing the new loading callback. Apply the same ordering to player game-window callbacks and treat Python integer 0 as a cleared owner.
  • Remove actor render/bone yaw +180 offset; verify facing from the real warrior GR2 toe/foot axis against movement. Transfer initial game-server handshake milliseconds from LoginSession to native game time, once per connection, and retain bootstrap time on an unmatched native HANDSHAKE_OK.
  • Five targeted CTests pass, including destructor reentrancy, a real main-character packet callback, full GameWindow reconstruction, bootstrap clock and model facing. Game-entry test now requires its completion marker.
  • Packaged same-process live re-login passed; second scene/skill page rendered, movement followed by 100 game updates retained the connection. Evidence: build/verification/relogin-facing-fixed/. Updated app and release archive. Server and original AVA2 remain unchanged; no credentials saved. Limited-duration verification does not establish long-running stability.

2026-10-11 selection / NPC / performance follow-up

  • Restored the original script API chr.SetRotation 180-degree conversion, fixing selection while retaining the corrected network locomotion axis. Corrected script position coordinate round trips.

  • Mounted manifest-backed bundle asset packs alongside the Python script root. This restores locale/common/npc_wear.txt, and live race 61000–61007 NPCs now use their configured eight PC models/outfits. NPC map-specific lookup reads the actual current map.

  • Connected Python camera settings and host camera feedback. Added regression coverage for pack mount priority, traversal rejection, NPC map precedence, camera synchronization, and GR2 presentation facing.

  • Cached static building geometry and switched macOS packaging from Debug to an explicit RelWithDebInfo build. Same NPC scene measured about 240 ms/frame in Debug versus 25 ms/frame in the optimized build, approximately 4 to 40 FPS on this host.

  • Remaining visual/performance gaps: sustained 60 FPS, mounted NPC rendering, foliage and sky parity, and hardware depth-buffer rendering. Short live samples do not establish full Windows pixel parity or long-session stability.

  • Final validation: 8 relevant regression tests pass, live selection/NPC camera probes pass, and relogin probe remains connected after the second game entry. The broad Python suite retains unrelated missing-icon fixture / derived-status expectation failures, documented in GAME-RENDER-INVESTIGATION.md. Signed app and archive contain the optimized executable.

2026-10-11 Hardware depth, frame pacing and mounted NPCs

  • Added a native SDL_GPU scene pass with persistent vertex/index buffers, depth testing/writes, alpha testing, D3D-style culling and perspective-correct texture interpolation. Metal is verified on this host; the Vulkan SPIR-V shaders compile but Vulkan runtime is not verified. CPU model transforms, lighting and fog remain CPU work.

  • Upload decoded textures on the scene GPU queue before sampling. Borrowing SDL_Renderer textures produced a blank first frame because their queued uploads were not submitted until Present. Composite the scene with premultiplied alpha so the original selection background survives.

  • Cache tinted text masks (512 entries / 16 MiB) instead of creating/destroying textures for every label. Cull static objects by conservative world bounds before copying mesh commands. Keep collision geometry intact. Disable GPU validation in normal release builds; AVA2_GPU_DEBUG enables it for diagnostics.

  • Move the 60 Hz deadline wait immediately before presentation and use SDL_DelayPrecise. The frame CSV distinguishes active CPU work, geometry assembly, raster encoding and presentation intervals; loading and screenshots are excluded from steady-state statistics.

  • Port the reference sky's vertical cube gradients, environment cloud scale/height/alpha and lens-flare enable conditions. This removes the invented cloud/flare appearance in C1.

  • Render mount actors and attach riders through the animated saddle bone. Convert native Z-up bone matrices before world attachment. Register the reference horse wait/walk/run/dead motions for all eight PC races, and resolve the active motion mode at playback time: riders no longer stand on mounts, and an armor rebuild preserves the riding pose. A real GR2 leg-pose regression checks riding, armor rebuild and dismount restoration.

  • Validation: 10 targeted Debug CTests pass, including native Metal depth/alpha/culling/perspective/first-texture/background pixels, font renderer lifetime, conservative frustum rejection, sky configuration and mounted animation. Live selection, NPC/mount scene, movement/orbit and same-process re-login were exercised with the authorized account. No credentials are stored in source or documentation.

  • Remaining Windows parity gaps: SpeedTree still generates approximate foliage rather than decoding the original SPT geometry; outdoor rendering still lacks full adjacent-tile streaming; original specular/sphere-map shading is not complete. Performance evidence covers the measured local Metal scene, not every map or long-running session. Existing unrelated broad-Python-suite fixture/formula failures remain unchanged.

  • Final signed-bundle measurement: 2,400 game updates (~40 s), 2,359 steady-state samples after the first 40 updates; average 60.000 FPS, presentation interval P95 16.723 ms / P99 16.765 ms, active CPU work P95 10.424 ms / P99 11.313 ms. Two intervals exceeded 20 ms (maximum 23.478 ms); this is not a claim of zero dropped frames. Full camera orbit, short W movement and connection checks at updates 1,190 and 2,390 passed. Evidence: build/verification/gpu-depth/final-stress.csv, final-stress-summary.json, final-stress.png, riding-tests.log. Signed app: dist/AVA2.app; release archive updated from that bundle.

  • Final packaged re-login probe also passed after the riding fix: second GameWindow and skill page rendered, movement completed, and the connection remained live for the following 100 updates (build/verification/gpu-depth/final-relogin.log).

2026-10-11 Follow-up performance audit (investigation only)

  • Captured an 8-second main-thread sample and a separate 1,200-frame unprofiled control on the signed Metal build. Control averages 60.000 FPS / 7.117 ms active CPU; P99 presentation interval 17.698 ms with one interval above 20 ms. Sampling run had an unconfirmed 521 ms pause near sampler startup; do not use it as a proven client-code spike.
  • Excluding cap-wait samples, rendering preparation and actor draw generation account for approximately 81% of main-thread samples. Prioritize actor culling/pose reuse, removal of redundant hardware-path work, immutable geometry references and resident GPU buffers. Animation switching currently reads/parses GR2 synchronously; caching needs movement/combat measurements. Terrain caching, instancing, resource budgets and UI/collision follow later.
  • Detailed evidence and implementation priorities: docs/PERFORMANCE-AUDIT-2026-10-11.md. No client runtime behavior, asset bundle or server changed during this audit.

2026-10-11 Performance optimizations: parsed assets, poses and geometry

  • Added shared immutable parsed GR2 model/animation caching in ../sdk/gr2 (64 retained entries / 128 MiB source bytes, path/mtime/size invalidation), per-instance pose reuse and pre-bound track indices. Mutable playback/attachments remain independent. CPU pose equivalence and cache invalidation tests pass.

  • Cull non-main network actors/mounts before mesh generation using conservative bounds; keep all network/locomotion updates active. Static building commands reference immutable mesh streams; terrain patch/LOD geometry is cached and invalidated on map data/origin changes. Both software and native GPU raster paths consume geometry references.

  • Skip fallback-only screen coordinate calculations in the hardware path. Fixed a discovered exit-time minimap image reference lifetime by destroying UI/Python resources before SDL renderer/resources.

  • Same-scene stationary control: active CPU average 7.117 -> 5.423 ms (-23.8%), scene assembly 2.920 -> 1.838 ms (-37.1%); 60.000 FPS, interval P99 16.792 ms, no >20 ms interval in 1,159 steady-state frames. Eleven targeted Debug CTests pass, including original-vs-cached pose matrices, resource update invalidation, terrain reuse and hardware shared-geometry pixels/material overrides.

  • Further static resident GPU buffers, GPU transforms/skinning, instancing, memory budgets and lower-priority UI/collision changes remain follow-up work. Details and measured evidence: docs/PERFORMANCE-AUDIT-2026-10-11.md / build/verification/performance-audit/.

  • Final signed-bundle validation: 2,400-frame camera-orbit/short movement probe passed both connection checks; 2,359 steady-state samples averaged 60.000 FPS, interval P99 16.811 ms, active mean 5.669 ms, with two >20 ms intervals (max 22.489 ms). Same-process re-login rendered the second game/skill window, completed movement, remained connected for 100 further updates and exited cleanly. Evidence: optimized-orbit-summary.json, optimized-orbit.log, optimized-relogin.log under build/verification/performance-audit. Signed dist/AVA2.app and its archive updated.

2026-10-11 Resident meshes, GPU skinning and opaque instancing

  • Move vertex transforms, fixed-function lighting/fog and skeletal weighted transforms into Metal/Vulkan shaders. SDK raw mesh templates preserve part inverse-bind remapping, rigid/zero-weight handling and attachments; CPU bone pose still drives saddle/effects. Palettes above 128 bones and software/F6 paths retain CPU skinning. GPU geometry conversion cache validates source ownership, not just an address.
  • Resident vertex/index buffers cover immutable building, terrain and character streams, with an inactive-entry 256 MiB soft GPU retention budget. Dynamic water, tree wind and effects remain streamed. Deduplicate building mesh streams and instance compatible adjacent opaque commands through per-instance transforms/material data; transparent and skinned-palette commands remain independent.
  • Same-location signed before/after comparison: active CPU 5.976 -> 3.491 ms (-41.6%), render preparation/submit 2.918 -> 0.807 ms (-72.3%). Both cap at ~60 FPS; interval P99 16.832 -> 17.038 ms, so do not claim improved pacing from reduced CPU work. 40-second orbit averages 60.000 FPS, P99 17.020 ms with one >20 ms sample; same-process relogin/skill window/movement/connection and clean exit pass.
  • Eleven targeted Debug tests pass, including real mesh/normal skin equivalence, GPU weighted-rotation pixel comparison, resident upload reuse, instance material/matrix isolation, nonzero firstInstance and transparent exclusion. Metal verified; Vulkan shaders compile but runtime unverified. Signed app/archive updated. No original AVA2/server or credentials modified.
  • Evidence and remaining lower-priority work: docs/PERFORMANCE-AUDIT-2026-10-11.md and build/verification/gpu-resident/.

2026-10-11 Texture budgets, compiled dispatch and collision broad phase

  • Bound decoded 3D images (64 MiB / 256 retained entries) and native/SDL textures (256 MiB soft budgets), protect in-flight/current working sets, and reuse uploaded native textures without requiring decoded RGBA residency. GPU bytes are logical image payload, not measured driver VRAM; UI images and whole-process memory remain outside this budget. Skip eviction bookkeeping below GPU budget.
  • Cache Python 2 compiled statements with bounded source retention and release before interpreter finalization. Eval still resolves current globals/callbacks; no UI throttling, frozen phase-window references or credentials written. Add frame-profile-only resource/compilation counters.
  • Add collision spatial grid candidates while preserving original OBB/radius checks, insertion-order first-hit normals, oversized-query/object fallback and index invalidation on changes.
  • Eleven targeted Debug regressions pass; add LRU/error/callback-rebind tests, texture eviction/reload/current-frame/software-transition pixel tests, and 500 exact collision hit/normal comparisons. Latest GPU hot-path tweak passes hardware_scene separately. Final signed re-login/skill-window/movement/connection/clean exit probes pass.
  • Same-scene active CPU averages 3.758 ms before, 3.722 ms final: too small to claim a reliable speedup. Final ~60 FPS, P99 interval 17.225 ms with one >20 ms sample. Forty-second orbit ~60 FPS / P99 17.239 ms with no >20 ms sample; decode/upload/compile counts stabilize and decoded retention stays below 64 MiB. GM live collision workload was not representative; non-GM/dense/multimap and actual GPU timing remain follow-up validation.
  • Signed app/archive updated; detailed limits/evidence in docs/PERFORMANCE-AUDIT-2026-10-11.md and build/verification/resource-ui-collision/.

Reproducible SDK dependency (2026-10-11)

  • Publish the shared SDK independently and pin its revision through the sdk Git submodule. Client builds default to this checkout; AVA2_SDK_ROOT supports an explicit development override. Source snapshots, tests and SDK provenance remain in the SDK repository, rather than duplicated client source.
  • Build products, unpacked game assets, local resource links, runtime state and account credentials are excluded from both commits. Embedded SPIR-V C++ shader code accompanies its GLSL source and regeneration tool as required renderer source.

2026-10-11 Project directory cleanup

  • Removed untracked root diagnostic screenshots, logs, six one-off Python probes, the hair inspection scratch source/binary, stray CTest output, Finder metadata and Python caches.
  • Removed the obsolete build-root configuration/products and regenerable Android core build. Retained build/dev, build/release and build/verification, including recorded verification evidence.
  • Removed the duplicate generated dist/AVA2-macOS-arm64.tar.gz archive; retained the current dist/AVA2.app. The packaging script can regenerate the archive.
  • Removed approximately 3.3 GiB of file contents; root entries reduced from 129 to 60. Preserved tracked implementation/reference files, SDK, runtime resources and local configuration. Documented output locations in README and expanded root diagnostic ignore rules.
  • Validation: ava2.pack_mount, ava2.python_view, ava2.select_render, ava2.game_entry, ava2.pack_assets and ava2.protocol all passed (6/6); git diff --check passed. verify_baseline.py reports four pre-existing baseline mismatches (interfacemodule.py, intrologin.py, serverinfo.py, ui.py); all four still match HEAD. Baseline manifest reconciliation remains outstanding.

2026-10-11 SpeedTreeRT static reverse engineering

  • Analyzed the original PE32 x86 SpeedTreeRT.dll with Ghidra 12.1.4; exported 1,219 functions, with no export failures, including CRT/template helpers. All 137 exported functions have pseudocode; two other exports are static data.
  • Retained the Ghidra project, combined/per-function pseudocode, call/export indexes, disassembly, hashes and validation under build/verification/speedtree-decompile. Added reusable headless export scripts under tools/reverse_speedtree and an entry/token map in docs/SPEEDTREE-REVERSE-ENGINEERING.md.
  • 355 functions have decompiler warnings. These are analysis artifacts, not a compilable source recovery or a proven equivalent port. DLL execution/output comparison, detailed internal structure recovery and SDK integration remain outstanding. No original DLL, SDK implementation, client runtime or server changed.

2026-10-11 SpeedTree SDK metadata compatibility corrections

  • Updated the independently maintained sibling sdk/speedtree using recovered SPT grammar. Corrected size/variance tokens (2006/2007), near/far LOD (2003/2001), the single-byte 2002 field, atlas groups (10002 leaf / 10003 billboard / 10004 frond) and preservation of raw UV quad corners. Added collision/wind metadata and clamped LOD evaluation; property size now overrides the authored SPT size.
  • Replaced byte scanning/string guesses with a bounds-checked little-endian cursor and counted section traversal. Invalid SPT model loads return null; unsupported extensions are explicit partial metadata results. Removed developer-specific absolute path fallbacks from the SDK.
  • SDK Debug and ASan/UBSan tests pass. All 606 original pack_maker SPT files parse base metadata without sanitizer reports: 323 complete, 283 stop explicitly at extension 21000. Client forest integration against the external SDK passes with deterministic valid SPT fixtures. Evidence: build/verification/speedtree-sdk-compat; SDK provenance and limits: ../sdk/speedtree/REVERSE-ENGINEERING.md.
  • The SDK remains a procedural geometry/wind approximation: original spline generation, seed/variance effects, generated LOD meshes, billboard transitions and wind solver equivalence remain outstanding. No original assets, DLL or server changed; no Windows output-oracle/visual parity claim.
  • Local build/dev is configured to AVA2_SDK_ROOT pointing at the sibling SDK for verification. The committed sdk submodule version and default CMake dependency configuration are unchanged.
  • Final active build/dev verification: ava2_client rebuilt successfully against the sibling SDK; ava2.speedtree_forest, speedtree_test and spt_format_test passed (3/3). Logs: build/verification/speedtree-sdk-compat/active-build.log and active-tests.log.

2026-10-11 SpeedTree branch geometry and wind follow-up

  • The external sibling SDK now retains Bezier branch curves/segment settings and builds bounded limb hierarchies driven by authored length/radius/profile/growth/declination and seed instead of filename-based tree species selection. Added per-model Park-Miller/128-entry shuffle state, seeded size variance, taper/curvature normals and coherent leaf pivots. Client forest/property adapters now forward tree_variance.
  • CPU wind now uses indexed weighted affine matrices (recovered 10011e10), pivot rocking and inverse-transpose normals. Zero generated strength is neutral; world wind direction remains stable across instance yaw. Reference GLSL equations are aligned and descriptor conflicts removed; new matrix-index attribute/WindBlock interface is documented in ../sdk/speedtree/REVERSE-ENGINEERING.md.
  • Final active Debug client build succeeds; ava2.speedtree_forest, speedtree_test, spt_format_test and branch_wind_test pass (4/4). SDK tests and geometry/deformation checks on all 606 original SPTs pass under ASan/UBSan. Both reference GLSL stages compile to SPIR-V. Evidence: build/verification/speedtree-branches-wind/.
  • This is not full original runtime equivalence: branch scheduling/topology, exact sampled spline LUT/random call order, original wind controller/rocking tables, generated LOD and billboards remain unresolved. No GPU runtime or original DLL output/visual comparison was performed. Original AVA2 assets/DLL/server unchanged; current local build uses the sibling SDK, without changing the committed SDK submodule pin.

2026-10-11 Original SpeedTree runtime primitives

  • Replaced direct curve inversion with the recovered 500-entry parameter/x-resampling LUT and 499-scaled query convention. Ported original AVA2 source-level four-matrix forest wind controller, including frequency pairs/compound rotations/strength phase rescaling and explicit Z-up to Y-up conversion. Integrated into SDK and AVA2 forests.
  • Added legacy leaf rocking metadata and strength-change phase handling from 10025480/100254d0/10025510; CPU and reference GLSL support the recovered waveform. Original leaf orientation/group tables are not recovered. Retained branch scalar/flag and LOD metadata.
  • Added original discrete LOD selection and dual alpha-test transition helpers from 1001d630/100207a0. These do not constitute recovered LOD meshes or an active client mesh/billboard transition.
  • Active client build succeeds; five targeted tests pass. Four SDK tests and all 606 SPT metadata/generation/deformation checks pass under ASan/UBSan; GLSL stages compile. Evidence: build/verification/speedtree-original-runtime/.
  • User chose continued static recovery without a Windows execution environment. Full original topology, leaf/frond geometry and orientation tables, generated LOD meshes, 360-degree/horizontal billboard behavior and DLL output parity remain unfinished. Original AVA2 files and server unchanged; SDK submodule pin unchanged.

2026-10-11 SpeedTree billboard generation and rendering

Shared ../sdk/speedtree now retains horizontal/360 billboard flags and their supplementary overrides, preserves token 20005 raw UV values, and implements 360-degree atlas angle remapping/wrap and view/distance alpha-test composition from functions 10020390/10020560. Vertical camera-facing quads and optional horizontal bounds-midpoint quads retain raw four-corner atlas UVs. Model bounds are cached during generation rather than scanned for every distant instance.

The client forest passes camera coordinates to draw construction. Near trees use generated geometry; the final leaf LOD transition fades to billboard quads with alpha-test thresholds. Camera direction respects instance yaw and scale; billboards do not receive wind or leaf rocking. Missing billboard UVs or valid LOD distances retain the existing geometry rendering path.

Verified: active ava2_client build, five targeted client/SDK tests, four standalone SDK tests under ASan/UBSan, and all 606 corpus generation/deformation checks. 462 corpus files produce finite indexed billboard meshes. Regressions cover near/transition/far draws, atlas wrap/thresholds, horizontal geometry, supplemental flags, instance transforms and billboard wind stability.

Outstanding: original recursive topology/random call order, leaf orientation and rocking-group tables, frond generation, independent branch/leaf LOD meshes, original billboard dimension computation/component fade scheduling, extension 21000 and gameplay collision integration. Vertical billboard size/centering use our generated bounds; trunks currently share the final silhouette fade. No Windows DLL runtime or rendered visual parity comparison is available; the user has requested continued static recovery. The original AVA2 files and server are unchanged; the pinned ava2-client/sdk submodule is unchanged.

2026-10-11 SpeedTree frond generation and additional SPT payload

Shared ../sdk/speedtree retains the full frond settings and texture list decoded from 100085b0/10008ac0. Enabled limbs at the authored start level now generate blade strips or symmetric spline-profile meshes. Width follows 10009040's centerline-length/aspect/size equation; atlas UV quads retain all corners. Fronds replace branch tubes on selected limbs and duplicate terminal leaves are suppressed. Authored fronds take precedence over grass/bush filename heuristics.

AVA2 submits double-sided alpha-tested frond draws with CPU branch wind weights; leaf rocking is disabled for these vertices. Fronds participate in cached model bounds, radius and billboard transitions. Original frond frame/edge smoothing, random call ordering and reduced LOD meshes remain incomplete.

All 283 corpus extension-21000 tails contain two token-tagged floats (21000 and 21001). These are now preserved without assigning unverified semantics. Parsing then reports unsupported token 22000; no unknown later blocks are skipped and metadata completeness remains 323 of 606. This part is inferred from resource bytes, because no corresponding handler was found in the current DLL decompile.

Verified: active application build and five targeted tests pass; four standalone SDK tests, all 606 metadata reads and generated/deformed models pass under ASan/UBSan. All 337 enabled-frond resources produce frond meshes; 462 resources produce billboard meshes. Evidence: build/verification/speedtree-fronds/.

Remaining: exact recursive tree topology/random order, leaf orientation/rocking groups, independent reduced branch/leaf/frond LOD meshes, exact frond smoothing, billboard dimensions/component fades, newer SPT extension semantics, gameplay collision integration and GPU wind rendering. No DLL runtime or rendered visual parity comparison was performed. Original AVA2 data and server remain unchanged.

2026-10-12 Per-frame CPU/GPU optimization pass

Implemented the prioritized per-frame findings, one commit per item (client 1eccdc87..121f1a63, shared sdk a1b3938..53115d9):

  • Render3D mesh cache sweeps only on growth; one shared GPU skinning palette per instance (pushed once per change); cached part->parent bone maps.
  • Text tails/labels: no per-frame codepoint vectors, show-state flag instead of list search, memoized widths, reused painter text instance.
  • Off-screen actor shadows culled; draw lists reserve last frame's peak.
  • Full mip chains for GPU scene textures (visible change: distant terrain/props no longer shimmer; sampler max_lod was zero before).
  • GPU tri-groups share one resident mesh and draw index sub-ranges.
  • Skins resolved once per skin change on the GPU draw cache; RenderSceneGPU resolves each texture once and sorts opaque draws by texture handle.
  • HardwareVertex packed 88 -> 48 bytes (UBYTE4_NORM colour, SHORT4_NORM normal, UBYTE4 bones, USHORT4_NORM weights); shaders unchanged.
  • Texture/mesh uploads staged and copied in the frame command buffer (one transfer buffer and copy pass per frame).
  • Every draw reads its transform from the instance storage buffer (firstInstance = batch index); the 288-byte uniform is pushed once per frame. Texture eviction sorts candidates once.
  • Bone lookup by a cached name index; attachments cache their bone index.
  • Python member-function names interned for PyCallClassMemberFunc (cache dropped by Py_AtExit across Py_Finalize/Py_Initialize).
  • Preview minimap radar redrawn only when its inputs change.

Verified: Debug macOS/Metal build, 50/50 CTests (including new regressions for resident index sub-ranges and GPU-cache skin changes). The current origin/main SpeedTree forest test needs SDK APIs not present in any pushed sdk revision, so verification used a local SDK shim; speedtree_forest_test was not built.

Not done, by decision: removing the offscreen colour target + blit (the 3D layer must composite premultiplied over SDL_Renderer 2D layers); baking text outlines (SDL already batches the five quads; colour would enter the cache key); partial palette pushes (risky on Vulkan/SPIR-V); sharing streams on the CPU-skinning tri-group path (would churn resident buffers); a per-frame light/fog uniform (light is per draw; fog is 32 bytes and nothing is pushed per draw any more).

Outstanding: no Vulkan/Android device run or frame-time capture for this pass; frames*0.033f / frames/60 animation clocks are frame-based rather than real time; translucent depth sorting uses each draw's first vertex. Original AVA2 data and the server are unchanged.

2026-10-12 FPS pass 2 (SpeedTree untouched)

SpeedTree (forest culling, SpeedTreeRT texture-path cache) is left alone while the SDK side is still being optimized. Client commits 46880be5..b2c7c6ce, one per item:

  • Cached map-object and terrain-patch draws are submitted by pointer (Render3DDrawRef + FlattenDraws); no per-frame copies of cached commands.
  • Map objects beyond the AVA2 loading distance are skipped, 1:1 with ENABLE_MAP_OBJECT_OPTIMIZATION (CArea::__UpdateLoadedObjectInstances): 2D distance from the main actor > max(OBJECT_DIST, 5000). The background update now receives the player position instead of the camera eye, as CPythonApplication does. Fog-far culling was rejected (it changes silhouettes against the sky).
  • Render scale < 1 no longer copies the scene through an extra full-screen texture when the SDL_GPU pipeline is active; the scene target is composited with linear filtering.
  • HardwareScene skips redundant vertex/index/pipeline/sampler binds; the opaque sort groups depth-writing opaque and alpha-tested draws by cull mode, texture and geometry (blended and non-depth-writing draws stay back to front).
  • Distant actors animate at the original reduced FPS (CGrannyLODController::UpdateLODLevel + CGrannyModelInstance::Update): only models with a _lod_01.gr2 sibling, more than 500 units from the camera target, 30-120 FPS by camera distance over 5000 (25000 for models of 500+ units). The _lod_ meshes are now swapped in too; see the follow-up below.

GPU skinning limit reviewed, not changed: 36 of 3755 skinned models in pc*, monster*, npc*, npc_mount and npc_pet exceed 128 bones (bosses, metin stones, doors; max 314, no PC models) and fall back to CPU skinning. Raising the limit needs shader rebuilds, exceeds Vulkan's 16 KB minimum uniform range and the UBYTE4 bone index range.

Verified: Debug macOS/Metal build, 50/50 CTests (new regressions for FlattenDraws, scaled-scene compositing and LOD animation rate). Not verified: in-game frame-time capture and 3D screenshots (no server in this session), and any Vulkan/Android device run.

2026-10-12 FPS pass 2 follow-up: real-time clocks and LOD meshes

  • Animation clocks follow real frame time: main.cpp sums the frame delta into a game clock (still fixed at 0.033 s per frame under --frames) for water, network actors, FlyingManager and weapon traces; the skybox, effect.Update/fly.Update (app.GetGameFrameDelta) and CRenderTarget previews (elapsed SDL_GetTicksNS, clamped to 0.25 s) use real deltas. The SpeedTree UpdateSystem(0.033f) wind clock is unchanged (SDK work pending).
  • Actor bodies swap to _lod_01.._03 meshes (CGrannyLODController): queue {lod_03, lod_02, lod_01, main}, lazy loading, the original distance bands (including the BYTE wrap for a single LOD) and the building factor. Parts, .msm skins and the current motion follow the drawn instance.
  • 9 of 1739 shipped LODs drop an attaching bone (lion2_lod_02/03 lose saddle; shaman_miyeom_lod_*, mutant_1/2, gold_monkey and assassin_easter_day_2016 _lod_01 lose equip_*). Such a level stays on PART_MAIN while that bone is in use, and bone queries fall back to PART_MAIN.
  • Not ported: weapon/item LOD models.
  • SetWeapon/AttachPart helper attachments (outside the part slots) are kept on the actor and re-attached to the drawn instance after the slots, so LOD and shape changes no longer drop them; a slot taking the same bone replaces the helper, and SetRace/SetModel clear them.
  • Blended, non-depth-writing, water and additive draws sort back to front by the bounds centre of their indexed vertices instead of the mesh's first vertex (cached per shared geometry index range). Depth-writing opaque draws keep the first-vertex tie-break.
  • Build: AVA2_SDK_ROOT defaults to a sibling ../sdk checkout and falls back to the pinned submodule (now https://git.slcydia.fun/4v5u09Z5a4Yuc/metin2-SDK.git).

Verified: Debug macOS/Metal build, 50/50 CTests (render_3d covers the LOD bands, the 30 FPS far pose rate on _lod_03 and the lion2 saddle fallback; hardware_scene covers the blended centre sort). Not verified: in-game or device visuals (no server in this session).

2026-10-12 Android step 1: APK packaging and game data

  • support/android moved to a top-level android/ and completed: Gradle 8.12 wrapper, AGP 8.7.3, compileSdk/targetSdk 35, minSdk 26, arm64-v8a, placeholder adaptive icon. android/build.sh builds SDL3 3.4.16 and FreeType 2.13.3 once into build/android-deps (SDL Java sources copied from the same release), then the APK (C++ as RelWithDebInfo in debug), and installs/launches it when a phone is attached. libmain.so, libSDL3.so and libc++_shared.so are 16 KB page aligned; FreeType is linked statically (AVA2_HAS_FREETYPE).
  • On Android the client enters SDL_GetAndroidExternalStoragePath() (/sdcard/Android/data/com.metin2.ava2/files) at startup. Script-root discovery also accepts a flattened root (game.py beside uiscript/).
  • android/push_assets.py stages assets/loose + upstream/python-root (scripts win) + python27.zip as hard links in build/android-data/root (55,761 files, 2.86 GiB) and sends them with adb push --sync. It remaps the three assets/loose symlinks that point into the old machine's pack_maker (bgm, sound/ui, icon/icon).
  • The on-screen keyboard follows edit focus (ime.EnableCaptureInput / DisableCaptureInput from ui.py), the in-game chat and the dev login view where SDL reports screen-keyboard support; desktop keeps text input on.
  • Build workaround: this checkout calls SpeedTree SDK APIs that are not yet in the SDK repository (LegacyWindController, CreateFromSpt variance, LOD fields). Until that SDK work is pushed, the APK builds from a local mirror with shims: AVA2_SOURCE_DIR=<mirror> AVA2_SDK_ROOT=<shim> android/build.sh. (Obsolete since SDK 62a5f5a, 2026-10-13: plain AVA2_SDK_ROOT=../sdk builds.)

Verified: debug APK builds; the desktop client reaches the login screen inside build/android-data/root (the phone layout) with no missing-effect errors. Not verified: any run on a device (no phone attached), Vulkan rendering, touch, lifecycle, frame rate.

2026-10-12 Mobile step 3: touch input router

  • src/app/input/touch_router.{h,cpp} (ava2_input): per-finger routing in this order: UI under the finger (or any finger outside the game phase) -> one UI pointer; attack circle; lower-left joystick area (floating base, dead zone 0.18); otherwise camera (one-finger drag rotates after a slop, two-finger pinch zooms, a short tap is a world click). CancelAll on SDL_EVENT_FINGER_CANCELED / focus loss.
  • Touch mode is on by default on Android/iOS, or with --touch / AVA2_TOUCH=1 on desktop; it sets SDL_HINT_TOUCH_MOUSE_EVENTS=0 and makes app.ENABLE_MOBILE_HUD follow it. main.cpp hosts the sink: UI = a picked window that is not the player GameWindow; world tap = mouse move + left down for one frame (GameWindow keeps the move target after release); joystick -> SetPlayerJoystick (replaces the WASD axes while active, so movement uses the original camera-relative yaw path); attack -> SetPlayerAttackKey (same state and fishing check as player.SetAttackKeyState).
  • Python module touch: IsEnabled, GetJoystick, IsAttackPressed, SetAttackButton, SetJoystickArea, GetLayout. The mobile HUD prototype's joystick and combat wheel are now display-only (not_pick); the old joystick sent raw move packets and the attack button was a one-pointer ui.Button.

Verified: ava2.touch_router (routing unit test) and ava2.touch_game (the original GameWindow with the mobile HUD in touch mode: open world, joystick zone and attack button are not UI, the taskbar is; joystick right gives movement yaw 90 at camera yaw 0; attack held while walking; taskbar tap reaches the window manager, open-world tap becomes a world click); 51/51 desktop tests; ava2_client --touch reaches the login screen. Outstanding: no device run (real multi-touch, finger/pixel scale); the attack key state is still not consumed on the real-server path (player_ComboAttack stub), so touch attack does not swing yet; the prototype's attack/quickslot .sub art is missing from the packs (attack drawn as a coloured block, skill slots invisible).

2026-10-12 Mobile step 3b — attack and combo wiring

The attack key (keyboard or touch) now swings on the real-server path, ported from GameLib ActorInstanceBattle / ActorInstanceCollisionDetection, CPythonPlayerInput NEW_Attack, CPythonPlayerEventHandler OnAttack / OnHit and CInstanceBase RefreshState / RunNormalAttack / RunComboAttack.

  • RaceData: RaceMotionData (ParseRaceMotionData, cached GetRaceMotionData) reads ComboInputData and AttackingData in both the old single-hit layout (AttackingType) and the MotionType + HitDataCount layout; .msm DEFENDING radius. LoadPlayerRaces registers every player motion and combo table (LoadPlayerMotions, a port of PythonPlayerSettingsModule intro/general/weapon/combo/horse/fishing).
  • chr.MOTION_MODE_BOW_SPECIAL is 17 and there is no MOTION_MODE_CLAW (AVA2 builds without ENABLE_WOLFMAN_CHARACTER, Locale_inc.h:131).
  • ActorInstance: combo state machine (InputComboAttackCommand, pre-input and direct input windows, ComboProcess, __RunNextCombo, mounted wrap), normal attack, attack speed (m_dwAtkSpd / 100) applied to attack motions, per-hit-data victim maps with invisible time and the 16 / HitLimitCount limits, TestAttackHit (hit-position segments against the victim).
  • ProcessPlayerAttack (called from the main loop): NEW_Attack checks (bow needs a target and an arrow), stop packet when the attack interrupts a walk, CG_MOVE FUNC_COMBO per started motion, hit test against live monsters/stones, SetTarget + CG_ATTACK on a hit. Walking and click-move are suspended while attacking. player.ComboAttack uses the same path.
  • Remote actors: RefreshState picks the motion mode from weapon / mount / polymorph / wedding dress / pickaxe / rod; CG_MOVE FUNC_ATTACK / FUNC_COMBO from the server play the attack motion facing the packet rotation.

Verified: ava2.attack_combo (both .msa layouts, warrior combo tables, real combo timings: pre-input fires at DirectInputTime, direct input chains, input after InputLimitTime is dropped, attack speed, remote motions not reported, hit detection at yaw 0 / 90 incl. once-per-combo, range and far side); ava2.touch_game; 52/52 desktop tests. Outstanding gaps: not verified against the real server; attack speed is a motion-clock ratio (no blend / speed-ratio curves); accumulation root motion is not applied during attacks; victims are an upright cylinder of the race DEFENDING radius (50 default) instead of the bone spheres; bow attacks have no arrow flight / clickable-distance reserve; horse attack details, emotions and skills are not wired; PvP IsAttackableInstance rules and the __CanAttack checks (emotion, private shop, observer, new mount) are missing; remote FUNC_ATTACK / FUNC_COMBO snap to the packet position instead of walking there when 50+ away.

2026-10-12 Mobile step 2 — platform layer

src/app/platform/ (ava2_platform) takes the per-platform code out of main.cpp:

  • EnterClientDataDirectory (macOS per-user data dir linking the bundle Resources; Android external files dir) and ConfigDirectory (Android internal storage for metin2.cfg / interface.cfg) — moved unchanged.
  • Lifecycle: an SDL event watch records background / foreground / low memory / terminating; the main loop applies them. Entering the background cancels movement and touch fingers, saves the config and interface status, and pauses the audio device (SoundManager::SetPaused); while in the background the loop skips game update and rendering but keeps receiving and dispatching network packets. Foreground resets the frame clock. Android runs with SDL_ANDROID_BLOCK_ON_PAUSE=0 (SDL then waits up to 100 ms per poll while paused); SDL's Vulkan backend recreates the surface on resume.
  • Safe area: SDL_GetWindowSafeArea mapped through the letterboxed logical presentation (MapSafeInsets) into TouchLayout (safe_*; ForScreen keeps the joystick area and attack button inside) and re-queried on SDL_EVENT_WINDOW_SAFE_AREA_CHANGED / resize. Python touch.GetSafeArea(); the mobile HUD prototype insets the player panel, target bar, drawer, quick belt and combat wheel.

Verified: ava2.platform (lifecycle transitions incl. pause+resume between frames, inset mapping with letterbox bars and scaling, safe touch layout), ava2.touch_game (desktop insets 0; a HUD built with insets puts the attack button inside them), 53/53 desktop tests, ava2_client --touch starts, Android APK builds. Outstanding: no device run (background/resume, surface recreation, audio resume, server keepalive while paused); low memory only logs (no cache purge); the HUD reads the insets only when it is built; iOS lifecycle needs the event watch to do the save work synchronously.

2026-10-12 Mobile step 4 — mobile HUD layout

The touch HUD (upstream/python-root/ui_mobile_*.py, mobile mode only) now follows the planned phone layout instead of the step-3 prototype:

  • Native UI::CDisc (wndMgr.RegisterDisc / SetDiscColors / SetDiscArc, WT_DISC): radial-gradient disc with a bevelled rim and an optional clockwise pie arc, drawn with SDL_RenderGeometry. All round frames are procedural; icons come only from AVA2's own taskbar / skill / item / face textures.
  • ui_mobile_widgets.py: Disc, RoundButton (icon or label, fires on release inside), QuickSlotDisc (one ui.SlotWindow slot inside a disc; tap uses it, tap while dragging adds or moves into it — the uitaskbar.AddQuickSlot logic; refresh is a one-slot TaskBar.RefreshQuickSlot).
  • Layout (inset by touch.GetSafeArea()): top-left face disc (uiCharacter.FACE_IMAGE_DICT) + "Lv. name" + HP/SP/stamina gauges with the original AffectShower below; original uiTarget.TargetBoard stays top centre; top-right row Messenger / Status / Inventory / Menu (menu panel: Skill, Quest, Guild, System) with the original minimap and event icon under it; left column Quest / Skill / Emote / Chat plus the original GameButtonWindow hint buttons in a second column; bottom-right attack disc (r 60, touch.SetAttackButton) with 8 quickslots on two rings (current quickslot page, cycles pages 1-3) and page / ride (/ride, the Ctrl+G command) / pick-up buttons; bottom centre potion belt = quickslot page 4 (global 24-31); 3 px experience bar at the bottom edge.
  • interfaceModule.ShowDefaultWindows / ShowAllWindows call MobileHUD.AdoptDefaultWindows: hides the PC taskbar (and its TOP_MOST HP/SP/EXP tooltips, which only the taskbar's OnUpdate hides), expanded taskbars and energy bar, moves the minimap, chat and game hint buttons. game.GameWindow calls AdoptGameWindows after the event icon opens.
  • New player.RequestUseGlobalQuickSlot / RequestAddGlobalQuickSlot / RequestMoveGlobalQuickSlotToGlobalQuickSlot (global < 32, same CG_QUICKSLOT packets as the local variants) for the belt; switching SetQuickPage was not usable because it refreshes the inventory.

Verified: ava2.touch_game (taskbar hidden, belt = globals 24-31, minimap under the top row, HUD buttons are UI while open world / joystick / attack are not, attack disc pixels drawn, insets move the player panel), ava2.python (global quickslot packets and range limits), 53/53 desktop tests, desktop screenshot reviewed, Android APK builds. Outstanding: no device run; minimap is still the original round one; labels are English; chat input line can overlap the wheel's page button while typing; no auto-hunt / target-lock buttons; Android keeps the 1024x768 letterboxed logical size (step 5 scaling); the HUD reads the safe area only when built.

2026-10-12 Mobile step 5 — UI scaling and live safe area

  • Logical UI size on phones / tablets (platform::ChooseMobileLogicalSize): instead of letterboxing metin2.cfg's 1024x768, height = clamp(round(height in dp x 1.5), 600, 768) and width = height x screen aspect (landscape, even, at least 1024). A 2400x1080 phone at density 2.75 gets 1332x600, a 2400x1080 at 2.25 gets 1600x720, a 4:3 tablet 1024x768. --ui-height N / AVA2_UI_HEIGHT override the height (600..1080). CPythonSystem::SetDisplaySizeOverride makes systemSetting.GetWidth/Height and the window manager report it without rewriting metin2.cfg. Android / iOS read the primary display (QueryDisplay); desktop simulates with --phone WxH[@density] (implies --touch) and --safe-insets L,T,R,B.
  • Live safe area: on SDL_EVENT_WINDOW_SAFE_AREA_CHANGED / resize the host resets the touch layout for the new insets; MobileHUD.OnUpdate sees touch.GetSafeArea() change and rebuilds itself under a fresh root window (old root hidden), re-registers the attack button and re-runs AdoptDefaultWindows / AdoptGameWindows (minimap, chat, hint buttons, buffs, event icon). Covers rotating 180 degrees with a side notch.
  • HUD gauge backgrounds and frames are now kept referenced (they were destroyed right after creation).
  • Fixed the step-4 touch_game disc pixel check (threshold too high; the earlier run used a stale test binary because the build stopped at the known speedtree_forest_test errors without -k).

Verified: ava2.platform (size choice for phones, portrait-reported displays, tablets, override clamp, near-square foldable, --phone parsing), ava2.touch_game (running HUD relayouts on new insets and back, minimap and buffs follow, attack button re-registered), 53/53 desktop tests, ava2_client --phone 2400x1080@2.75 --safe-insets 50,0,0,24 --phase game --preview-data renders 1332x600 full-bleed with the HUD inset. Outstanding: not run on a device (display mode vs. immersive window size, real cutout insets); a window size change at runtime (split screen, foldable) keeps the logical size chosen at start; no in-game UI size option yet (only --ui-height / env); original PC windows (inventory etc.) are not rearranged for 600 px height.

2026-10-12 Mobile step 6 — auto hunt

Client-only feature (the original client has none; not taken from 40250). It only drives paths that manual play already uses: walk-to (move target), target packet, the normal attack, quickslot skills, item pick-up and quickslot potions. Nothing new goes on the wire.

  • src/game/auto_hunt.{h,cpp}: engine-free state machine (off / search / engage / loot / return / paused). Hunts the nearest living mob within radius of an anchor point (metin stones optional), loots own or unowned drops before the next mob, walks back to the anchor when the area is empty, and gives up on a target whose distance stops shrinking for 8 s (ignored for 30 s). Joystick / attack key / mouse movement pause it; it resumes 3 s after the last input and re-anchors where the player stopped. HP / SP potions (belt slots 1 / 2, quickslot 24 / 25) are checked in every state with a 1 s gap. Death turns it off.
  • ProcessAutoHunt() (python_gameplay_modules.cpp, called from the game loop before ProcessPlayerAttack) builds the input from NetworkActorManager (mobs bType 0/2), CPythonItem::GetGroundItems() (new read accessor) and the combat wheel's current skill page, skipping skills on cooldown, active toggles, 121-123 and guild skills.
  • Python: player.SetAutoHunt / IsAutoHunt / GetAutoHuntState / SetAutoHuntOption / GetAutoHuntOption; options (radius, skills, pickup, stones, hp_percent, sp_percent, hp_slot, sp_slot) persist in autohunt.cfg next to metin2.cfg.
  • ui_mobile_autohunt.py: AUTO button on the combat wheel (tap toggles, green while on with the state under it; 0.6 s long press opens the settings board with range / skills / pick-up / stones / potion thresholds).

Verified: ava2.auto_hunt (targeting, range stop, skill gap, busy, loot before next mob, area and stone filter, return, chase watchdog, pause / resume / re-anchor, potions, death), ava2.touch_game (AUTO is UI under the finger, tap on/off, engage + target VID + move target, stop in reach, joystick pauses, long press opens settings, option persistence), 54/54 desktop tests, HUD screenshot shows AUTO above Ride. Outstanding: not run on a device or against the server (ownership timing, pick-up refusals, attack speed); straight-line walking only, the stuck watchdog is the only obstacle handling; party loot rules ignored (only own / unowned drops); no desktop hotkey (F9 is taken by the preview mode); English labels, no locale strings; does not run in --preview-data.

2026-10-12 Mobile step 7a — app_loop split

  • src/app/main.cpp moved to src/app/app_loop.cpp (history kept). The former main() body is now RunClient, a C++20 coroutine that suspends at the top of every frame (co_yield), so start-up, frame body and teardown stay one function with all their locals in the coroutine frame. ava2::app::AppLoop (app_loop.h) drives it: Start (start-up up to the first frame), Iterate (one frame), QueueEvent, Finish (lets a running client leave the loop and tear down), Run (classic loop).
  • The new src/app/main.cpp only picks the driver: SDL main callbacks (AVA2_MAIN_CALLBACKS, default ON except Android; iOS requires it because UIKit owns the main thread) or a classic main loop (Android for now). With callbacks, SDL_AppEvent queues events and the frame's event pass reads the queue instead of SDL_PollEvent.
  • iOS: no software FPS cap by default (SDL_AppIterate follows the display).

Verified: 54/54 desktop tests; ava2_client --phone 2400x1080@2.75 --safe-insets 50,0,0,24 --phase game --preview-data --frames 150 --screenshot gives a byte-identical BMP with the callbacks and with the classic loop (-DAVA2_MAIN_CALLBACKS=OFF) compared to before the split; bad arguments still exit 1. Outstanding: Android stays on the classic loop until callbacks are tried on a device; the frame body is still one function (state not yet split into classes).

2026-10-13 Mobile step 7b — iOS packaging

  • ios/build.sh [sim|device] [deps] [--no-run]: builds static SDL3 3.4.16 and FreeType 2.13.3 once into build/ios-deps/prefix-<sdk> (tarballs shared with build/android-deps), then the client as build/ios-<sdk>/ava2_client.app (8.8 MB, code only, Python embedded, deployment target 15.0, arm64). The simulator build is signed ad hoc, booted, installed and launched. A device build is signed with AVA2_IOS_SIGN_IDENTITY and the entitlements of AVA2_IOS_PROFILE, and is installed with xcrun devicectl. ios/Info.plist.in sets landscape only, full screen, a hidden status bar, an empty launch screen (native resolution), UIFileSharingEnabled and a local-network usage string.
  • Simulator only: SDL_GPU rejects the simulator's Metal device because it does not report MTLGPUFamilyApple3. build.sh patches its private extracted copy of SDL_gpu_metal.m (|| TARGET_OS_SIMULATOR). Device builds use stock SDL.
  • Data directory: platform.cpp uses the app's Documents folder (SDL_FOLDER_DOCUMENTS). The "game data not found" box names ios/push_assets.py. That script stages the tree with android/push_assets.py --stage-only --lowercase and copies it into the simulator container as APFS clones (cp -Rc), or to a device with xcrun devicectl device copy to.
  • iOS file systems are case-sensitive as the app sees them, including the simulator container. The client opens lower-cased paths (ResourceManager::NormalizePath), but the data is mixed case (Dopador_manual/…). So the iOS tree is staged with every name ASCII-lowercased. Only A–Z is folded: legacy CP949 names stored as Latin-1 code points (oxà캥æ®.dds) must keep their bytes. EffectData's path normalisation now also folds A–Z (scripts spell empire_A.mse), like the effect cache key already did.
  • Staging fixes that also apply to Android: android/push_assets.py now uses build/dev/test-rundir (tools/make_test_rundir.py) as the base layer and adds the loose svside/ folder. Before, assets/loose alone lacked pack files that game.py needs (Dopador_manual/, the switcher art, svside/.jpg), and the game phase ended. The staged tree is now 98,349 files / 3.95 GiB.

Verified: iPhone 17 Pro simulator, --phase game --preview-data. The game scene and the mobile HUD render; the safe area (118/0/118/38) keeps the HUD clear of the notch on either landscape side. The console has 0 TraceError or Traceback lines. Without data, the app shows the "game data not found" box. Desktop 54/54. Outstanding: the device build, signing and devicectl install/copy are untested (no device or profile). The network keepalive does not run while the app is in the background (iOS suspends SDL_AppIterate). Android still uses the classic loop. Paths the client opens without lower-casing them would fail on iOS; none showed up in the login screen or the game phase, but character select and a real-server login have not been run on iOS yet.

2026-10-13 Mobile gestures — item and window interaction

  • Before this step the port's CSlotWindow had no mouse handlers, so item pick-up, drop, equip, double-click use, right-click and hover tooltips did not work on desktop either. Ported from EterPythonLib, 1:1:
    • PythonSlotWindow.cpp handlers: left down → OnSelectItemSlot/OnSelectEmptySlot, the drop on left up, right down, double click → OnUseSlot, over/over-out tooltips, RefreshSlot.
    • PythonGridSlotWindow.cpp: the slot vector, GetPickedSlotList, OnRefreshSlot, CheckMoving, the grid GetPickedSlotPointer.
    • CWindowManager: IsDragging (the 10 px rule), mouse over on every move, right button down/up with DeattachIcon.
  • app.SetMouseHandler now stores the handler. app_loop calls its Update/Render after the phase window, so the attached icon follows the pointer. app.IsPressed reads the real keyboard state, so desktop Shift-split and Ctrl-quickslot work. Desktop double clicks (clicks >= 2) reach RunMouseLeftButtonDoubleClick. Keys are released on focus loss and when the app goes to the background.
  • Touch router UI gestures:
    • A tap sends move, down and up at the touch-down point.
    • A drag past tap_slop presses at the start point.
    • A double tap (within 300 ms and 40 px) becomes a double click.
    • A long press (450 ms) on an item slot calls touch.SetLongPressEvent.
  • The callback opens ui_mobile_actions.ItemActionSheet with Use, Split and Quick slot. Split and Quick slot run the original Shift/Ctrl branches via touch.SetVirtualKey.
  • Mapping table: docs/MOBILE-ARCHITECTURE.md, "物品与窗口手势".

Verified: the new ava2.inventory_touch test drives the original uiinventory.py through the router and the window manager. It covers the hover tooltip, tap pick-up and tap drop (move packet 0→5), drag 0→6, double-tap use, the long-press sheet (Use, Split opens dlgPickMoney, Quick slot), tap-outside close, long press on an empty cell, and app.IsPressed. touch_router_test covers the gesture timing. The phone simulation (--phone --touch) draws no software cursor. Desktop 55/55. Outstanding:

  • Gestures have not been tried on an Android or iOS device yet.
  • Drop and sell are drag-only; the sheet has no buttons for them.
  • A button's zero-size TextLine sits at the button's exact centre pixel, and IsIn is inclusive, as in the original. Only that one pixel misses the button.

2026-10-13 Android device verification

Device: OnePlus PJZ110 (Android 17), 2376x1080 at density 3.00, giving a 1320x600 logical UI. Safe area insets: 117/67/50/53.

Changes:

  • Ava2Activity (extends SDLActivity) passes the args intent extra as the command line, so a dev run can start in --phase game --preview-data. android/build.sh forwards AVA2_ARGS.
  • Startup crash: directories created by adb push were owned by shell with mode 2770, so the app uid could not stat ymir work/pc/...gr2. The uncaught std::filesystem exception ended main. push_assets.py now chmods what shell owns after the push. It skips files the app wrote itself (channel.inf, the cfg files), which shell cannot chmod.
  • Forced landscape: the window is resizable and had no SDL_HINT_ORIENTATIONS, so SDL requested FULL_USER. That overrode the manifest's sensorLandscape, and the game rendered letterboxed in portrait. Fixes:
    • app_loop sets the hint to LandscapeLeft LandscapeRight on Android and iOS.
    • Ava2Activity.setOrientationBis always requests SENSOR_LANDSCAPE.
    • Verified with the system rotation locked to portrait.
  • The mobile window is SDL_WINDOW_FULLSCREEN (immersive). Before this, the status bar drew over the HUD. Verified.
  • Wrong trees on the phone: about 1000 files exist in both assets/loose and the pack-manifest test-rundir with different content. Examples are the zone/b tree atlases (at half size), monster2/npc_pet models and pc effects. assets/loose was layered on top, which broke the SpeedTree UVs into flat green cards. The desktop client showed the same result in build/android-data/root. Fix: push_assets.py now stages assets/loose first and lets test-rundir (what the original client serves from its packs) win.
  • One adb push --sync over all ~98k files aborts in file_sync_client ("failed to read stat response"). push_assets.py now pushes batches of at most 20,000 files.

Verified on the device:

  • Game phase renders correctly on Vulkan.
  • Joystick moves the player.
  • The inventory opens from the HUD and closes with its X.
  • Login phase shows the server list.
  • 60 fps steady on the 60 Hz panel (SurfaceFlinger latency: 0 frames over 25 ms), with SoC sensors around 41 °C.

Environment notes:

  • A root-owned adb server on :5037 claims the phone, and launchd respawns it. Use the SDK adb (34.0.4) against it: a different client version restarts that server mid-push.

Outstanding:

  • Item gestures on the device: the preview inventory is empty, so pick/drag/double-tap/ long-press were checked only in ava2.inventory_touch.
  • Real-server login: no isolated AVA2 server or account is available. The listed servers are not to be used.
  • A missing or unreadable model should fail that load, not throw out of main.
  • The --preview-data camera starts inside the tree canopy, so the player is hidden.
  • Thermals over a long session not yet measured.

2026-10-13 Real SpeedTree SDK

The SDK repository now carries the SpeedTree runtime this checkout calls (SDK 62a5f5a: "Implement cross-platform SpeedTree runtime and recovery tests" and "Fix terminal foliage dispatch on frond branches"). The local mirror and SDK shim are no longer needed; desktop and Android build against the plain SDK checkout.

Changes:

  • tests/attack_combo_test.cpp and tests/ava2_render_3d_test.cpp call the code under test inside assert(). In RelWithDebInfo (NDEBUG) those calls compiled out and the tests segfaulted; they had been skipped only because the test rundir was not found. Both now undefine NDEBUG, like hardware_scene_test.cpp.
  • android/build.sh prefers the SDK's adb over the one on PATH (see the adb note above).

Verified:

  • Desktop ctest 59/59 with -DAVA2_TEST_RUNDIR=<checkout>/build/dev/test-rundir, including ava2.speedtree_forest (without that option the 9 asset tests are skipped).
  • Desktop phone layout and the device both render trees with real branches and fronds.
  • Device game phase: 60.3 fps, max frame gap 16.6 ms, 0 frames over 25 ms.

2026-10-13 Mobile HUD: minimap frame and top inset

  • Minimap outside its frame (preview): with --preview-data no map loads, so miniMap.Render returns early and the green circle was app_loop's dev radar, drawn at the fixed PC spot (screen_width - 132, 5). CPythonMiniMap::Render now records the window position before the map check (GetScreenPosition), and the radar draws there. It opens the minimap once via ShowMiniMap() (normally AtlasInfo does that on map load), so CanShow() follows its close/open buttons. A real map was not affected.
  • Top HUD row too low: SDL folds system-gesture insets into the safe area. In landscape fullscreen the status bar is hidden but its swipe zone still gave a 120 px (67 logical) top inset. Ava2Activity.Ava2Surface re-sends the insets with the top taken only from the display cutout and visible system bars (device cutout is left-only).
  • The preview keyboard-hint header is not drawn in touch mode; it overlapped the HUD.
  • --game-script now also runs with --preview-data (desktop probing of the mobile HUD).

Verified on the device: minimap inside its frame, portrait/status bars and the entry row at the top edge. Desktop ctest 59/59.

Outstanding: after a tap the cursor stays where the finger lifted, so hover tooltips (e.g. "[F6] Battle pass") remain until the next touch.