137 Commits
Author SHA1 Message Date
shenleiandClaude Opus 5.5 84404cf1f1 Model preview: AVA2 render-target window on a Vulkan colour target
Port of AVA2's CRenderTarget / GrpRenderTargetTexture / renderTarget module.
The host gains an RGBA8 offscreen colour pass for D3D colour render targets;
mt_preview shows wearable items on every allowed race and monsters with
motions, reached by X+click in the inventory and shop and from the wiki.
Player races are created as TYPE_PC so their parts exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 04:48:07 +09:00
shenleiandClaude Opus 5.5 b14fb2ffe9 Record the batch chest production deploy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:47:50 +09:00
shenleiandClaude Opus 5.5 b8363693f1 Add batch gift box opening window (mt_chest)
Ctrl + right click on an ITEM_GIFTBOX opens a count window (1/10/50/all,
max 200) that sends /mt_chest and sums the MTCH1 gains into chat. Without
Ctrl or against a server without the command the original use runs.
Exports item.ITEM_TYPE_GIFTBOX. Verified live on the 203 channel5 core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:31:03 +09:00
shenleiandClaude Opus 5.5 10f8c9760e Record the attribute lock production deploy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:11:31 +09:00
shenleiandClaude Opus 5.5 a22c064587 Add attribute lock buttons to the switchbot window
Five per-slot toggles next to start/stop, shown only when the server
sends the MTSB1 lock line; locked attributes are marked in the current
attribute line. Server side: metin2-server docs/FEATURE-ATTR-LOCK.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:06:00 +09:00
shenleiandClaude Opus 5.5 ffe097ec57 Add world boss window (AVA2 uitrack world-boss tab, read-only)
mt_boss lists the server's timed boss regens from the MTF1 "bosses"
query: alive/max, countdown, map-local position and period, paged by 8,
with per-boss spawn reminders that only fire on a fresh alive snapshot.
Teleport is left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:36:04 +09:00
shenleiandClaude Opus 5.5 13a462b6fc Add client-only channel switch (AVA2 ENABLE_CHANNEL_CHANGE)
mt_channel lists the serverInfo channels of the current server and switches by
running the original paths: /logout, then the login window connects to the
chosen channel with the account kept by MainStream, and the original
stream.isAutoSelect starts the same character. No server change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:37:02 +09:00
shenleiandClaude Opus 5.5 aeb67f3c9c Hide near trees drawn as PC blockers when trees are switched off
A tree close to the camera is drawn by RenderPCBlocker, not RenderTree,
so background.SetVisiblePart(PART_TREE, 0) left it on screen. Skip tree
blockers while PART_TREE is hidden. Live screenshots on the 203 test
core confirm the tree, the GM mark and the weapon glow now disappear.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:24:53 +09:00
shenleiandClaude Opus 5.5 e546f91e03 Add AVA2-style display options (effect level, trees, clouds)
Client-only port of ENABLE_GRAPHIC_ON_OFF / HIDE_OBJECTS: five effect
levels toggle attached actor effects via Active/Deactive, tree and cloud
parts use background.SetVisiblePart, plus shortcuts for the original
name and damage options. mt_display window, mt_display.cfg, port.display
test, docs/AVA2-DISPLAY.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 21:11:25 +09:00
shenleiandClaude Opus 5.5 e22d7ba6fd Add batch pickup on the pickup key for the server mt_pickup command
Embedded module mt_pickup wraps GameWindow.PickUpItem (Z / `): with batch
pickup on it sends /mt_pickup 1 MASK (0.5 s gap, one in flight, presses
swallowed while waiting); after 3 s without a reply it notes once in chat
and falls back to the original single pickup. Settings window (on/off and
8 categories, persisted in mt_pickup.cfg) behind a "拾取" button under the
switchbot entry by the minimap.

Live tested against 203 (channel-5 test core, port 13040) with the macOS
native client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:45:37 +09:00
shenleiandClaude Opus 5.5 514eae6745 Record live switchbot busy/no_scroll/rejected results
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:49:21 +09:00
shenleiandClaude Opus 5.5 6b1d21a2c5 Add switchbot (自动洗练) window for the server mt_switchbot command
Embedded module mt_switchbot: a paced request queue (0.3 s gap, one in
flight, 4 s timeout -> unsupported), atomic attrs lists from the server,
two alternatives of up to 5 targets, 10-1000 roll limits, live state and
stop reasons. Entry button under the wiki button by the minimap. The
selection follows the server-reported cell when the item moves mid-run
and falls back to the same vnum when it moves while idle.

Live tested against 203 (channel-5 test core, port 13040) with the macOS
native client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 19:45:14 +09:00
shenandshen 4e2d39b612 Add feature queries, dungeon information and event calendar UI 2026-10-15 02:28:01 -07:00
shenandshen 9d9993b007 Add searchable wiki catalogue and biology material navigation 2026-10-15 00:48:50 -07:00
shenandshen 6472d17306 Add mobile touch UI and AVA2 biology system with server tools 2026-10-14 19:12:38 -07:00
shenandshen e7f2202a94 Improve auto-hunt navigation, recovery and mounted skill casting 2026-10-01 07:46:44 -07:00
shenandshen eb5833747a Expand auto-hunt pursuit ranges and show server bonus effects 2026-09-30 23:02:04 -07:00
shenandshen 922954dd97 Optimize fixed-function Vulkan shaders for Adreno 512 and recover Android surfaces 2026-09-30 21:48:07 -07:00
shenandshen 1e4762ccf4 Fix Android 10 resource sync and fullscreen; record Global ROM comparison 2026-09-30 19:35:52 -07:00
shenandshen b8b0a84149 Add render isolation probes and profile Mi 8 Lite terrain bottleneck 2026-09-30 18:10:12 -07:00
shenandshen d45c5c6cf5 Fix Android directory CRC login crash and record Mi 8 Lite device tests 2026-09-30 17:54:11 -07:00
shenandshen 059ceadec2 Expand movement ring to all 65 registered maps with paged categories 2026-09-30 17:33:13 -07:00
shenandshen 8a6aeaedf0 Add free cloak-style auto-hunt pull for 3 10 or 20 monster groups 2026-09-30 17:07:24 -07:00
shenandshen d1f8d3dddd Improve macOS Retina UI clarity and bundle HD assets 2026-09-30 16:13:31 -07:00
shenleiandClaude Opus 5.5 cd9e5b259d android: build.sh installs and syncs the game files when a phone is attached
After building the APK, android/build.sh now picks the attached device (ANDROID_SERIAL for several),
installs the APK (reinstalling on a signature mismatch), syncs the zh client into files/Client and, with
--launch, wakes the phone and starts the app. Without a device it only builds.

push-client.sh is now incremental (android/sync_client.py): the device keeps files/Client/.mt_sync
(size, mtime, path of what the last sync wrote), so later syncs send only new and changed files as one
tar streamed through `adb shell -T run-as` (no copy in /data/local/tmp) and delete the ones gone
locally. Only game resources are synced; settings and logs the app writes there are kept. --locale zh
rebuilds build/zh-locale/Client first when its inputs changed. android/adb_env.sh picks adb and falls
back to server port 5038 when :5037 cannot bind.

Verified against a fake adb device: first sync (1.4 GB, byte-identical), no-op resync, changed files,
deletions, locale switch, --full, the install/launch path and the no-device path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:36:21 +09:00
shenleiandClaude Opus 5.5 f9cd63713f docs: PORT-PLAN numbers after the platform TODO sweep
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:08:26 +09:00
shenleiandClaude Opus 5.5 17cb7326c1 docs: PORT-PLAN MilesLib done, platform 61.2%
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 12:07:51 +09:00
shenleiandClaude Opus 5.5 d509f0a8b4 PORT-PLAN §4: performance batch 2 status
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 11:43:00 +09:00
shenleiandClaude Opus 5.5 54fa2c0fc3 npc-shops: generic NPC shop installer + mount shop 15 on NPC 20368
tools/server/item-mall-shop becomes tools/server/npc-shops with one
directory per shop (shop.conf + items.tsv) and install.sh <shop dir>.
New mount shop: 35 ride tickets on NPC 20368 (renamed 坐骑商人 via
NPC_NAME -> mob_names.txt) beside the stable boy in a1/b1/c1. Verified
on 203: 35 slots at the drafted prices, bought + used 71114 -> mounted.
zh overlay: 71118 虎坐骑券(黄), 20368 坐骑商人.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 00:38:37 +09:00
shenleiandClaude Opus 5.5 4bfc4244bd 商城按钮改为提示去找百店老板娘
203 没有网页商城,端口也没有网页窗口,系统菜单的商城按钮打开的是空窗口。
新 PORT 模块 mt_mallhint 替换 SystemDialog 的商城按钮和 GameWindow 的 mall 命令处理,
弹出提示框(并在聊天栏提示):商城物品请到各村杂货店旁的百店老板娘处购买。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 00:17:28 +09:00
shenleiandClaude Opus 5.5 71d8f8c6e7 移动端界面大小设置:默认 600 逻辑高,系统选项可选 600/700/800
Android 上 40250 界面原先固定按 800 逻辑像素高排版,弹窗文字在手机上只有约 1 mm 高。
- UIScaleMode.h + host ui_scale.cpp:逻辑高度来自保存的设置(默认 600),ui_height.cfg 保存,下次启动生效;
  桌面可用 MT_UI_HEIGHT 测试
- app.GetUIHeight/GetAppliedUIHeight/SetUIHeight
- mt_uiscale PORT 模块:系统选项对话框加高一行,"界面大小 大/中/小",修改后聊天提示重启生效

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 23:10:51 +09:00
shenleiandClaude Opus 5.5 e33e41c12b 背包扩展到 5 页:服务端补丁 + DB 迁移 + 客户端 mt_inventory
- GameType.h: c_Inventory_Page_Count 2 -> 5; SQuickSlot.Position BYTE -> WORD
- quickslot 包/接口 pos 改为 WORD(CG/GC 5 字节),wire_classic 同步
- mt_inventory PORT 模块:inventorywindow.py 装备格 90 -> EQUIPMENT_SLOT_START 重映射、5 个小页签、
  自动药水高亮与 SelectItemWindow 扫描全部 5 页;40250 脚本保持不变
- tools/server/inventory-5-pages: server.patch(格子布局 +135、quickslot WORD)、migrate_db.py、README

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:37:44 +09:00
shenleiandClaude Opus 5.5 22d534c5eb Split vulkan_window.cpp by responsibility and render() into phases
VulkanWindow's 3000-line TU becomes sdl_window.cpp (window, events,
cursor, screenshot BMP), vk_device.cpp (device, swapchain, MSAA,
framebuffers), vk_pipelines.cpp (render passes, pipelines),
vk_resources.cpp (buffers, render targets, geometry), vk_textures.cpp
(textures, samplers, descriptors), vk_frame.cpp (render) and
ui_batches.cpp; vulkan_window.cpp keeps construction and timing stats.
Function bodies move verbatim.

render() now reads fence/acquire -> prepare_draws -> prepare_ui ->
write_draw_states -> record_passes -> record_readbacks -> submit ->
finish_readbacks -> present, with FrameDraws / Readback carrying the
locals that used to live across 500 lines.

Verified: login-screen screenshot byte-identical to HEAD; game-world
draw/vertex/index/UI counts identical; ctest, port_gate macos+android,
Android build pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:54:36 +09:00
shenleiandClaude Opus 5.5 eab5938072 host: cross-platform audio decode (Android has sound)
Replace the macOS-only AudioToolbox decoder with mt_host::decode_audio: a
RIFF/WAVE PCM parser plus vendored dr_mp3, resampled/remixed to 44.1 kHz
stereo float with SDL_ConvertAudioSamples. macOS and Android now share one
path; the AudioToolbox link is gone.

BGM is no longer cached in clips_ (a 5-minute track is ~100 MB of float):
only the playing track is kept, and a new one decodes on a worker thread
(the pack read stays on the main thread) so map changes do not stall.

host.audio_decode test: synthetic wav layouts + all 1578 pack .wav, 9 pack
.mp3 and 25 Client/BGM .mp3 decode (7060 s of audio in ~3.6 s on M2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:22:11 +09:00
shenleiandClaude Opus 5.5 75d2dd8545 host: split src/host/main.cpp into translation units
main.cpp (4.5k lines) -> main.cpp (entry, args, synthetic benchmark) plus
vulkan_window, live_client, frame_policy, native_audio, texture_decode,
render_state, input_keymap, host_util. Bodies are moved verbatim; multi-line
VulkanWindow / NativeAudioEngine / FrameRatePolicy members are defined out of
line; one-line accessors stay inline. Anonymous namespace -> mt_host.

No behavior change: ctest 15/15, port_gate macos+android PASS, desktop
--live-client login screen and synthetic --draws runs unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:30:44 +09:00
shenleiandClaude Opus 5.5 a46093104c layout: restructure into src/ tests/ android/ scripts/ tools/
- extension/src/{port,platform,codepage} -> src/; native_render -> src/host
  (+ dxt, shaders/); libgr2 -> src/gr2; extension/third_party -> third_party
- extension/tests -> tests/port, libgr2/tests -> tests/gr2
- android-native -> android (build.sh, push-client.sh moved in)
- script -> scripts; tools/40250 -> tools/server; oracle -> tools/granny-oracle;
  perf tools -> tools/perf
- all build trees under build/ (native, release, android, port-gate)
- xrender:: CMake aliases -> mt::; port-map ledger impl paths rewritten

No code changes. ctest 15/15, port_gate macos+android PASS, port_map check 0 errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:08:19 +09:00
shenleiandClaude Opus 5.5 0137f852d3 docs: rewrite PORT-PLAN for the native SDL3 architecture
Godot-era batch records move verbatim to docs/archive/PORT-HISTORY.md.
README and THIRD-PARTY no longer mention submodules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:26:54 +09:00
shenleiandClaude Opus 5.5 f970f95800 cleanup: drop Godot-era build trees, m2dev net/pack layers and stale docs
- Untrack build-debug/ and build-asan/ (CMake trees committed by mistake in
  c9389431) and ignore them.
- Remove extension/src/net and extension/src/pack (m2dev protocol and XChaCha
  pack format, superseded by the ported 40250 code), their 18 unregistered tests
  and the net/pack tools, the MT_BUILD_NET_TOOLS probe, and the libsodium and zstd
  submodules they alone used.
- The fake login server's classic cipher, sequence table and wire layouts move to
  extension/tests/classic/ (still used by port.login_flow, port.packet and the
  native client's offline mode).
- Archive Godot/m2dev-era plans under docs/archive/; THIRD-PARTY.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 18:17:25 +09:00
shenandshen 3c52ced02e Adapt Android mobile controls and native client UI 2026-09-28 19:39:13 -07:00
shenleiandClaude Opus 5.5 a1ae69aa7a zh locale: pack locale_zh and add reviewed Chinese names
eterpack_pack writes locale packs in the original format (COMPRESS
entries, LZO+TEA index), and build_zh_locale.py packs locale/zh into
locale_zh.eix/.epk registered in pack/Index instead of leaving loose
files.

The reviewed translations for names and keys still in English are
kept apart from the server snapshot in data/zh_40250/*_zh_overlay.txt
(1,607 items, 231 mobs/NPCs, 45 locale_game keys) and override it at
build time. Only YMIR, the coordinate-named warp markers and the empty
TOOLTIP_UNSEAL_LEFT_TIME remain English.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:45:58 +09:00
shenleiandClaude Opus 5.5 0b701d88c3 codepage: replace iconv with bundled WindowsBestFit tables
mt_codepage implements code pages 874/932/936/949/950/1250-1258 from
Microsoft's bestfit<cp>.txt sources (script/gen_codepage_tables.py,
SHA-256 pinned). Win32Crt's MultiByteToWideChar/WideCharToMultiByte/
IsDBCSLeadByteEx and net/text_codec use it, so the Android API 24 build
no longer depends on iconv. port.codepage checks every table against
its source file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 18:45:49 +09:00
shenandshen d3cf586849 render and server locale parity fixes 2026-09-28 00:18:37 -07:00
shenandshen 25dd65f2ce feat: complete native client rendering parity updates 2026-09-27 19:44:41 -07:00
shenandshen 330ec9745b port: verify root pack ledger and repair runtime adapters 2026-09-24 00:18:33 -07:00
shenandshen 837c830182 port: complete 100% logic layer, eliminate pending dir, and unify client_main on port route
- Completed batch 4-f (Messenger, Guild, GuildMark), 4-g (PythonSystem, systemSetting), 4-h (PythonSoundManagerModule, MilesLib CSoundManager)
- Ported UserInterface/Locale.cpp, EterLocale/Japanese.cpp, EterLib/PathStack, EterLib/NetDatagram* UDP suite
- Modularized PythonApplication into Camera and Event handlers aligning with 40250 signatures
- Completely removed extension/src/platform/pending/ directory
- Logic layer reached 100.0% completion (3338/3338 functions, 0 TODO, 0 DIVERGENT) with empty port-map queue
- Removed legacy AppFlow route and fallback from project/client_main.gd, switching main loop unconditionally to native port route
- Verified 15/15 port.login_flow integration steps and 19/19 port_gate suites passing
2026-09-23 22:17:59 -07:00
shenlei ee7a9cd3e2 WIP port 4-d quest dialogue modules 2026-09-24 09:53:02 +09:00
shenleiandClaude Opus 5.5 a12e7fea42 Port route 4-c: NPC shop (PythonShop.cpp) + app cursor state
- UserInterface/PythonShop.cpp ported verbatim (shop module, initshop after initfly);
  pending stub and module stubs removed.
- 40250 PythonApplicationCursor.cpp and SetMouseHandler moved into the platform
  CPythonApplication on file-static members; GetCursorNum out of line, since uishop's
  app.GetCursor() dereferenced the missing application object.
- Fake server: general store (npclist 9003) answers CG_ON_CLICK with GC_SHOP START,
  CG_SHOP BUY/SELL2/END like CShop::Buy / CShopManager::Sell.
- port.login_flow step 10: click the shopkeeper, right-click buy, drag-sell, ESC close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 09:30:47 +09:00
shenleiandClaude Opus 5.5 85e176bdd5 Batch 4-b: verify combat on the port route
The fake server spawns a stray dog outside the village's BANPK safe disc
and answers CG_TARGET/CG_ATTACK with GC_TARGET/GC_DAMAGE_INFO/GC_DEAD.
port.login_flow and python_game_render_test hold the left button on it
(MBF_SMART -> __OnPressActor) until it dies. Adds the host/test helper
PythonBoot::Evaluate / Metin2PythonHost.evaluate.

python_3d_surface: emission is now multiplied by the texture, like
D3D's emissive-then-MODULATE, which removes the grey click-glow quad and
the grey wash on characters. Damage numbers wait on CPythonSystem (4-g).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 09:13:20 +09:00
shenleiandClaude Opus 5.5 6ea0fa9889 port 4-a: text input through CPythonIME (login typed, in-game chat)
- UserInterface/PythonIME(+Module) ported verbatim; ime module stubs removed, initime() after initdbg()
- EterLib/IME.cpp in platform/: 40250 buffer/WMChar bodies, IMM/TSF processors no-op; committed
  multi-byte text via PythonBoot::UIChar emulating GCS_RESULTSTR
- GameApplicationAdapter RunIME* -> CWindowManager; Godot keys -> ui_ime_key/ui_char
- port.login_flow/login_live type the account through the IME; chat CG_CHAT round-trip on the fake server
- python_game_render_test logs in with Godot key events

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 08:35:53 +09:00
shenleiandClaude Opus 5.5 1bda4390d6 docs: the sword by the actor is the fake server's ground item, not a weapon-attach bug
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 07:37:20 +09:00