Files
AVA2/docs/PORT-PLAN.md
T
shenleiandClaude Opus 5.5 9077aa389a AVA2 client Windows parity passes (gr2 BitKnit2/64-bit, GamePhase handlers, python modules)
- gr2: BitKnit2 decompression, 64-bit LE files, compressed curves
- net: remaining GamePhase handlers, generated GC packet table
- python: event/chat/chr/minimap/guild/quest/messenger/shop-search and
  other native modules ported against the AVA2 Windows client
- render: D3D8 fixed-function lighting in Gr2ModelRenderer, terrain
  without baked shade; cape/NPC equipment attachment
- tests + audits updated; docs/PORT-PLAN.md and WINDOWS-PARITY.md

Batch 4 (render pipeline: background.*, app.RenderGame/UpdateGame,
camera bindings, main.cpp fake-content removal) is still in progress.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:43:01 +09:00

143 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.