Files
AVA2/docs/PORT-PLAN.md
T

66 KiB

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.