Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8164c02709 | ||
|
|
84404cf1f1 | ||
|
|
32372c2a73 | ||
|
|
5dcac9cbd4 | ||
|
|
b14fb2ffe9 | ||
|
|
b8363693f1 | ||
|
|
10f8c9760e | ||
|
|
a22c064587 | ||
|
|
ffe097ec57 | ||
|
|
13a462b6fc | ||
|
|
aeb67f3c9c | ||
|
|
e546f91e03 | ||
|
|
e22d7ba6fd | ||
|
|
514eae6745 | ||
|
|
6b1d21a2c5 | ||
|
|
4e2d39b612 | ||
|
|
9d9993b007 | ||
|
|
6472d17306 | ||
|
|
e7f2202a94 | ||
|
|
586bae51e4 | ||
|
|
f2848af3ac | ||
|
|
eb5833747a | ||
|
|
922954dd97 | ||
|
|
1e4762ccf4 | ||
|
|
b8b0a84149 | ||
|
|
d45c5c6cf5 | ||
|
|
059ceadec2 | ||
|
|
cf9ed052b1 | ||
|
|
8a6aeaedf0 | ||
|
|
d1f8d3dddd | ||
|
|
905f23f135 | ||
|
|
f345bd5d3b | ||
|
|
01cc252a1d | ||
|
|
c5b709d38d | ||
|
|
8182445f8b | ||
|
|
8ec8f1a445 | ||
|
|
3aa4c482e9 | ||
|
|
f9be09d2c2 | ||
|
|
5c8d583b31 | ||
|
|
78d14776b8 | ||
|
|
cd9e5b259d | ||
|
|
a60ed6b03f | ||
|
|
58a3d01027 |
@@ -76,7 +76,7 @@ The 106 `project/*_system.gd` files that only their own `test_*_parity.gd` loade
|
|||||||
cmake -S . -B build/native -DCMAKE_BUILD_TYPE=Release -DMT_BUILD_NATIVE_RENDER=ON -DCMAKE_PREFIX_PATH=/opt/homebrew
|
cmake -S . -B build/native -DCMAKE_BUILD_TYPE=Release -DMT_BUILD_NATIVE_RENDER=ON -DCMAKE_PREFIX_PATH=/opt/homebrew
|
||||||
cmake --build build/native -j8 && ctest --test-dir build/native --output-on-failure -j4
|
cmake --build build/native -j8 && ctest --test-dir build/native --output-on-failure -j4
|
||||||
./scripts/port_gate.sh macos android # build/port-gate
|
./scripts/port_gate.sh macos android # build/port-gate
|
||||||
./android/build.sh Release --install # build/android + APK
|
./android/build.sh Release # build/android + APK; installs + syncs zh assets when a phone is attached
|
||||||
```
|
```
|
||||||
|
|
||||||
All build trees live under `build/` (gitignored). Always finish with `git diff --check`.
|
All build trees live under `build/` (gitignored). Always finish with `git diff --check`.
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
# Wiki TSV keeps a final TAB for recipes with an empty materials column.
|
||||||
|
data/wiki/catalogue.txt whitespace=-blank-at-eol
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
/build/
|
/build/
|
||||||
/build-*/
|
/build-*/
|
||||||
/cmake-build-*/
|
/cmake-build-*/
|
||||||
|
/dist/
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|
||||||
|
|
||||||
@@ -34,6 +35,10 @@ __pycache__/
|
|||||||
# Written by 40250 uitaskbar.py at runtime.
|
# Written by 40250 uitaskbar.py at runtime.
|
||||||
/mouse.cfg
|
/mouse.cfg
|
||||||
|
|
||||||
|
# Written at runtime by the mt_* option windows (mt_pickup, mt_display, ...).
|
||||||
|
/mt_*.cfg
|
||||||
|
/Client/mt_*.cfg
|
||||||
|
|
||||||
# native Android client (./android/build.sh): SDL3 download, NDK builds, Gradle output
|
# native Android client (./android/build.sh): SDL3 download, NDK builds, Gradle output
|
||||||
/android/.gradle/
|
/android/.gradle/
|
||||||
/android/app/build/
|
/android/app/build/
|
||||||
|
|||||||
@@ -16,7 +16,17 @@ option(MT_BUILD_TOOLS "Build libgr2 validation tools" OFF)
|
|||||||
option(MT_BUILD_PORT "Build the 40250 port and its tests" ON)
|
option(MT_BUILD_PORT "Build the 40250 port and its tests" ON)
|
||||||
option(MT_BUILD_NATIVE_RENDER "Build the SDL3 and Vulkan client" OFF)
|
option(MT_BUILD_NATIVE_RENDER "Build the SDL3 and Vulkan client" OFF)
|
||||||
|
|
||||||
add_subdirectory(src/gr2)
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../sdk/gr2)
|
||||||
|
message(STATUS "Using shared SDK: ../sdk/gr2")
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../sdk/gr2 ${CMAKE_CURRENT_BINARY_DIR}/sdk_gr2)
|
||||||
|
else()
|
||||||
|
add_subdirectory(src/gr2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../sdk/speedtree)
|
||||||
|
message(STATUS "Using shared SDK: ../sdk/speedtree")
|
||||||
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../sdk/speedtree ${CMAKE_CURRENT_BINARY_DIR}/sdk_speedtree)
|
||||||
|
endif()
|
||||||
add_subdirectory(third_party)
|
add_subdirectory(third_party)
|
||||||
add_subdirectory(src/codepage)
|
add_subdirectory(src/codepage)
|
||||||
if(MT_BUILD_PORT OR MT_BUILD_NATIVE_RENDER)
|
if(MT_BUILD_PORT OR MT_BUILD_NATIVE_RENDER)
|
||||||
|
|||||||
@@ -19,12 +19,11 @@ cmake --build build/release --target mt_native_render -j8
|
|||||||
## Android
|
## Android
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./android/build.sh Release --install
|
./android/build.sh # 构建 APK;连着手机时自动安装并增量推送中文资源
|
||||||
./android/push-client.sh /path/to/40250/Client
|
./android/build.sh --launch # 同上,完成后唤醒手机并启动
|
||||||
adb shell am start -n org.metin2port.client/.MainActivity
|
|
||||||
```
|
```
|
||||||
|
|
||||||
APK 由 SDLActivity、`libSDL3.so` 和 Vulkan 原生 `libmain.so` 组成。40250 `Client` 资源单独复制到应用数据目录;`--live-server HOST:AUTH_PORT:GAME_PORT --login-screen` 可连接服务器。构建与启动细节见 [src/host/README.md](src/host/README.md)。
|
APK 由 SDLActivity、`libSDL3.so` 和 Vulkan 原生 `libmain.so` 组成。40250 `Client` 资源单独同步到应用数据目录(`android/push-client.sh`,只传有变化的文件);`--live-server HOST:AUTH_PORT:GAME_PORT --login-screen` 可连接服务器。构建与启动细节见 [src/host/README.md](src/host/README.md)。
|
||||||
|
|
||||||
## 测试
|
## 测试
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# Sourced by the android/ scripts: picks adb and the target device.
|
||||||
|
# ADB adb binary (default: $ANDROID_HOME/platform-tools/adb, else adb on PATH)
|
||||||
|
# ANDROID_SERIAL device to use when several are attached (adb honours it itself)
|
||||||
|
# An adb server that cannot bind :5037 ("Address already in use" with nothing listening, seen on this
|
||||||
|
# Mac after sleep) is retried on :5038 through ANDROID_ADB_SERVER_PORT.
|
||||||
|
SDK="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-$HOME/Library/Android/sdk}}"
|
||||||
|
PKG=org.metin2port.client
|
||||||
|
if [ -z "${ADB:-}" ]; then
|
||||||
|
if [ -x "$SDK/platform-tools/adb" ]; then ADB="$SDK/platform-tools/adb"; else ADB="$(command -v adb || true)"; fi
|
||||||
|
fi
|
||||||
|
[ -n "$ADB" ] || { echo "adb not found (install Android platform-tools or set ADB)" >&2; return 1 2>/dev/null || exit 1; }
|
||||||
|
if ! "$ADB" start-server >/dev/null 2>&1; then
|
||||||
|
export ANDROID_ADB_SERVER_PORT=5038
|
||||||
|
"$ADB" start-server >/dev/null 2>&1 || { echo "adb server does not start on :5037 or :5038" >&2; return 1 2>/dev/null || exit 1; }
|
||||||
|
echo "adb: :5037 unusable, using :5038"
|
||||||
|
fi
|
||||||
|
export ADB
|
||||||
|
|
||||||
|
# adb_device: sets DEVICE to the one ready device (or ANDROID_SERIAL) and returns 0; returns 1 with a
|
||||||
|
# message when none is ready (unauthorized / offline devices are named so the user can fix them).
|
||||||
|
adb_device() {
|
||||||
|
local ready others
|
||||||
|
ready=$("$ADB" devices | awk 'NR > 1 && $2 == "device" { print $1 }')
|
||||||
|
others=$("$ADB" devices | awk 'NR > 1 && NF >= 2 && $2 != "device" { print $1 " (" $2 ")" }')
|
||||||
|
if [ -n "${ANDROID_SERIAL:-}" ]; then
|
||||||
|
if printf '%s\n' "$ready" | grep -qxF "$ANDROID_SERIAL"; then DEVICE="$ANDROID_SERIAL"; return 0; fi
|
||||||
|
echo "device $ANDROID_SERIAL is not ready" >&2
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
case $(printf '%s' "$ready" | grep -c .) in
|
||||||
|
1) DEVICE="$ready"; export ANDROID_SERIAL="$DEVICE"; return 0 ;;
|
||||||
|
0)
|
||||||
|
if [ -n "$others" ]; then
|
||||||
|
echo "device attached but not ready: $others (unlock the phone and allow USB debugging)" >&2
|
||||||
|
else
|
||||||
|
echo "no Android device attached" >&2
|
||||||
|
fi
|
||||||
|
return 1 ;;
|
||||||
|
*) echo "several devices attached, pick one with ANDROID_SERIAL:" $ready >&2; return 1 ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
@@ -6,6 +6,8 @@
|
|||||||
<uses-permission android:name="android.permission.VIBRATE" />
|
<uses-permission android:name="android.permission.VIBRATE" />
|
||||||
|
|
||||||
<application android:label="@string/app_name"
|
<application android:label="@string/app_name"
|
||||||
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:allowBackup="false"
|
android:allowBackup="false"
|
||||||
android:appCategory="game"
|
android:appCategory="game"
|
||||||
android:isGame="true"
|
android:isGame="true"
|
||||||
|
|||||||
@@ -214,6 +214,11 @@ public class MainActivity extends SDLActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void applyImmersiveMode() {
|
private void applyImmersiveMode() {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
|
||||||
|
final WindowManager.LayoutParams attributes = getWindow().getAttributes();
|
||||||
|
attributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
|
||||||
|
getWindow().setAttributes(attributes);
|
||||||
|
}
|
||||||
final View decor = getWindow().getDecorView();
|
final View decor = getWindow().getDecorView();
|
||||||
decor.setSystemUiVisibility(
|
decor.setSystemUiVisibility(
|
||||||
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
||||||
@@ -248,7 +253,7 @@ public class MainActivity extends SDLActivity {
|
|||||||
args = DEFAULT_ARGS;
|
args = DEFAULT_ARGS;
|
||||||
if (!args.contains("--safe-inset-px"))
|
if (!args.contains("--safe-inset-px"))
|
||||||
args = args.trim() + " --safe-inset-px " + safeInsetPx();
|
args = args.trim() + " --safe-inset-px " + safeInsetPx();
|
||||||
// Test phase: FPS readout in the top-left corner. Drop this line for release builds.
|
// Test phase: FPS readout at the top centre. Drop this line for release builds.
|
||||||
if (!args.contains("--show-fps"))
|
if (!args.contains("--show-fps"))
|
||||||
args = args.trim() + " --show-fps";
|
args = args.trim() + " --show-fps";
|
||||||
return args.trim().split("\\s+");
|
return args.trim().split("\\s+");
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generated by branding/icon/build_icons.sh. -->
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@mipmap/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generated by branding/icon/build_icons.sh. -->
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@mipmap/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 35 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 35 KiB |
@@ -1,20 +1,35 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Build the native (SDL3 + Vulkan) 40250 client as an Android arm64 APK.
|
# Build the native (SDL3 + Vulkan) 40250 client as an Android arm64 APK and, when a phone is attached,
|
||||||
# ./android/build.sh [Debug|Release] [--install]
|
# install it and bring its game files up to date, so the app is ready to play.
|
||||||
|
# ./android/build.sh [Debug|Release] [--no-deploy] [--no-push] [--locale XX] [--full-push] [--launch]
|
||||||
# Output: android/app/build/outputs/apk/debug/app-debug.apk
|
# Output: android/app/build/outputs/apk/debug/app-debug.apk
|
||||||
# The 1.4 GB Client/ directory is not in the APK; push it once with ./android/push-client.sh.
|
# Deploy (skipped when no device is ready; ANDROID_SERIAL picks one of several):
|
||||||
|
# adb install -r, then ./android/push-client.sh --locale XX (default zh), which sends only the game
|
||||||
|
# files changed since the last push (the first push is the whole 1.4 GB client). --no-push installs
|
||||||
|
# only, --full-push resends everything, --launch wakes the phone and starts the app afterwards.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
REPO="$PWD"
|
REPO="$PWD"
|
||||||
|
|
||||||
CONFIG=Release
|
CONFIG=Release
|
||||||
INSTALL=0
|
DEPLOY=1
|
||||||
for a in "$@"; do
|
PUSH=1
|
||||||
case "$a" in
|
LOCALE=zh
|
||||||
Debug|Release) CONFIG="$a" ;;
|
FULL_PUSH=0
|
||||||
--install) INSTALL=1 ;;
|
LAUNCH=0
|
||||||
*) echo "usage: $0 [Debug|Release] [--install]" >&2; exit 2 ;;
|
usage="usage: $0 [Debug|Release] [--no-deploy] [--no-push] [--locale XX] [--full-push] [--launch]"
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case "$1" in
|
||||||
|
Debug|Release) CONFIG="$1" ;;
|
||||||
|
--install) ;; # the default now; kept for old command lines
|
||||||
|
--no-deploy) DEPLOY=0 ;;
|
||||||
|
--no-push) PUSH=0 ;;
|
||||||
|
--locale) LOCALE="${2:?--locale needs a locale code}"; shift ;;
|
||||||
|
--full-push) FULL_PUSH=1 ;;
|
||||||
|
--launch) LAUNCH=1 ;;
|
||||||
|
*) echo "$usage" >&2; exit 2 ;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
API=24
|
API=24
|
||||||
OUT="$REPO/build/android"
|
OUT="$REPO/build/android"
|
||||||
@@ -84,6 +99,39 @@ variant=Debug # debug-signed either way (sideload); CONFIG picks the native opt
|
|||||||
APK="$REPO/android/app/build/outputs/apk/debug/app-debug.apk"
|
APK="$REPO/android/app/build/outputs/apk/debug/app-debug.apk"
|
||||||
ls -la "$APK"
|
ls -la "$APK"
|
||||||
|
|
||||||
if [ "$INSTALL" = 1 ]; then
|
[ "$DEPLOY" = 1 ] || exit 0
|
||||||
adb install -r "$APK"
|
. android/adb_env.sh
|
||||||
|
if ! adb_device; then
|
||||||
|
echo "APK built; install and push skipped. Attach the phone and rerun (or ./android/push-client.sh)."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "device: $DEVICE ($("$ADB" shell getprop ro.product.model | tr -d '\r'))"
|
||||||
|
if ! out=$("$ADB" install -r "$APK" 2>&1); then
|
||||||
|
echo "$out" >&2
|
||||||
|
case "$out" in
|
||||||
|
*INSTALL_FAILED_UPDATE_INCOMPATIBLE*|*INSTALL_FAILED_VERSION_DOWNGRADE*)
|
||||||
|
# Signed by another machine's debug key (or a newer build): only a reinstall helps. That drops the
|
||||||
|
# app's data, so the push below starts over with the whole client.
|
||||||
|
echo "reinstalling $PKG (the installed copy has another signature; its data is removed)"
|
||||||
|
"$ADB" uninstall "$PKG" >/dev/null
|
||||||
|
"$ADB" install "$APK" ;;
|
||||||
|
*)
|
||||||
|
echo "install failed; on some phones USB installs must be allowed in developer options and confirmed on screen" >&2
|
||||||
|
exit 1 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
echo "installed $PKG"
|
||||||
|
if [ "$PUSH" = 1 ]; then
|
||||||
|
push_args=(--locale "$LOCALE")
|
||||||
|
[ "$FULL_PUSH" = 1 ] && push_args+=(--full)
|
||||||
|
python3 android/sync_client.py "${push_args[@]}"
|
||||||
|
fi
|
||||||
|
if [ "$LAUNCH" = 1 ]; then
|
||||||
|
# The app exits with a Vulkan surface error when started behind the lock screen.
|
||||||
|
"$ADB" shell input keyevent KEYCODE_WAKEUP
|
||||||
|
if "$ADB" shell dumpsys window | grep -qE 'mDreamingLockscreen=true|isKeyguardShowing=true|mKeyguardShowing=true'; then
|
||||||
|
echo "the phone is locked: unlock it, then start Metin2 from the launcher" >&2
|
||||||
|
else
|
||||||
|
"$ADB" shell am start -n "$PKG/.MainActivity" >/dev/null && echo "started $PKG"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,39 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copy the 40250 Client/ directory into the Android app's private files/ (SDL_GetPrefPath), where
|
# Sync the 40250 game files into the Android app's private files/ (SDL_GetPrefPath), where src/host looks
|
||||||
# src/host looks for files/Client/pack/Index. Needs the debug APK installed (run-as).
|
# for files/Client/pack/Index. Only files changed since the last sync are sent (android/sync_client.py).
|
||||||
# ./android/push-client.sh [--locale XX] [CLIENT_DIR]
|
# Needs the debug APK installed (run-as).
|
||||||
# --locale XX writes the pushed locale.cfg from CLIENT_DIR/locale_XX.cfg. --locale zh defaults
|
# ./android/push-client.sh [--locale XX] [--full] [--dry-run] [CLIENT_DIR]
|
||||||
# CLIENT_DIR to build/zh-locale/Client (scripts/build_zh_locale.py), whose pack/ registers locale_zh.
|
# --locale XX writes the pushed locale.cfg from CLIENT_DIR/locale_XX.cfg. --locale zh defaults CLIENT_DIR
|
||||||
|
# to build/zh-locale/Client (scripts/build_zh_locale.py, rebuilt first when its inputs changed).
|
||||||
|
# --full deletes the synced resources on the device and pushes everything again.
|
||||||
# Symbolic links in CLIENT_DIR (the zh client links the original packs) are copied as their targets.
|
# Symbolic links in CLIENT_DIR (the zh client links the original packs) are copied as their targets.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
PKG=org.metin2port.client
|
. android/adb_env.sh
|
||||||
LOCALE=""
|
adb_device
|
||||||
if [ "${1:-}" = "--locale" ]; then
|
exec python3 android/sync_client.py "$@"
|
||||||
LOCALE="${2:?--locale needs a locale code}"
|
|
||||||
shift 2
|
|
||||||
fi
|
|
||||||
if [ "$LOCALE" = zh ]; then
|
|
||||||
CLIENT="${1:-build/zh-locale/Client}"
|
|
||||||
else
|
|
||||||
CLIENT="${1:-Client}"
|
|
||||||
fi
|
|
||||||
[ -f "$CLIENT/pack/Index" ] || { echo "$CLIENT/pack/Index not found" >&2; exit 1; }
|
|
||||||
# The archive's top directory is basename(CLIENT DIR); the app reads files/Client.
|
|
||||||
[ "$(basename "$CLIENT")" = Client ] || { echo "CLIENT_DIR must be named Client" >&2; exit 1; }
|
|
||||||
if [ -n "$LOCALE" ]; then
|
|
||||||
[ -f "$CLIENT/locale_$LOCALE.cfg" ] || { echo "$CLIENT/locale_$LOCALE.cfg not found" >&2; exit 1; }
|
|
||||||
pack="$(cut -d' ' -f3 < "$CLIENT/locale_$LOCALE.cfg" | tr -d '\r\n')"
|
|
||||||
tr -d '\r' < "$CLIENT/pack/Index" | grep -qxF "locale_$pack" ||
|
|
||||||
{ echo "locale_$pack is not registered in $CLIENT/pack/Index" >&2; exit 1; }
|
|
||||||
fi
|
|
||||||
TMP=/data/local/tmp/mt-client.tar
|
|
||||||
echo "packing $CLIENT ..."
|
|
||||||
tar -h -C "$(dirname "$CLIENT")" -cf - "$(basename "$CLIENT")" | adb shell "cat > $TMP"
|
|
||||||
echo "unpacking into $PKG files/ ..."
|
|
||||||
adb shell "run-as $PKG sh -c 'mkdir -p files && rm -rf files/Client && cd files && tar -xf $TMP' && rm -f $TMP"
|
|
||||||
if [ -n "$LOCALE" ]; then
|
|
||||||
adb shell "run-as $PKG sh -c 'cp files/Client/locale_$LOCALE.cfg files/Client/locale.cfg'"
|
|
||||||
echo "locale.cfg: $(adb shell "run-as $PKG cat files/Client/locale.cfg")"
|
|
||||||
fi
|
|
||||||
adb shell "run-as $PKG ls files/Client/pack/Index" >/dev/null && echo "done: files/Client"
|
|
||||||
|
|||||||
@@ -0,0 +1,233 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Bring the game files in the app's private files/Client (SDL_GetPrefPath, where src/host looks for
|
||||||
|
files/Client/pack/Index) up to date with a local client directory, sending only what changed.
|
||||||
|
|
||||||
|
The device keeps files/Client/.mt_sync, the list (size, mtime, path) of what the last sync wrote. A sync
|
||||||
|
compares it with the local files, streams the new and changed ones as one tar through `adb shell -T run-as`
|
||||||
|
(no copy in /data/local/tmp), removes the ones gone locally, then writes the new list. Only the game
|
||||||
|
resources are synced (pack/, sound/, BGM/, miles/, lib/, channel.inf, locale*.cfg); what the app writes
|
||||||
|
there itself (settings such as ui_height.cfg, perf logs) is never touched. mouse.cfg is only seeded on
|
||||||
|
the first sync.
|
||||||
|
|
||||||
|
Needs the debug APK installed (run-as). adb and the device come from android/adb_env.sh ($ADB,
|
||||||
|
$ANDROID_SERIAL); android/push-client.sh is the shell entry point.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import hashlib
|
||||||
|
import os
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import tarfile
|
||||||
|
import time
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
REPO = Path(__file__).resolve().parents[1]
|
||||||
|
PKG = "org.metin2port.client"
|
||||||
|
MANIFEST = ".mt_sync"
|
||||||
|
HEADER = "# mt-sync 1"
|
||||||
|
SYNC_DIRS = ("pack", "sound", "BGM", "miles", "lib")
|
||||||
|
SEED_FILES = ("mouse.cfg",)
|
||||||
|
ZH_OUTPUT = REPO / "build/zh-locale/Client"
|
||||||
|
ZH_STAMP = REPO / "build/zh-locale/.inputs.sha256"
|
||||||
|
|
||||||
|
|
||||||
|
def adb(*args, **kwargs):
|
||||||
|
return subprocess.run([os.environ.get("ADB", "adb"), *args], **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def run_as_command(script):
|
||||||
|
# `adb shell -T` (shell protocol v2, Android 7+): no pty, so stdin/stdout stay binary-safe, and unlike
|
||||||
|
# exec-in/exec-out it returns the remote exit status.
|
||||||
|
return [os.environ.get("ADB", "adb"), "shell", "-T", f"run-as {PKG} sh -c '{script}'"]
|
||||||
|
|
||||||
|
|
||||||
|
def run_as(script, **kwargs):
|
||||||
|
"""Runs script with sh as the app user in its data directory."""
|
||||||
|
return subprocess.run(run_as_command(script), **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
def zh_inputs_digest(client_base):
|
||||||
|
h = hashlib.sha256()
|
||||||
|
inputs = [REPO / "scripts/build_zh_locale.py", client_base / "pack/Index"]
|
||||||
|
inputs += [REPO / "tools/server/biolog" / name for name in ("catalog.json", "shop.json", "make_assets.py")]
|
||||||
|
inputs.append(REPO / "tests/port/biolog_proto_patch.cpp")
|
||||||
|
inputs += sorted((REPO / "data/wiki").glob("*"))
|
||||||
|
inputs.append(REPO / "tools/wiki/build_catalogue.py")
|
||||||
|
inputs += sorted(p for p in (REPO / "data/zh_40250").rglob("*") if p.is_file())
|
||||||
|
for path in inputs:
|
||||||
|
h.update(str(path.relative_to(REPO)).encode())
|
||||||
|
h.update(path.read_bytes() if path.exists() else b"")
|
||||||
|
return h.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
def ensure_zh_locale():
|
||||||
|
"""Rebuilds build/zh-locale/Client when its inputs (translations, the builder, the base pack Index)
|
||||||
|
changed since the last build."""
|
||||||
|
digest = zh_inputs_digest(REPO / "Client")
|
||||||
|
built = (ZH_OUTPUT / "pack/Index").is_file()
|
||||||
|
if built and ZH_STAMP.is_file() and ZH_STAMP.read_text().strip() == digest:
|
||||||
|
return
|
||||||
|
print("zh locale: inputs changed, rebuilding build/zh-locale/Client ...")
|
||||||
|
result = subprocess.run([sys.executable, str(REPO / "scripts/build_zh_locale.py")], cwd=REPO)
|
||||||
|
if result.returncode == 0:
|
||||||
|
ZH_STAMP.write_text(digest + "\n")
|
||||||
|
elif built:
|
||||||
|
print("zh locale: rebuild failed, syncing the previous build", file=sys.stderr)
|
||||||
|
else:
|
||||||
|
sys.exit("zh locale: build failed (scripts/build_zh_locale.py)")
|
||||||
|
|
||||||
|
|
||||||
|
def local_files(client, locale):
|
||||||
|
"""{device path: local path} of the synced resources; locale.cfg comes from locale_<locale>.cfg."""
|
||||||
|
files = {}
|
||||||
|
for top in SYNC_DIRS:
|
||||||
|
root = client / top
|
||||||
|
if not root.is_dir():
|
||||||
|
continue
|
||||||
|
for dirpath, dirnames, filenames in os.walk(root, followlinks=True):
|
||||||
|
dirnames[:] = [d for d in dirnames if not d.startswith(".")]
|
||||||
|
for name in filenames:
|
||||||
|
if not name.startswith("."):
|
||||||
|
path = Path(dirpath) / name
|
||||||
|
files[path.relative_to(client).as_posix()] = path
|
||||||
|
for path in client.iterdir():
|
||||||
|
# hd_ui.pak: the 2x UI textures of scripts/build_hd_ui.py, when built (src/host/texture_decode.cpp).
|
||||||
|
if path.is_file() and (path.name in ("channel.inf", "hd_ui.pak")
|
||||||
|
or (path.name.startswith("locale") and path.suffix == ".cfg")):
|
||||||
|
files[path.name] = path
|
||||||
|
if locale:
|
||||||
|
cfg = client / f"locale_{locale}.cfg"
|
||||||
|
if not cfg.is_file():
|
||||||
|
sys.exit(f"{cfg} not found")
|
||||||
|
pack = cfg.read_text().split()[2]
|
||||||
|
index = (client / "pack/Index").read_text(errors="replace").split()
|
||||||
|
if f"locale_{pack}" not in index:
|
||||||
|
sys.exit(f"locale_{pack} is not registered in {client}/pack/Index")
|
||||||
|
files["locale.cfg"] = cfg
|
||||||
|
return files
|
||||||
|
|
||||||
|
|
||||||
|
def stat_key(path):
|
||||||
|
st = path.stat()
|
||||||
|
return f"{st.st_size}\t{st.st_mtime_ns}"
|
||||||
|
|
||||||
|
|
||||||
|
def read_device_manifest():
|
||||||
|
out = run_as(f"cat files/Client/{MANIFEST} 2>/dev/null", capture_output=True).stdout.decode(errors="replace")
|
||||||
|
lines = out.splitlines()
|
||||||
|
if not lines or lines[0] != HEADER:
|
||||||
|
return None
|
||||||
|
manifest = {}
|
||||||
|
for line in lines[1:]:
|
||||||
|
size, mtime, path = line.split("\t", 2)
|
||||||
|
manifest[path] = f"{size}\t{mtime}"
|
||||||
|
return manifest
|
||||||
|
|
||||||
|
|
||||||
|
class Progress:
|
||||||
|
def __init__(self, total):
|
||||||
|
self.total, self.done, self.last, self.start = total, 0, 0.0, time.monotonic()
|
||||||
|
|
||||||
|
def add(self, n):
|
||||||
|
self.done += n
|
||||||
|
now = time.monotonic()
|
||||||
|
if now - self.last >= 1 or self.done == self.total:
|
||||||
|
self.last = now
|
||||||
|
rate = self.done / max(now - self.start, 1e-3) / 2**20
|
||||||
|
print(f"\r {self.done / 2**20:8.1f} / {self.total / 2**20:.1f} MB {rate:5.1f} MB/s", end="", flush=True)
|
||||||
|
|
||||||
|
|
||||||
|
def push(files):
|
||||||
|
"""Streams {device path: local path} into files/Client as one tar."""
|
||||||
|
# Older Android tar restores ownership even when run as an unprivileged app.
|
||||||
|
# Match the app identity so extraction does not try to chown files to root.
|
||||||
|
identity = run_as("id -u && id -g", capture_output=True, check=True).stdout.split()
|
||||||
|
app_uid, app_gid = map(int, identity)
|
||||||
|
total = sum(p.stat().st_size for p in files.values())
|
||||||
|
progress = Progress(total)
|
||||||
|
proc = subprocess.Popen(run_as_command("mkdir -p files/Client && cd files/Client && tar -xf -"),
|
||||||
|
stdin=subprocess.PIPE)
|
||||||
|
with tarfile.open(fileobj=proc.stdin, mode="w|", format=tarfile.GNU_FORMAT, dereference=True) as tar:
|
||||||
|
for name, path in sorted(files.items()):
|
||||||
|
info = tar.gettarinfo(str(path), arcname=name) # dereference: the zh client links the original packs
|
||||||
|
info.uid, info.gid = app_uid, app_gid
|
||||||
|
info.uname = info.gname = ""
|
||||||
|
with open(path, "rb") as f:
|
||||||
|
tar.addfile(info, f)
|
||||||
|
progress.add(info.size)
|
||||||
|
proc.stdin.close()
|
||||||
|
if progress.total:
|
||||||
|
print()
|
||||||
|
if proc.wait() != 0:
|
||||||
|
sys.exit("push failed (tar on the device)")
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
|
parser.add_argument("client", nargs="?", type=Path, help="client directory (default: Client, or the zh build for --locale zh)")
|
||||||
|
parser.add_argument("--locale", help="write locale.cfg from locale_<LOCALE>.cfg; zh uses build/zh-locale/Client, rebuilt when stale")
|
||||||
|
parser.add_argument("--full", action="store_true", help="delete the synced resources on the device and push everything")
|
||||||
|
parser.add_argument("--dry-run", action="store_true", help="only print what would change")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if args.locale == "zh" and args.client is None:
|
||||||
|
ensure_zh_locale()
|
||||||
|
client = ZH_OUTPUT
|
||||||
|
else:
|
||||||
|
client = args.client or REPO / "Client"
|
||||||
|
client = client.absolute()
|
||||||
|
if not (client / "pack/Index").is_file():
|
||||||
|
sys.exit(f"{client}/pack/Index not found")
|
||||||
|
|
||||||
|
if not adb("shell", "pm", "path", PKG, capture_output=True).stdout.strip():
|
||||||
|
sys.exit(f"{PKG} is not installed (android/build.sh installs it)")
|
||||||
|
if run_as("true", capture_output=True).returncode != 0:
|
||||||
|
sys.exit(f"run-as {PKG} failed: the installed APK must be the debug build")
|
||||||
|
|
||||||
|
files = local_files(client, args.locale)
|
||||||
|
wanted = {name: stat_key(path) for name, path in files.items()}
|
||||||
|
device = None if args.full else read_device_manifest()
|
||||||
|
first = device is None
|
||||||
|
if first:
|
||||||
|
changed = sorted(wanted)
|
||||||
|
removed = []
|
||||||
|
# First sync (or --full): also seed the default settings the app would otherwise lack.
|
||||||
|
for name in SEED_FILES:
|
||||||
|
if (client / name).is_file():
|
||||||
|
files[name] = client / name
|
||||||
|
changed.append(name)
|
||||||
|
else:
|
||||||
|
changed = sorted(n for n, key in wanted.items() if device.get(n) != key)
|
||||||
|
removed = sorted(n for n in device if n not in wanted)
|
||||||
|
size = sum(files[n].stat().st_size for n in changed)
|
||||||
|
print(f"sync {client} -> {PKG} files/Client: {len(changed)} files to push ({size / 2**20:.1f} MB), "
|
||||||
|
f"{len(removed)} to delete, {len(wanted) - len(changed) if not first else 0} unchanged"
|
||||||
|
+ (" [full]" if args.full else " [first sync]" if first else ""))
|
||||||
|
if not changed and not removed:
|
||||||
|
return
|
||||||
|
if args.dry_run:
|
||||||
|
for n in changed[:50]:
|
||||||
|
print(" +", n)
|
||||||
|
for n in removed[:50]:
|
||||||
|
print(" -", n)
|
||||||
|
return
|
||||||
|
|
||||||
|
if args.full:
|
||||||
|
dirs = " ".join(SYNC_DIRS)
|
||||||
|
run_as(f"mkdir -p files/Client && cd files/Client && rm -rf {dirs} {MANIFEST}", check=True)
|
||||||
|
# Drop the list before touching files: an interrupted sync then starts over as a first sync.
|
||||||
|
run_as(f"rm -f files/Client/{MANIFEST}", check=True)
|
||||||
|
if removed:
|
||||||
|
run_as('cd files/Client && while IFS= read -r f; do rm -f "$f"; done',
|
||||||
|
input="".join(n + "\n" for n in removed).encode(), check=True)
|
||||||
|
if changed:
|
||||||
|
push({n: files[n] for n in changed})
|
||||||
|
manifest = HEADER + "\n" + "".join(f"{wanted[n]}\t{n}\n" for n in sorted(wanted))
|
||||||
|
run_as(f"cat > files/Client/{MANIFEST}", input=manifest.encode(), check=True)
|
||||||
|
locale = run_as("cat files/Client/locale.cfg", capture_output=True).stdout.decode(errors="replace").strip()
|
||||||
|
print(f"done: files/Client updated (locale.cfg: {locale})")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Bear animation group binding
|
||||||
|
|
||||||
|
40250 `EterGrnLib/ModelInstanceUpdate.cpp::UpdateTransform` delegates to
|
||||||
|
`GrannyUpdateModelMatrix`; that gameplay caller remains unchanged. ModelInstanceMotion
|
||||||
|
binds controls through `GrannyPlayControlledAnimation`.
|
||||||
|
|
||||||
|
The real packed bear model is named Bip01. Both `bear/02.gr2` (walk) and `03.gr2`
|
||||||
|
(run) contain Hedra first, Bip01 second. Hedra has zero accumulation; Bip01 has
|
||||||
|
the translation in the corresponding unchanged MSA (-93.25 and -299.89 Y).
|
||||||
|
The previous adapter exposed a count of two with one public group pointer, flattened
|
||||||
|
bone binding across groups, and always accumulated the first group's translation.
|
||||||
|
|
||||||
|
The reader now preserves each group's name, placement, accumulation, text tracks,
|
||||||
|
and flattened-track range. Runtime controls match the model name, excluding morph
|
||||||
|
groups, and use only the selected group for bone binding and root accumulation.
|
||||||
|
|
||||||
|
`tests/port/port_granny_root_motion_test.cpp` loads those assets through PackBackend
|
||||||
|
and the runtime APIs used by the live client. It checks both public groups, rotated
|
||||||
|
root displacement across a loop boundary, inverse displacement, and stationary Hedra.
|
||||||
|
The same test linked with HEAD's previous GrannyRuntime fails six assertions; the
|
||||||
|
updated runtime passes. Desktop and `MT_TEST_MOBILE=1` login-flow regressions pass.
|
||||||
|
Native macOS renderer and Android debug APK builds pass.
|
||||||
|
|
||||||
|
This is narrow evidence for constant-extracted motion. VDA extraction and complete
|
||||||
|
Windows Granny output equivalence remain unverified; the aggregate contract stays PARTIAL.
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# Assassin gungsin / 魅影 destination-alpha blending
|
||||||
|
|
||||||
|
The original skilldesc identifies 魅影 as skill 32, gungsin. The unchanged PC/PC2
|
||||||
|
MSA files attach gungsintanyeong start/end/blow effects. Base and grade-four start/end
|
||||||
|
MSE particles use SRCALPHA (5) / DESTALPHA (7), with MODULATE color operation.
|
||||||
|
EffectInstance and ParticleSystemInstance match the reference except include casing;
|
||||||
|
their state order, emission, asset colors, and textures remain unchanged.
|
||||||
|
|
||||||
|
RecordingDevice exposes an X8R8G8B8 back buffer and R5G6B5 GPU shadow targets.
|
||||||
|
Both have implicit destination alpha 1. Vulkan stores the scene in RGBA and the
|
||||||
|
previous pipeline incorrectly used the stored, draw-modified alpha for DESTALPHA.
|
||||||
|
This attenuated the background, including zero-alpha opaque scene pixels.
|
||||||
|
|
||||||
|
`src/host/blend_state.h` normalizes DESTALPHA to ONE, INVDESTALPHA to ZERO, and
|
||||||
|
SRCALPHASAT to ZERO for RGB targets before creating the Vulkan blend pipeline.
|
||||||
|
Ordinary source-alpha, additive, and color blend factors remain unchanged. This
|
||||||
|
helper applies only to the currently supported recorded RGB targets; future actual
|
||||||
|
alpha render targets must retain their own destination-alpha semantics.
|
||||||
|
|
||||||
|
Focused CTest `host.blend_state` passes. The GPU regression command is:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python3 tests/host/rgb_target_blend_test.py build/native/src/port/host_blend_state_test build/release/src/host/mt_native_render
|
||||||
|
```
|
||||||
|
|
||||||
|
It draws an opaque zero-alpha background followed by a SRCALPHA/DESTALPHA overlay,
|
||||||
|
reads the native renderer's BMP pixel, and checks RGB (128,128,160). The old native
|
||||||
|
executable fails with (0,64,128); the updated executable passes. This exercises
|
||||||
|
actual Vulkan blending, not just the mapping helper.
|
||||||
|
|
||||||
|
Native fake-server skill inspection used `--py-exec` to select the main instance,
|
||||||
|
set assassin race 1 and armor 0, then `chr.PushOnceMotion(chr.MOTION_SKILL+2,0.0)`.
|
||||||
|
Screenshots at 8 and 30 frames show bright particles and were inspected. These
|
||||||
|
timed screenshots are not a deterministic Windows visual oracle. Android debug
|
||||||
|
APK builds successfully; physical Android GPU and live-server skill-grade checks
|
||||||
|
remain unverified. The aggregate render contract stays PARTIAL.
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# macOS UI clarity evidence
|
||||||
|
|
||||||
|
The 40250 UI layout, item data, UVs and hit testing remain unchanged. Host rendering
|
||||||
|
snaps axis-aligned image origins to physical pixels and selects nearest sampling only
|
||||||
|
when sampled texels match physical pixels. Scaled images retain linear sampling.
|
||||||
|
Font atlases rebuild between script frames on display-density changes, preserving
|
||||||
|
cached character-info node addresses and logical metrics. HiDPI pages use 8-bit alpha.
|
||||||
|
|
||||||
|
The HD pipeline completed all 2406 images without skips (1898 icon, 384 UI and 124
|
||||||
|
Chinese locale images). The resulting 135.1 MiB archive is validated and embedded in
|
||||||
|
`dist/Metin2.app/Contents/Resources/hd_ui.pak`. Generated game assets remain private
|
||||||
|
build artifacts. The package includes SDL3, Vulkan loader and MoltenVK, uses bundled
|
||||||
|
rpaths and passes `codesign --verify --deep --strict` with local ad-hoc signatures.
|
||||||
|
|
||||||
|
Validation on 2026-09-30:
|
||||||
|
|
||||||
|
- Full native CTest: 29 passed, 2 skipped (codepage data absent and no live server).
|
||||||
|
- `host.ui_quality`: physical snapping, sampling decisions, font-density rounding,
|
||||||
|
valid archive lookup and malformed/truncated archive rejection.
|
||||||
|
- `port.text`: transitions 1→2→3→1→2 preserve character pointers, logical text
|
||||||
|
dimensions and advances; HiDPI page sizes and non-4-bit alpha are checked.
|
||||||
|
Linking this test with the previous font implementation fails 9 new assertions.
|
||||||
|
- Desktop and mobile-mode login flow pass. Native release renderer and Android debug
|
||||||
|
APK builds pass.
|
||||||
|
- Packaged launcher run from `/` loads 2406 bundled textures and reports 2× glyphs
|
||||||
|
at density 2.000. A two-frame local-server inventory fixture inserts weapon,
|
||||||
|
armor, jewelry and consumables, then opens and refreshes the inventory.
|
||||||
|
- Before and after images are `build/mac-ui-items-before.png` and
|
||||||
|
`build/mac-ui-items-after.png`, both 2560×1600. Visual inspection confirms sharper
|
||||||
|
inventory icon contours, slot borders and bottom toolbar detail.
|
||||||
|
|
||||||
|
This is macOS clarity evidence, not Windows pixel parity. Actual movement between
|
||||||
|
physical monitors of different density remains unverified. Original low-resolution
|
||||||
|
art still limits recoverable detail; `MT_HD_UI=0` retains an original-art comparison.
|
||||||
|
The HUD aggregate contract remains PARTIAL.
|
||||||
@@ -640,3 +640,14 @@
|
|||||||
{"date": "2026-09-30", "unit": "EterLib/GrpDevice.cpp", "action": "port", "evidence": "verbatim except Create (recording device in place of Direct3DCreate8/detector/CreateDevice, EL3D_ConfirmDevice on its caps); RecordingDevice decodes declaration-only vertex shaders to stream-0 FVFs; GrpScreen Show uses the GrpDevice browser globals; port.app_loop (PT/PNT/PNT2 FVFs, max texture 4096), full ctest, live-client screenshot matches"}
|
{"date": "2026-09-30", "unit": "EterLib/GrpDevice.cpp", "action": "port", "evidence": "verbatim except Create (recording device in place of Direct3DCreate8/detector/CreateDevice, EL3D_ConfirmDevice on its caps); RecordingDevice decodes declaration-only vertex shaders to stream-0 FVFs; GrpScreen Show uses the GrpDevice browser globals; port.app_loop (PT/PNT/PNT2 FVFs, max texture 4096), full ctest, live-client screenshot matches"}
|
||||||
{"date": "2026-09-30", "unit": "EterLib/GrpDetector.cpp", "action": "port", "evidence": "verbatim; IDirect3D8 shim completed (adapter count/caps/format checks/CreateDevice) and implemented once as the host adapter behind Direct3DCreate8 (RecordingDevice.cpp), which CPythonGraphic::GetD3D also returns; GrpDevice::Create now verbatim but for the D3DX debug meshes; port.app_loop (800x600x32 HWVP D16 mode, ms_lpd3d, GetString), full ctest, live-client screenshot matches"}
|
{"date": "2026-09-30", "unit": "EterLib/GrpDetector.cpp", "action": "port", "evidence": "verbatim; IDirect3D8 shim completed (adapter count/caps/format checks/CreateDevice) and implemented once as the host adapter behind Direct3DCreate8 (RecordingDevice.cpp), which CPythonGraphic::GetD3D also returns; GrpDevice::Create now verbatim but for the D3DX debug meshes; port.app_loop (800x600x32 HWVP D16 mode, ms_lpd3d, GetString), full ctest, live-client screenshot matches"}
|
||||||
{"date": "2026-09-30", "unit": "UserInterface/UserInterface.cpp", "action": "port", "evidence": "ApplicationSetErrorString/ApplicationStringTable_Initialize verbatim + port.app_loop; Main ADAPTED to PythonBoot; Win32 entry/launcher options N_A"}
|
{"date": "2026-09-30", "unit": "UserInterface/UserInterface.cpp", "action": "port", "evidence": "ApplicationSetErrorString/ApplicationStringTable_Initialize verbatim + port.app_loop; Main ADAPTED to PythonBoot; Win32 entry/launcher options N_A"}
|
||||||
|
{"date": "2026-09-30", "unit": "ScriptLib/PythonUtils.cpp", "action": "port", "evidence": "already verbatim (udiff: MSVC cast + perf counters); mapped"}
|
||||||
|
{"date": "2026-09-30", "unit": "ScriptLib/Resource.cpp", "action": "port", "evidence": "verbatim 40250 (was a rewrite that also registered .png); ctest 29/29, screenshot unchanged"}
|
||||||
|
{"date": "2026-09-30", "unit": "EterGrnLib/ModelInstanceUpdate.cpp", "action": "fix-platform-adapter", "evidence": "2026-09-30: native Granny adapter now selects the model-named track group, preserving all group metadata and limiting bone binding to that group. Real packed bear walk/run (auxiliary Hedra before Bip01) fail with the previous runtime and pass in tests/port/port_granny_root_motion_test.cpp. See audit/evidence/2026-09-30-bear-root-motion.md."}
|
||||||
|
{"date": "2026-09-30", "unit": "EffectLib/ParticleSystemInstance.cpp", "action": "fix-platform-adapter", "evidence": "XRGB destination alpha semantics fixed in Vulkan pipeline; focused mapping + GPU pixel regression; original particle logic unchanged; desktop/mobile login regressions and Android build pass."}
|
||||||
|
{"date": "2026-09-30", "unit": "EterLib/GrpFontTexture.cpp", "action": "improve-platform-rendering", "evidence": "Retina UI clarity: dynamic font atlas rebuild preserving cached pointers and logical metrics, 8-bit HiDPI glyph alpha, physical pixel alignment and 1:1 sampling; 2406 bundled HD textures. Full native suite 29 passed, 2 skipped, macOS packaged inventory screenshots and strict signature verification. See audit/evidence/2026-09-30-mac-ui-clarity.md."}
|
||||||
|
{"date": "2026-09-30", "unit": "EterLib/GrpImageInstance.cpp", "action": "improve-platform-rendering", "evidence": "Retina UI clarity: dynamic font atlas rebuild preserving cached pointers and logical metrics, 8-bit HiDPI glyph alpha, physical pixel alignment and 1:1 sampling; 2406 bundled HD textures. Full native suite 29 passed, 2 skipped, macOS packaged inventory screenshots and strict signature verification. See audit/evidence/2026-09-30-mac-ui-clarity.md."}
|
||||||
|
{"date": "2026-09-30", "unit": "UserInterface/PythonPlayerAutoHunt.cpp", "action": "user-authorized-extension", "evidence": "Replace tag-and-chase gather with free server-authoritative cloak-style BeginFight pull, nearest 3/10/20 actual monster groups. Server rate limit and safety checks, request generations, stationary approach wait. host.autohunt_pull and desktop/mobile port.login_flow pass; 203 FreeBSD compile/deploy and live 3-group/9-monster reply verified. See tools/server/autohunt-pull/README.md."}
|
||||||
|
{"date": "2026-09-30", "unit": "EterBase/CRC32.cpp", "action": "fix-platform-adapter", "evidence": "MI 8 Lite Android 15 fake-login SIGABRT/std::bad_alloc from directory CRC. Reject non-regular/null FILE handles and failed seeks; preserve normal CRC/position. port_utils_test pass, port_map check 0 errors; rebuilt APK installed and on-device fake-login/map entry succeeds. docs/XIAOMI8LITE-DEVICE-TEST-20260930.md"}
|
||||||
|
{"date": "2026-09-30", "action": "user-authorized-render-diagnostics", "units": ["UserInterface/PythonApplication.cpp", "GameLib/MapOutdoorRenderHTP.cpp", "GameLib/MapOutdoorRenderSTP.cpp"], "evidence": "7 same-scene MI 8 Lite runs, 42 two-second sample windows. Baseline 4.88 FPS/205.3ms, no terrain 15.45FPS/64.7ms, no scene 30.03FPS/17.7ms; repeated baseline 4.83 FPS. Normal rendering defaults unchanged. See docs/XIAOMI8LITE-RENDER-ISOLATION-20260930.md."}
|
||||||
|
{"date": "2026-09-30", "unit": "Client/root/uiaffectshower.py", "result": "RUN_AS_IS unchanged; authorized PORT extension for server rates", "evidence": ["src/platform/ScriptLib/ServerBonusScript.inc", "tools/server/autohunt-pull-range/server_bonuses.h", "build/autohunt-fix-test.log", "build/autohunt-fix-mobile-test.log", "build/autohunt-bonuses-android.png"], "finding": "40250 global privileges emit login notices rather than character AFFECT packets; added distinct status channel, packed scripts unchanged."}
|
||||||
|
{"date": "2026-10-01", "unit": "UserInterface/PythonPlayerAutoHunt.cpp", "action": "user-authorized-extension", "evidence": ["docs/AUTO-HUNT-ENHANCEMENTS.md", "build/autohunt-enhance-test.log", "build/autohunt-enhance-mobile-test.log", "build/autohunt-enhance-mac-build.log", "build/autohunt-enhance-android-build.log", "build/qa/autohunt-enhance-ui/settings.png"], "finding": "Added bounded terrain/scene-collision A* and reachability for combat/loot/return; independent learned skill-ID selection with legacy config migration; optional server restart_here and 5-second/70%-HP recovery; acknowledged dismount/cast/remount batching. Original manual movement and packed Python scripts unchanged. Desktop/mobile fake-server integration and macOS/Android builds pass; real-server soak not claimed."}
|
||||||
|
|||||||
@@ -684,6 +684,14 @@
|
|||||||
"tests": [
|
"tests": [
|
||||||
"project/app_flow_lifecycle_test.gd"
|
"project/app_flow_lifecycle_test.gd"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"reference": "CPythonApplication::Process on the 60 Hz s_uiNextFrameTime update clock; a late frame skips only the render (s_bFrameSkip), so CPythonNetworkStream::Process runs every 16/17 ms",
|
||||||
|
"implementation": "src/platform/UserInterface/PythonApplication.cpp CPythonApplication::Process: one host frame polls the stream once per elapsed 60 Hz tick (catch-up capped at 500 ms)",
|
||||||
|
"invariant": "GamePhase packet budget (3 packets a poll below 8 KB pending) must be 180/s regardless of render rate; at 30 fps idle it was 90/s and mob move packets queued behind character add/del bursts",
|
||||||
|
"tests": [
|
||||||
|
"real server 192.168.21.203 chase probe A/B 2026-09-30: GC_MOVE push gap p50 138-178 -> 70-92 ms, p90 580-785 -> 358-403 ms"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"evidence": {
|
"evidence": {
|
||||||
@@ -1894,9 +1902,13 @@
|
|||||||
"project/mob_view_test.gd",
|
"project/mob_view_test.gd",
|
||||||
"project/motion_event_payload_test.gd",
|
"project/motion_event_payload_test.gd",
|
||||||
"project/motion_registry_test.gd",
|
"project/motion_registry_test.gd",
|
||||||
"project/hit_view_test.gd"
|
"project/hit_view_test.gd",
|
||||||
|
"tests/port/port_granny_root_motion_test.cpp"
|
||||||
],
|
],
|
||||||
"last_test_result": "PASS: PC playersettingmodule motion registry (registration order/weights), HORSE parent fallback, knockdown/stand-up early-return, MSA MotionDuration authority, LoopData skill timing, motion event payloads, and hot clip/MSA cache reuse regressions passed; NPC/full RaceData/event-consumer parity remains PARTIAL"
|
"last_test_result": "PASS: PC playersettingmodule motion registry (registration order/weights), HORSE parent fallback, knockdown/stand-up early-return, MSA MotionDuration authority, LoopData skill timing, motion event payloads, and hot clip/MSA cache reuse regressions passed; NPC/full RaceData/event-consumer parity remains PARTIAL",
|
||||||
|
"commands": [
|
||||||
|
"2026-09-30: ctest --test-dir build/native -R port.granny_root_motion --output-on-failure PASS; HEAD GrannyRuntime linked against the same packed-asset test FAIL (zero root displacement). audit/evidence/2026-09-30-bear-root-motion.md"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"remaining": [
|
"remaining": [
|
||||||
"扩展已接入的 PC playersettingmodule registry 快照,对比 NPC motlist、horse/wedding/skill 的每个 motion key 和缺失 key 失败语义",
|
"扩展已接入的 PC playersettingmodule registry 快照,对比 NPC motlist、horse/wedding/skill 的每个 motion key 和缺失 key 失败语义",
|
||||||
@@ -3852,9 +3864,14 @@
|
|||||||
"project/motion_event_payload_test.gd",
|
"project/motion_event_payload_test.gd",
|
||||||
"project/motion_event_visibility_test.gd",
|
"project/motion_event_visibility_test.gd",
|
||||||
"project/net_world_motion_event_test.gd",
|
"project/net_world_motion_event_test.gd",
|
||||||
"project/motion_event_warp_test.gd"
|
"project/motion_event_warp_test.gd",
|
||||||
|
"tests/host/blend_state_test.cpp",
|
||||||
|
"tests/host/rgb_target_blend_test.py"
|
||||||
],
|
],
|
||||||
"last_test_result": "PASS"
|
"last_test_result": "PASS",
|
||||||
|
"commands": [
|
||||||
|
"2026-09-30: host.blend_state PASS; python3 tests/host/rgb_target_blend_test.py build/native/src/port/host_blend_state_test build/release/src/host/mt_native_render PASS (128,128,160); previous executable FAIL (0,64,128). Native gungsin motion screenshots inspected; Android APK build PASS. audit/evidence/2026-09-30-gungsin-blending.md"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"remaining": [
|
"remaining": [
|
||||||
"type 4/6 的生产分支和专用字段消费;type 9 WARP 已接入但远端目标生命周期仍待 live 验证",
|
"type 4/6 的生产分支和专用字段消费;type 9 WARP 已接入但远端目标生命周期仍待 live 验证",
|
||||||
@@ -4122,7 +4139,15 @@
|
|||||||
"focus_pause_exit_cleanup": "PARTIAL"
|
"focus_pause_exit_cleanup": "PARTIAL"
|
||||||
},
|
},
|
||||||
"platform_adaptations": [
|
"platform_adaptations": [
|
||||||
"Godot mobile touch/joystick/pinch/landscape UI is a platform adaptation and has no direct Windows 40250 branch to compare 1:1."
|
"Godot mobile touch/joystick/pinch/landscape UI is a platform adaptation and has no direct Windows 40250 branch to compare 1:1.",
|
||||||
|
{
|
||||||
|
"reference": "CGraphicImageTexture loads the UI images (d:/ymir work/ui/, icon/, locale/<locale>/ui) from the packs at their 1x size; 40250 draws them 1:1 on an 800x600+ desktop",
|
||||||
|
"implementation": "src/host/vk_textures.cpp get_gpu_texture -> src/host/texture_decode.cpp read_hd_ui_texture: a UI texture present in hd_ui.pak (scripts/build_hd_ui.py, realesrgan-x4plus + back-projection, 2x) is uploaded in place of the pack file; MT_HD_UI=0 disables",
|
||||||
|
"invariant": "only the GPU texel density changes: the engine's own decode, the image sizes, layout, quads and normalized UVs stay the 40250 1x ones; a name absent from the pak falls back to the pack",
|
||||||
|
"tests": [
|
||||||
|
"real server 192.168.21.203 shop + character window A/B 2026-09-30 (MT_HD_UI=0 vs 1, 600-high UI at ~1.7x): identical layout, icons and portrait sharper, board grain kept; 2406 textures, 135 MB pak"
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"evidence": {
|
"evidence": {
|
||||||
"contract": "audit/contracts/ui.input-camera-mobile.md",
|
"contract": "audit/contracts/ui.input-camera-mobile.md",
|
||||||
@@ -4236,9 +4261,17 @@
|
|||||||
"project/name_show_test.gd",
|
"project/name_show_test.gd",
|
||||||
"project/char_status_ui_test.gd",
|
"project/char_status_ui_test.gd",
|
||||||
"project/test_taskbar_quickslot_parity.gd",
|
"project/test_taskbar_quickslot_parity.gd",
|
||||||
"project/taskbar_dock_test.gd"
|
"project/taskbar_dock_test.gd",
|
||||||
|
"tests/host/ui_quality_test.cpp",
|
||||||
|
"tests/port/port_text_test.cpp"
|
||||||
],
|
],
|
||||||
"last_test_result": "PARTIAL"
|
"last_test_result": "PARTIAL",
|
||||||
|
"commands": [
|
||||||
|
"2026-09-30: native UI HiDPI font refresh and sampling checks PASS; previous font runtime fails 9 new assertions. Full native CTest: 29 pass, codepage and live login skipped. Actual mac app HD archive/launch/screenshot checks recorded in audit/evidence/2026-09-30-mac-ui-clarity.md. Aggregate HUD parity remains PARTIAL."
|
||||||
|
],
|
||||||
|
"notes": [
|
||||||
|
"2026-10-02: SCREEN waypoint atlas must retain original black RGB under alpha=0; HD minimap.dds colour bleed reproduced, native five-frame waypoint smoke renders clean rings after original-atlas fallback. build/minimap-fix-smoke.png. Full Windows visual parity remains unverified."
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"remaining": [
|
"remaining": [
|
||||||
"在正式 GameScene 创建并注入唯一 TargetUI,移除/隐藏简化目标条并补生产链回归",
|
"在正式 GameScene 创建并注入唯一 TargetUI,移除/隐藏简化目标条并补生产链回归",
|
||||||
|
|||||||
@@ -511,7 +511,8 @@
|
|||||||
],
|
],
|
||||||
"evidence": [
|
"evidence": [
|
||||||
"scripts/verify_root_pack.py: uiaffectshower.py bytes match 40250 source and root.epk",
|
"scripts/verify_root_pack.py: uiaffectshower.py bytes match 40250 source and root.epk",
|
||||||
"scripts/python_game_render_test.sh: embedded CPython loads system.py and game modules through CEterPackManager"
|
"scripts/python_game_render_test.sh: embedded CPython loads system.py and game modules through CEterPackManager",
|
||||||
|
"2026-09-30 PORT server-bonus extension: original affect script unchanged; port.login_flow checks separate global/event entries and expiry/update via real CHAT_TYPE_COMMAND; Mi 8 Lite tooltip verified."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"AffectShower.OnUpdate": {
|
"AffectShower.OnUpdate": {
|
||||||
@@ -521,7 +522,8 @@
|
|||||||
],
|
],
|
||||||
"evidence": [
|
"evidence": [
|
||||||
"scripts/verify_root_pack.py: uiaffectshower.py bytes match 40250 source and root.epk",
|
"scripts/verify_root_pack.py: uiaffectshower.py bytes match 40250 source and root.epk",
|
||||||
"scripts/python_game_render_test.sh: embedded CPython loads system.py and game modules through CEterPackManager"
|
"scripts/python_game_render_test.sh: embedded CPython loads system.py and game modules through CEterPackManager",
|
||||||
|
"2026-09-30 PORT server-bonus extension: original affect script unchanged; port.login_flow checks separate global/event entries and expiry/update via real CHAT_TYPE_COMMAND; Mi 8 Lite tooltip verified."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,8 @@
|
|||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/port/EffectLib/EffectInstance.cpp:CEffectInstance::OnRender"
|
"src/port/EffectLib/EffectInstance.cpp:CEffectInstance::OnRender"
|
||||||
]
|
],
|
||||||
|
"note": "2026-09-30: reference statements remain verbatim apart from include case. Native Vulkan adapter now interprets destination alpha as 1 on recorded X8R8G8B8/R5G6B5 targets; gungsin start/end particles use SRCALPHA/DESTALPHA. Focused mapping and actual GPU pixel regression fail before/pass after. See audit/evidence/2026-09-30-gungsin-blending.md."
|
||||||
},
|
},
|
||||||
"CEffectInstance::SetGlobalMatrix": {
|
"CEffectInstance::SetGlobalMatrix": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
|
|||||||
@@ -44,7 +44,8 @@
|
|||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/port/EffectLib/ParticleSystemInstance.cpp:CParticleSystemInstance::OnRender"
|
"src/port/EffectLib/ParticleSystemInstance.cpp:CParticleSystemInstance::OnRender"
|
||||||
]
|
],
|
||||||
|
"note": "2026-09-30: reference statements remain verbatim apart from include case. Native Vulkan adapter now interprets destination alpha as 1 on recorded X8R8G8B8/R5G6B5 targets; gungsin start/end particles use SRCALPHA/DESTALPHA. Focused mapping and actual GPU pixel regression fail before/pass after. See audit/evidence/2026-09-30-gungsin-blending.md."
|
||||||
},
|
},
|
||||||
"CParticleSystemInstance::OnSetDataPointer": {
|
"CParticleSystemInstance::OnSetDataPointer": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_utils_test.cpp"
|
"tests/port/port_utils_test.cpp"
|
||||||
],
|
],
|
||||||
"note": "40250 maps the file (CreateFile + CreateFileMapping/MapViewOfFile from offset 0) and CRCs the whole view; the port reads the whole FILE* into a buffer. Invariant: same CRC of the full file, the handle's position is unchanged, 0 when the file cannot be opened."
|
"note": "40250 maps the file (CreateFile + CreateFileMapping/MapViewOfFile from offset 0) and CRCs the whole view; the port reads the whole FILE* into a buffer. Invariant: same CRC of the full file, the handle's position is unchanged, 0 when the file cannot be opened. Android 15 MI 8 Lite regression: reject non-regular FILE handles before seeking/allocating, preserving Win32 directory-open failure; check seek errors. Directory/null regression in port_utils_test and successful on-device fake-login/map entry after prior std::bad_alloc abort."
|
||||||
},
|
},
|
||||||
"GetFileCRC32": {
|
"GetFileCRC32": {
|
||||||
"status": "ADAPTED",
|
"status": "ADAPTED",
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_utils_test.cpp"
|
"tests/port/port_utils_test.cpp"
|
||||||
],
|
],
|
||||||
"note": "40250 maps the file (CreateFile + CreateFileMapping/MapViewOfFile from offset 0) and CRCs the whole view; the port reads the whole FILE* into a buffer. Invariant: same CRC of the full file, the handle's position is unchanged, 0 when the file cannot be opened. Callers: GuildMarkUploader/GuildMarkDownloader symbol CRC, root pack CRC report."
|
"note": "40250 maps the file (CreateFile + CreateFileMapping/MapViewOfFile from offset 0) and CRCs the whole view; the port reads the whole FILE* into a buffer. Invariant: same CRC of the full file, the handle's position is unchanged, 0 when the file cannot be opened. Callers: GuildMarkUploader/GuildMarkDownloader symbol CRC, root pack CRC report. Android 15 MI 8 Lite regression: reject non-regular FILE handles before seeking/allocating, preserving Win32 directory-open failure; check seek errors. Directory/null regression in port_utils_test and successful on-device fake-login/map entry after prior std::bad_alloc abort."
|
||||||
},
|
},
|
||||||
"GetFileSize": {
|
"GetFileSize": {
|
||||||
"status": "ADAPTED",
|
"status": "ADAPTED",
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/port/EterGrnLib/ModelInstanceUpdate.cpp:CGrannyModelInstance::UpdateTransform"
|
"src/port/EterGrnLib/ModelInstanceUpdate.cpp:CGrannyModelInstance::UpdateTransform"
|
||||||
]
|
],
|
||||||
|
"note": "2026-09-30: native Granny adapter now selects the model-named track group, preserving all group metadata and limiting bone binding to that group. Real packed bear walk/run (auxiliary Hedra before Bip01) fail with the previous runtime and pass in tests/port/port_granny_root_motion_test.cpp. See audit/evidence/2026-09-30-bear-root-motion.md."
|
||||||
},
|
},
|
||||||
"CGrannyModelInstance::Deform": {
|
"CGrannyModelInstance::Deform": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_text_test.cpp"
|
"tests/port/port_text_test.cpp"
|
||||||
],
|
],
|
||||||
"note": "40250: deletes each HFONT of the font map. Port: also deletes its oversampled twin. Invariant: 40250 teardown; no leaked GDI fonts."
|
"note": "40250 deletes fonts/pages. PORT also unregisters the live raster atlas and deletes oversampled twins; rebuilding preserves cached character-info node addresses. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
|
||||||
},
|
},
|
||||||
"CGraphicFontTexture::CreateDeviceObjects": {
|
"CGraphicFontTexture::CreateDeviceObjects": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_text_test.cpp"
|
"tests/port/port_text_test.cpp"
|
||||||
],
|
],
|
||||||
"note": "40250: the page DIB is width x height. Port: width*s x height*s for oversample s (1 by default = 40250). Invariant: logical page size, metrics and UVs unchanged."
|
"note": "40250 retains logical font metrics and atlas dimensions. PORT allocates 1–4x raster pages and registers successful atlases for monitor-density refresh; port.text verifies unchanged width/height/advance and stable glyph pointers. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
|
||||||
},
|
},
|
||||||
"CGraphicFontTexture::GetFont": {
|
"CGraphicFontTexture::GetFont": {
|
||||||
"status": "ADAPTED",
|
"status": "ADAPTED",
|
||||||
@@ -89,22 +89,24 @@
|
|||||||
"note": "40250: CreateFontIndirect per code page. Port: with s > 1 also creates an s-times-height twin for drawing. Invariant: the measuring font is the 40250 one."
|
"note": "40250: CreateFontIndirect per code page. Port: with s > 1 also creates an s-times-height twin for drawing. Invariant: the measuring font is the 40250 one."
|
||||||
},
|
},
|
||||||
"CGraphicFontTexture::AppendTexture": {
|
"CGraphicFontTexture::AppendTexture": {
|
||||||
"status": "PORTED",
|
"status": "ADAPTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::AppendTexture"
|
"src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::AppendTexture"
|
||||||
],
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_text_test.cpp"
|
"tests/port/port_text_test.cpp"
|
||||||
]
|
],
|
||||||
|
"note": "40250 creates A4R4G4B4 pages. PORT uses A8R8G8B8 for HiDPI pages to retain 256 coverage levels; 1x still uses A4R4G4B4. tests/port/port_text_test.cpp checks alpha finer than 4-bit. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
|
||||||
},
|
},
|
||||||
"CGraphicFontTexture::UpdateTexture": {
|
"CGraphicFontTexture::UpdateTexture": {
|
||||||
"status": "PORTED",
|
"status": "ADAPTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::UpdateTexture"
|
"src/platform/EterLib/GrpFontTexture.cpp:CGraphicFontTexture::UpdateTexture"
|
||||||
],
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_text_test.cpp"
|
"tests/port/port_text_test.cpp"
|
||||||
]
|
],
|
||||||
|
"note": "40250 copies DIB cells into 16-bit pages. PORT copies 32-bit ARGB rows for HiDPI pages; 1x retains the original conversion. Tests check actual published memory textures. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
|
||||||
},
|
},
|
||||||
"CGraphicFontTexture::GetCharacterInfomation": {
|
"CGraphicFontTexture::GetCharacterInfomation": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
@@ -123,7 +125,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_text_test.cpp"
|
"tests/port/port_text_test.cpp"
|
||||||
],
|
],
|
||||||
"note": "40250: TextOutW with the 1x font, bilevel threshold into A4R4G4B4. Port: with s > 1 draws the glyph with the twin into the s-scaled cell keeping coverage alpha; s == 1 is the 40250 path. Invariant: width/height/advance and packing are the logical 1x values."
|
"note": "40250 measures the logical font and caches metrics/UVs. PORT draws oversampled white glyphs with 8-bit coverage and preserves logical metrics. Monitor changes rebuild map values in place without invalidating text-instance pointers; port.text tests 1→2→3→1→2 scales. See docs/MAC-UI-CLARITY.md and audit/evidence/2026-09-30-mac-ui-clarity.md."
|
||||||
},
|
},
|
||||||
"CGraphicFontTexture::CheckTextureIndex": {
|
"CGraphicFontTexture::CheckTextureIndex": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"tests/port/port_grp_resource_test.cpp"
|
"tests/port/port_grp_resource_test.cpp"
|
||||||
],
|
],
|
||||||
"note": "40250: SetPDTStream + DEFAULT_IB_FILL_RECT + stage-0 texture, DrawIndexedPrimitive. Port: the same four TPDTVertex corners/UVs/diffuse go to UIRenderAddImage. Invariant: quad = image rect at m_v2Position-0.5, UVs = rect/texture size."
|
"note": "40250: SetPDTStream + DEFAULT_IB_FILL_RECT + stage-0 texture, DrawIndexedPrimitive. Port: the same four TPDTVertex corners/UVs/diffuse go to UIRenderAddImage. Invariant: quad = image rect at m_v2Position-0.5, UVs = rect/texture size. 2026-09-30: native host snaps axis-aligned quad origins by at most half a physical pixel and uses point sampling only at 1:1 texel/pixel density; source layout/UVs and rotated quads unchanged. host.ui_quality + mac UI screenshots. See docs/MAC-UI-CLARITY.md."
|
||||||
},
|
},
|
||||||
"CGraphicImageInstance::GetTextureReference": {
|
"CGraphicImageInstance::GetTextureReference": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"impl": [
|
"impl": [
|
||||||
"src/platform/GameLib/MapOutdoorRenderHTP.cpp:CMapOutdoor::__RenderTerrain_RenderHardwareTransformPatch"
|
"src/platform/GameLib/MapOutdoorRenderHTP.cpp:CMapOutdoor::__RenderTerrain_RenderHardwareTransformPatch"
|
||||||
],
|
],
|
||||||
"note": "Verbatim 40250 body plus an early return when IsNativeTerrainRenderEnabled() is false (Godot terrain adapter path, PORT-PLAN §3). Fake-server frame: far band no longer white, layout matches the STP path; pixel parity vs a 40250 frame not verified."
|
"note": "Verbatim 40250 body plus an early return when IsNativeTerrainRenderEnabled() is false (Godot terrain adapter path, PORT-PLAN \u00a73). Fake-server frame: far band no longer white, layout matches the STP path; pixel parity vs a 40250 frame not verified. Opt-in MT_DIAGNOSTIC_SKIP_RENDER isolates drawing only for device profiling; absent on normal launches, simulation/network unchanged. See tools/perf/run_render_isolation.py and docs/XIAOMI8LITE-RENDER-ISOLATION-20260930.md."
|
||||||
},
|
},
|
||||||
"CMapOutdoor::__HardwareTransformPatch_RenderPatchSplat": {
|
"CMapOutdoor::__HardwareTransformPatch_RenderPatchSplat": {
|
||||||
"status": "NEEDS_LIVE",
|
"status": "NEEDS_LIVE",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
"impl": [
|
"impl": [
|
||||||
"src/platform/GameLib/MapOutdoorRenderSTP.cpp:CMapOutdoor::__RenderTerrain_RenderSoftwareTransformPatch"
|
"src/platform/GameLib/MapOutdoorRenderSTP.cpp:CMapOutdoor::__RenderTerrain_RenderSoftwareTransformPatch"
|
||||||
],
|
],
|
||||||
"note": "Verbatim 40250 body plus an early return when IsNativeTerrainRenderEnabled() is false (Godot terrain adapter path, PORT-PLAN §3), same gate as HTP. Reached only with SOFTWARE_TILING 1 or a non-fast-T&L device. Fake-server STP frame matches HTP layout; pixel parity vs a 40250 STP frame not verified."
|
"note": "Verbatim 40250 body plus an early return when IsNativeTerrainRenderEnabled() is false (Godot terrain adapter path, PORT-PLAN \u00a73), same gate as HTP. Reached only with SOFTWARE_TILING 1 or a non-fast-T&L device. Fake-server STP frame matches HTP layout; pixel parity vs a 40250 STP frame not verified. Opt-in MT_DIAGNOSTIC_SKIP_RENDER isolates drawing only for device profiling; absent on normal launches, simulation/network unchanged. See tools/perf/run_render_isolation.py and docs/XIAOMI8LITE-RENDER-ISOLATION-20260930.md."
|
||||||
},
|
},
|
||||||
"CMapOutdoor::__SoftwareTransformPatch_RenderPatchSplat": {
|
"CMapOutdoor::__SoftwareTransformPatch_RenderPatchSplat": {
|
||||||
"status": "NEEDS_LIVE",
|
"status": "NEEDS_LIVE",
|
||||||
|
|||||||
@@ -5,61 +5,122 @@
|
|||||||
"contracts": [],
|
"contracts": [],
|
||||||
"functions": {
|
"functions": {
|
||||||
"Py_BadArgument": {
|
"Py_BadArgument": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:Py_BadArgument"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"Py_BuildException": {
|
"Py_BuildException": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:Py_BuildException"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"Py_BuildNone": {
|
"Py_BuildNone": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:Py_BuildNone"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"Py_ReleaseNone": {
|
"Py_ReleaseNone": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:Py_ReleaseNone"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetObject": {
|
"PyTuple_GetObject": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetObject"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetLong": {
|
"PyTuple_GetLong": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetLong"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetDouble": {
|
"PyTuple_GetDouble": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetDouble"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetFloat": {
|
"PyTuple_GetFloat": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetFloat"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetByte": {
|
"PyTuple_GetByte": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetByte"
|
||||||
|
],
|
||||||
|
"note": "verbatim except `unsigned char(val)` (MSVC-only cast) written as `(unsigned char) val`."
|
||||||
},
|
},
|
||||||
"PyTuple_GetInteger": {
|
"PyTuple_GetInteger": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetInteger"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetUnsignedLong": {
|
"PyTuple_GetUnsignedLong": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetUnsignedLong"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetUnsignedInteger": {
|
"PyTuple_GetUnsignedInteger": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetUnsignedInteger"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetString": {
|
"PyTuple_GetString": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetString"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyTuple_GetBoolean": {
|
"PyTuple_GetBoolean": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyTuple_GetBoolean"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyCallClassMemberFunc": {
|
"PyCallClassMemberFunc": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyCallClassMemberFunc"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"PyCallClassMemberFunc_ByPyString": {
|
"PyCallClassMemberFunc_ByPyString": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:PyCallClassMemberFunc_ByPyString"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"__PyCallClassMemberFunc_ByCString": {
|
"__PyCallClassMemberFunc_ByCString": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:__PyCallClassMemberFunc_ByCString"
|
||||||
|
],
|
||||||
|
"note": "verbatim plus the MtPerf::CPythonScope / CountPythonMissing perf counters (no behaviour change)."
|
||||||
},
|
},
|
||||||
"__PyCallClassMemberFunc_ByPyString": {
|
"__PyCallClassMemberFunc_ByPyString": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:__PyCallClassMemberFunc_ByPyString"
|
||||||
|
],
|
||||||
|
"note": "verbatim plus the MtPerf::CPythonScope / CountPythonMissing perf counters (no behaviour change)."
|
||||||
},
|
},
|
||||||
"__PyCallClassMemberFunc": {
|
"__PyCallClassMemberFunc": {
|
||||||
"status": "TODO"
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/port/ScriptLib/PythonUtils.cpp:__PyCallClassMemberFunc"
|
||||||
|
],
|
||||||
|
"note": "verbatim plus the MtPerf::CPythonScope / CountPythonMissing perf counters (no behaviour change)."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"reference": "ScriptLib/Resource.cpp",
|
||||||
|
"reference_sha256": "559339874da495b2e5fbeb78256a6ea9dfde2ea11f838d55c4f01b918a052c7f",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"NewImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:NewImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"NewSubImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:NewSubImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"NewText": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:NewText"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"NewThing": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:NewThing"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"NewEffectMesh": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:NewEffectMesh"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"NewAttributeData": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:NewAttributeData"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonResource::DumpFileList": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:CPythonResource::DumpFileList"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonResource::Destroy": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:CPythonResource::Destroy"
|
||||||
|
],
|
||||||
|
"note": "verbatim; like 40250 only CPythonApplication::Destroy calls it, which is DIVERGENT (host tears down via PythonBoot::Stop resets), so it does not run at shutdown yet."
|
||||||
|
},
|
||||||
|
"CPythonResource::CPythonResource": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:CPythonResource::CPythonResource"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonResource::~CPythonResource": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"src/platform/ScriptLib/Resource.cpp:CPythonResource::~CPythonResource"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
"src/platform/UserInterface/PythonApplication.cpp:CPythonApplication::RenderGame"
|
"src/platform/UserInterface/PythonApplication.cpp:CPythonApplication::RenderGame"
|
||||||
],
|
],
|
||||||
"test": "tests/port/port_login_flow_test.cpp",
|
"test": "tests/port/port_login_flow_test.cpp",
|
||||||
"note": "40250's !PERF_CHECKER_RENDER_GAME branch line for line, members reached through their singletons; the perf-timing branch (PERF_CHECKER_RENDER_GAME is FALSE) is left out."
|
"note": "40250's !PERF_CHECKER_RENDER_GAME branch line for line, members reached through their singletons; the perf-timing branch (PERF_CHECKER_RENDER_GAME is FALSE) is left out. Opt-in MT_DIAGNOSTIC_SKIP_RENDER isolates drawing only for device profiling; absent on normal launches, simulation/network unchanged. See tools/perf/run_render_isolation.py and docs/XIAOMI8LITE-RENDER-ISOLATION-20260930.md."
|
||||||
},
|
},
|
||||||
"CPythonApplication::UpdateGame": {
|
"CPythonApplication::UpdateGame": {
|
||||||
"status": "ADAPTED",
|
"status": "ADAPTED",
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
"impl": [
|
"impl": [
|
||||||
"src/platform/UserInterface/PythonApplication.cpp:CPythonApplication::Create"
|
"src/platform/UserInterface/PythonApplication.cpp:CPythonApplication::Create"
|
||||||
],
|
],
|
||||||
"note": "40250 CPythonApplication lifecycle and state adapted for platform host and singletons; m_LightManager.Initialize() (40250 :1263) now called; Destroy() still empty (m_LightManager.Destroy at 40250 :1418 not yet mirrored); 40250 :1196-1251 tiling selection mirrored (SOFTWARE_TILING cfg → GRAPHICS_CAPS_SOFTWARE_TILING before device create, auto tiling IsFastTNL ? HTP : STP via ReserveSoftwareTilingEnable, !IsFastTNL → CGrannyLODController::SetMinLODMode(true)); RecordingDevice caps report VS 1.1 + CLIPTLVERTS so auto picks HTP",
|
"note": "40250 CPythonApplication lifecycle and state adapted for platform host and singletons; m_LightManager.Initialize() (40250 :1263) now called; Destroy() still empty (m_LightManager.Destroy at 40250 :1418 not yet mirrored); 40250 :1196-1251 tiling selection mirrored (SOFTWARE_TILING cfg \u2192 GRAPHICS_CAPS_SOFTWARE_TILING before device create, auto tiling IsFastTNL ? HTP : STP via ReserveSoftwareTilingEnable, !IsFastTNL \u2192 CGrannyLODController::SetMinLODMode(true)); RecordingDevice caps report VS 1.1 + CLIPTLVERTS so auto picks HTP",
|
||||||
"test": "tests/port/port_login_flow_test.cpp"
|
"test": "tests/port/port_login_flow_test.cpp"
|
||||||
},
|
},
|
||||||
"CPythonApplication::SetGlobalCenterPosition": {
|
"CPythonApplication::SetGlobalCenterPosition": {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"reference": "UserInterface/PythonNetworkDatagramModule.cpp",
|
||||||
|
"reference_sha256": "fc49120f237cee410aeb9d8d18dcda0eeeb8a244f541af878b8ebaf08858e9de",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"initudp": {
|
||||||
|
"status": "TODO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -38,7 +38,8 @@
|
|||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/port/UserInterface/PythonNetworkStreamCommand.cpp:CPythonNetworkStream::ServerCommand"
|
"src/port/UserInterface/PythonNetworkStreamCommand.cpp:CPythonNetworkStream::ServerCommand"
|
||||||
]
|
],
|
||||||
|
"note": "User-authorized auto-hunt extension consumes only AutoHuntGather replies before unchanged 40250 command handling. Current request generations reject stale/stopped replies; tests/port/autohunt_pull_checks.inc verifies Python settings and CG_CHAT/GC_CHAT through the real network stream. Original commands remain unchanged."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,7 +242,17 @@
|
|||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
"impl": [
|
"impl": [
|
||||||
"src/port/UserInterface/PythonPlayer.cpp:CPythonPlayer::NotifyDeadMainCharacter"
|
"src/port/UserInterface/PythonPlayer.cpp:CPythonPlayer::NotifyDeadMainCharacter"
|
||||||
]
|
],
|
||||||
|
"note": "Original auto-attack cleanup retained; user-authorized PORT auto-hunt extension optionally waits for server restart_here and recovery. Default remains stopping on death. See docs/AUTO-HUNT-ENHANCEMENTS.md.",
|
||||||
|
"evidence": {
|
||||||
|
"tests": [
|
||||||
|
"tests/port/autohunt_recovery_checks.inc"
|
||||||
|
],
|
||||||
|
"commands": [
|
||||||
|
"ctest --test-dir build/native -R ^port.login_flow$ --output-on-failure",
|
||||||
|
"MT_TEST_MOBILE=1 ctest --test-dir build/native -R ^port.login_flow$ --output-on-failure"
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"CPythonPlayer::NotifyChangePKMode": {
|
"CPythonPlayer::NotifyChangePKMode": {
|
||||||
"status": "PORTED",
|
"status": "PORTED",
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"reference": "UserInterface/PythonProfilerModule.cpp",
|
||||||
|
"reference_sha256": "6afa0c492e2ad88eea775c55ff3f6bd9c490abe91408772dae461e40a207b96c",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"profilerPush": {
|
||||||
|
"status": "TODO"
|
||||||
|
},
|
||||||
|
"profilerPop": {
|
||||||
|
"status": "TODO"
|
||||||
|
},
|
||||||
|
"initProfiler": {
|
||||||
|
"status": "TODO"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
# Renders branding/icon/icon.svg into every platform icon and writes them where the builds pick them up:
|
||||||
|
# android/app/src/main/res/mipmap-* legacy ic_launcher / ic_launcher_round (API 24-25) and the
|
||||||
|
# adaptive-icon layers (API 26+, mipmap-anydpi-v26/*.xml)
|
||||||
|
# branding/icon/macos/AppIcon.icns macOS app icon (Big Sur squircle with drop shadow)
|
||||||
|
# branding/icon/ios/AppIcon.appiconset iOS single-size 1024 icon (opaque)
|
||||||
|
# The outputs are committed, so building the apps does not need this script. Rerun it after editing the SVG.
|
||||||
|
# Needs Google Chrome (SVG filters) and ImageMagick (`brew install imagemagick`); iconutil ships with macOS.
|
||||||
|
set -euo pipefail
|
||||||
|
here=${0:A:h}
|
||||||
|
repo=${here:h:h}
|
||||||
|
chrome=${CHROME:-"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"}
|
||||||
|
work=$(mktemp -d)
|
||||||
|
trap 'rm -rf "$work"' EXIT
|
||||||
|
|
||||||
|
# icon.svg -> full / background-only / foreground-only (scaled into the adaptive-icon safe zone) SVGs.
|
||||||
|
python3 - "$here/icon.svg" "$work" <<'EOF'
|
||||||
|
import re, sys
|
||||||
|
src, out = sys.argv[1], sys.argv[2]
|
||||||
|
svg = open(src).read()
|
||||||
|
# Both layer groups sit at two-space indent; the foreground one is the last element and holds nested groups.
|
||||||
|
bg = re.search(r' <g id="background">.*?\n </g>\n', svg, re.S)
|
||||||
|
fg = re.search(r' <g id="foreground">.*\n </g>\n(?=</svg>)', svg, re.S)
|
||||||
|
assert bg and fg
|
||||||
|
open(out + "/full.svg", "w").write(svg)
|
||||||
|
open(out + "/background.svg", "w").write(svg.replace(fg.group(0), ""))
|
||||||
|
# Adaptive icons show the inner 72 of 108 dp (338 px of the 512 half-width) and launchers mask inside that.
|
||||||
|
# Scale the foreground so the ring (outer radius 405 around (512, 500)) sits at the same 79% of the visible
|
||||||
|
# radius as in the full icon: 405 * 0.66 = 267 = 0.79 * 338.
|
||||||
|
scaled = ' <g transform="translate(512 512) scale(0.66) translate(-512 -500)">\n' + fg.group(0) + ' </g>\n'
|
||||||
|
open(out + "/foreground.svg", "w").write(svg.replace(bg.group(0), "").replace(fg.group(0), scaled))
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for name in full background foreground; do
|
||||||
|
"$chrome" --headless=new --disable-gpu --hide-scrollbars --default-background-color=00000000 \
|
||||||
|
--window-size=1024,1024 --screenshot="$work/$name.png" "file://$work/$name.svg" >/dev/null 2>&1
|
||||||
|
done
|
||||||
|
|
||||||
|
# Android
|
||||||
|
res=$repo/android/app/src/main/res
|
||||||
|
typeset -A legacy=(mdpi 48 hdpi 72 xhdpi 96 xxhdpi 144 xxxhdpi 192)
|
||||||
|
for density size in ${(kv)legacy}; do
|
||||||
|
dir=$res/mipmap-$density
|
||||||
|
mkdir -p $dir
|
||||||
|
layer=$(( size * 9 / 4 )) # 108 dp at this density
|
||||||
|
magick "$work/background.png" -resize ${layer}x${layer} "$dir/ic_launcher_background.png"
|
||||||
|
magick "$work/foreground.png" -resize ${layer}x${layer} "$dir/ic_launcher_foreground.png"
|
||||||
|
# Legacy launchers show the bitmap as is: a rounded square and a circle.
|
||||||
|
r=$(( size * 18 / 100 ))
|
||||||
|
magick "$work/full.png" -alpha set -resize ${size}x${size} \
|
||||||
|
\( -size ${size}x${size} xc:none -fill white -draw "roundrectangle 0,0 $((size-1)),$((size-1)) $r,$r" \) \
|
||||||
|
-compose DstIn -composite "$dir/ic_launcher.png"
|
||||||
|
magick "$work/full.png" -alpha set -resize ${size}x${size} \
|
||||||
|
\( -size ${size}x${size} xc:none -fill white -draw "circle $((size/2)),$((size/2)) $((size/2)),0" \) \
|
||||||
|
-compose DstIn -composite "$dir/ic_launcher_round.png"
|
||||||
|
done
|
||||||
|
mkdir -p $res/mipmap-anydpi-v26
|
||||||
|
for name in ic_launcher ic_launcher_round; do
|
||||||
|
cat > $res/mipmap-anydpi-v26/$name.xml <<'EOF'
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generated by branding/icon/build_icons.sh. -->
|
||||||
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<background android:drawable="@mipmap/ic_launcher_background" />
|
||||||
|
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
|
||||||
|
</adaptive-icon>
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
|
||||||
|
# macOS: 824 px squircle-ish rounded rect (radius 185) centred on 1024 with a soft shadow, per the Big Sur grid.
|
||||||
|
magick "$work/full.png" -alpha set -resize 824x824 \
|
||||||
|
\( -size 824x824 xc:none -fill white -draw "roundrectangle 0,0 823,823 185,185" \) \
|
||||||
|
-compose DstIn -composite "$work/tile.png"
|
||||||
|
magick -size 1024x1024 xc:none \
|
||||||
|
\( "$work/tile.png" -background black -shadow 50x14+0+10 \) -gravity center -geometry +0+6 -compose Over -composite \
|
||||||
|
"$work/tile.png" -gravity center -geometry +0+0 -compose Over -composite "$work/mac1024.png"
|
||||||
|
iconset=$work/AppIcon.iconset
|
||||||
|
mkdir -p $iconset
|
||||||
|
for s in 16 32 128 256 512; do
|
||||||
|
magick "$work/mac1024.png" -resize ${s}x${s} "$iconset/icon_${s}x${s}.png"
|
||||||
|
magick "$work/mac1024.png" -resize $((s*2))x$((s*2)) "$iconset/icon_${s}x${s}@2x.png"
|
||||||
|
done
|
||||||
|
mkdir -p $here/macos
|
||||||
|
iconutil -c icns -o $here/macos/AppIcon.icns $iconset
|
||||||
|
cp "$work/mac1024.png" $here/macos/AppIcon-1024.png
|
||||||
|
|
||||||
|
# iOS: opaque, square; the system applies the mask.
|
||||||
|
ios=$here/ios/AppIcon.appiconset
|
||||||
|
mkdir -p $ios
|
||||||
|
magick "$work/full.png" -background '#12050a' -alpha remove -alpha off "$ios/AppIcon-1024.png"
|
||||||
|
cat > $ios/Contents.json <<'EOF'
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "AppIcon-1024.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
echo "icons written"
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
|
||||||
|
<!-- Metin2 client app icon: a Metin stone (the cursed monoliths the game is named after) with glowing
|
||||||
|
rune cracks, inside a gold ring over a blood-red dusk sky and ink mountains.
|
||||||
|
Full-bleed square; platforms apply their own mask. #background / #foreground are the Android
|
||||||
|
adaptive-icon layers. branding/icon/build_icons.sh renders every platform size from this file. -->
|
||||||
|
<defs>
|
||||||
|
<radialGradient id="sky" cx="50%" cy="42%" r="70%">
|
||||||
|
<stop offset="0" stop-color="#8e1b14"/>
|
||||||
|
<stop offset="0.45" stop-color="#4a0b0e"/>
|
||||||
|
<stop offset="1" stop-color="#12050a"/>
|
||||||
|
</radialGradient>
|
||||||
|
<radialGradient id="aura" cx="50%" cy="50%" r="50%">
|
||||||
|
<stop offset="0" stop-color="#ff7a2a" stop-opacity="0.85"/>
|
||||||
|
<stop offset="0.4" stop-color="#e2361a" stop-opacity="0.45"/>
|
||||||
|
<stop offset="1" stop-color="#e2361a" stop-opacity="0"/>
|
||||||
|
</radialGradient>
|
||||||
|
<linearGradient id="gold" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0" stop-color="#fff0a8"/>
|
||||||
|
<stop offset="0.35" stop-color="#e8b64a"/>
|
||||||
|
<stop offset="0.7" stop-color="#a8701c"/>
|
||||||
|
<stop offset="1" stop-color="#f3cf6a"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="faceL" x1="0" y1="0" x2="1" y2="1">
|
||||||
|
<stop offset="0" stop-color="#5b5566"/>
|
||||||
|
<stop offset="1" stop-color="#211d28"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="faceR" x1="1" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0" stop-color="#2a2531"/>
|
||||||
|
<stop offset="1" stop-color="#0b090f"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="faceM" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0" stop-color="#46404f"/>
|
||||||
|
<stop offset="1" stop-color="#16131b"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="mtnFar" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0" stop-color="#3a0c10"/>
|
||||||
|
<stop offset="1" stop-color="#1c0609"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="mtnNear" x1="0" y1="0" x2="0" y2="1">
|
||||||
|
<stop offset="0" stop-color="#1e070a"/>
|
||||||
|
<stop offset="1" stop-color="#080305"/>
|
||||||
|
</linearGradient>
|
||||||
|
<filter id="glow" x="-50%" y="-50%" width="200%" height="200%">
|
||||||
|
<feGaussianBlur stdDeviation="9" result="b"/>
|
||||||
|
<feMerge><feMergeNode in="b"/><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>
|
||||||
|
</filter>
|
||||||
|
<filter id="soft" x="-20%" y="-20%" width="140%" height="140%">
|
||||||
|
<feGaussianBlur stdDeviation="3"/>
|
||||||
|
</filter>
|
||||||
|
<filter id="shadow" x="-30%" y="-30%" width="160%" height="160%">
|
||||||
|
<feDropShadow dx="0" dy="10" stdDeviation="14" flood-color="#000" flood-opacity="0.7"/>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
|
||||||
|
<g id="background">
|
||||||
|
<!-- sky -->
|
||||||
|
<rect width="1024" height="1024" fill="url(#sky)"/>
|
||||||
|
|
||||||
|
<!-- blood moon behind the stone -->
|
||||||
|
<circle cx="512" cy="430" r="250" fill="#c0301f" opacity="0.35"/>
|
||||||
|
<circle cx="512" cy="430" r="330" fill="url(#aura)"/>
|
||||||
|
|
||||||
|
<!-- ink mountains -->
|
||||||
|
<path d="M0 700 L110 610 L180 650 L280 540 L360 620 L420 590 L512 660 L610 575 L690 630 L760 540 L860 640 L940 600 L1024 660 L1024 1024 L0 1024 Z" fill="url(#mtnFar)"/>
|
||||||
|
<path d="M0 800 L90 740 L170 780 L260 710 L350 790 L512 760 L660 800 L760 720 L860 770 L950 730 L1024 770 L1024 1024 L0 1024 Z" fill="url(#mtnNear)"/>
|
||||||
|
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<g id="foreground">
|
||||||
|
<!-- gold ring -->
|
||||||
|
<g filter="url(#shadow)">
|
||||||
|
<circle cx="512" cy="500" r="392" fill="none" stroke="url(#gold)" stroke-width="26"/>
|
||||||
|
<circle cx="512" cy="500" r="360" fill="none" stroke="#e8b64a" stroke-width="4" opacity="0.8"/>
|
||||||
|
<g id="stud"><circle cx="512" cy="108" r="17" fill="url(#gold)" stroke="#6b430c" stroke-width="3"/><circle cx="512" cy="108" r="6" fill="#c0301f"/></g>
|
||||||
|
<use href="#stud" transform="rotate(45 512 500)"/>
|
||||||
|
<use href="#stud" transform="rotate(90 512 500)"/>
|
||||||
|
<use href="#stud" transform="rotate(135 512 500)"/>
|
||||||
|
<use href="#stud" transform="rotate(225 512 500)"/>
|
||||||
|
<use href="#stud" transform="rotate(270 512 500)"/>
|
||||||
|
<use href="#stud" transform="rotate(315 512 500)"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- the Metin stone -->
|
||||||
|
<g filter="url(#shadow)">
|
||||||
|
<!-- rocky base -->
|
||||||
|
<path d="M300 808 L360 752 L452 770 L512 742 L590 768 L668 750 L728 806 L690 840 L340 842 Z" fill="#17121a"/>
|
||||||
|
<!-- left face -->
|
||||||
|
<path d="M512 150 L408 300 L372 560 L400 790 L500 810 L486 520 Z" fill="url(#faceL)"/>
|
||||||
|
<!-- middle face -->
|
||||||
|
<path d="M512 150 L486 520 L500 810 L560 802 L566 470 Z" fill="url(#faceM)"/>
|
||||||
|
<!-- right face -->
|
||||||
|
<path d="M512 150 L566 470 L560 802 L632 780 L656 540 L616 290 Z" fill="url(#faceR)"/>
|
||||||
|
<!-- facet highlights -->
|
||||||
|
<path d="M512 150 L408 300 L372 560" fill="none" stroke="#9a92a8" stroke-width="4" opacity="0.7"/>
|
||||||
|
<path d="M512 150 L486 520 L500 810" fill="none" stroke="#6d6579" stroke-width="3" opacity="0.6"/>
|
||||||
|
<path d="M408 300 L452 250 L512 150 M372 560 L420 600 L400 790" fill="none" stroke="#7a7288" stroke-width="2.5" opacity="0.5"/>
|
||||||
|
<path d="M616 290 L656 540 L632 780" fill="none" stroke="#ff5a2a" stroke-width="5" opacity="0.75"/>
|
||||||
|
<path d="M566 470 L620 430 M560 802 L600 700" fill="none" stroke="#3b3444" stroke-width="2.5" opacity="0.8"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- glowing cracks and runes -->
|
||||||
|
<g filter="url(#glow)" stroke-linecap="round" stroke-linejoin="round" fill="none">
|
||||||
|
<path d="M470 250 L452 330 L478 380 L440 470 L462 540 L430 640 L452 720" stroke="#ff6a1f" stroke-width="9"/>
|
||||||
|
<path d="M452 330 L418 360" stroke="#ff6a1f" stroke-width="6"/>
|
||||||
|
<path d="M440 470 L404 500" stroke="#ff6a1f" stroke-width="6"/>
|
||||||
|
<path d="M548 300 L566 380 L540 430 L584 520 L560 600 L596 690" stroke="#ff4a18" stroke-width="8"/>
|
||||||
|
<path d="M584 520 L620 540" stroke="#ff4a18" stroke-width="6"/>
|
||||||
|
<!-- rune on the middle face -->
|
||||||
|
<path d="M526 575 L556 630 L526 685 L496 630 Z M526 605 L526 655" stroke="#ffd27a" stroke-width="7"/>
|
||||||
|
</g>
|
||||||
|
<!-- hot cores of the cracks -->
|
||||||
|
<g stroke-linecap="round" stroke-linejoin="round" fill="none" stroke="#fff0c0" opacity="0.9">
|
||||||
|
<path d="M470 250 L452 330 L478 380 L440 470 L462 540 L430 640 L452 720" stroke-width="3"/>
|
||||||
|
<path d="M548 300 L566 380 L540 430 L584 520 L560 600 L596 690" stroke-width="3"/>
|
||||||
|
<path d="M526 575 L556 630 L526 685 L496 630 Z M526 605 L526 655" stroke-width="2.5"/>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- embers -->
|
||||||
|
<g fill="#ffb25a" filter="url(#soft)">
|
||||||
|
<circle cx="340" cy="420" r="6"/><circle cx="690" cy="360" r="5"/><circle cx="660" cy="620" r="7"/>
|
||||||
|
<circle cx="360" cy="650" r="5"/><circle cx="600" cy="220" r="4"/><circle cx="410" cy="200" r="4"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 517 KiB |
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "AppIcon-1024.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"platform" : "ios",
|
||||||
|
"size" : "1024x1024"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 711 KiB |
@@ -0,0 +1,15 @@
|
|||||||
|
# Wiki 公开资料包 v1
|
||||||
|
|
||||||
|
由 `tools/wiki/build_catalogue.py` 生成。仅含物品/怪物模板、升级配方与已有中文名称,不包含玩家资料或游戏图片。
|
||||||
|
|
||||||
|
`catalogue.txt` 使用 UTF-8、LF、TAB 分隔,无可执行内容。第一行为 `MTWIKI<TAB>1<TAB>payload_sha256`,SHA 对第一行之后的全部字节计算。完整清单与输入/生成器/中文表哈希在 manifest.json。
|
||||||
|
|
||||||
|
| 行类型 | 字段(按顺序) |
|
||||||
|
|---|---|
|
||||||
|
| I | 标记、ID、范围末端、名称、类型、子类、最低等级、占格、升级目标 ID、配方 ID |
|
||||||
|
| M | 标记、ID、名称、类型、级别分类、等级、生命、最小攻击、最大攻击、经验、防御 |
|
||||||
|
| R | 标记、配方 ID、基础费用、基础成功率、逗号分隔的 `材料ID:数量` |
|
||||||
|
|
||||||
|
限额:2 MiB、30,000 条记录、每单元格 256 字符;升级材料最多五种;客户端分页每次最多 12 项。重复 ID、重叠范围、未知 schema、非法数值和文本标记均拒绝,界面显示更新资料包提示。
|
||||||
|
|
||||||
|
这里是配置快照,不是运行中服务器状态证明:重新加载前的文件修改可能与实际内存不同。当前未声明实时掉落、最终精炼概率、宝箱、模型预览等能力;后续接入独立协议时将与静态 schema 分别版本化。
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"schema": 1,
|
||||||
|
"catalogue_sha256": "7efea0e88002d717c5d29174cf264a4ba06b0594561d8d25bd6ab7c091da9159",
|
||||||
|
"source_sha256": {
|
||||||
|
"item_proto.txt": "bf3d2c9d72719f1c222266042766cbe2f3fff8f0951666344181b6add0a31009",
|
||||||
|
"item_names.txt": "a6888dfdb0be64f8c8112445b4d54e399a0f8e6ca29799ba33b3bb4160adad2a",
|
||||||
|
"mob_proto.txt": "883a9f877f140e9baead30346b629f2f2c0d7c9c1f538febb2e17f28c9e446ce",
|
||||||
|
"mob_names.txt": "2c7a5275983268b668e21b9f4e39f6d58ee6fde04ada1cbb4a1fd8315bfad391",
|
||||||
|
"refine.tsv": "df6d14fb31b7e281434c927cf96413c6471f0c6b93da752d1b20e1bd082990db"
|
||||||
|
},
|
||||||
|
"items": 5756,
|
||||||
|
"monsters": 763,
|
||||||
|
"refine_recipes": 407,
|
||||||
|
"source": "203 public server tables; no player data",
|
||||||
|
"generator_sha256": "9c4e1b6069179c36c080a1136d65cbe52a8e44b3577fb8391e8404f5162ef40b",
|
||||||
|
"localization_sha256": {
|
||||||
|
"item_names_zh.txt": "5604985d7f11039f3d3e38d4e2c07995e80ca3e4f6deb01fe57cd772e9cd0f70",
|
||||||
|
"item_names_zh_overlay.txt": "5d8396f19e7184fafd691b7a255b328237bddc1cdfda8d3cf8a7b074eb528f83",
|
||||||
|
"mob_names_zh.txt": "fdbfe4b3f3367d5842c0e9bbe0b5e5ea2dbe99fb6e566ef5789f65d3794eab5c",
|
||||||
|
"mob_names_zh_overlay.txt": "7c44a5f6cff5c3c27c13cc4c7be91d619c20c67a8e091222e13ed392ea18d00b"
|
||||||
|
},
|
||||||
|
"scope": "template catalogue; acquisition and runtime rates not yet queried"
|
||||||
|
}
|
||||||
@@ -14,7 +14,9 @@
|
|||||||
它们的审核译文(2026-09-28 确认)单独放在 `item_names_zh_overlay.txt`、
|
它们的审核译文(2026-09-28 确认)单独放在 `item_names_zh_overlay.txt`、
|
||||||
`mob_names_zh_overlay.txt`,界面回退键译文在 `locale_game_zh_overlay.txt`;
|
`mob_names_zh_overlay.txt`,界面回退键译文在 `locale_game_zh_overlay.txt`;
|
||||||
`scripts/build_zh_locale.py` 构建时以 overlay 覆盖快照同 VNUM / 同键的值。
|
`scripts/build_zh_locale.py` 构建时以 overlay 覆盖快照同 VNUM / 同键的值。
|
||||||
旧的龙驹中文表与线上表有 21 个相同 VNUM 不同名;不把旧表覆盖到服务端。
|
中文译名以 `server_extracted/40250_deploy` 为优先参考;客户端技能和物品说明参考
|
||||||
|
`server_extracted/client_locale/longju/locale/taiwan`。与资料冲突的译名通过 overlay 修正,
|
||||||
|
线上原始快照保留不动。`server_extracted/database` 与部署表有少数地图名差异时采用部署表。
|
||||||
服务端名称若再更新,需重新只读导出并核对差异后更新本快照。
|
服务端名称若再更新,需重新只读导出并核对差异后更新本快照。
|
||||||
|
|
||||||
## 任务文本(translate.lua)
|
## 任务文本(translate.lua)
|
||||||
@@ -36,14 +38,28 @@
|
|||||||
|
|
||||||
`scripts/build_zh_locale.py` 以 40250 的 `skilldesc.txt` 为底,逐行取龙驹同 VNUM 的名称、说明和条件列(2–8)
|
`scripts/build_zh_locale.py` 以 40250 的 `skilldesc.txt` 为底,逐行取龙驹同 VNUM 的名称、说明和条件列(2–8)
|
||||||
以及效果列(17/20/23)。客户端把效果列当作 `_snprintf` 格式串传入最小值、最大值,所以效果列只有在格式参数与英文一致时才替换。
|
以及效果列(17/20/23)。客户端把效果列当作 `_snprintf` 格式串传入最小值、最大值,所以效果列只有在格式参数与英文一致时才替换。
|
||||||
`skilldesc_zh_overlay.txt` 按 `VNUM\t列号\t译文` 覆盖龙驹缺的或者不对的格。例如 126–128 在龙驹里叫吴/蜀/魏国方言,
|
`skilldesc_zh_overlay.txt` 按 `VNUM\t列号\t译文` 覆盖龙驹缺的或者不对的格。126–128 沿用资料里的吴/蜀/魏国方言;骑马技能说明沿用资料原文。
|
||||||
这里改成盛唐语、秦皇语、汉武语;骑马技能的说明补上等级要求。
|
效果列仍需适配当前客户端格式参数,例如反射机率使用 `%.1f%%`。
|
||||||
|
|
||||||
## 整行覆盖(item_list.txt、itemdesc.txt)
|
## 整行覆盖(item_list.txt、itemdesc.txt)
|
||||||
|
|
||||||
`item_list_zh_overlay.txt`、`itemdesc_zh_overlay.txt` 每行是目标文件的一整行(UTF-8,第一列 VNUM),
|
`item_list_zh_overlay.txt`、`itemdesc_zh_overlay.txt` 每行是目标文件的一整行(UTF-8,第一列 VNUM),
|
||||||
`build_zh_locale.py` 用它替换同 VNUM 的行(`ROW_FILES`),其余行字节不变;VNUM 不存在就报错。
|
`build_zh_locale.py` 用它替换同 VNUM 的行(`ROW_FILES`),其余行字节不变;VNUM 不存在就报错。
|
||||||
用于服务端改了用途的物品,例如 50307 小狩猎套装礼包(`tools/server/hunt-set`)换成礼盒图标和中文说明。
|
50307 保留用户确认的自定义名称“小狩猎套装礼包”及原有说明;71118 恢复为勇气披风+及对应说明。
|
||||||
|
70058 移动戒指(`tools/server/ring-warp`)的自定义说明保留;提取客户端资料没有该 VNUM 的说明。
|
||||||
|
图标与使用限制不属于本次翻译修改。
|
||||||
|
|
||||||
|
## 物品限制(item_limits_server.tsv)
|
||||||
|
|
||||||
|
服务端 `item_proto.txt` 里改过的物品使用限制(每行 VNUM、限制类型 0、值 0、限制类型 1、值 1;0 = 无,1 = 等级),
|
||||||
|
由 `locale_proto_patch` 写进客户端 `item_proto`,提示框显示的等级要求与服务端一致。其余字段仍逐字节校验不变。
|
||||||
|
|
||||||
|
## 物品占格与标志(item_shapes_server.tsv)
|
||||||
|
|
||||||
|
服务端给了新用途、改过占格或标志的物品(每行 VNUM、size、flags、anti flags,数值),由 `locale_proto_patch`
|
||||||
|
写进客户端 `item_proto`,背包占格和堆叠与服务端一致;只允许这几条记录的这三个字段变化。目前是 VIP 会员卡
|
||||||
|
38001/38002(`tools/server/vip-card`):40250 原为 size 0,背包里不显示也不能移动。
|
||||||
|
该表跟在 `item_stones_server.tsv` 后面传入(位置参数),所以需要石头表也存在。
|
||||||
|
|
||||||
## 物品说明(itemdesc_translate_zh.tsv)
|
## 物品说明(itemdesc_translate_zh.tsv)
|
||||||
|
|
||||||
@@ -57,3 +73,24 @@
|
|||||||
- 如果最后一行只剩一两个字,会把前面的行收窄一些重新折。
|
- 如果最后一行只剩一两个字,会把前面的行收窄一些重新折。
|
||||||
- 表里没有的格子保留英文,`zh-locale-report.json` 里的 `itemdesc.txt translation.english_rows` 会列出这些 VNUM。
|
- 表里没有的格子保留英文,`zh-locale-report.json` 里的 `itemdesc.txt translation.english_rows` 会列出这些 VNUM。
|
||||||
- `itemdesc_zh_overlay.txt` 的整行覆盖在翻译之后执行,它的说明列也用同样的方式折行。
|
- `itemdesc_zh_overlay.txt` 的整行覆盖在翻译之后执行,它的说明列也用同样的方式折行。
|
||||||
|
|
||||||
|
## 2026-10-01 资料对齐
|
||||||
|
|
||||||
|
修正 71118 的物品名和说明、16 个怪物/NPC/地图标记名及 12 个技能文本单元格。
|
||||||
|
50307 按用户要求保留自定义礼包。
|
||||||
|
UI 中为兼容当前客户端而调整的占位符、百分号及明显错字继续保留。
|
||||||
|
|
||||||
|
### 武器名称来源
|
||||||
|
|
||||||
|
武器译名以提取客户端 `server_extracted/client_locale/longju/locale/taiwan/item_proto`
|
||||||
|
的 `szLocaleName` 为准。该文件为 MIPX v1、记录宽度 152 字节,按类型 WEAPON(1)和
|
||||||
|
VNUM 匹配,不复制属性。它与 `server_extracted/database`、`40250_deploy` 的同 VNUM
|
||||||
|
名称存在差异;武器优先采用提取客户端原型,其他名称继续参考部署表。
|
||||||
|
|
||||||
|
本次修正 29 组武器的 +0~+9,共 290 条译名,例如武士刀→短刀、风雷剑→龙虎刀、
|
||||||
|
鬼牙剑→夺魂刀、碧玉刀→封神刀。逐条来源和修改前名称见 `weapon_names_source_audit.tsv`。
|
||||||
|
修改通过 `item_names_zh_overlay.txt` 生效,原始线上名称快照保留不动。
|
||||||
|
|
||||||
|
## +6 镶嵌石配置修复(2026-10-02)
|
||||||
|
|
||||||
|
当前 203 的 28700~28713 原为 ITEM_NONE,与 server_extracted 备份不同。`item_stones_server.tsv` 恢复备份中的类型、佩戴位置、属性和六个 value 字段;`locale_proto_patch` 只允许这 14 条记录的对应字段变化,其余非名称字段继续逐字节校验。服务端同份配置在 `tools/server/npc-shops/item-mall/stones.tsv`,商店安装时恢复。已有背包内同编号石头也使用新配置。
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
# vnum limit type 0 value 0 limit type 1 value 1 (0 = LIMIT_NONE, 1 = LIMIT_LEVEL): the item_proto.txt limits
|
||||||
|
# changed on our server (tools/server/*), mirrored into the client proto by locale_proto_patch.
|
||||||
|
# 70058 移动戒指: level 30 removed (tools/server/ring-warp).
|
||||||
|
70058 0 0 0 0
|
||||||
|
@@ -685,8 +685,8 @@ VNUM LOCALE_NAME
|
|||||||
31092 超冷怪的皮肤碎片
|
31092 超冷怪的皮肤碎片
|
||||||
35000 药草+
|
35000 药草+
|
||||||
35001 虎肝+
|
35001 虎肝+
|
||||||
38001 VIP特权
|
38001 VIP会员卡(7天)
|
||||||
38002 抽奖券(今日)
|
38002 VIP会员卡(30天)
|
||||||
38003 抽奖券(明日)
|
38003 抽奖券(明日)
|
||||||
38004 抽奖重抽券
|
38004 抽奖重抽券
|
||||||
38005 高级抽奖转盘券
|
38005 高级抽奖转盘券
|
||||||
@@ -1368,7 +1368,7 @@ VNUM LOCALE_NAME
|
|||||||
71115 野猪坐骑券(蓝)
|
71115 野猪坐骑券(蓝)
|
||||||
71116 狼坐骑券(黄)
|
71116 狼坐骑券(黄)
|
||||||
71117 狼坐骑券(蓝)
|
71117 狼坐骑券(蓝)
|
||||||
71118 虎坐骑券(黄)
|
71118 勇气披风+
|
||||||
71119 虎坐骑券(蓝)
|
71119 虎坐骑券(蓝)
|
||||||
71120 狮坐骑券(黄)
|
71120 狮坐骑券(黄)
|
||||||
71121 狮坐骑券(蓝)
|
71121 狮坐骑券(蓝)
|
||||||
@@ -1608,3 +1608,293 @@ VNUM LOCALE_NAME
|
|||||||
164300 传说黑龙石
|
164300 传说黑龙石
|
||||||
164400 传说黑龙石
|
164400 传说黑龙石
|
||||||
50307 小狩猎套装礼包
|
50307 小狩猎套装礼包
|
||||||
|
10 短刀+0
|
||||||
|
11 短刀+1
|
||||||
|
12 短刀+2
|
||||||
|
13 短刀+3
|
||||||
|
14 短刀+4
|
||||||
|
15 短刀+5
|
||||||
|
16 短刀+6
|
||||||
|
17 短刀+7
|
||||||
|
18 短刀+8
|
||||||
|
19 短刀+9
|
||||||
|
140 龙虎刀+0
|
||||||
|
141 龙虎刀+1
|
||||||
|
142 龙虎刀+2
|
||||||
|
143 龙虎刀+3
|
||||||
|
144 龙虎刀+4
|
||||||
|
145 龙虎刀+5
|
||||||
|
146 龙虎刀+6
|
||||||
|
147 龙虎刀+7
|
||||||
|
148 龙虎刀+8
|
||||||
|
149 龙虎刀+9
|
||||||
|
150 夺魂刀+0
|
||||||
|
151 夺魂刀+1
|
||||||
|
152 夺魂刀+2
|
||||||
|
153 夺魂刀+3
|
||||||
|
154 夺魂刀+4
|
||||||
|
155 夺魂刀+5
|
||||||
|
156 夺魂刀+6
|
||||||
|
157 夺魂刀+7
|
||||||
|
158 夺魂刀+8
|
||||||
|
159 夺魂刀+9
|
||||||
|
160 封神刀+0
|
||||||
|
161 封神刀+1
|
||||||
|
162 封神刀+2
|
||||||
|
163 封神刀+3
|
||||||
|
164 封神刀+4
|
||||||
|
165 封神刀+5
|
||||||
|
166 封神刀+6
|
||||||
|
167 封神刀+7
|
||||||
|
168 封神刀+8
|
||||||
|
169 封神刀+9
|
||||||
|
180 伏牺刀+0
|
||||||
|
181 伏牺刀+1
|
||||||
|
182 伏牺刀+2
|
||||||
|
183 伏牺刀+3
|
||||||
|
184 伏牺刀+4
|
||||||
|
185 伏牺刀+5
|
||||||
|
186 伏牺刀+6
|
||||||
|
187 伏牺刀+7
|
||||||
|
188 伏牺刀+8
|
||||||
|
189 伏牺刀+9
|
||||||
|
190 龙颚闪+0
|
||||||
|
191 龙颚闪+1
|
||||||
|
192 龙颚闪+2
|
||||||
|
193 龙颚闪+3
|
||||||
|
194 龙颚闪+4
|
||||||
|
195 龙颚闪+5
|
||||||
|
196 龙颚闪+6
|
||||||
|
197 龙颚闪+7
|
||||||
|
198 龙颚闪+8
|
||||||
|
199 龙颚闪+9
|
||||||
|
200 九龙神剑+0
|
||||||
|
201 九龙神剑+1
|
||||||
|
202 九龙神剑+2
|
||||||
|
203 九龙神剑+3
|
||||||
|
204 九龙神剑+4
|
||||||
|
205 九龙神剑+5
|
||||||
|
206 九龙神剑+6
|
||||||
|
207 九龙神剑+7
|
||||||
|
208 九龙神剑+8
|
||||||
|
209 九龙神剑+9
|
||||||
|
220 神兵‖天山苍穹刀+0
|
||||||
|
221 神兵‖天山苍穹刀+1
|
||||||
|
222 神兵‖天山苍穹刀+2
|
||||||
|
223 神兵‖天山苍穹刀+3
|
||||||
|
224 神兵‖天山苍穹刀+4
|
||||||
|
225 神兵‖天山苍穹刀+5
|
||||||
|
226 神兵‖天山苍穹刀+6
|
||||||
|
227 神兵‖天山苍穹刀+7
|
||||||
|
228 神兵‖天山苍穹刀+8
|
||||||
|
229 神兵‖天山苍穹刀+9
|
||||||
|
240 七窍破魂剑+0
|
||||||
|
241 七窍破魂剑+1
|
||||||
|
242 七窍破魂剑+2
|
||||||
|
243 七窍破魂剑+3
|
||||||
|
244 七窍破魂剑+4
|
||||||
|
245 七窍破魂剑+5
|
||||||
|
246 七窍破魂剑+6
|
||||||
|
247 七窍破魂剑+7
|
||||||
|
248 七窍破魂剑+8
|
||||||
|
249 七窍破魂剑+9
|
||||||
|
260 神兵‖晨星弑月刀+0
|
||||||
|
261 神兵‖晨星弑月刀+1
|
||||||
|
262 神兵‖晨星弑月刀+2
|
||||||
|
263 神兵‖晨星弑月刀+3
|
||||||
|
264 神兵‖晨星弑月刀+4
|
||||||
|
265 神兵‖晨星弑月刀+5
|
||||||
|
266 神兵‖晨星弑月刀+6
|
||||||
|
267 神兵‖晨星弑月刀+7
|
||||||
|
268 神兵‖晨星弑月刀+8
|
||||||
|
269 神兵‖晨星弑月刀+9
|
||||||
|
270 五虎伏魔剑+0
|
||||||
|
271 五虎伏魔剑+1
|
||||||
|
272 五虎伏魔剑+2
|
||||||
|
273 五虎伏魔剑+3
|
||||||
|
274 五虎伏魔剑+4
|
||||||
|
275 五虎伏魔剑+5
|
||||||
|
276 五虎伏魔剑+6
|
||||||
|
277 五虎伏魔剑+7
|
||||||
|
278 五虎伏魔剑+8
|
||||||
|
279 五虎伏魔剑+9
|
||||||
|
290 青焰刀+0
|
||||||
|
291 青焰刀+1
|
||||||
|
292 青焰刀+2
|
||||||
|
293 青焰刀+3
|
||||||
|
294 青焰刀+4
|
||||||
|
295 青焰刀+5
|
||||||
|
296 青焰刀+6
|
||||||
|
297 青焰刀+7
|
||||||
|
298 青焰刀+8
|
||||||
|
299 青焰刀+9
|
||||||
|
460 造化神器‖屠龙刀+0
|
||||||
|
461 造化神器‖屠龙刀+1
|
||||||
|
462 造化神器‖屠龙刀+2
|
||||||
|
463 造化神器‖屠龙刀+3
|
||||||
|
464 造化神器‖屠龙刀+4
|
||||||
|
465 造化神器‖屠龙刀+5
|
||||||
|
466 造化神器‖屠龙刀+6
|
||||||
|
467 造化神器‖屠龙刀+7
|
||||||
|
468 造化神器‖屠龙刀+8
|
||||||
|
469 造化神器‖屠龙刀+9
|
||||||
|
1100 冰牙+0
|
||||||
|
1101 冰牙+1
|
||||||
|
1102 冰牙+2
|
||||||
|
1103 冰牙+3
|
||||||
|
1104 冰牙+4
|
||||||
|
1105 冰牙+5
|
||||||
|
1106 冰牙+6
|
||||||
|
1107 冰牙+7
|
||||||
|
1108 冰牙+8
|
||||||
|
1109 冰牙+9
|
||||||
|
1120 乌皇剑+0
|
||||||
|
1121 乌皇剑+1
|
||||||
|
1122 乌皇剑+2
|
||||||
|
1123 乌皇剑+3
|
||||||
|
1124 乌皇剑+4
|
||||||
|
1125 乌皇剑+5
|
||||||
|
1126 乌皇剑+6
|
||||||
|
1127 乌皇剑+7
|
||||||
|
1128 乌皇剑+8
|
||||||
|
1129 乌皇剑+9
|
||||||
|
1160 神兵‖流光飞影+0
|
||||||
|
1161 神兵‖流光飞影+1
|
||||||
|
1162 神兵‖流光飞影+2
|
||||||
|
1163 神兵‖流光飞影+3
|
||||||
|
1164 神兵‖流光飞影+4
|
||||||
|
1165 神兵‖流光飞影+5
|
||||||
|
1166 神兵‖流光飞影+6
|
||||||
|
1167 神兵‖流光飞影+7
|
||||||
|
1168 神兵‖流光飞影+8
|
||||||
|
1169 神兵‖流光飞影+9
|
||||||
|
1170 吴钩+0
|
||||||
|
1171 吴钩+1
|
||||||
|
1172 吴钩+2
|
||||||
|
1173 吴钩+3
|
||||||
|
1174 吴钩+4
|
||||||
|
1175 吴钩+5
|
||||||
|
1176 吴钩+6
|
||||||
|
1177 吴钩+7
|
||||||
|
1178 吴钩+8
|
||||||
|
1179 吴钩+9
|
||||||
|
2160 魔神弓+0
|
||||||
|
2161 魔神弓+1
|
||||||
|
2162 魔神弓+2
|
||||||
|
2163 魔神弓+3
|
||||||
|
2164 魔神弓+4
|
||||||
|
2165 魔神弓+5
|
||||||
|
2166 魔神弓+6
|
||||||
|
2167 魔神弓+7
|
||||||
|
2168 魔神弓+8
|
||||||
|
2169 魔神弓+9
|
||||||
|
2170 铁牌弓+0
|
||||||
|
2171 铁牌弓+1
|
||||||
|
2172 铁牌弓+2
|
||||||
|
2173 铁牌弓+3
|
||||||
|
2174 铁牌弓+4
|
||||||
|
2175 铁牌弓+5
|
||||||
|
2176 铁牌弓+6
|
||||||
|
2177 铁牌弓+7
|
||||||
|
2178 铁牌弓+8
|
||||||
|
2179 铁牌弓+9
|
||||||
|
2180 神兵‖紫禁炫翼弓+0
|
||||||
|
2181 神兵‖紫禁炫翼弓+1
|
||||||
|
2182 神兵‖紫禁炫翼弓+2
|
||||||
|
2183 神兵‖紫禁炫翼弓+3
|
||||||
|
2184 神兵‖紫禁炫翼弓+4
|
||||||
|
2185 神兵‖紫禁炫翼弓+5
|
||||||
|
2186 神兵‖紫禁炫翼弓+6
|
||||||
|
2187 神兵‖紫禁炫翼弓+7
|
||||||
|
2188 神兵‖紫禁炫翼弓+8
|
||||||
|
2189 神兵‖紫禁炫翼弓+9
|
||||||
|
3150 炎龙魂+0
|
||||||
|
3151 炎龙魂+1
|
||||||
|
3152 炎龙魂+2
|
||||||
|
3153 炎龙魂+3
|
||||||
|
3154 炎龙魂+4
|
||||||
|
3155 炎龙魂+5
|
||||||
|
3156 炎龙魂+6
|
||||||
|
3157 炎龙魂+7
|
||||||
|
3158 炎龙魂+8
|
||||||
|
3159 炎龙魂+9
|
||||||
|
3160 狱焰+0
|
||||||
|
3161 狱焰+1
|
||||||
|
3162 狱焰+2
|
||||||
|
3163 狱焰+3
|
||||||
|
3164 狱焰+4
|
||||||
|
3165 狱焰+5
|
||||||
|
3166 狱焰+6
|
||||||
|
3167 狱焰+7
|
||||||
|
3168 狱焰+8
|
||||||
|
3169 狱焰+9
|
||||||
|
3200 神兵‖九天灭世刀+0
|
||||||
|
3201 神兵‖九天灭世刀+1
|
||||||
|
3202 神兵‖九天灭世刀+2
|
||||||
|
3203 神兵‖九天灭世刀+3
|
||||||
|
3204 神兵‖九天灭世刀+4
|
||||||
|
3205 神兵‖九天灭世刀+5
|
||||||
|
3206 神兵‖九天灭世刀+6
|
||||||
|
3207 神兵‖九天灭世刀+7
|
||||||
|
3208 神兵‖九天灭世刀+8
|
||||||
|
3209 神兵‖九天灭世刀+9
|
||||||
|
3210 玄冥剑+0
|
||||||
|
3211 玄冥剑+1
|
||||||
|
3212 玄冥剑+2
|
||||||
|
3213 玄冥剑+3
|
||||||
|
3214 玄冥剑+4
|
||||||
|
3215 玄冥剑+5
|
||||||
|
3216 玄冥剑+6
|
||||||
|
3217 玄冥剑+7
|
||||||
|
3218 玄冥剑+8
|
||||||
|
3219 玄冥剑+9
|
||||||
|
4040 日影黄泉+0
|
||||||
|
4041 日影黄泉+1
|
||||||
|
4042 日影黄泉+2
|
||||||
|
4043 日影黄泉+3
|
||||||
|
4044 日影黄泉+4
|
||||||
|
4045 日影黄泉+5
|
||||||
|
4046 日影黄泉+6
|
||||||
|
4047 日影黄泉+7
|
||||||
|
4048 日影黄泉+8
|
||||||
|
4049 日影黄泉+9
|
||||||
|
5090 天神铃+0
|
||||||
|
5091 天神铃+1
|
||||||
|
5092 天神铃+2
|
||||||
|
5093 天神铃+3
|
||||||
|
5094 天神铃+4
|
||||||
|
5095 天神铃+5
|
||||||
|
5096 天神铃+6
|
||||||
|
5097 天神铃+7
|
||||||
|
5098 天神铃+8
|
||||||
|
5099 天神铃+9
|
||||||
|
5120 青竹铃+0
|
||||||
|
5121 青竹铃+1
|
||||||
|
5122 青竹铃+2
|
||||||
|
5123 青竹铃+3
|
||||||
|
5124 青竹铃+4
|
||||||
|
5125 青竹铃+5
|
||||||
|
5126 青竹铃+6
|
||||||
|
5127 青竹铃+7
|
||||||
|
5128 青竹铃+8
|
||||||
|
5129 青竹铃+9
|
||||||
|
5150 神兵‖法神杖+0
|
||||||
|
5151 神兵‖法神杖+1
|
||||||
|
5152 神兵‖法神杖+2
|
||||||
|
5153 神兵‖法神杖+3
|
||||||
|
5154 神兵‖法神杖+4
|
||||||
|
5155 神兵‖法神杖+5
|
||||||
|
5156 神兵‖法神杖+6
|
||||||
|
5157 神兵‖法神杖+7
|
||||||
|
5158 神兵‖法神杖+8
|
||||||
|
5159 神兵‖法神杖+9
|
||||||
|
7160 七翎扇+0
|
||||||
|
7161 七翎扇+1
|
||||||
|
7162 七翎扇+2
|
||||||
|
7163 七翎扇+3
|
||||||
|
7164 七翎扇+4
|
||||||
|
7165 七翎扇+5
|
||||||
|
7166 七翎扇+6
|
||||||
|
7167 七翎扇+7
|
||||||
|
7168 七翎扇+8
|
||||||
|
7169 七翎扇+9
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# vnum size flags anti flags: item_proto.txt size/flags changed on our server (tools/server/*), mirrored into the
|
||||||
|
# client proto by locale_proto_patch so the item takes a cell and stacks like on the server.
|
||||||
|
# 38001/38002 VIP 会员卡 (tools/server/vip-card): 40250 ships them size 0, no flags; now size 1,
|
||||||
|
# ITEM_STACKABLE | ITEM_LOG (4 | 8192), ANTI_SELL (256).
|
||||||
|
38001 1 8196 256
|
||||||
|
38002 1 8196 256
|
||||||
|
@@ -0,0 +1,15 @@
|
|||||||
|
# vnum type subtype wear apply_type apply_value value0 value1 value2 value3 value4 value5
|
||||||
|
28700 10 0 16 16 25 0 0 0 0 0 17
|
||||||
|
28701 10 0 16 15 25 0 0 0 0 0 18
|
||||||
|
28702 10 0 16 9 50 0 0 0 0 0 19
|
||||||
|
28703 10 0 16 59 55 0 0 0 0 0 20
|
||||||
|
28704 10 0 16 60 55 0 0 0 0 0 21
|
||||||
|
28705 10 0 16 61 55 0 0 0 0 0 22
|
||||||
|
28706 10 0 16 62 55 0 0 0 0 0 23
|
||||||
|
28707 10 0 16 63 25 0 0 0 0 0 24
|
||||||
|
28708 10 0 1 27 25 0 0 0 0 0 25
|
||||||
|
28709 10 0 1 28 25 0 0 0 0 0 26
|
||||||
|
28710 10 0 1 2 1000 0 0 0 0 0 27
|
||||||
|
28711 10 0 1 1 2000 0 0 0 0 0 28
|
||||||
|
28712 10 0 1 54 500 0 0 0 0 0 29
|
||||||
|
28713 10 0 1 8 50 0 0 0 0 0 30
|
||||||
|
@@ -1,2 +1,4 @@
|
|||||||
# vnum name description: whole itemdesc.txt rows (build_zh_locale.py ROW_FILES)
|
# vnum name description: whole itemdesc.txt rows (build_zh_locale.py ROW_FILES)
|
||||||
50307 小狩猎套装礼包 打开后按职业获得一套1级+9装备:武器、盔甲、头盔、盾牌、手镯、鞋子、项链、耳环,每件5条满值属性。需留15格背包空位,每个角色限开一次。
|
50307 小狩猎套装礼包 打开后按职业获得一套1级+9装备:武器、盔甲、头盔、盾牌、手镯、鞋子、项链、耳环,每件5条满值属性。需留15格背包空位,每个角色限开一次。
|
||||||
|
70058 移动戒指 此戒指可将你传送到本国一村、二村或各主要地图,任何等级都可使用,可无限次使用,没有冷却时间。不可交易。
|
||||||
|
71118 勇气披风+ 古代战士的披风. 对敌人有莫名的吸引力 | 使用后每10秒召唤一次身边的怪物 | 升级时必备物品
|
||||||
|
|||||||
@@ -230,3 +230,19 @@ VNUM LOCALE_NAME
|
|||||||
33011 碧玉炼圣
|
33011 碧玉炼圣
|
||||||
33012 翡翠炼圣
|
33012 翡翠炼圣
|
||||||
33013 青玉炼圣
|
33013 青玉炼圣
|
||||||
|
10033 天意一层 10594 7525
|
||||||
|
10034 天意二层 10594 7525
|
||||||
|
10066 赤鬼木林 9915 11195
|
||||||
|
10079 天意一层 1364 13436
|
||||||
|
10080 天意二层 2413 12755
|
||||||
|
10081 天意一层 99 13618
|
||||||
|
10083 天意一层 1360 14972
|
||||||
|
10084 天意二层 2414 14289
|
||||||
|
10085 天意一层 99 15154
|
||||||
|
10087 天意一层 1360 16508
|
||||||
|
10088 天意二层 2414 15825
|
||||||
|
10089 天意一层 99 16690
|
||||||
|
10091 天意一层 1360 18044
|
||||||
|
10092 天意二层 2414 17361
|
||||||
|
20075 亡灵塔防具师
|
||||||
|
20076 亡灵塔饰品师
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ VNUM COLUMN TEXT
|
|||||||
19 8 不会被击倒
|
19 8 不会被击倒
|
||||||
20 20 气绝机率 %.0f%%
|
20 20 气绝机率 %.0f%%
|
||||||
64 20 对方攻击失败机率增加
|
64 20 对方攻击失败机率增加
|
||||||
65 20 近身伤害反射 %.1f%%
|
65 20 物理攻击反射机率 %.1f%%
|
||||||
126 2 盛唐语
|
126 2 吴国方言
|
||||||
126 5 可以听懂盛唐国的语言
|
126 5 可以听与说吴国的方言
|
||||||
127 2 秦皇语
|
127 2 蜀国方言
|
||||||
127 5 可以听懂秦皇国的语言
|
127 5 可以听与说蜀国的方言
|
||||||
128 2 汉武语
|
128 2 魏国方言
|
||||||
128 5 可以听懂汉武国的语言
|
128 5 可以听与说魏国的方言
|
||||||
137 5 骑马奔跑并攻击周围的敌人(50级起)
|
137 5 骑马奔跑并攻击周围的敌人
|
||||||
138 5 击倒前方拦截的敌人(52级起)
|
138 5 击倒前方拦截的敌人
|
||||||
139 5 攻击周围的敌人(55级起)
|
139 5 攻击周围的敌人
|
||||||
140 5 攻击拦截的前方敌人(50级起)
|
140 5 攻击拦截的前方敌人
|
||||||
152 17 最大生命值 +%.0f%%
|
152 17 提升最高Hp +%.0f%%
|
||||||
|
|||||||
@@ -0,0 +1,292 @@
|
|||||||
|
# Source: server_extracted/client_locale/longju/locale/taiwan/item_proto (MIPX v1, stride 152, type WEAPON=1)
|
||||||
|
VNUM PREVIOUS_NAME SOURCE_NAME
|
||||||
|
10 武士刀+0 短刀+0
|
||||||
|
11 武士刀+1 短刀+1
|
||||||
|
12 武士刀+2 短刀+2
|
||||||
|
13 武士刀+3 短刀+3
|
||||||
|
14 武士刀+4 短刀+4
|
||||||
|
15 武士刀+5 短刀+5
|
||||||
|
16 武士刀+6 短刀+6
|
||||||
|
17 武士刀+7 短刀+7
|
||||||
|
18 武士刀+8 短刀+8
|
||||||
|
19 武士刀+9 短刀+9
|
||||||
|
140 风雷剑+0 龙虎刀+0
|
||||||
|
141 风雷剑+1 龙虎刀+1
|
||||||
|
142 风雷剑+2 龙虎刀+2
|
||||||
|
143 风雷剑+3 龙虎刀+3
|
||||||
|
144 风雷剑+4 龙虎刀+4
|
||||||
|
145 风雷剑+5 龙虎刀+5
|
||||||
|
146 风雷剑+6 龙虎刀+6
|
||||||
|
147 风雷剑+7 龙虎刀+7
|
||||||
|
148 风雷剑+8 龙虎刀+8
|
||||||
|
149 风雷剑+9 龙虎刀+9
|
||||||
|
150 鬼牙剑+0 夺魂刀+0
|
||||||
|
151 鬼牙剑+1 夺魂刀+1
|
||||||
|
152 鬼牙剑+2 夺魂刀+2
|
||||||
|
153 鬼牙剑+3 夺魂刀+3
|
||||||
|
154 鬼牙剑+4 夺魂刀+4
|
||||||
|
155 鬼牙剑+5 夺魂刀+5
|
||||||
|
156 鬼牙剑+6 夺魂刀+6
|
||||||
|
157 鬼牙剑+7 夺魂刀+7
|
||||||
|
158 鬼牙剑+8 夺魂刀+8
|
||||||
|
159 鬼牙剑+9 夺魂刀+9
|
||||||
|
160 碧玉刀+0 封神刀+0
|
||||||
|
161 碧玉刀+1 封神刀+1
|
||||||
|
162 碧玉刀+2 封神刀+2
|
||||||
|
163 碧玉刀+3 封神刀+3
|
||||||
|
164 碧玉刀+4 封神刀+4
|
||||||
|
165 碧玉刀+5 封神刀+5
|
||||||
|
166 碧玉刀+6 封神刀+6
|
||||||
|
167 碧玉刀+7 封神刀+7
|
||||||
|
168 碧玉刀+8 封神刀+8
|
||||||
|
169 碧玉刀+9 封神刀+9
|
||||||
|
180 飞火流云刀+0 伏牺刀+0
|
||||||
|
181 飞火流云刀+1 伏牺刀+1
|
||||||
|
182 飞火流云刀+2 伏牺刀+2
|
||||||
|
183 飞火流云刀+3 伏牺刀+3
|
||||||
|
184 飞火流云刀+4 伏牺刀+4
|
||||||
|
185 飞火流云刀+5 伏牺刀+5
|
||||||
|
186 飞火流云刀+6 伏牺刀+6
|
||||||
|
187 飞火流云刀+7 伏牺刀+7
|
||||||
|
188 飞火流云刀+8 伏牺刀+8
|
||||||
|
189 飞火流云刀+9 伏牺刀+9
|
||||||
|
190 黑翼魔神刀+0 龙颚闪+0
|
||||||
|
191 黑翼魔神刀+1 龙颚闪+1
|
||||||
|
192 黑翼魔神刀+2 龙颚闪+2
|
||||||
|
193 黑翼魔神刀+3 龙颚闪+3
|
||||||
|
194 黑翼魔神刀+4 龙颚闪+4
|
||||||
|
195 黑翼魔神刀+5 龙颚闪+5
|
||||||
|
196 黑翼魔神刀+6 龙颚闪+6
|
||||||
|
197 黑翼魔神刀+7 龙颚闪+7
|
||||||
|
198 黑翼魔神刀+8 龙颚闪+8
|
||||||
|
199 黑翼魔神刀+9 龙颚闪+9
|
||||||
|
200 龙爪赤魂刀+0 九龙神剑+0
|
||||||
|
201 龙爪赤魂刀+1 九龙神剑+1
|
||||||
|
202 龙爪赤魂刀+2 九龙神剑+2
|
||||||
|
203 龙爪赤魂刀+3 九龙神剑+3
|
||||||
|
204 龙爪赤魂刀+4 九龙神剑+4
|
||||||
|
205 龙爪赤魂刀+5 九龙神剑+5
|
||||||
|
206 龙爪赤魂刀+6 九龙神剑+6
|
||||||
|
207 龙爪赤魂刀+7 九龙神剑+7
|
||||||
|
208 龙爪赤魂刀+8 九龙神剑+8
|
||||||
|
209 龙爪赤魂刀+9 九龙神剑+9
|
||||||
|
220 苍穹刀+0 神兵‖天山苍穹刀+0
|
||||||
|
221 苍穹刀+1 神兵‖天山苍穹刀+1
|
||||||
|
222 苍穹刀+2 神兵‖天山苍穹刀+2
|
||||||
|
223 苍穹刀+3 神兵‖天山苍穹刀+3
|
||||||
|
224 苍穹刀+4 神兵‖天山苍穹刀+4
|
||||||
|
225 苍穹刀+5 神兵‖天山苍穹刀+5
|
||||||
|
226 苍穹刀+6 神兵‖天山苍穹刀+6
|
||||||
|
227 苍穹刀+7 神兵‖天山苍穹刀+7
|
||||||
|
228 苍穹刀+8 神兵‖天山苍穹刀+8
|
||||||
|
229 苍穹刀+9 神兵‖天山苍穹刀+9
|
||||||
|
240 五刃刀+0 七窍破魂剑+0
|
||||||
|
241 五刃刀+1 七窍破魂剑+1
|
||||||
|
242 五刃刀+2 七窍破魂剑+2
|
||||||
|
243 五刃刀+3 七窍破魂剑+3
|
||||||
|
244 五刃刀+4 七窍破魂剑+4
|
||||||
|
245 五刃刀+5 七窍破魂剑+5
|
||||||
|
246 五刃刀+6 七窍破魂剑+6
|
||||||
|
247 五刃刀+7 七窍破魂剑+7
|
||||||
|
248 五刃刀+8 七窍破魂剑+8
|
||||||
|
249 五刃刀+9 七窍破魂剑+9
|
||||||
|
260 弑月刀+0 神兵‖晨星弑月刀+0
|
||||||
|
261 弑月刀+1 神兵‖晨星弑月刀+1
|
||||||
|
262 弑月刀+2 神兵‖晨星弑月刀+2
|
||||||
|
263 弑月刀+3 神兵‖晨星弑月刀+3
|
||||||
|
264 弑月刀+4 神兵‖晨星弑月刀+4
|
||||||
|
265 弑月刀+5 神兵‖晨星弑月刀+5
|
||||||
|
266 弑月刀+6 神兵‖晨星弑月刀+6
|
||||||
|
267 弑月刀+7 神兵‖晨星弑月刀+7
|
||||||
|
268 弑月刀+8 神兵‖晨星弑月刀+8
|
||||||
|
269 弑月刀+9 神兵‖晨星弑月刀+9
|
||||||
|
270 紫云伏魔刀+0 五虎伏魔剑+0
|
||||||
|
271 紫云伏魔刀+1 五虎伏魔剑+1
|
||||||
|
272 紫云伏魔刀+2 五虎伏魔剑+2
|
||||||
|
273 紫云伏魔刀+3 五虎伏魔剑+3
|
||||||
|
274 紫云伏魔刀+4 五虎伏魔剑+4
|
||||||
|
275 紫云伏魔刀+5 五虎伏魔剑+5
|
||||||
|
276 紫云伏魔刀+6 五虎伏魔剑+6
|
||||||
|
277 紫云伏魔刀+7 五虎伏魔剑+7
|
||||||
|
278 紫云伏魔刀+8 五虎伏魔剑+8
|
||||||
|
279 紫云伏魔刀+9 五虎伏魔剑+9
|
||||||
|
290 赤焰刀+0 青焰刀+0
|
||||||
|
291 赤焰刀+1 青焰刀+1
|
||||||
|
292 赤焰刀+2 青焰刀+2
|
||||||
|
293 赤焰刀+3 青焰刀+3
|
||||||
|
294 赤焰刀+4 青焰刀+4
|
||||||
|
295 赤焰刀+5 青焰刀+5
|
||||||
|
296 赤焰刀+6 青焰刀+6
|
||||||
|
297 赤焰刀+7 青焰刀+7
|
||||||
|
298 赤焰刀+8 青焰刀+8
|
||||||
|
299 赤焰刀+9 青焰刀+9
|
||||||
|
1100 无极双刀+0 冰牙+0
|
||||||
|
1101 无极双刀+1 冰牙+1
|
||||||
|
1102 无极双刀+2 冰牙+2
|
||||||
|
1103 无极双刀+3 冰牙+3
|
||||||
|
1104 无极双刀+4 冰牙+4
|
||||||
|
1105 无极双刀+5 冰牙+5
|
||||||
|
1106 无极双刀+6 冰牙+6
|
||||||
|
1107 无极双刀+7 冰牙+7
|
||||||
|
1108 无极双刀+8 冰牙+8
|
||||||
|
1109 无极双刀+9 冰牙+9
|
||||||
|
1120 夜魔异刃双刀+0 乌皇剑+0
|
||||||
|
1121 夜魔异刃双刀+1 乌皇剑+1
|
||||||
|
1122 夜魔异刃双刀+2 乌皇剑+2
|
||||||
|
1123 夜魔异刃双刀+3 乌皇剑+3
|
||||||
|
1124 夜魔异刃双刀+4 乌皇剑+4
|
||||||
|
1125 夜魔异刃双刀+5 乌皇剑+5
|
||||||
|
1126 夜魔异刃双刀+6 乌皇剑+6
|
||||||
|
1127 夜魔异刃双刀+7 乌皇剑+7
|
||||||
|
1128 夜魔异刃双刀+8 乌皇剑+8
|
||||||
|
1129 夜魔异刃双刀+9 乌皇剑+9
|
||||||
|
1160 流光飞影+0 神兵‖流光飞影+0
|
||||||
|
1161 流光飞影+1 神兵‖流光飞影+1
|
||||||
|
1162 流光飞影+2 神兵‖流光飞影+2
|
||||||
|
1163 流光飞影+3 神兵‖流光飞影+3
|
||||||
|
1164 流光飞影+4 神兵‖流光飞影+4
|
||||||
|
1165 流光飞影+5 神兵‖流光飞影+5
|
||||||
|
1166 流光飞影+6 神兵‖流光飞影+6
|
||||||
|
1167 流光飞影+7 神兵‖流光飞影+7
|
||||||
|
1168 流光飞影+8 神兵‖流光飞影+8
|
||||||
|
1169 流光飞影+9 神兵‖流光飞影+9
|
||||||
|
1170 闪燕双刀+0 吴钩+0
|
||||||
|
1171 闪燕双刀+1 吴钩+1
|
||||||
|
1172 闪燕双刀+2 吴钩+2
|
||||||
|
1173 闪燕双刀+3 吴钩+3
|
||||||
|
1174 闪燕双刀+4 吴钩+4
|
||||||
|
1175 闪燕双刀+5 吴钩+5
|
||||||
|
1176 闪燕双刀+6 吴钩+6
|
||||||
|
1177 闪燕双刀+7 吴钩+7
|
||||||
|
1178 闪燕双刀+8 吴钩+8
|
||||||
|
1179 闪燕双刀+9 吴钩+9
|
||||||
|
2160 魔神武尊弓+0 魔神弓+0
|
||||||
|
2161 魔神武尊弓+1 魔神弓+1
|
||||||
|
2162 魔神武尊弓+2 魔神弓+2
|
||||||
|
2163 魔神武尊弓+3 魔神弓+3
|
||||||
|
2164 魔神武尊弓+4 魔神弓+4
|
||||||
|
2165 魔神武尊弓+5 魔神弓+5
|
||||||
|
2166 魔神武尊弓+6 魔神弓+6
|
||||||
|
2167 魔神武尊弓+7 魔神弓+7
|
||||||
|
2168 魔神武尊弓+8 魔神弓+8
|
||||||
|
2169 魔神武尊弓+9 魔神弓+9
|
||||||
|
2170 金鹏万里弓+0 铁牌弓+0
|
||||||
|
2171 金鹏万里弓+1 铁牌弓+1
|
||||||
|
2172 金鹏万里弓+2 铁牌弓+2
|
||||||
|
2173 金鹏万里弓+3 铁牌弓+3
|
||||||
|
2174 金鹏万里弓+4 铁牌弓+4
|
||||||
|
2175 金鹏万里弓+5 铁牌弓+5
|
||||||
|
2176 金鹏万里弓+6 铁牌弓+6
|
||||||
|
2177 金鹏万里弓+7 铁牌弓+7
|
||||||
|
2178 金鹏万里弓+8 铁牌弓+8
|
||||||
|
2179 金鹏万里弓+9 铁牌弓+9
|
||||||
|
2180 炫翼弓+0 神兵‖紫禁炫翼弓+0
|
||||||
|
2181 炫翼弓+1 神兵‖紫禁炫翼弓+1
|
||||||
|
2182 炫翼弓+2 神兵‖紫禁炫翼弓+2
|
||||||
|
2183 炫翼弓+3 神兵‖紫禁炫翼弓+3
|
||||||
|
2184 炫翼弓+4 神兵‖紫禁炫翼弓+4
|
||||||
|
2185 炫翼弓+5 神兵‖紫禁炫翼弓+5
|
||||||
|
2186 炫翼弓+6 神兵‖紫禁炫翼弓+6
|
||||||
|
2187 炫翼弓+7 神兵‖紫禁炫翼弓+7
|
||||||
|
2188 炫翼弓+8 神兵‖紫禁炫翼弓+8
|
||||||
|
2189 炫翼弓+9 神兵‖紫禁炫翼弓+9
|
||||||
|
3150 飞龙裂空斩+0 炎龙魂+0
|
||||||
|
3151 飞龙裂空斩+1 炎龙魂+1
|
||||||
|
3152 飞龙裂空斩+2 炎龙魂+2
|
||||||
|
3153 飞龙裂空斩+3 炎龙魂+3
|
||||||
|
3154 飞龙裂空斩+4 炎龙魂+4
|
||||||
|
3155 飞龙裂空斩+5 炎龙魂+5
|
||||||
|
3156 飞龙裂空斩+6 炎龙魂+6
|
||||||
|
3157 飞龙裂空斩+7 炎龙魂+7
|
||||||
|
3158 飞龙裂空斩+8 炎龙魂+8
|
||||||
|
3159 飞龙裂空斩+9 炎龙魂+9
|
||||||
|
3160 炎狱霸王斩+0 狱焰+0
|
||||||
|
3161 炎狱霸王斩+1 狱焰+1
|
||||||
|
3162 炎狱霸王斩+2 狱焰+2
|
||||||
|
3163 炎狱霸王斩+3 狱焰+3
|
||||||
|
3164 炎狱霸王斩+4 狱焰+4
|
||||||
|
3165 炎狱霸王斩+5 狱焰+5
|
||||||
|
3166 炎狱霸王斩+6 狱焰+6
|
||||||
|
3167 炎狱霸王斩+7 狱焰+7
|
||||||
|
3168 炎狱霸王斩+8 狱焰+8
|
||||||
|
3169 炎狱霸王斩+9 狱焰+9
|
||||||
|
3200 灭世刀+0 神兵‖九天灭世刀+0
|
||||||
|
3201 灭世刀+1 神兵‖九天灭世刀+1
|
||||||
|
3202 灭世刀+2 神兵‖九天灭世刀+2
|
||||||
|
3203 灭世刀+3 神兵‖九天灭世刀+3
|
||||||
|
3204 灭世刀+4 神兵‖九天灭世刀+4
|
||||||
|
3205 灭世刀+5 神兵‖九天灭世刀+5
|
||||||
|
3206 灭世刀+6 神兵‖九天灭世刀+6
|
||||||
|
3207 灭世刀+7 神兵‖九天灭世刀+7
|
||||||
|
3208 灭世刀+8 神兵‖九天灭世刀+8
|
||||||
|
3209 灭世刀+9 神兵‖九天灭世刀+9
|
||||||
|
3210 银翎斩+0 玄冥剑+0
|
||||||
|
3211 银翎斩+1 玄冥剑+1
|
||||||
|
3212 银翎斩+2 玄冥剑+2
|
||||||
|
3213 银翎斩+3 玄冥剑+3
|
||||||
|
3214 银翎斩+4 玄冥剑+4
|
||||||
|
3215 银翎斩+5 玄冥剑+5
|
||||||
|
3216 银翎斩+6 玄冥剑+6
|
||||||
|
3217 银翎斩+7 玄冥剑+7
|
||||||
|
3218 银翎斩+8 玄冥剑+8
|
||||||
|
3219 银翎斩+9 玄冥剑+9
|
||||||
|
4040 逆天夺魄双刀+0 日影黄泉+0
|
||||||
|
4041 逆天夺魄双刀+1 日影黄泉+1
|
||||||
|
4042 逆天夺魄双刀+2 日影黄泉+2
|
||||||
|
4043 逆天夺魄双刀+3 日影黄泉+3
|
||||||
|
4044 逆天夺魄双刀+4 日影黄泉+4
|
||||||
|
4045 逆天夺魄双刀+5 日影黄泉+5
|
||||||
|
4046 逆天夺魄双刀+6 日影黄泉+6
|
||||||
|
4047 逆天夺魄双刀+7 日影黄泉+7
|
||||||
|
4048 逆天夺魄双刀+8 日影黄泉+8
|
||||||
|
4049 逆天夺魄双刀+9 日影黄泉+9
|
||||||
|
5090 凤鸣乾坤铃+0 天神铃+0
|
||||||
|
5091 凤鸣乾坤铃+1 天神铃+1
|
||||||
|
5092 凤鸣乾坤铃+2 天神铃+2
|
||||||
|
5093 凤鸣乾坤铃+3 天神铃+3
|
||||||
|
5094 凤鸣乾坤铃+4 天神铃+4
|
||||||
|
5095 凤鸣乾坤铃+5 天神铃+5
|
||||||
|
5096 凤鸣乾坤铃+6 天神铃+6
|
||||||
|
5097 凤鸣乾坤铃+7 天神铃+7
|
||||||
|
5098 凤鸣乾坤铃+8 天神铃+8
|
||||||
|
5099 凤鸣乾坤铃+9 天神铃+9
|
||||||
|
5120 蛇魔夺魂铃+0 青竹铃+0
|
||||||
|
5121 蛇魔夺魂铃+1 青竹铃+1
|
||||||
|
5122 蛇魔夺魂铃+2 青竹铃+2
|
||||||
|
5123 蛇魔夺魂铃+3 青竹铃+3
|
||||||
|
5124 蛇魔夺魂铃+4 青竹铃+4
|
||||||
|
5125 蛇魔夺魂铃+5 青竹铃+5
|
||||||
|
5126 蛇魔夺魂铃+6 青竹铃+6
|
||||||
|
5127 蛇魔夺魂铃+7 青竹铃+7
|
||||||
|
5128 蛇魔夺魂铃+8 青竹铃+8
|
||||||
|
5129 蛇魔夺魂铃+9 青竹铃+9
|
||||||
|
5150 法神杖+0 神兵‖法神杖+0
|
||||||
|
5151 法神杖+1 神兵‖法神杖+1
|
||||||
|
5152 法神杖+2 神兵‖法神杖+2
|
||||||
|
5153 法神杖+3 神兵‖法神杖+3
|
||||||
|
5154 法神杖+4 神兵‖法神杖+4
|
||||||
|
5155 法神杖+5 神兵‖法神杖+5
|
||||||
|
5156 法神杖+6 神兵‖法神杖+6
|
||||||
|
5157 法神杖+7 神兵‖法神杖+7
|
||||||
|
5158 法神杖+8 神兵‖法神杖+8
|
||||||
|
5159 法神杖+9 神兵‖法神杖+9
|
||||||
|
7160 骨魔卷云扇+0 七翎扇+0
|
||||||
|
7161 骨魔卷云扇+1 七翎扇+1
|
||||||
|
7162 骨魔卷云扇+2 七翎扇+2
|
||||||
|
7163 骨魔卷云扇+3 七翎扇+3
|
||||||
|
7164 骨魔卷云扇+4 七翎扇+4
|
||||||
|
7165 骨魔卷云扇+5 七翎扇+5
|
||||||
|
7166 骨魔卷云扇+6 七翎扇+6
|
||||||
|
7167 骨魔卷云扇+7 七翎扇+7
|
||||||
|
7168 骨魔卷云扇+8 七翎扇+8
|
||||||
|
7169 骨魔卷云扇+9 七翎扇+9
|
||||||
|
460 屠龙刀+0 造化神器‖屠龙刀+0
|
||||||
|
461 屠龙刀+1 造化神器‖屠龙刀+1
|
||||||
|
462 屠龙刀+2 造化神器‖屠龙刀+2
|
||||||
|
463 屠龙刀+3 造化神器‖屠龙刀+3
|
||||||
|
464 屠龙刀+4 造化神器‖屠龙刀+4
|
||||||
|
465 屠龙刀+5 造化神器‖屠龙刀+5
|
||||||
|
466 屠龙刀+6 造化神器‖屠龙刀+6
|
||||||
|
467 屠龙刀+7 造化神器‖屠龙刀+7
|
||||||
|
468 屠龙刀+8 造化神器‖屠龙刀+8
|
||||||
|
469 屠龙刀+9 造化神器‖屠龙刀+9
|
||||||
|
@@ -5,12 +5,20 @@
|
|||||||
## 安装和资源
|
## 安装和资源
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
./android/build.sh Release --install
|
./android/build.sh [Debug|Release] [--launch]
|
||||||
./android/push-client.sh /path/to/40250/Client
|
|
||||||
adb shell am start -n org.metin2port.client/.MainActivity
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`android/push-client.sh` 将 40250 `Client` 目录复制到应用私有目录。APK 本身包含 `libmain.so`、`libSDL3.so`、着色器和 Python 2.7 标准库,不包含约 1.4 GB 的 40250 客户端资源。使用中文资源时运行 `./android/push-client.sh --locale zh`。
|
构建完成后,如果有一台已授权的设备(多台时用 `ANDROID_SERIAL` 指定),脚本会:
|
||||||
|
|
||||||
|
1. `adb install -r` 安装 APK;签名不一致(别的机器的 debug key)时卸载重装,应用数据随之清空。
|
||||||
|
2. 运行 `android/push-client.sh --locale zh`,把资源同步到应用私有目录 `files/Client`。中文资源 `build/zh-locale/Client` 的输入(`data/zh_40250`、`scripts/build_zh_locale.py`、`Client/pack/Index`)有变化时先重新生成。
|
||||||
|
3. 带 `--launch` 时唤醒手机并启动应用;锁屏状态下只提示解锁(锁屏启动会因 Vulkan surface 错误退出)。
|
||||||
|
|
||||||
|
没有设备时只构建 APK。其他选项:`--no-deploy` 只构建,`--no-push` 只安装,`--locale XX` 用 `Client/locale_XX.cfg`,`--full-push` 删除设备上的资源后全量重传。
|
||||||
|
|
||||||
|
资源同步是增量的:设备上的 `files/Client/.mt_sync` 记录上次写入的文件(大小、修改时间),之后只传新增和改动的文件,并删除本地已不存在的文件;第一次同步传完整的约 1.4 GB。只同步游戏资源(`pack/`、`sound/`、`BGM/`、`channel.inf`、`locale*.cfg`),应用自己写的设置和性能日志不会被覆盖或删除。单独同步资源:`./android/push-client.sh [--locale zh] [--full] [--dry-run] [CLIENT_DIR]`。
|
||||||
|
|
||||||
|
APK 本身包含 `libmain.so`、`libSDL3.so`、着色器和 Python 2.7 标准库,不包含 40250 客户端资源。
|
||||||
|
|
||||||
## 连服务器
|
## 连服务器
|
||||||
|
|
||||||
@@ -19,6 +27,24 @@ adb shell am start -n org.metin2port.client/.MainActivity \
|
|||||||
--es args "--live-server HOST:AUTH_PORT:GAME_PORT --login-screen"
|
--es args "--live-server HOST:AUTH_PORT:GAME_PORT --login-screen"
|
||||||
```
|
```
|
||||||
|
|
||||||
默认不传参数时连接进程内假服。测试真服前确认模拟器/设备能访问相应主机与端口。用 `adb logcat` 查看崩溃和启动错误。`adb devices -l` 没有设备时,先连接模拟器或开启真机 USB 调试。
|
从桌面图标启动(不传参数)时连接 `MainActivity.DEFAULT_ARGS` 里的真服登录界面;显式传入不含 `--live-server` 的参数时运行进程内假服。测试真服前确认模拟器/设备能访问相应主机与端口。用 `adb logcat` 查看崩溃和启动错误。`adb devices -l` 没有设备时,先连接模拟器或开启真机 USB 调试。
|
||||||
|
|
||||||
更详细的构建依赖与命令见 [src/host/README.md](../src/host/README.md)。
|
更详细的构建依赖与命令见 [src/host/README.md](../src/host/README.md)。
|
||||||
|
|
||||||
|
## Mi 8 Lite / Adreno 512
|
||||||
|
|
||||||
|
2026-09-30 真机适配:绘制状态使用动态 uniform buffer,片元着色器按纹理混合和透明测试状态编译专用管线,
|
||||||
|
减少 Adreno 512 每个像素的存储读取和动态分支。Android 的默认场景分辨率仍为 75%、MSAA 2×,UI 保持屏幕分辨率。
|
||||||
|
此 GPU 首次启动默认使用省电模式(30 FPS);已保存的帧率设置和显式命令行参数优先,其他 GPU 不改变默认模式。
|
||||||
|
|
||||||
|
`--generic-shaders`(或 `MT_GENERIC_SHADERS=1`)保留 uniform buffer、关闭片元专用化,供诊断对比。
|
||||||
|
完整测量和画面对比见 [Mi 8 Lite 适配记录](XIAOMI8LITE-ADAPTATION-20260930.md)。
|
||||||
|
|
||||||
|
可重复的分段性能测试(需已安装 APK 并同步资源):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ANDROID_SERIAL=<serial> python3 tools/perf/run_render_isolation.py build/qa/device-test \
|
||||||
|
--sections baseline,terrain,baseline_repeat --render-scale 0.75 --msaa 2 --fps-cap 30
|
||||||
|
```
|
||||||
|
|
||||||
|
每段排除首个加载后的采样窗口,记录 6 个 2 秒窗口;输出 CSV、截图、内存快照和汇总 JSON,结束后恢复正常登录启动。
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# 自动狩猎:寻路、复活和独立技能配置
|
||||||
|
|
||||||
|
2026-10-01 用户授权的 PORT 玩法扩展。自动狩猎继续使用客户端状态机,攻击、施法、拾取、复活和骑乘通过原有接口与封包完成。
|
||||||
|
|
||||||
|
## 使用
|
||||||
|
|
||||||
|
F8 或移动端自动狩猎设置打开面板,选择已学会的技能。选择记录的是技能 ID,移动、删除、换页快捷栏不会改变自动施法选择。
|
||||||
|
|
||||||
|
- **自动复活**:默认关闭。开启后死亡进入等待状态,10 秒后请求 `/restart_here`,未复活则每 10 秒重试;服务端保留复活限制。只有真实角色存活后才进入恢复,至少等待 5 秒且 HP 达到 70% 后继续。启用了自动红药时,恢复阶段临时将喝药阈值提高到 70%,不修改保存的正常战斗阈值;关闭红药则等待自然恢复。
|
||||||
|
- **下马施法**:默认开启。普通技能在马上就绪时,请求 `/ride` 下马,等待角色骑乘状态确实变为下马,施放选中的可用技能,等待技能动画结束后请求 `/ride` 骑乘。一次下马尽量施放多项就绪技能;马战技能保持在马上使用。
|
||||||
|
- 下马/骑乘确认最多等待 8 秒,不反复发送切换命令。下马失败后暂缓 30 秒再尝试;完成一次施法骑乘后至少间隔 10 秒再开启下一轮下马。
|
||||||
|
- 手动移动、世界点击或攻击会取消正在进行的自动骑乘流程并暂停狩猎。复活/恢复期间的这些手动操作会停止自动狩猎。停止、换地图和退出游戏清理自动动作。
|
||||||
|
|
||||||
|
骑乘依赖服务端原有 `/ride` 逻辑:普通马需要仍可骑乘;其他坐骑需要相应道具仍可用。原有命令可能优先选择已召唤的马或背包中第一件可用坐骑道具,不能保证恢复不同种类坐骑中的指定一种。
|
||||||
|
|
||||||
|
## 路径与目标
|
||||||
|
|
||||||
|
`AutoHuntNavigation.h` 提供自动狩猎专用、100 cm 网格的有界 A*,8 个方向移动,并对边、转角和简化后的路径逐段采样,禁止穿墙和切过封闭墙角。
|
||||||
|
|
||||||
|
运行时查询已经加载的 `attr.atr` 阻挡属性和场景对象碰撞体,使用 25 cm 的通行余量;未加载的格子视为不可通行。先尝试直达,不能直达时寻找绕障路径。普通目标和引怪目标均按优先级检查可达性,每轮最多检查 4 个候选,每个搜索最多扩展 3500 个节点。没有找到路径的候选短暂跳过 5 秒;实际移动无进展仍使用原有超时和较长黑名单。
|
||||||
|
|
||||||
|
追怪、拾取和返回挂机点都沿路径节点移动,最终攻击和拾取仍走原有流程。绕障时实际位置变化会更新进展时间,避免因为暂时远离目标而误判卡住;攻击技能施放前还检查当前直达路径,防止目标移动到墙后仍施法。
|
||||||
|
|
||||||
|
这是有界、基于当前加载数据的规划:很长的绕行、过窄通道、临时角色阻挡或场景数据不完整仍可能找不到路线。不会因找不到路径而退回穿墙直走。原有手动移动没有修改。
|
||||||
|
|
||||||
|
## 配置和代码
|
||||||
|
|
||||||
|
`autohunt.cfg` 升级为 `AUTOHUNT2` 格式,保存复活开关、下马施法开关和独立技能 ID。旧 7/8 字段格式仍可读取;进入游戏后将旧勾选快捷栏的技能迁移一次。技能界面只列出已学会且可主动使用的职业/马战技能,不列被动技能。
|
||||||
|
|
||||||
|
- `src/port/UserInterface/PythonPlayerAutoHunt.cpp`:状态机、地图查询、复活和骑乘流程。
|
||||||
|
- `src/port/UserInterface/AutoHuntNavigation.h`:路径规划。
|
||||||
|
- `src/platform/ScriptLib/AutoHuntScript.inc`:设置面板、按技能名称勾选和状态显示。
|
||||||
|
- `src/port/UserInterface/PythonPlayerModule.cpp`:独立技能选择接口。
|
||||||
|
|
||||||
|
## 验证
|
||||||
|
|
||||||
|
- `host.autohunt_navigation`:直达、绕墙、封闭墙、近距离隔墙、墙角、搜索预算、未加载数据、异常坐标。
|
||||||
|
- `port.login_flow` / `MT_TEST_MOBILE=1 port.login_flow`:真实 Python 面板和接口;技能选择不受快捷栏变化影响;关闭下马施法不发送骑乘命令;手动操作取消待确认的流程;模拟服务端角色重建确认下马后施法、施法后重新骑乘;默认死亡停止、可选原地复活请求和 HP 恢复门槛。
|
||||||
|
- macOS `mt_native_render` 和 Android arm64 `main` 构建。
|
||||||
|
|
||||||
|
集成测试使用假服并模拟骑乘/存活确认;真实服务器拒绝条件、复杂地图上的长期寻路和真机长时间挂机尚需实测。
|
||||||
|
|
||||||
|
中文面板已用原生 Vulkan 渲染器检查手机布局,截图位于 `build/qa/autohunt-enhance-ui/settings.png`;截图使用模拟的可选技能列表,实际已学技能过滤由上述集成测试覆盖。
|
||||||
|
|
||||||
|
|
||||||
|
## 2026-10-02:拥堵与拾取抢占
|
||||||
|
|
||||||
|
自动狩猎检测近身且无静态阻挡的合法怪物。拾取期间出现这类怪物立即清除物品预约和路径,转为战斗;近身有两只以上怪物,或追击 1.5 秒没有进展时,也优先清理近身目标。保留当前近身目标,避免频繁换向。拥堵期间及解除后的 3 秒不补拉、不被外围石头抢占;首领过滤仍生效。暂缓的物品跳过 2 秒,后续重新扫描。
|
||||||
|
|
||||||
|
已处于原有可攻击距离且直线无静态阻挡时,直接进入攻击流程,不再要求走到固定 100 cm 站位。攻击进展由本地碰撞命中回调更新,不再由攻击动画刷新;这是客户端命中证据,并非服务器伤害确认。施法和眩晕期间保留等待。移动进展按到当前路点的最佳距离减少或通过路点更新,横向绕圈不刷新。物品尝试另有 15 秒总期限,超时清除路径和移动。
|
||||||
|
|
||||||
|
新增假服回归覆盖拾取转战斗和威胁消失后的重新拾取。真实密集怪群、骑乘和墙边拥堵需真机验证。本次不加入动态 A* 怪物障碍,也不修改服务端。
|
||||||
@@ -0,0 +1,189 @@
|
|||||||
|
# AVA2 与 40250 客户端差异审查
|
||||||
|
|
||||||
|
日期:2026-10-03。结论:同源引擎上的大幅功能分支,协议与数据不兼容;不是当前跨平台客户端的可直接替换升级版。
|
||||||
|
|
||||||
|
## 范围与证据边界
|
||||||
|
|
||||||
|
- AVA2 客户端:`AVA2/TEST/3. Source BIN/Client`;脚本和解包资源:`AVA2/TEST/1. Client DEV/pack_maker`。
|
||||||
|
- 40250 客户端:`40250/Server Client TMP4/ClientVS22/source`;原始 Python:`40250/Server Client TMP4/Client/Eternexus/root`。
|
||||||
|
- AVA2 服务端:只读取 `FILES+SRC.tgz`,将 Server 源码提取到 `metin2-client/build/ava2-comparison/server`,没有执行包内脚本、启动服务器或导入数据库。
|
||||||
|
- 40250 服务端:`40250/Server Client TMP4/Server/metin2/src/server`。
|
||||||
|
- 当前项目与原始 40250 分开说明:当前项目已经是 SDL3/Vulkan arm64,并有 5 页背包、中文、移动操作、自动狩猎等扩展,不能把这些算成“原始 40250 功能”。
|
||||||
|
- 用户提供的[发布帖](https://metin2hub.com/threads/ava2-org-serverfiles-and-source-full-version.1269/)主页面直接读取返回 403;搜索索引能找到同一帖标题及 2023-01-15 的发帖信息,但未据此认定功能完整性。以下功能结论来自本地源码。
|
||||||
|
- 本次完成目录清点、文件内容比较、主要编译开关及构建列表核对、重点协议/数据/碰撞/拾取路径审阅。没有逐函数证明两个客户端等价,也没有运行 AVA2 Windows 客户端。因此“源码接入”不等于“真机稳定”。
|
||||||
|
|
||||||
|
## 1. 差异规模
|
||||||
|
|
||||||
|
| 清点项 | AVA2 | 40250 | 说明 |
|
||||||
|
|---|---:|---:|---|
|
||||||
|
| 客户端 `.h/.cpp/.c/.py` 文件 | 738 | 651 | 递归清点,含备份与非活动代码 |
|
||||||
|
| 同相对路径文件 | 639 | 639 | 其中 150 个只归一化 CRLF 后完全相同,489 个不同 |
|
||||||
|
| AVA2 独有源码文件 | 99 | — | 含新增功能、反作弊、Discord、备份文件,不是 99 个功能 |
|
||||||
|
| root 顶层 Python 文件 | 162 | 74 | AVA2 新增 88 个同名比较中不存在的文件,含旧版/备份脚本 |
|
||||||
|
| AVA2 uiscript Python 文件 | 166 | — | 递归统计;未用此数量推断全部界面已启用 |
|
||||||
|
| 服务端 `.h/.cpp` 文件 | 571 | 513 | 442 个同路径文件,其中 120 个归一化后相同、322 个不同;含第三方 Lua 头文件 |
|
||||||
|
|
||||||
|
文件不同包括注释、编码、功能分支和实质逻辑;不能将 489/639 当成功能变化比例。机器可读清单在 `build/ava2-comparison`。
|
||||||
|
|
||||||
|
## 2. 底层架构:延续旧引擎,没有升级到新引擎
|
||||||
|
|
||||||
|
| 项目 | 原始 40250 | AVA2 | 当前 metin2-client |
|
||||||
|
|---|---|---|---|
|
||||||
|
| 客户端平台 | Windows C++ | Windows C++ | macOS/Android arm64 |
|
||||||
|
| 图形接口 | Direct3D 8 | 仍引用 Direct3D 8 | SDL3 + Vulkan,macOS 经 MoltenVK |
|
||||||
|
| Python | 2.7 系列 | 活动 ScriptLib 引用 Python2,头文件为 2.7.6 | 内嵌 2.7.18 |
|
||||||
|
| 构建 | Windows 工程 | Win32 工程,v142 工具链 | CMake / Android Gradle |
|
||||||
|
| 客户端二进制 | 原版 Windows 路线 | `bin_ava2.exe` 实测 PE32 Intel 80386 | 当前产物 arm64 64 位 |
|
||||||
|
| 服务端部署 | 原版 FreeBSD 路线 | README 指定 FreeBSD 11 x32 + MySQL 5.6;game Makefile 为 g++11、`-m32`、C++14 | 现有 203 为已适配 40250 服务端 |
|
||||||
|
|
||||||
|
AVA2 目录额外包含 Python22(2.2.3),但当前 ScriptLib 实际 include 指向 Python2(2.7.6);不能据目录名误认活动解释器是 2.2。工程叫 VC90/VC100 也不能直接认定当前工具集版本,活动 vcxproj 里是 v142。
|
||||||
|
|
||||||
|
证据:[EterLib/StdAfx.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/EterLib/StdAfx.h:23>); [ScriptLib/StdAfx.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/ScriptLib/StdAfx.h:12>); [UserInterface/UserInterface_VC90.vcxproj](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/UserInterface_VC90.vcxproj:38>); [game/src/Makefile](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/game/src/Makefile:33>)
|
||||||
|
|
||||||
|
## 3. 协议:基础编号已经不同
|
||||||
|
|
||||||
|
| 封包 | 40250 | AVA2 |
|
||||||
|
|---|---:|---:|
|
||||||
|
| CG_ATTACK | 2 | 225 |
|
||||||
|
| CG_CHAT | 3 | 231 |
|
||||||
|
| CG_ITEM_DROP | 12 | 224 |
|
||||||
|
| CG_USE_SKILL | 52 | 233 |
|
||||||
|
| CG_FISHING | 82 | 222 |
|
||||||
|
| CG_STATE_CHECKER | 206 | 94 |
|
||||||
|
|
||||||
|
上述 AVA2 attack/chat/skill/state 数字在其服务端 packet.h 中也有对应定义。这不是只有客户端 UI 的改动。
|
||||||
|
|
||||||
|
原始头文件文字扫描:AVA2 找到 267 个显式赋值的 CG/GC 名称,40250 为 217;同名 6 个编号改变,AVA2 独有名称 51 个。此统计含条件关闭的声明,而且不能替代预处理后的实际封包注册表。
|
||||||
|
|
||||||
|
新增代表:离线商店 CG57/58、商店搜索 CG143、洗属性 CG171、肩带 CG211、副本信息 CG213、掉落信息 CG215、合成 CG216、日历 CG220、战令 CG230、批量拾取 CG235;相应新增 GC 返回包。关闭的 combat zone/CShield/element spell 也有声明,不能全部当成活动功能。
|
||||||
|
|
||||||
|
加密同样不同:40250 `ServiceDefs.h` 开启 `_IMPROVED_PACKET_ENCRYPTION_`;AVA2 客户端与服务端 service.h 都将它注释掉,AccountConnector 中保留并选择旧的 `SetSecurityMode` 分支。当前跨平台项目使用的 DH2/CTR 路线不能原样接 AVA2。
|
||||||
|
|
||||||
|
证据:[UserInterface/Packet.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Packet.h:33>); [UserInterface/Packet.h](</Users/shen/Work/Code/Metin2/40250/Server Client TMP4/ClientVS22/source/UserInterface/Packet.h:31>); [EterBase/ServiceDefs.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/EterBase/ServiceDefs.h:4>); [EterBase/ServiceDefs.h](</Users/shen/Work/Code/Metin2/40250/Server Client TMP4/ClientVS22/source/EterBase/ServiceDefs.h:4>); [UserInterface/AccountConnector.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/AccountConnector.cpp:245>)
|
||||||
|
|
||||||
|
## 4. 相同编号的封包,也可能完全不同
|
||||||
|
|
||||||
|
| 结构/常量 | 40250 | AVA2 | 影响 |
|
||||||
|
|---|---|---|---|
|
||||||
|
| `TPacketGCPoints.points` | Windows 32 位 long | long long | 属性数组元素变 8 字节 |
|
||||||
|
| `TPacketGCPointChange` | amount/value 为 long | amount/value 为 long long | 同名同编号不能照原长度分帧 |
|
||||||
|
| `TPacketGCItemSet2.count` | BYTE | DWORD | 物品数量字段扩宽 |
|
||||||
|
| 物品 socket 数组 | 3 | 8 | 结构长度、特殊物品 socket 索引变化 |
|
||||||
|
| 物品属性数组 | 7 | 15 | 网络/数据库/角色物品结构变化 |
|
||||||
|
| 物品附加字段 | 无 AVA2 扩展 | glove randomAttr[7]、自定义 name[25] 等 | 依启用开关继续变长 |
|
||||||
|
| `TPacketGCDead` | header + vid | 增加复活类型数组 | 死亡/复活处理变化 |
|
||||||
|
| 每账号角色 | 4 | 开关启用后 5 | 选角数组与登录成功包改变 |
|
||||||
|
| 金钱/交易/商店价格 | 32 位相关字段 | 多处 long long | 必须连同 DB、Python 接口和格式化迁移 |
|
||||||
|
|
||||||
|
**15 个属性数组不等于每件装备能正常洗出 15 条普通属性**:AVA2 仍定义普通 5 条、稀有 2 条,另外扩展槽的用途要按对应系统检查。**8 个 socket 也不等于能镶 8 颗石头**;唯一物品计时等也使用 socket。
|
||||||
|
|
||||||
|
证据:[UserInterface/Packet.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Packet.h:2133>); [UserInterface/Packet.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Packet.h:2275>); [UserInterface/GameType.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/GameType.h:536>); [UserInterface/GameType.h](</Users/shen/Work/Code/Metin2/40250/Server Client TMP4/ClientVS22/source/UserInterface/GameType.h:299>); [UserInterface/Packet.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Packet.h:1833>)
|
||||||
|
|
||||||
|
## 5. 背包、装备与角色成长
|
||||||
|
|
||||||
|
| 项目 | 原始 40250 | AVA2 |
|
||||||
|
|---|---|---|
|
||||||
|
| 背包 | 2 页、90 格 | 开启扩展,4 页、180 格 |
|
||||||
|
| 特殊收纳 | 原版背包/龙魂/腰带等 | 新增专门收纳窗口与特殊库存常量 |
|
||||||
|
| 装备 | 原版身体/武器/首饰等,预留 32 槽 | 肩带及肩带时装、武器/坐骑时装、手套、护符、宠物槽、发光槽、坐骑皮肤等 |
|
||||||
|
| 服务端装备槽上限 | 32 | 新增槽后枚举至 36;需要核对客户端映射,不可依注释复制 |
|
||||||
|
| 普通等级源码上限 | 120 | 250 |
|
||||||
|
| 征服者等级 | 无此分支 | 宏开启,源码上限 30,Sungma/Yohara 相关字段 |
|
||||||
|
| 龙魂 | 原版等级体系 | 增加神话等级、洗属性和效果控制 |
|
||||||
|
| 货币上限常量 | 2,000,000,000 | 2,000,000,000,000,000LL |
|
||||||
|
| 技能 | 原版 | 7/8 技能扩展、额外元素相关字段 |
|
||||||
|
|
||||||
|
这里是源码常量,不代表打包服实际经验表、任务或地图支持玩家练到 250。当前 metin2-client 已是 5 页、225 格,**AVA2 的默认 4 页并不是对当前项目的背包容量升级**。
|
||||||
|
|
||||||
|
客户端 `CItemData::WEAR_MAX_NUM` 仍显式写 32,但服务端 wear 枚举新增项后到 36,客户端也存在独立的新装备计数/槽映射。此处需要专项逐槽核对;静态看到差异不能直接宣称已产生越界。
|
||||||
|
|
||||||
|
证据:[UserInterface/GameType.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/GameType.h:44>); [common/length.h](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/common/length.h:84>); [common/length.h](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/common/length.h:113>); [GameLib/ItemData.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/GameLib/ItemData.h:495>); [common/length.h](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/common/length.h:309>)
|
||||||
|
|
||||||
|
## 6. 新增玩法系统及接入证据
|
||||||
|
|
||||||
|
下表比较的是原始 40250;现有项目自定义扩展另算。
|
||||||
|
|
||||||
|
| 系统 | AVA2 证据 | 状态/边界 |
|
||||||
|
|---|---|---|
|
||||||
|
| 离线商店、跨商店搜索 | 客户端 PythonPrivateShopSearch / uiofflineshop;服务端 offlineshop_manager/search;DB ClientManagerOfflineshop | 客户端/服务端宏开启,必须迁移 DB 表和协议 |
|
||||||
|
| 自动洗属性 switchbot | PythonSwitchbot、uiswitchbot;服务端 new_switchbot;CG/GC171 | 有真实编译接入,不是只有脚本 |
|
||||||
|
| 5+2 属性加成操作、属性锁定/复制 | __BL_67_ATTR__、ENABLE_LOCK_ATTR、ENABLE_COPY_ATTR_ITEM,uiAttr67Add | 不等于扩展数组每一槽都有普通洗属性入口 |
|
||||||
|
| Wiki / 掉落查询 / 宝箱预览 | PythonWiki、PythonDropItem、uiwiki、uiChestDrop,target/drop 包 | 依赖资料和服务端返回,不是界面贴图即可 |
|
||||||
|
| 模型预览 | CPythonRenderTargetModule、EterLib CRenderTarget、uirendertarget | 需要离屏渲染、相机和资源绑定 |
|
||||||
|
| 副本资料/计时/排名 | PythonDungeonInfo、dungeon_info、uidungeoninfo | 服务端和 Python 互相依赖 |
|
||||||
|
| 战令 Battle Pass | PythonBattlePass、uibattlepass、battlepass、questlua_battlepass | 宏开启并加入构建 |
|
||||||
|
| 生物学家任务 UI | biolog、uibiyolog / uiprofessionalbiolog | 扩展任务及网络/UI 配合 |
|
||||||
|
| 宠物成长、孵化、喂养、技能 | New_PetSystem、PythonSkillPet、多个宠物 UI | 比原版 PetSystem 更丰富;包里也有 old/copia 版本,不能全算启用 |
|
||||||
|
| 肩带吸收/时装 | PythonSash、uisash、服务端 __SASH_SYSTEM__ | 增加物品、装备槽和封包 |
|
||||||
|
| 日历、活动、帝国战争 | char_event_calendar、new_events、uicalendar/uikingdomswar | 多种活动实现并存,需确认实际入口 |
|
||||||
|
| 小游戏 | fishgame、Catch King,对应脚本/包/宏 | 普通钓鱼也改了包头 |
|
||||||
|
| 新副本内容 | Meley、Zodiac、船防御相关宏及源码/资源 | 静态存在,不等于每个副本任务流程已实测 |
|
||||||
|
| 便捷操作 | 换线、批量精炼、合成改版、反经验、自选技能、装扮隐藏、装备切换、排序 | 有独立宏/源码/脚本,迁移复杂度不同 |
|
||||||
|
| Discord | discord_rpc、ENABLE_DISCORD_RPC | 活动宏开启,但 app ID 配置值为 0,不能称现成可用集成 |
|
||||||
|
| 银行/支援/狼人与战斗区 | 代码或脚本存在 | 开关不一致或关闭,不能列为无条件可用功能,见后文 |
|
||||||
|
|
||||||
|
证据:[UserInterface/Locale_inc.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Locale_inc.h:86>); [UserInterface/UserInterface.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/UserInterface.cpp:697>); [UserInterface/UserInterface_VC90.vcxproj](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/UserInterface_VC90.vcxproj:361>); [game/src/Makefile](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/game/src/Makefile:156>)
|
||||||
|
|
||||||
|
## 7. 与近期自动狩猎问题直接相关的差异
|
||||||
|
|
||||||
|
### 7.1 敌对怪物碰撞被忽略
|
||||||
|
|
||||||
|
AVA2 启用 `ENABLE_MOBS_WITHOUT_COLLISIONS`。`CActorInstance::IsIgnoreCollision` 对 enemy 返回 TRUE,也对特定 race 和 campfire 返回 TRUE;InstanceBaseBattle 的角色碰撞检测在这个返回值为真时跳过该 actor。
|
||||||
|
|
||||||
|
这会让客户端移动不被敌对怪群实体碰撞阻挡,是更改基础碰撞规则;我们的当前优化保留碰撞,通过近身清怪、拾取抢占和停止补拉解围。这两个方案的手感与语义不同,不能将 AVA2 的开关称作同一套自动狩猎修复。它也不代表忽略墙、地图阻挡或所有服务器校验。
|
||||||
|
|
||||||
|
### 7.2 自动拾取是批量协议扩展
|
||||||
|
|
||||||
|
AVA2 的 `CPythonPlayer::SendPickUPItemPacket` 收集物品 VID,500 ms 节流、过滤归属后调用 `SendItemsPickUpPacket`,新增 CG235。它不同于当前项目基于单个物品、路径、预约和超时的拾取。
|
||||||
|
|
||||||
|
本次没有找到与当前项目同名的完整 `AutoHunt` 状态机;原版已有的 `__Update_AutoAttack` 不能当成新增完整挂机系统。自动拾取、技能流派选择、自动洗属性也不等于具备当前自动狩猎的引怪、寻路、恢复和配置能力。进一步核对 `uiautoskill.py`:其窗口仅在技能流派尚未选择时打开,按钮发送选择流派命令;`ENABLE_AUTO_SELECT_SKILL` 不是自动循环施法。
|
||||||
|
|
||||||
|
证据:[GameLib/ActorInstanceCollisionDetection.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/GameLib/ActorInstanceCollisionDetection.cpp:777>); [UserInterface/InstanceBaseBattle.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/InstanceBaseBattle.cpp:524>); [UserInterface/PythonPlayer.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/PythonPlayer.cpp:1510>)
|
||||||
|
|
||||||
|
## 8. 资源、Python 与渲染
|
||||||
|
|
||||||
|
- AVA2 活动 `USE_FOX_FS` 走 FoxFS API(FoxFS_Create/LoadA/GetA),包索引按每行一个包名读取;包里提供 FoxFS Windows `.lib`,本地 pack 名称也不走普通成对 EIX/EPK 清单。这是当前 EPK 加载器不能直接替换的依赖。
|
||||||
|
- 存在大量已解包目录,因此可以挑选资源复用;没有必要为了导入一个模型就先移植 FoxFS。
|
||||||
|
- pack_maker 清点得到 45 个资源目录、93,874 个文件,含重复/备份、工具或压缩文件,不是 93,874 个独立游戏资产。
|
||||||
|
- 增加 Yohara/征服者地图、Zodiac、Meley、新宠物、装扮、离线商店、掉落查询、新选角等资源目录。目录存在不等于所有模型格式都经过当前 libgr2 验证。
|
||||||
|
- Python root 仍用 Python 2 语法和 `app/net/player/item` 一类原版 C++ 模块,但接口已扩展;复制整个 root 会遇到缺少 C++ 方法、常量、封包和数据等问题。
|
||||||
|
- ItemManager 支持 MIPX/MIPT 和结构自动检测,PythonNonPlayer 也有 mob_proto 结构兼容分支;这些是 proto 表结构转换能力,**不是服务器协议自动兼容能力**。
|
||||||
|
- EterLib 仍 D3D8,新增 offscreen RenderTarget,用于 Wiki/商店/NPC 模型预览;大量闪光、特效、缩放和显示选项属于旧引擎扩展,没有证据表明换成现代渲染引擎。
|
||||||
|
|
||||||
|
证据:[UserInterface/UserInterface.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/UserInterface.cpp:547>); [EterPack/EterPackManager.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/EterPack/EterPackManager.cpp:299>); [GameLib/ItemManager.cpp](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/GameLib/ItemManager.cpp:269>); [system.py](</Users/shen/Work/Code/Metin2/AVA2/TEST/1. Client DEV/pack_maker/root/system.py:62>)
|
||||||
|
|
||||||
|
## 9. 数据库与文件包的区别
|
||||||
|
|
||||||
|
`MYSQL56.tgz` 实际主要是 MySQL 数据目录备份,不是通用 SQL 导出:清点 252 个 `.frm`、193 对 `.MYI/.MYD`、5 个 `.ibd` 等。存在 `offline_shop_item/npc/search/log`、`battle_pass`、`new_petsystem`、`ranking_dungeon`、`date_dungeon`、`itemshop` 等表。
|
||||||
|
|
||||||
|
因此不能简单把它当 `.sql` 导入现有 MySQL 8,更不能覆盖当前账号/人物/物品数据库。选移功能时应从源码 SQL 读写和隔离的原运行环境还原 schema,编写逐表迁移。当前版本没有导入、启动或验证该备份,表名清点不代表 schema 已校验。
|
||||||
|
|
||||||
|
AVA2 item/proto/player 表还需要匹配 8 sockets、15 attrs、glove randomAttr、long long gold、conqueror 等结构。我们当前给“11”配置的 7 条属性和 +6 石头无需因比较而修改;本次未连接 203。
|
||||||
|
|
||||||
|
## 10. 打包源码中的不一致与未确认项
|
||||||
|
|
||||||
|
1. 客户端 `ENABLE_WOLFMAN_CHARACTER` 注释,服务端 CommonDefines.h 开启。该静态配置不一致值得检查,不能直接宣布狼人在提供的 exe 中可玩。
|
||||||
|
2. 客户端 `ENABLE_MANAGER_BANK_SYSTEM` 开启,服务端对应宏注释。不能把银行当作已经两端一致启用的系统。
|
||||||
|
3. 客户端 `ENABLE_SUPPORT_SYSTEM` 注释,服务端开启;角色支援代码/脚本存在,但入口和最终二进制需要核对。
|
||||||
|
4. CShield 的宏关闭,但旧保护组件、相关静态库、反作弊源码仍在;移植时要检查活动构建,不宜按文件名一律迁移。
|
||||||
|
5. 有 `oldrendertarget`、`*_old.py`、`- Copy.cpp`、`copia`、多套商城/宠物/离线商店实现。文件数量不能当系统数量。
|
||||||
|
6. `Locale_inc.h` 有 `ENABLE_HIGHLIGHT_SYSTEM // disabled because its bug` 这样的注释与开关状态矛盾,表明注释不能替代实际预处理结果。
|
||||||
|
7. 未证明提供的 Windows exe 与这份 vcxproj/宏是同一次构建;源码宣告功能与成品实际功能要区分。
|
||||||
|
8. 未做双方 GR2/地图/EPK-FoxFS 格式全量交叉读取、逐技能数值比较、任务语料比较或性能测量;不能据系统更多推断更稳定、更快、更省电。
|
||||||
|
|
||||||
|
证据:[UserInterface/Locale_inc.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Locale_inc.h:131>); [common/CommonDefines.h](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/common/CommonDefines.h:99>); [UserInterface/Locale_inc.h](</Users/shen/Work/Code/Metin2/AVA2/TEST/3. Source BIN/Client/UserInterface/Locale_inc.h:155>); [common/CommonDefines.h](</Users/shen/Work/Code/Metin2/metin2-client/build/ava2-comparison/server/common/CommonDefines.h:171>)
|
||||||
|
|
||||||
|
## 11. 对当前项目的迁移建议
|
||||||
|
|
||||||
|
| 目标 | 建议 | 主要依赖 |
|
||||||
|
|---|---|---|
|
||||||
|
| 只想改善打怪体验 | 保留当前主线;按需要评估是否采用“怪物无碰撞”作为单独玩法变更 | 碰撞规则和真服移动验证 |
|
||||||
|
| 换地图、怪物、特效、装扮 | 先离线导入少量已解包资源 | 资源读取、race/MSM/MSA、proto、挂点 |
|
||||||
|
| Wiki、宝箱掉落、副本资料 UI | 适合分模块引入 | 服务端查询、Python 接口、UI 和数据 |
|
||||||
|
| 模型预览 | 可移植,改写 D3D 离屏渲染为现有 Vulkan 目标 | 相机、RT、材质和 UI 合成 |
|
||||||
|
| 换线、批量精炼、自动洗属性 | 分别立功能,不搬整个 AVA2 root | 服务端处理、封包、状态安全与 UI |
|
||||||
|
| 离线商店、宠物成长、肩带、征服者/手套/护符 | 重型系统迁移,需要独立设计和验收 | 协议、DB、数值、资源、逻辑和 UI 全链 |
|
||||||
|
| 直接连接 AVA2 服务器 | 单独协议后端或专用分支 | 旧加密、包号/长度、角色/物品/金钱、Python 接口 |
|
||||||
|
| 将 AVA2 当作新底座替换当前项目 | 不建议直接替换 | 会重新承担 Win32→arm64、专有库、运行时和完整回归成本 |
|
||||||
|
|
||||||
|
最合理的用法:把 AVA2 当作功能及资源参考库,选择少数实际需要的系统逐个移植。若目标是完整兼容 AVA2,按“另一套客户端/服务端协议项目”估算,不能当成替换几个脚本的升级。
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
# AVA2 世界 Boss 追踪进度(v1)
|
||||||
|
|
||||||
|
2026-10-15。参考 AVA2 `uitrack` 的世界 Boss 页,只读。服务端见 metin2-server `docs/FEATURE-BOSS-TRACK.md`。没有移植 AVA2 的传送按钮(它会改变游戏进程);副本页已经由 `mt_dungeons` 实现。
|
||||||
|
|
||||||
|
## 与 AVA2 的差异
|
||||||
|
|
||||||
|
| 项目 | AVA2 | 本实现 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 数据来源 | 专用封包 | 原有 `/mt_features` 查询,种类 `bosses`(能力位 256) |
|
||||||
|
| 跨核心 | 不明(AVA2 服务端源码不在本机) | 每个核心用原 `HEADER_GG_RELAY` 广播自己的 Boss 刷新点,旧核心会忽略 |
|
||||||
|
| 传送 | 有 | 无 |
|
||||||
|
| 提醒 | 有 | 有:刷新后在聊天框提示,以服务器快照为准 |
|
||||||
|
|
||||||
|
## 窗口
|
||||||
|
|
||||||
|
- 入口:小地图左侧按钮列中的“Boss”(换线按钮下方)。
|
||||||
|
- 标题“世界Boss”,有“刷新”“上一页/下一页”按钮,每页 8 行。
|
||||||
|
- 每行显示:
|
||||||
|
- `[CHn]` 或 `[共享]`(频道 99)、Boss 名、地图名;
|
||||||
|
- 状态(存活 a/m、刷新倒计时、即将刷新、不再刷新)、坐标(地图内坐标 /100,`ANYWHERE` 显示“随机位置”)、刷新周期;
|
||||||
|
- “提醒:开/关”按钮,只能对未存活、有计时的 Boss 打开。
|
||||||
|
- 窗口打开时每 30 秒刷新一次。倒计时按服务器时间和本地经过时间计算。
|
||||||
|
- 名称:
|
||||||
|
- Boss 名取自 `nonplayer.GetMonsterName`;
|
||||||
|
- 地图名用服务端地图编号 → 地图目录(`MAPS`,取自服务端 `map/index`)在 `localeInfo.MINIMAP_ZONE_NAME_DICT` 中查找;
|
||||||
|
- 找不到时显示“地图N”。
|
||||||
|
|
||||||
|
## 提醒
|
||||||
|
|
||||||
|
- 提醒的键是 (vnum, 地图, 频道, x, y)。
|
||||||
|
- 窗口关闭时,提醒过的 Boss 计时到期 2 秒后,客户端会主动查询一次。
|
||||||
|
- 只有新快照显示它存活时,聊天框才提示“X 已在 Y 刷新”,然后清除这条提醒;只到计时不提示。
|
||||||
|
- 服务器不再列出的 Boss 会被移出提醒。
|
||||||
|
- 离开游戏(换线、换角色)时,清空快照和提醒。
|
||||||
|
|
||||||
|
## 客户端
|
||||||
|
|
||||||
|
- 模块 `mt_boss`(`src/platform/ScriptLib/BossScript.inc`),在 `PythonBoot.cpp` 中安装,挂接 `game.GameWindow.Open/Close`。
|
||||||
|
- `FeatureServiceScript.inc`:
|
||||||
|
- 新增 `bosses` 种类和 `boss` 行解析(13 项,X/Y 有符号);
|
||||||
|
- 校验 vnum/地图/周期非 0、频道 ≤ 255、alive ≤ max ≤ 255;
|
||||||
|
- 一次最多 128 行。
|
||||||
|
|
||||||
|
## 证据
|
||||||
|
|
||||||
|
- `tests/wiki/test_boss.py`(CTest:`port.boss`)共 5 项通过,覆盖:
|
||||||
|
- 入口位置、各状态文字、坐标、分页;
|
||||||
|
- 只在确认刷新后提示;
|
||||||
|
- 未启用和空列表的提示;
|
||||||
|
- 关闭时复位;
|
||||||
|
- 地图表。
|
||||||
|
- `tests/wiki/test_service.py` 新增 `boss` 行和旧服务端(cap 255)返回 unsupported 的测试。
|
||||||
|
- 2026-10-15 联机测试(203,macOS 原生客户端,账号 admin):
|
||||||
|
- 临时开了两个 channel5 核心:13040 放地图 1/21/41/68,13041 放地图 72/5。
|
||||||
|
- 从任一核心进入游戏,窗口都列出两个核心的 5 个 Boss(海盗 5001 ×2、2307、1192、5161),倒计时一致。
|
||||||
|
- 截图确认布局正常。测试后 channel5 已恢复原配置。
|
||||||
|
|
||||||
|
## 限制和未完成
|
||||||
|
|
||||||
|
- 只列出有定时刷新的 Boss 刷新点(regen 文件里 `time > 0`);由任务或事件刷出的 Boss 不在列表中。
|
||||||
|
- 共享频道(game99)的 Boss 要等 game99 换上新服务端才会出现。
|
||||||
|
- 副本内地图(如 5、72)在 `MINIMAP_ZONE_NAME_DICT` 中没有名称,显示“地图N”。
|
||||||
|
- macOS 桌面客户端没有中文字体,窗口文字显示为 `?`。
|
||||||
|
- Android 真机测试未做。
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# AVA2 换线适配进度(v1)
|
||||||
|
|
||||||
|
2026-10-15。只改了 metin2-client,服务端不需要改动。参考了 AVA2 的 `ENABLE_CHANNEL_CHANGE`(`Locale_inc.h`)。AVA2 客户端只接收 `HEADER_GC_CHANNEL`(121)来显示当前频道,真正的换线由服务端完成;AVA2 服务端源码不在本机,所以这里没有照搬它的做法。
|
||||||
|
|
||||||
|
## 与 AVA2 的差异
|
||||||
|
|
||||||
|
| 项目 | AVA2 | 本实现 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 换线方式 | 服务端把角色传送到目标频道的核心 | 客户端依次走原有流程:`/logout` → 登录界面 → 用保存的账号登录目标频道 → 自动选择同一角色进入游戏 |
|
||||||
|
| 服务端改动 | 需要(频道到端口的对应关系,或 DB/P2P 协议) | 不需要;本服务端的核心之间不知道其他频道的监听端口 |
|
||||||
|
| 频道列表 | 服务端提供 | 客户端 `serverInfo.REGION_DICT`,与登录界面的频道列表相同 |
|
||||||
|
| 等待时间 | 传送 | 原 `/logout` 倒计时(3 秒,战斗中 10 秒)加一次登录和读图 |
|
||||||
|
|
||||||
|
## 流程
|
||||||
|
|
||||||
|
1. 游戏内点“换线”,窗口列出当前服务器的频道。当前频道用 `【】` 标出且不能点。当前频道按 `MainStream` 的连接地址在 `serverInfo` 中查找;找不到时(例如测试端口 13040)显示“未知”,服务器取 `channel.inf` 中上次选择的服务器。
|
||||||
|
2. 选择频道后发送原 `/logout`。服务端倒计时,结束后关闭连接;`OnRemoteDisconnect` 调用 `SetLoginPhase`。
|
||||||
|
3. `introLogin.LoginWindow.Open` 之后,脚本把连接信息设为目标频道(认证服务器取 `REGION_AUTH_SERVER_DICT`),写入 `channel.inf` 和 `net.SetServerInfo`,打开 `stream.isAutoSelect` 并恢复原来的角色槽位,然后调用原 `LoginWindow.Connect`,账号密码取自 `MainStream.id/pwd`。
|
||||||
|
4. `introSelect.SelectCharacterWindow.Open` 中原有的 `isAutoSelect` 分支选择同一槽位并 `StartGame`。
|
||||||
|
5. 进入游戏后关闭 `isAutoSelect`,聊天框提示“已换到 CHx”。
|
||||||
|
|
||||||
|
换线进行中所有频道按钮都不能点:再次发送 `/logout` 会取消服务端倒计时。
|
||||||
|
|
||||||
|
## 失败处理
|
||||||
|
|
||||||
|
- 20 秒内服务端没有断开连接(例如刚战斗过,`IsHack` 拒绝退出),取消换线并提示。
|
||||||
|
- 登录失败或连接失败时,取消换线、关闭 `isAutoSelect`,并显示原登录失败提示,之后可以手动登录。
|
||||||
|
- 没有保存的账号密码时(例如自动登录信息不完整)不发送 `/logout`。
|
||||||
|
|
||||||
|
## 客户端
|
||||||
|
|
||||||
|
- 模块 `mt_channel`(`src/platform/ScriptLib/ChannelScript.inc`),在 `PythonBoot.cpp` 中安装:
|
||||||
|
- 入口是小地图旁“显示”下方的“换线”按钮。
|
||||||
|
- 挂接 `game.GameWindow.Open/Close/OnUpdate` 和 `introLogin.LoginWindow.Open/OnUpdate/OnLoginFailure/OnConnectFailure`。
|
||||||
|
|
||||||
|
## 证据
|
||||||
|
|
||||||
|
- `tests/wiki/test_channel.py`(CTest:`port.channel`)共 6 项通过,覆盖:
|
||||||
|
- 当前频道定位(`serverInfo` 匹配、`channel.inf` 回退);
|
||||||
|
- 完整换线:只发一次 `/logout`,登录窗口连接到目标频道和认证服务器,`isAutoSelect`、槽位、`channel.inf`、`SetServerInfo`,进入游戏后复位;
|
||||||
|
- 退出超时、登录失败、同频道和无账号时拒绝;
|
||||||
|
- 服务端 `do_cmd` 的 10 秒倒计时小于超时,且重复 `/logout` 会取消。
|
||||||
|
- 2026-10-15 联机测试(203 正式频道,macOS 原生客户端,账号 admin,角色 `[SA]Admin`):
|
||||||
|
- CH1(13000)→ CH2(13010)→ CH1,每次约 20 秒(倒计时 3 秒、登录约 2 秒、读图约 6 秒)。
|
||||||
|
- 换线后角色在同一位置(64600, 79800),连接端口分别为 13010 和 13000,选人界面由原 `isAutoSelect` 自动进入。
|
||||||
|
- 截图确认窗口布局、当前频道标记和换线中状态正常。
|
||||||
|
|
||||||
|
## 限制和未完成
|
||||||
|
|
||||||
|
- 换线经过登录界面,比服务端传送慢,期间会看到登录和读图画面。
|
||||||
|
- 只支持 `serverInfo` 里有的频道;测试核心 channel5(13040)不在列表中,从它出发时当前频道显示“未知”。
|
||||||
|
- 副本等地图没有做客户端限制:退出后重新登录由服务端按原规则决定角色位置。
|
||||||
|
- macOS 桌面客户端没有中文字体,窗口文字显示为 `?`。
|
||||||
|
- Android 真机测试未做。
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# AVA2 批量开箱适配进度(v1)
|
||||||
|
|
||||||
|
2026-10-15。修改了 metin2-client 和 metin2-server,AVA2 代码只作参考(`ENABLE_MULTI_CHEST`:`uiinventory.py` 的 Ctrl + 右键、`uichestdropinfo.py`、服务端 `do_chest_drop` / `CHARACTER::OpenChest`)。服务端规则和协议见 `metin2-server/docs/FEATURE-CHEST.md`。
|
||||||
|
|
||||||
|
## 与 AVA2 的差异
|
||||||
|
|
||||||
|
| 项目 | AVA2 | 本实现 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 触发 | Ctrl + 右键打开带滑块的窗口;Ctrl + Z + 右键直接开整叠 | Ctrl + 右键打开数量窗口(1 / 10 / 50 / 全部),点“开启”;没有直接开整叠的组合键 |
|
||||||
|
| 命令 | `/chest_drop WINDOW CELL COUNT` | `/mt_chest 1 open CELL COUNT`,不新增包头 |
|
||||||
|
| 开箱过程 | 重写的 `GiveItemFromSpecialItemGroupNew` / `AutoGiveItemChest`,单次最多 1000 | 每个礼盒都调用原 `UseItem` 礼盒路径,检查、奖励组抽取、金币/经验、日志、扣除都不变;单次最多 200 |
|
||||||
|
| 范围 | 一叠 | 同一种礼盒,先开选中的格子,再开背包里其他格子(203 上多数礼盒不叠加) |
|
||||||
|
| 背包满 | 由 AutoGiveItemChest 处理 | 每开一个前要求至少 3 格空位,不足就停止,奖励不会掉在地上 |
|
||||||
|
| 不允许批量 | — | 奖励组含刷怪、怪物组、减速、中毒、吸血的礼盒,以及非 ITEM_GIFTBOX 的物品(例如带任务脚本的宝箱) |
|
||||||
|
|
||||||
|
## 客户端
|
||||||
|
|
||||||
|
- 模块 `mt_chest`(`src/platform/ScriptLib/ChestScript.inc`),在 `PythonBoot.cpp` 中安装。替换了 `uiInventory.InventoryWindow.UseItemSlot`:按住 Ctrl 右键 ITEM_GIFTBOX 时打开窗口,其他情况调用原方法。原方法本身不使用 Ctrl(联机时检查过它的 `co_names`)。
|
||||||
|
- `PythonItemModule.cpp` 新导出 `item.ITEM_TYPE_GIFTBOX`。
|
||||||
|
- 窗口显示礼盒名称、背包内总数、数量按钮(`【】` 表示已选;“全部”最多 200)、开启按钮和上次结果。选中格子里的礼盒被移走时,自动改用背包里同一种礼盒的其他格子。
|
||||||
|
- 等待回复时,以及两次发送间隔不足 0.5 秒时,“开启”按钮不可用。
|
||||||
|
- 结果:聊天框一行“开启 N 个,金币 +N(停止原因)”,之后每行最多 5 种获得的物品(名称 ×数量)。单个礼盒的提示由服务端暂存,不再逐条刷屏;被原路径拒绝时转发一次拒绝提示。
|
||||||
|
- 3 秒没有回复:在聊天框提示一次“服务器尚未启用批量开启”,之后 Ctrl + 右键也走原来的单个使用;再收到回复会自动恢复。
|
||||||
|
- 经验不在汇总里(服务端只汇报背包物品和金币变化)。
|
||||||
|
|
||||||
|
## 证据
|
||||||
|
|
||||||
|
- `tests/wiki/test_chest.py`(CTest:`port.chest`)共 6 项通过,覆盖:
|
||||||
|
- 发送一次、等待回复、获得行累积到 done、数量上限 200、负的金币差、发送间隔;
|
||||||
|
- error 解析,畸形行和其他前缀;
|
||||||
|
- 超时后标记不支持,迟到的回复会恢复;
|
||||||
|
- 聊天汇总行(停止原因、金币、每行 5 种);
|
||||||
|
- 钩子:不按 Ctrl 和非礼盒走原方法,Ctrl + 右键礼盒打开窗口,“全部”,选中格子消失后改用其他格子,命令拦截,超时后回退,窗口关闭;
|
||||||
|
- 与服务端 `port_chest.h` 的常量、错误码和停止原因一致。
|
||||||
|
- `tests/wiki` 全部 57 项通过(1 项跳过)。
|
||||||
|
- 2026-10-15 在 203 channel5 测试核心(13040,独立二进制)用 macOS 客户端以 [SA]Admin 联机验收,礼盒用 `/item` 生成:
|
||||||
|
- 50037(可叠加,30 个)开 10 个:`done 50037 10 10 done 0`,获得 6 种物品,背包差值与 `MTCH1 got` 完全一致;
|
||||||
|
- 50070(不叠加,4 个分在 4 格)开全部:`done 50070 4 4 done 100000`,跨格子全部开启,金币 +100000 与余额变化一致;
|
||||||
|
- 71036(奖励组刷怪):`error kind`,没有扣除;
|
||||||
|
- 连发两条命令:第二条 `error rate`;
|
||||||
|
- 50037 剩余 20 个开全部:`done 50037 20 20 done 0`,获得 11 种;
|
||||||
|
- 不按 Ctrl 右键:原单个使用,礼盒正常扣除;
|
||||||
|
- 日志库只有原路径写的 `SYSTEM`、`TREASURE_EXP`、`TREASURE_GOLD` 行;syserr 没有新错误(只有原有的 `new_quest_lv52` LUA_ERROR)。
|
||||||
|
- 2026-10-15 16:43 部署到 203 正式环境(服务端 bc32475),CH1(13000)用同一场景复验通过(50037 开 10 个 / 剩余 20 个、50070 跨 4 格、71036 拒绝、限速、普通右键不变)。
|
||||||
|
- 未做 Android 真机测试;触屏没有 Ctrl,暂无触屏入口。
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
# AVA2 显示开关适配进度(v1)
|
||||||
|
|
||||||
|
2026-10-15。只改了 metin2-client,服务端不需要改动。参考了 AVA2 的 `ENABLE_GRAPHIC_ON_OFF`(`InstanceBase.cpp` 中 `__CanRender` 的 effect_level 0–4)和 `HIDE_OBJECTS`(`background.SetVisiblePart`)。
|
||||||
|
|
||||||
|
## 与 AVA2 的差异
|
||||||
|
|
||||||
|
| 项目 | AVA2 | 本实现 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 特效等级 | 0–4,在渲染判断里跳过 | 相同的 5 档;在 `CInstanceBase::Update` 中对角色挂载的特效调用 Active/Deactive,不改渲染路径 |
|
||||||
|
| 摆摊、宠物、坐骑的显示范围 | 有 | 不移植:经典版没有离线摆摊和宠物 |
|
||||||
|
| 树木、云 | `background.SetVisiblePart` | 相同,使用原有接口 |
|
||||||
|
| 名字、伤害数字 | 原有选项 | 窗口内加了快捷开关,仍然写原来的 systemSetting,退出时由原配置保存 |
|
||||||
|
|
||||||
|
## 特效等级
|
||||||
|
|
||||||
|
| 等级 | 显示的特效 |
|
||||||
|
| --- | --- |
|
||||||
|
| 0 全部特效 | 全部 |
|
||||||
|
| 1 只看怪物特效 | 自己、怪物、灵石 |
|
||||||
|
| 2 只看玩家特效 | 自己、其他玩家 |
|
||||||
|
| 3 只看自己特效 | 只有自己 |
|
||||||
|
| 4 关闭全部特效 | 无,包括自己 |
|
||||||
|
|
||||||
|
## 客户端
|
||||||
|
|
||||||
|
- C++:
|
||||||
|
- `CEffectManager::ActiveEffectInstance`。
|
||||||
|
- `CActorInstance::SetAttachingEffectShown`:对已挂载的特效调用 Active/Deactive;关闭期间新挂载的特效也会立即 Deactive。使用 Deactive 而不是 Hide,避免和刺客隐身的 Show/Hide 冲突。
|
||||||
|
- `CPythonSystem::Get/SetEffectLevel`,越界值按 0 处理;不写入 metin2.cfg。
|
||||||
|
- `systemSetting.SetEffectLevel/GetEffectLevel`。
|
||||||
|
- `CInstanceBase::__UpdateEffectShown`,每帧在 `Update` 开头按上表判断。
|
||||||
|
- `CMapOutdoor::RenderPCBlocker`:离镜头近、挡住角色的树会作为遮挡物(PC blocker)单独绘制,不经过 `RenderTree`,所以原来关闭树木后这类树仍然显示。现在隐藏树木时跳过遮挡物中的树。AVA2 有同样的问题。
|
||||||
|
- 模块 `mt_display`(`src/platform/ScriptLib/DisplayScript.inc`),在 `PythonBoot.cpp` 中安装:
|
||||||
|
- 入口是小地图旁“拾取”下方的“显示”按钮。
|
||||||
|
- 窗口“显示设置”包含 5 个特效等级、显示树木、显示云、总是显示名字、显示伤害数字,`【】` 表示当前选中。
|
||||||
|
- 设置保存在客户端目录的 `mt_display.cfg`,格式为“特效等级 树木 云”,默认 `0 1 1`,损坏时回到默认值。
|
||||||
|
- 特效等级在启动时生效;树木和云在进入游戏(`GameWindow.Open`)时生效。
|
||||||
|
|
||||||
|
## 证据
|
||||||
|
|
||||||
|
- `tests/wiki/test_display.py`(CTest:`port.display`)共 3 项通过,覆盖:
|
||||||
|
- 默认值、配置文件读写、损坏的配置;
|
||||||
|
- 进入游戏时生效,窗口按钮、配置保存、名字和伤害开关;
|
||||||
|
- 5 档和 C++ 规则一致。
|
||||||
|
- `test_pickup.py`(7 项)和 `test_switchbot.py`(6 项)仍然通过。
|
||||||
|
- 2026-10-15 联机测试(203 测试核心 channel5,macOS 原生客户端,账号 admin):
|
||||||
|
- 切到等级 4 并关闭树木后,配置为 `4 0 1`;恢复后为 `0 1 1`。
|
||||||
|
- 截图确认窗口布局正常。
|
||||||
|
- 用 `/goto 646 798` 走到离树约 7 米的位置截图对比:等级 4 时 GM 标志和武器光效消失;关闭树木后树消失(修复遮挡物问题之前,这棵树仍然显示);恢复后都回来。
|
||||||
|
|
||||||
|
## 限制和未完成
|
||||||
|
|
||||||
|
- 只控制挂载在角色上的特效(装备光效、buff、种族特效)。单独播放的特效和飞行特效(技能弹道、命中特效)不受影响。
|
||||||
|
- macOS 桌面客户端没有中文字体,窗口文字显示为 `?`(原版界面同样乱码);Android 使用 CFF FreeType,不受影响。
|
||||||
|
- 树的影子烘焙在地形阴影图里,关闭树木后地面上仍有树影(与 AVA2 相同)。
|
||||||
|
- Android 真机测试未做。
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# AVA2 副本与活动日历适配进度
|
||||||
|
|
||||||
|
2026-10-15。修改 metin2-client 和 metin2-server;AVA2 只读参考。
|
||||||
|
|
||||||
|
## 已实现
|
||||||
|
|
||||||
|
百科顶部增加“副本信息”“活动日历”入口,沿用触屏按钮与可移动窗口,缩放时重新排版。
|
||||||
|
|
||||||
|
副本首批接入当前服实际安装的 `dragon_lair_access` 和 `dragon_lair_weekly`。服务端直接调用已加载任务的只读 settings 函数,读取当前冷却、加入窗口、门票及动态需求数量;读取当前角色 quest flags 和全服 event flags。保持 Lua 栈和当前任务/角色上下文,不调用 CHARACTER::GetQuestFlag(其内部 GetPC 会切换任务上下文),不设置任务状态、不创建物品、不传送、不消耗门票。
|
||||||
|
|
||||||
|
龙穴按任务原规则显示共享场次:加入窗口为闭区间,申请新场次要求冷却严格小于零,因此到期秒仍在等待。个人周任务冷却从接取任务开始,与共享龙穴计时分别显示;当前收集阶段从原任务状态读取。界面提供入口说明和登录期间的单个到期提醒,提醒必须经过一次新的服务端快照确认;场次延期不会按旧到期时间误报。休眠或时间跳变使旧快照失效,重连/换角色销毁提醒。
|
||||||
|
|
||||||
|
活动列表按 UTC 展示排期、频道/阵营范围、当前状态及开始/结束提醒。只适配当前服已有的月光宝箱和圣诞袜掉落;同一份 `port_events.tsv` 同时驱动查询和原始 `CreateQuestDropItem` 分支的启用条件。原概率、怪物等级/种类限制、随机数调用、生成物品流程沿用原实现;重叠排期取布尔并集,不叠加概率。原管理员 event flags 仍可独立启用这些活动,日历展示的是计划时段。
|
||||||
|
|
||||||
|
调度按服务器当前 Unix 时间计算 `[start,end)`,没有开服补发/定时发奖,也不向 DB 写全局开关。服务重启后从文件恢复,所有共享 locale 的 core 在五秒内发现原子替换的新配置。删除/非法配置使计划效果关闭,并返回 schedule_unavailable;不伪造空日历。有效空文件表示明确无计划活动。
|
||||||
|
|
||||||
|
## 配置
|
||||||
|
|
||||||
|
服务端示例:`metin2-server/tools/calendar/port_events.tsv.example`。复制到 **LocaleService_GetBasePath() / port_events.tsv**;不是客户端资源或 quest/object。部署时必须让所有 core 读取同一个文件,先验证再用原子 rename 发布。未部署任何生产排期,本批不会自动开启活动。
|
||||||
|
|
||||||
|
格式与运维/验证说明见 `metin2-server/docs/FEATURE-DUNGEON-CALENDAR.md`。协议在既有 MTF1 上增量扩展 capability 16/32,旧服降级为未启用;未知能力位忽略,未知协议版本拒绝。所有页面带 request ID 和服务器时间;缺行/重复行/非法时间和范围不提交界面。
|
||||||
|
|
||||||
|
## 证据与边界
|
||||||
|
|
||||||
|
- `tests/wiki/test_service.py`:新增副本完整性、日历范围和未来能力位兼容测试;与目录/提醒测试合计 22 项通过。
|
||||||
|
- `tests/wiki/test_timers.py`:验证副本原始到期边界、延期、休眠后查询、日历频道范围、一次提醒及配置删除取消。
|
||||||
|
- 服务端 `tests/features/test_calendar.py`:编译实际解析/调度/查询主体,验证区间边界、频道/阵营、重叠不叠加、重启、同秒同大小文件原子替换、非法配置关闭;查询与掉落开关一致。
|
||||||
|
- 服务端 `tests/features/dungeon_lua_probe.cpp`:在 203 独立进程中使用实际 Lua 5.0.3 库和现网编译 quest state 文件验证 settings、动态门票、共享/个人时间、状态、上下文及栈保持;不连接游戏/数据库,不修改运行状态。
|
||||||
|
- `build/wiki-source/dungeon-calendar-integration.log`:隔离加密登录、查询、分页/提醒开关,以及原有触控背包、装备、商店、仓库、战斗回归通过。
|
||||||
|
- macOS `dungeon-calendar-mac-build.log`、Android `dungeon-calendar-android-build.log` 构建通过;Android 未进行真机验收。
|
||||||
|
- `dungeon-info.png`、`event-calendar.png`(另有短屏 `event-calendar-small.png`)为实际原生宿主渲染,使用隔离协议 fixture,不代表生产活动安排。
|
||||||
|
- FreeBSD 输出仅在 `/root/metin2-features-dev/bin/game`,没有替换 `/usr/metin2` 程序或重启服务。
|
||||||
|
|
||||||
|
没有承诺所有副本已迁移:其他副本、NPC 导航/传送、通关次数、最快时间与排名仍待接入。龙穴入口最终资格和门票检查仍由原 NPC 任务负责,查询就绪不等于保证入场。自动洗练/属性锁定、战令任务及领奖持久化、百科模型预览、批量开箱仍未实现,不能标记整体迁移完成。
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
# AVA2 功能迁移计划
|
||||||
|
|
||||||
|
日期:2026-10-14。本文是计划,不代表功能已实现或授权部署。
|
||||||
|
|
||||||
|
## 范围与原则
|
||||||
|
|
||||||
|
- 目标客户端:metin2-client;目标服务端:metin2-server,来自 203 的源码快照。
|
||||||
|
- AVA2 原始源码与 ava2-client 作为只读参考;不迁移整个 AVA2 root、协议或数据库。
|
||||||
|
- 以 AVA2 的活动实现为功能依据;面向当前服务器的数据和物品规则适配,移动端布局沿用现有单层最多六技能方案。
|
||||||
|
- 生物学家系统保持现有实现;百科可提供其材料查询入口。
|
||||||
|
- 每阶段分别提交客户端、服务端改动;契约注明对应版本。数据库变更提供升级、验证及回退方案。
|
||||||
|
- 不默认迁移 AVA2 的 8 sockets、15 attrs、64 位货币、征服者等级、装备槽或新副本内容。
|
||||||
|
- 开发先用隔离测试运行目录与测试账号;上线前备份相关二进制、配置与新增数据,避免恢复整个数据库覆盖玩家后续进度。
|
||||||
|
|
||||||
|
## 阶段 0:共同基础与活动代码确认
|
||||||
|
|
||||||
|
1. 为每项建立 AVA2 入口、启用宏、Python/C++ 方法、网络请求、服务器处理、数据配置、数据库字段的追踪清单,记录源码哈希。
|
||||||
|
2. 识别 old/copia/ex 等多版本实现,依据实际 import、调用、编译路径确定基准。日历与战令尤其不能按文件名任选一套。
|
||||||
|
3. 定义版本化功能能力和扩展消息契约。检查当前包头占用,统一固定宽度字段、长度上限、分页、错误码、请求标识;不直接复制 AVA2 的包头编号。
|
||||||
|
4. 查询与写操作分离。服务器确认道具消耗、奖励、任务进度、冷却和洗练结果;客户端只展示和发送请求。
|
||||||
|
5. 资料使用当前服务器配置导出,包含版本/哈希与中文名;客户端打包和 Android 增量同步都纳入新资源。
|
||||||
|
6. 公用分页、物品提示、搜索、空态、错误提示、触屏滚动、关闭与重连处理。小地图旁使用收纳入口,避免七个窗口入口长期遮挡画面。
|
||||||
|
|
||||||
|
验收:不支持功能的服务端不会触发客户端解析错误;未知/越界消息被拒绝;查询不阻塞游戏主循环;旧功能基本流程回归通过。
|
||||||
|
|
||||||
|
## 阶段 1:游戏百科
|
||||||
|
|
||||||
|
参考:uiwiki.py、wikiui.py、PythonWiki;模型预览另参考 RenderTarget。
|
||||||
|
|
||||||
|
客户端:物品/怪物分类、中文及 ID 搜索、详情、升级材料链、关联跳转;材料详情可进入掉落来源,生物学家材料可进入百科。
|
||||||
|
服务端/工具:由当前 item_proto、mob_proto、refine 配置及实际可用物品清单生成目录;缺少或禁用内容不伪装可获取。
|
||||||
|
数据:静态版本化资料包优先,服务端只补实时/受权限影响的数据;分页索引避免一次创建全部 UI。
|
||||||
|
首批交付:2D 图标与文字查询;第二子批移植 Vulkan 离屏模型预览、独立相机、对象生命周期及尺寸适配,完成后才称 AVA2 对应预览已迁移。
|
||||||
|
验收:升级链无错链、搜索可定位现有物品、缺失图标可回退、重复开关无资源泄漏;模型预览不污染主场景状态。
|
||||||
|
|
||||||
|
## 阶段 2:怪物掉落查询
|
||||||
|
|
||||||
|
参考:uitarget.py 的 InfoBoard、PythonDropItem、目标信息及掉落消息路径。
|
||||||
|
|
||||||
|
客户端:目标栏信息按钮、怪物详情掉落列表、按物品反查来源、与百科互跳。
|
||||||
|
服务端:复用实际加载的掉落配置/解析结果,区分怪物组掉落、等级/任务/活动条件和特殊代码发奖;不只读取一份文本便声称覆盖所有来源。
|
||||||
|
数据:区分数量、候选权重、基础概率、附加条件;未解析的来源明确标为未覆盖。动态倍率影响的最终概率不按静态权重伪造百分比。
|
||||||
|
验收:按实际掉落分支选样本,对照等级/活动/任务条件;仅查询不改变掉落 RNG 或消耗状态;生物学家材料来源可反查。
|
||||||
|
|
||||||
|
## 阶段 3:宝箱预览
|
||||||
|
|
||||||
|
参考:uiChestDrop.py、uichestdropinfo.py 与服务器 special item group / 开箱路径。
|
||||||
|
|
||||||
|
客户端:物品提示进入预览、分页展示奖励与数量,绑定当前物品 ID 和实时背包位置;先交付只读预览。
|
||||||
|
服务端:从真实开箱奖励组构建预览,标注“全部获得”“随机其一”“多次抽取”等真实规则;不能将权重直接当独立中奖率。
|
||||||
|
完整交互子批:若 AVA2 活动入口包含数量选择/批量开箱,跟随其限制移植;校验背包容量、绑定、钥匙、金币及失败消费顺序。
|
||||||
|
验收:预览与实际奖励候选集一致;预览无消耗;物品移动后旧请求不作用于另一件物品;批量不足、背包满、重复点击不会超额扣除。
|
||||||
|
|
||||||
|
## 阶段 4:角色详细属性面板
|
||||||
|
|
||||||
|
参考:uicharacterdetails.py / uicharacterdetails2.py,先核实实际入口与属性枚举。
|
||||||
|
|
||||||
|
客户端:按攻击、防御、职业/种族加成、抗性、速度、恢复等分类;中文搜索、单位、说明和已支持值展示。
|
||||||
|
服务端:返回同一角色状态版本的有效属性快照,补充当前协议未同步的对石、对 Boss、半人抗性等值。
|
||||||
|
边界:当前生物学家怪物加成对 Boss 的特殊处理必须在说明中体现;展示累计属性不等于承诺所有目标上的最终伤害百分比。首批不虚构“装备/任务/活动”分项来源。
|
||||||
|
验收:穿脱装备、切换增益、生物学家领奖与重选后更新一致;死亡/复活、重登、切线不残留旧快照;显示值对应实际战斗计算使用值。
|
||||||
|
|
||||||
|
## 阶段 5:副本信息与冷却提示
|
||||||
|
|
||||||
|
参考:uidungeoninfo.py、uidungeontimer.py、PythonDungeonInfo、dungeon_info 与任务 Lua 接口。
|
||||||
|
|
||||||
|
客户端:副本列表、等级/组队要求、门票提示、冷却、入口按钮和完成提醒;仅列当前服已安装并有真实入口的副本。
|
||||||
|
服务端:为每个副本建立任务标识、入口处理、冷却字段与写入时机映射;首次加载读取真实任务状态,禁止另建一套互不相通的客户端计时器。
|
||||||
|
计时:服务器下发时间基准与到期时间,客户端只渲染倒计时;休眠恢复/重连重新同步。明确角色/账号、队伍成员及频道间的冷却作用域。
|
||||||
|
持久化:优先复用现有 quest flags;确需新表时按角色/账号与副本键设计。通关次数、最快时间、排名分后续子批,不能用零占位声称已接入。
|
||||||
|
验收:提前进入被服务器拒绝;门票消耗与传送顺序正确;重复请求不重复扣票;重登、重启与跨频道后冷却一致。
|
||||||
|
|
||||||
|
## 阶段 6:自动洗练与属性锁定
|
||||||
|
|
||||||
|
参考:uiswitchbot.py、PythonSwitchbot、new_switchbot,以及 ENABLE_LOCK_ATTR 对应的 item_attribute / char_item / item_addon。
|
||||||
|
|
||||||
|
前置核查:明确 AVA2 活动版本的工作槽数、候选组合数、普通/稀有属性适用范围、停止条件、材料与锁定上限。原版锁信息存于扩展属性区域,当前七属性布局不能直接容纳。
|
||||||
|
存储决策:先编写字段映射与兼容测试。优先评估独立锁定元数据/表是否能完整承载其语义;若不能,必须单独规划物品结构、DB 缓存与网络格式升级,不能直接写入现有属性或 socket。
|
||||||
|
客户端:放入装备、目标属性及阈值、候选组合、锁定状态、开始/停止、剩余材料与停止原因;触屏可选列表代替细小输入控件。
|
||||||
|
服务端:在权威物品对象上执行受限频率任务;按物品唯一 ID 绑定,阻止运行中交易、出售、仓库转移和替换目标;统一所有手动/自动洗练路径的锁定行为。
|
||||||
|
执行规则:每次洗练原子检查状态、消耗、生成、保存;同一组合内条件如何组合、多个候选如何匹配,严格按已确认 AVA2 规则。客户端不决定随机值或自行发批量循环洗练。
|
||||||
|
断线策略:核实 AVA2 行为并明确恢复规则;不默认承诺离线洗练。断线/重启后的消耗和任务状态必须可核对。
|
||||||
|
验收:满足目标即停止;材料耗尽、非法属性、锁定上限、平均/技能伤害特殊属性、物品转移、重复开始和重启恢复都不复制物品、不重复扣费、不覆盖其他装备。
|
||||||
|
|
||||||
|
## 阶段 7A:活动日历
|
||||||
|
|
||||||
|
参考:interfacemodule.py 中实际 uiEventCalendarNew 入口、uieventcalendarnew.py、char_event_calendar;旧 uicalendar 有入口被注释,不默认全部移植。
|
||||||
|
|
||||||
|
客户端:月历/列表、活动详情、进行中状态、开始/结束提醒;显示服务器时区及当前活动作用频道/阵营。
|
||||||
|
服务端:唯一活动配置与调度器,同一配置驱动日历和真实倍率/掉落效果;仅支持当前服已实现的活动类型,不因日历有图标就导入对应玩法。
|
||||||
|
运维:配置校验、重新加载、重启后的活动恢复和结束清理,避免每个 game core 重复发奖。
|
||||||
|
验收:月末、跨日、服务器时间调整、断线恢复与进出活动区间正确;界面“进行中”与实际效果一致;重复调度不会重复开启/叠加奖励。
|
||||||
|
|
||||||
|
## 阶段 7B:战令任务
|
||||||
|
|
||||||
|
参考:uibattlepass.py 的实际 UiBattlePass 入口、PythonBattlePass、battlepass.cpp、questlua_battlepass;其余 ex 版本先做活动路径核实。
|
||||||
|
|
||||||
|
客户端:赛季、任务分类、进度、任务奖励/阶段奖励和领取状态;未适配的任务类型不展示成可完成。
|
||||||
|
服务端:在击杀、开箱、通关、采集等真实完成事件挂钩计数,区分击杀归属、组队和重复回调;客户端不能上报任意增加进度。
|
||||||
|
数据库:从 AVA2 实际 SQL 读写还原语义,使用新建迁移脚本;角色/账号归属、赛季 ID、任务 ID、完成量及领奖记录具有明确唯一键。禁止导入整个 AVA2 MySQL 数据目录。
|
||||||
|
奖励:领奖校验、持久化记录与发奖采取能抵御重试和崩溃的幂等流程;背包满、断线和切线不能丢奖或重复领。高级战令如活动实现需要解锁道具,另建明确的资格与消费流程。
|
||||||
|
验收:真实行为推进正确任务;任务/赛季边界、重启恢复、重复事件、并发领奖、赛季切换和背包满均可恢复;活动倍率不能意外放大战令计数。
|
||||||
|
|
||||||
|
## 交付顺序与阶段门槛
|
||||||
|
|
||||||
|
建议顺序:0 → 1 → 2 → 3 → 4 → 5 → 6 → 7A → 7B。
|
||||||
|
|
||||||
|
1/2/3 共用目录与查询层,先形成“生物学家材料 → 百科 → 怪物/宝箱来源”的完整闭环。
|
||||||
|
4 作为后续战斗加成验证工具;5 的通关事件可复用于 7B;3 的开箱事件也可复用于 7B。
|
||||||
|
活动日历与战令共用时间/通知基础,但进度、调度和领奖分别管理。
|
||||||
|
|
||||||
|
每阶段交付:客户端提交、服务端提交(如需)、协议与字段文档、资料生成脚本、资源清单、自动测试、macOS 联机记录、Android 真机交互记录、部署/回退说明。
|
||||||
|
完成条件:隔离环境通过后再安排 203 部署,实际任务闭环通过方可标记完成;编译、模拟包和静态比较不能替代联机验收。
|
||||||
|
2026-10-15 进度:阶段 0 的资料/界面基础与阶段 1 的静态查询子批已实现并完成本机回归;详情见 AVA2-WIKI-IMPLEMENTATION.md。服务端握手/查询协议、模型预览、阶段 2 以后均未完成,未部署上述新功能到 203。
|
||||||
|
|
||||||
|
2026-10-15 后续批次:阶段 0 的只读能力协商、阶段 2/3 的掉落/来源/宝箱查询、阶段 4 属性面板已实现并在隔离环境测试;未部署 203,待联机与真机验收。范围和缺口见 AVA2-READONLY-FEATURES.md。
|
||||||
|
|
||||||
|
2026-10-15 再续:龙穴/周任务信息与提醒、共享真实掉落开关的活动日历已实现并在隔离环境验证。副本仅首批龙穴;活动仅月光宝箱/圣诞袜,生产未部署,无生产排期。自动洗练/锁定、战令、模型预览、批量开箱仍待实现(2026-10-16:模型预览已实现,见 FEATURE-MODEL-PREVIEW.md)。见 AVA2-DUNGEON-CALENDAR.md。
|
||||||
|
|
||||||
|
2026-10-15 自动洗练 v1(阶段 6,不含属性锁定):服务端 mt_switchbot 逐次调用原 UseItem 洗练路径,客户端 mt_switchbot 窗口;隔离环境编译与桩测试通过,macOS 客户端已在 203 测试核心联机验收;未部署 203 正式环境、未做 Android 真机测试。属性锁定仍待存储设计。见 AVA2-SWITCHBOT.md。
|
||||||
|
|
||||||
|
2026-10-15 批量拾取(计划外追加,参考 AVA2 do_pickup_all):服务端 mt_pickup 对范围内自己的物品按分类逐件调用原 PickupItem,客户端在拾取键(Z)上接入并提供分类设置窗口;macOS 客户端已在 203 测试核心联机验收,未部署 203 正式环境、未做 Android 真机测试和触屏按钮。见 AVA2-PICKUP.md。
|
||||||
|
|
||||||
|
2026-10-15 显示开关(计划外追加,参考 AVA2 ENABLE_GRAPHIC_ON_OFF / HIDE_OBJECTS):仅客户端,5 档特效等级(挂载特效 Active/Deactive)、树木和云开关、名字和伤害数字快捷开关;macOS 客户端已在 203 测试核心联机验收,未做 Android 真机测试。不移植摆摊/宠物/坐骑显示范围。见 AVA2-DISPLAY.md。
|
||||||
|
|
||||||
|
2026-10-15 换线(计划外追加,参考 AVA2 ENABLE_CHANNEL_CHANGE):仅客户端,按原流程 /logout → 登录目标频道(serverInfo 频道表 + 保存的账号)→ isAutoSelect 进入同一角色,不做服务端传送;macOS 客户端已在 203 正式频道 CH1↔CH2 联机验收,未做 Android 真机测试。见 AVA2-CHANNEL.md。
|
||||||
|
2026-10-15 世界 Boss 追踪(AVA2 uitrack 世界 Boss 页,只读,不含传送):服务端各核心用原 HEADER_GG_RELAY(名字 #mt_boss)共享定时 Boss 刷新点,旧核心忽略;客户端 mt_boss 窗口 + 刷新提醒,查询种类 bosses(能力位 256);已在 203 两个 channel5 测试核心上做跨核心联机验收,正式核心尚未部署。见 AVA2-BOSS.md。
|
||||||
|
2026-10-15 属性锁定(阶段 6 后半,参考 AVA2 ENABLE_LOCK_ATTR):服务端新表 mt_item_attr_lock(按物品 ID 存锁定掩码,各核心启动时自动建表;不改动物品结构、db 缓存和客户端封包),CItem::ChangeAttribute 保留锁定槽位,手动、自动、GM 洗练全部生效;精炼时锁定随属性复制;最多 2 组,加成武器的 0/1 槽算一组;锁定免费。客户端在自动洗练窗口里加 5 个锁定按钮。已在 203 channel5 测试核心联机验收(洗 10 次锁定的 2 条不变,重新登录后仍在);2026-10-15 16:08 部署到 203 正式环境(服务端 dc71593),CH1 复验通过;未做 Android 真机测试。见 AVA2-SWITCHBOT.md 和服务端 FEATURE-ATTR-LOCK.md。
|
||||||
|
|
||||||
|
2026-10-15 批量开箱(阶段 3 的交互子批,参考 AVA2 ENABLE_MULTI_CHEST /chest_drop):服务端 mt_chest 对同一种礼盒(ITEM_GIFTBOX)逐个调用原 UseItem 开箱路径,可跨格子(203 上多数礼盒不叠加),单次最多 200 个,背包少于 3 格空位即停止;奖励组含刷怪/减速/中毒/吸血的礼盒不允许批量。客户端 Ctrl + 右键礼盒打开数量窗口(1/10/50/全部),结果汇总到聊天框。已在 203 channel5 测试核心联机验收;2026-10-15 16:43 部署到 203 正式环境(服务端 bc32475),CH1 复验通过;未做 Android 真机测试和触屏入口。见 AVA2-CHEST.md 和服务端 FEATURE-CHEST.md。
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
# AVA2 批量拾取适配进度(v1)
|
||||||
|
|
||||||
|
2026-10-15。修改了 metin2-client 和 metin2-server,AVA2 代码只作参考(`do_pickup_all`、`ENABLE_AUTOMATIC_PICK_UP_SYSTEM`)。服务端规则和协议见 `metin2-server/docs/FEATURE-PICKUP.md`。
|
||||||
|
|
||||||
|
## 与 AVA2 的差异
|
||||||
|
|
||||||
|
| 项目 | AVA2 | 本实现 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 触发 | 新包头 `HEADER_CG_ITEMS_PICKUP`,以及付费状态 70002(AFFECT_AUTO_PICK_UP)下的自动拾取 | 聊天命令 `/mt_pickup`,不新增包头;只在按拾取键时触发,不做自动拾取和付费状态 |
|
||||||
|
| 范围 | 自己的物品 | 相同:只拾取自己的或无主的物品;队伍分配的物品不批量拾取 |
|
||||||
|
| 拾取过程 | 自己实现 | 每件物品都调用原 `PickupItem`,距离、堆叠、背包空间、GET 日志、任务触发都不变 |
|
||||||
|
| 分类 | CheckItemCanGet 模式掩码 | 8 个分类位:金币、武器、防具/首饰、技能书、灵石、材料、时装、其他 |
|
||||||
|
|
||||||
|
## 客户端
|
||||||
|
|
||||||
|
- 模块 `mt_pickup`(`src/platform/ScriptLib/PickupScript.inc`),在 `PythonBoot.cpp` 中安装。替换了 `GameWindow.PickUpItem`(Z 键和 ` 键)。
|
||||||
|
- 开启时,按拾取键会发送 `/mt_pickup 1 掩码`。等待回复时,以及两次发送间隔不足 0.5 秒时,按键会被吞掉(防止按住 Z 连发)。关闭时走原来的单个拾取。
|
||||||
|
- 3 秒没有回复:在聊天框提示一次“服务器尚未启用批量拾取”,之后改用单个拾取;再收到回复会自动恢复。
|
||||||
|
- 设置窗口:入口是小地图旁“洗练”下方的“拾取”按钮。窗口内可开关批量拾取、选择 8 个分类(`【】` 表示已选,至少保留一个),并显示上次结果(附近 N 件、拾取 N 件、失败 N 件)。设置保存在客户端目录的 `mt_pickup.cfg`,格式为“开关 掩码”。
|
||||||
|
- 单件物品的提示仍由服务端发送;失败提示(例如背包已满)只发一次。
|
||||||
|
|
||||||
|
## 证据
|
||||||
|
|
||||||
|
- `tests/wiki/test_pickup.py`(CTest:`port.pickup`)共 7 项通过,覆盖:
|
||||||
|
- 发送节流和等待回复;
|
||||||
|
- done/error 解析,畸形行和其他前缀;
|
||||||
|
- 超时后改用单个拾取,迟到的回复会恢复批量拾取;
|
||||||
|
- 关闭开关、分类掩码、至少保留一个分类;
|
||||||
|
- 配置文件读写和损坏的配置;
|
||||||
|
- GameWindow 钩子:入口位置、拾取键、命令拦截、窗口开关;
|
||||||
|
- 和服务端的分类位、错误码、0.5 秒间隔一致。
|
||||||
|
- `tests/wiki/test_switchbot.py` 仍然通过。
|
||||||
|
- 2026-10-15 联机测试(203 测试核心 channel5/first,端口 13040,使用隔离编译的 game;macOS 原生客户端,账号 admin)。先用 `/item` 生成并逐件丢下武器 19、铠甲 11209、材料 30003、灵石 28030、技能书 50300 和 1000 金币:
|
||||||
|
- 掩码 2(武器):`done 1 1 0`,只拾回武器。
|
||||||
|
- 掩码 48(灵石+材料):`done 2 2 0`。
|
||||||
|
- 掩码 255:`done 3 3 0`,拾回铠甲、技能书和金币(金币数恢复)。
|
||||||
|
- 地上已没有物品:`done 0 0 0`;紧接着再发一次:`error rate`。
|
||||||
|
- log.log 有 5 行 GET,每件物品一行,和 DROP 一一对应。原路径拾取金币不写 GET 日志。
|
||||||
|
- 测试核心 syserr 没有新错误。丢金币时出现的 LOCALE_ERROR 来自原有的丢金币提示。
|
||||||
|
|
||||||
|
## 未完成
|
||||||
|
|
||||||
|
- Android 真机测试和触屏拾取按钮(`touch_controller.h` 的按钮发送 DIK 键码,需要再加布局)。
|
||||||
|
- 背包已满时的联机测试(服务端桩测试已覆盖)。
|
||||||
|
- 服务端还没有部署到 203 正式环境。
|
||||||
|
- 自动狩猎自带的客户端拾取(`PICKUP_TEXTS`)没有改动。
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# AVA2 迁移:掉落、宝箱和角色属性查询
|
||||||
|
|
||||||
|
日期:2026-10-15。阶段 0 查询基础、阶段 2/3 的只读查询、阶段 4 属性面板已实现;生产服联机验收尚未完成。
|
||||||
|
|
||||||
|
## 这批代码
|
||||||
|
|
||||||
|
- metin2-server:`ITEM_MANAGER::PortWikiDrops/PortWikiChest` 读取已加载的同一份数据;`/mt_features` 提供能力协商、怪物掉落、物品反查来源、宝箱和自身属性快照。
|
||||||
|
- metin2-client:`mt_feature_service` 管理会话请求、能力、超时、分页与原子提交;百科的详情页接入远程数据和来源跳转,增加详细属性面板。
|
||||||
|
- 怪物目标栏有“掉落”入口。触控背包单击显示固定提示,提示中的“百科 / 宝箱预览”可打开查询;开始拖动前隐藏固定提示,保留原穿脱、背包移动和出售流程。
|
||||||
|
- 百科“详细属性”可查看当前服务器实际支持的属性,分类、筛选和翻页;面板可见时每三秒同步,没有数据时显示未知,不用零值代替失败。
|
||||||
|
- 原始 AVA2/root、ava2-client、现有游戏物品和经济规则没有更改。本批查询没有开箱、洗练、奖励或 DB 写入。
|
||||||
|
|
||||||
|
## 数据和语义
|
||||||
|
|
||||||
|
怪物:通用掉落的角色等级范围、独立掉落组、击杀组候选、等级组、手套/增益资格组及怪物模板额外掉落。通用变身球按原规则过滤,其他组保持原生成分支的候选行为。返回权重/条件,不把经过等级、倍率和特殊事件修正的最终概率伪算成静态百分比。
|
||||||
|
|
||||||
|
仍未覆盖全部 `CreateQuestDropItem`、硬编码事件、矿石额外掉宝石和各地图特殊分支。UI 明确标示范围;零行只表示当前已覆盖范围没有配置,不能宣布没有任何获取途径。
|
||||||
|
|
||||||
|
宝箱:仅处理走 `GiveItemFromSpecialItemGroup` 的 GIFTBOX/TREASURE_BOX,以及 NORMAL/PCT 两种已确认模式。NORMAL 为按权重抽一项;PCT 为各项独立与 1..100 随机数比较,支持多项/无奖励。金币、经验、召唤怪物、减速、扣血、中毒和怪物组均单独标示,不当成物品 ID。钥匙、资格和消耗保留原校验;没有新增批量开箱。QUEST/SPECIAL 组与自定义开箱不伪装通用宝箱。
|
||||||
|
|
||||||
|
属性:服务端用当前编译的 POINT 常量访问实际属性,客户端仅使用稳定文字键;不复制 AVA2 面板的点号。HP/SP/等级用原角色 getter,其他用实际 point。研究怪物加成对 Boss 的排除规则及活动倍率另行显示的边界在面板说明,不把汇总值当伤害计算器。
|
||||||
|
|
||||||
|
## 协议与旧服
|
||||||
|
|
||||||
|
只复用现有聊天命令/命令回包的封装,不复制 AVA2 包头,不改变物品/属性数组布局。契约见 metin2-server `docs/FEATURE-QUERY-PROTOCOL.md`。
|
||||||
|
|
||||||
|
未协商能力前不发送业务查询。旧服不支持时会超时并显示“未启用”,不显示空掉落;服务端每角色限流,客户端串行发送,有限次 rate 重试。响应与 request ID/种类/目标/偏移匹配,完整 begin/row/end 后才更新 UI。换角色清理等待队列和回调。`mt_wiki.ServerCapabilities()` 返回 None/布尔以区分未知与已协商。
|
||||||
|
|
||||||
|
## 验证
|
||||||
|
|
||||||
|
- `tests/wiki/test_service.py`:7 项协议测试,含旧服、过期包、缺行、错误行、负数属性、限流重试、关闭取消和两端属性键一致。
|
||||||
|
- `tests/wiki/test_catalogue.py`:7 项已有模板目录测试通过。
|
||||||
|
- 服务端 `tests/features/test_queries.py`:编译真实查询/命令主体及原始分组类,对通用/独立/击杀/等级/手套/附加掉落、宝箱模式和特殊奖励、反查、分页、限流、参数、HP getter 和 RNG 未推进进行验证。结合真实 FreeBSD 完整游戏构建,不用模拟编译替代目标编译。
|
||||||
|
- `build/wiki-source/features-integration-final.log`:隔离加密登录/游戏连接、能力协商、来源跳转、跨页、宝箱奖励和属性同步,加原有触控穿脱/拖动/商店/战斗回归。
|
||||||
|
- `features-server-build.log`:203 独立副本的 FreeBSD 编译;只输出至 `/root/metin2-features-dev/bin/game`。
|
||||||
|
- `features-english-regression.log`:原英文资源完整回归通过。
|
||||||
|
- `features-tooltip-lifecycle.log`:实际 Python 2 宿主验证原固定提示跟随设置不被重置,过期弱引用不会中断下一次拖动。
|
||||||
|
- macOS 实际渲染:`chest-preview.png`、`character-details.png`。截图数据来自隔离协议 fixture,不是 203 实际宝箱奖励;fixture 未提供的属性显示未知。
|
||||||
|
- `features-android-build-final.log`:Android 编译成功;没有安装/真机验收。
|
||||||
|
|
||||||
|
## 明确剩余
|
||||||
|
|
||||||
|
没有替换运行中的 203 游戏二进制,也没有迁移 DB;当前连接旧服会显示查询未支持。生产联机与 Android 真机验证仍需后续安排。
|
||||||
|
后续已接入龙穴共享场次、个人周任务、真实门票/冷却查询与提醒,以及活动日历和月光/圣诞袜实际排期效果;范围和验证见 `AVA2-DUNGEON-CALENDAR.md`。其余副本尚未适配。
|
||||||
|
自动洗练与属性锁定、战令任务、Vulkan 模型预览、批量开箱仍未实现。完整剩余范围见迁移计划,不能把这批查询实现记为全部七项已完成。
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
# AVA2 自动洗练适配进度(v1 + 属性锁定)
|
||||||
|
|
||||||
|
2026-10-15。修改了 metin2-client 和 metin2-server,AVA2 代码只作参考。服务端规则和协议见 `metin2-server/docs/FEATURE-SWITCHBOT.md`。
|
||||||
|
|
||||||
|
## 与 AVA2 的差异
|
||||||
|
|
||||||
|
| 项目 | AVA2 | 本实现 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 窗口 | 新增 SWITCHBOT 物品窗口,5 个物品槽加 1 个道具槽 | 不新增窗口类型,物品留在背包,按物品 ID 绑定;每个角色同一时间只洗 1 件 |
|
||||||
|
| 洗练执行 | 自己实现消耗和 ChangeAttribute,绕过手动检查和 ItemLog | 每次都调用原 `UseItem`,检查、概率、日志、扣道具都和手动洗练一样;71151/76023 仍只能洗等级上限 ≤40 的武器和衣服 |
|
||||||
|
| 速度 | 0.1 秒一次 | 0.25 秒一次(约 4 次/秒) |
|
||||||
|
| 物品被移动 | 拦截移动、交易、出售等路径 | 每次洗练前重新检查:物品不在背包、已装备、易主时停止(item_gone);交易、商店、仓库、合成界面打开时停止(busy) |
|
||||||
|
| 换线 / 下线 | 通过 P2P 转移,继续洗 | 直接停止,不离线洗练 |
|
||||||
|
|
||||||
|
匹配规则和 AVA2 相同:最多 2 套方案,每套 1–5 条“属性 ≥ 阈值”;任意一套全部达标就停止,只看前 5 条普通属性。
|
||||||
|
|
||||||
|
## 客户端
|
||||||
|
|
||||||
|
- 模块 `mt_switchbot`(`src/platform/ScriptLib/SwitchbotScript.inc`),在 `PythonBoot.cpp` 中安装。入口是小地图旁“百科”按钮下方的“洗练”按钮。
|
||||||
|
- 物品:扫描背包里至少有一条属性的武器和防具,用 `<` `>` 切换。洗练道具:扫描子类型为 USE_CHANGE_ATTRIBUTE 的道具,显示数量。次数上限可选 10、50、100、200、500、1000。
|
||||||
|
- 可选属性和最大值由服务端 `attrs` 下发,客户端不自己推算。添加属性时分页点选;阈值用 -/+ 调整,步长为最大值的 1/5,默认取最大值。
|
||||||
|
- 运行时锁定所有设置,实时显示次数、剩余道具、停止原因和当前 5 条属性。停止时在聊天框提示;达标时如果窗口已关闭,会自动打开。
|
||||||
|
- 命令间隔至少 0.3 秒,同一时间只有一个请求在等待回复。4 秒没有回复就显示“服务器尚未启用自动洗练”。`attrs` 只接受完整、连续的回复,不完整的整批丢弃。
|
||||||
|
- 文字都用 GBK 可编码的字符(不用 ◀/▶/⚠)。
|
||||||
|
|
||||||
|
## 属性锁定(2026-10-15)
|
||||||
|
|
||||||
|
- 服务端规则、存储和协议见 `metin2-server/docs/FEATURE-ATTR-LOCK.md`。锁定的槽位在所有洗练方式下都保持不变:手动用道具、自动洗练、GM 命令。
|
||||||
|
- 窗口底部“开始/停止”右边有 5 个按钮,每条有属性的普通槽一个:`锁N` 表示未锁,`【锁N】` 表示已锁。点击切换。选属性时和洗练中不能点。
|
||||||
|
- 当前属性行里,已锁的属性前面加 `[锁]`。状态行提示“已锁定的属性在每次洗练中保持不变”。
|
||||||
|
- 服务端在 `attrs_end` 之后下发 `MTSB1 lock CELL VNUM MASK`。旧服务端不发这一行,所以不显示按钮。
|
||||||
|
- 错误提示:`slot`(该条属性不能锁定),`max`(最多锁定 2 条,且至少留 1 条可洗),`db`(保存失败)。
|
||||||
|
- 与 AVA2 的差异:
|
||||||
|
- 锁定免费。AVA2 每次锁定或解锁消耗 50348/50349,203 的 item_proto 里没有这两个道具。
|
||||||
|
- 锁定状态存在服务端独立表里,不占属性槽。
|
||||||
|
- 不要求物品正好有 5 条属性,但至少要留 1 条不锁。
|
||||||
|
- 联机测试(channel5 13040,盔甲 11209,背包 19 格):
|
||||||
|
- 锁第 2、4 条后,自动洗 10 次,这两条每次都不变,其余 3 条每次都变;
|
||||||
|
- 锁第 3 组时提示 max;
|
||||||
|
- 重新登录后锁定状态仍在;
|
||||||
|
- 解锁后表里的行被删除。
|
||||||
|
|
||||||
|
## 证据
|
||||||
|
|
||||||
|
- `tests/wiki/test_switchbot.py`(CTest:`port.switchbot`)共 7 项通过(第 7 项是锁定协议和按钮),覆盖:
|
||||||
|
- 请求节流和合并;
|
||||||
|
- 不完整的 attrs 回复被拒绝;
|
||||||
|
- start 命令的拼装和校验;
|
||||||
|
- state/error 解析和超时;
|
||||||
|
- 和服务端的原因码、错误码、上限一致;
|
||||||
|
- 窗口流程:扫描 → 读取属性 → 选属性 → 开始 → 达标提示。
|
||||||
|
- 脚本能在 Python 2.7 下编译。`tests/wiki/test_service.py` 仍然通过。
|
||||||
|
- 2026-10-15 联机测试(203 额外开的测试核心 channel5/first,端口 13040,使用隔离编译的 game;macOS 原生客户端,账号 admin,物品为背包 33 格的剑 279,道具 71084):
|
||||||
|
- 上限 10 次:洗满 10 次后停止(limit),约 4 次/秒。
|
||||||
|
- 两套方案、阈值 1:第 18 次达标(matched)。
|
||||||
|
- 已经达标的物品:0 次就停止,不扣道具。
|
||||||
|
- 洗练中把物品从 33 格移到 90 格:继续洗,窗口跟到 90 格;点停止后显示 stopped。
|
||||||
|
- 洗练中退出客户端:服务端立即停止。
|
||||||
|
- log.log 中 CHANGE_ATTRIBUTE 共 72 行,和总次数一致。
|
||||||
|
- busy:洗练中摆摊(先给 50200 摊位包袱;没有它 `OpenMyShop` 会提前返回、摊位不会开,第一次测试就是这样误判的),摊位开出约 1 秒后停止(busy),共洗 6 次。
|
||||||
|
- no_scroll:用 76014(共 6 张)、上限 10,洗 6 次后停止(no_scroll),道具剩 0。
|
||||||
|
- rejected:对 90 级剑用 71151(原路径只允许等级 <= 40):0 次就停止(rejected),道具未扣。
|
||||||
|
- 截图里窗口布局正常。仓库自带的 `Client` 是英文 cp1252 locale,所以中文显示为 `????`;需要 zh locale 客户端才能看到中文。
|
||||||
|
- 联机测试发现并修复了两个窗口问题,`test_switchbot.py` 已加回归用例:
|
||||||
|
- 洗练中移动物品后,选中项会跳到别的物品:现在按服务端报告的格子跟随。
|
||||||
|
- 空闲时移动物品后选中项丢失:现在退而按相同 vnum 匹配。
|
||||||
|
- 服务端 `tests/features/test_switchbot.py` 和 `test_queries.py` 通过。203 的隔离目录 `/root/metin2-features-dev` 完整编译通过。
|
||||||
|
|
||||||
|
## 未完成
|
||||||
|
|
||||||
|
- Android 真机测试。
|
||||||
|
- macOS 构建需要 `-DMT_40250_SOURCE=<含 EterPack/EterPack.cpp 的源码目录>` 来生成 pack 密钥,否则 system.py 读不出来(RunMain Error)。本机没有 40250 源码,这次用的是 AVA2 的 `TEST/3. Source BIN/Client`,两者密钥相同。
|
||||||
|
- 服务端还没有部署到 203 正式环境。
|
||||||
|
- 属性锁定已完成(见上),2026-10-15 16:08 已部署到 203 正式环境(服务端 dc71593),CH1 联机验收通过。
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# AVA2 功能迁移:百科首批
|
||||||
|
|
||||||
|
日期:2026-10-15。对应 AVA2-FEATURE-MIGRATION-PLAN.md 的阶段 0 部分基础与阶段 1 查询子批;不是七项功能全部完成。
|
||||||
|
|
||||||
|
## 已实现
|
||||||
|
|
||||||
|
- 小地图旁“百科”入口,物品/怪物分类,中文/ID 搜索、分页及详情;仅创建当前页按钮。
|
||||||
|
- 按真实模板范围解析 ID,不把范围展开成虚构变体。
|
||||||
|
- 升级目标和材料可点击跳转、返回;展示数据库基础费用/概率,并提醒以实际精炼窗口为准。
|
||||||
|
- 点击生物学家材料图标打开百科;详情显示研究阶段、材料数量和既有研究商店兑换信息。
|
||||||
|
- 640×360 至普通桌面横屏布局,原移动技能布局保持不变。中文详情使用统一代码页转换,错误资源给出提示。
|
||||||
|
- UTF-8 版本化目录与输入/生成器/中文名称表哈希,数据字段及大小校验。静态资料能力声明不假装实时掉落、宝箱或模型预览可用。
|
||||||
|
- 新 wiki pack 纳入中文资源构建和 Android 增量更新。
|
||||||
|
|
||||||
|
当前目录:5756 个物品模板、763 个怪物/矿石模板、407 条升级配方。
|
||||||
|
|
||||||
|
ITEM_NONE 中包含研究任务石,因此不能一概视为无效物品。目录存在不等于已配置获取途径;怪物面板仅展示基础模板值,不冒充最终战斗属性。
|
||||||
|
|
||||||
|
## 服务端与资源
|
||||||
|
|
||||||
|
203 本次只执行公开表导出与只读 SELECT,没有部署、重启、数据库迁移或改动玩家数据。
|
||||||
|
metin2-server 新增 tools/wiki/export_public_tables.py 和 tests/wiki/test_export.py,可重复导出公开配置和升级配方;凭据留在操作系统现有 MySQL 配置,不进入资料包。
|
||||||
|
客户端工具见 tools/wiki/README.md。原 AVA2 及 ava2-client 未修改。
|
||||||
|
|
||||||
|
## 验证证据
|
||||||
|
|
||||||
|
证据目录:build/wiki-source/(忽略目录,不入库)。
|
||||||
|
|
||||||
|
- catalogue 合同测试 7/7:中文搜索、范围 ID、分页、升级/怪物字段、非法数据、清单哈希与可重复生成。
|
||||||
|
- 服务端导出工具 2/2:仅读公开输入、只读查询、禁止复用输出目录、失败清理与非法数据库名拒绝。
|
||||||
|
- wiki-integration-r2.log:中文客户端完整离线登录/界面/商店/战斗回归通过,并实际鼠标点击百科与生物学家材料入口。
|
||||||
|
- wiki-touch-final.log:触控模式完整回归通过;额外验证 640×360 排版、缺失资料提示及标准库导入兼容。
|
||||||
|
- english-regression.log:原英文资源完整离线回归通过。
|
||||||
|
- mac-render-final.log / wiki-final.png:macOS 原生实际渲染与截图。
|
||||||
|
- android-build-final.log:Android 编译产物;仅编译,尚未在手机安装或验证。
|
||||||
|
|
||||||
|
## 待完成
|
||||||
|
|
||||||
|
阶段 0 的服务端能力握手、查询扩展协议与统一功能收纳入口仍待后续接入;当前只打开静态目录能力,不发送新查询消息。
|
||||||
|
阶段 1 的 Vulkan 离屏模型预览未实现;需独立相机、资源生命周期及实际渲染回归。
|
||||||
|
阶段 2 的服务端真实掉落查询、阶段 3 宝箱奖励预览及其余属性/副本/洗练/日历/战令尚未实现。
|
||||||
|
当前 UI 属 AVA2 功能方向的触屏适配,不宣称像素级复刻其全部百科布局或功能。
|
||||||
|
203 联机及 Android 真机验收未做,不能把本机触控模式测试写成真机验证。
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# D2R Mobile 可参考的客户端设计
|
||||||
|
|
||||||
|
检查日期:2026-10-14。来源:[jhaizhou-ops/d2r-mobile](https://github.com/jhaizhou-ops/d2r-mobile),版本 `685d3ddef8bf75768fd4c51228566f2e8d2a5182`。
|
||||||
|
本次只修改 metin2-client;下表除技能布局外均为后续建议。
|
||||||
|
|
||||||
|
| 优先级 | 参考设计与源码 | Metin2 可采用的方式 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 已应用 | [单层技能弧与独立移动区](https://github.com/jhaizhou-ops/d2r-mobile/blob/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/ios/Sources/dm_touch_controls.c) | 原项目四个副技能,本客户端扩为六个同半径快捷槽;保留大攻击键与浮动摇杆,统一绘制和命中几何。 |
|
||||||
|
| 高 | [手势取消和状态身份检查](https://github.com/jhaizhou-ops/d2r-mobile/blob/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/ios/Sources/dm_touch_controls.c) | 切后台、断线、切场景、尺寸变化时明确收回手指与持续攻击;给延迟触摸动作绑定场景/手势序号,避免旧动作在新场景执行。先补系统取消事件的覆盖。 |
|
||||||
|
| 高 | [物品手势](https://github.com/jhaizhou-ops/d2r-mobile/blob/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/ios/Sources/dm_touch_controls.h) | 在现有单击操作面板、长按使用、拖放基础上,扩大商店/仓库落点、增加拖动目标提示;每一步沿用原客户端请求与确认流程。 |
|
||||||
|
| 高 | [触摸脚本和结果断言](https://github.com/jhaizhou-ops/d2r-mobile/tree/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/verify/touchcases) | 为摇杆+攻击+技能多指组合、取消手势、背包拖动建立可重放触点序列,同时检查发包和物品结果。复用现有离线登录服务器,避免只凭截图判断操作正确。 |
|
||||||
|
| 中 | [底部 HUD 重排](https://github.com/jhaizhou-ops/d2r-mobile/blob/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/ios/NativeHUD/README.zh-CN.md) | 以 Metin2 自有生命/法力/经验组件和资源重排为紧凑底栏,保留真实数据;药水、背包等常用入口按手指尺寸统一排布。此次只给现有底栏预留空间。 |
|
||||||
|
| 中 | [图形状态缓存和管线预热](https://github.com/jhaizhou-ops/d2r-mobile/blob/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/gfx/README.zh-CN.md) | 在现有 Vulkan 管线缓存上采集真实场景常用状态,预热进地图必用组合;用首次入图最长帧和持续温度验证收益。其 NVN→Metal 实现不能直接替换本项目 D3D8→Vulkan 路径。 |
|
||||||
|
| 中 | [技能状态和显示分离](https://github.com/jhaizhou-ops/d2r-mobile/blob/685d3ddef8bf75768fd4c51228566f2e8d2a5182/dm/ios/Sources/dm_touch_game_state.h) | 图标、冷却、数量来自一致的状态快照;切角色/地图后使旧状态失效。本项目已有图标和冷却桥接,可补生命周期一致性。 |
|
||||||
|
|
||||||
|
其 README 还展示了手柄/触摸自动切换、30fps 省电、掉落过滤、高价值掉落震动与屏外目标指引。这些适合后续客户端体验迭代:优先接入已有帧率策略、掉落显示和小地图系统,避免重复实现已有功能。
|
||||||
|
其中定向拖动施法应先按 Metin2 的各技能目标类型设计,不能把另一款游戏的施法模型直接照搬。
|
||||||
|
|
||||||
|
该项目是离线 Switch 程序的 Apple 平台兼容层;二进制改写、NVN 接口和离线存档事务与本项目在线客户端架构不同。
|
||||||
|
它公布的帧率、耗电和启动时间是该项目的测量结果,不能据此推算 Metin2 的性能。建议借鉴分层、缓存、触控和验证方法,再在本客户端实测。
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
# Model preview
|
||||||
|
|
||||||
|
Ported from AVA2's render-target window (`EterLib/CRenderTarget*`, `GrpRenderTargetTexture.*`, `UserInterface/CPythonRenderTargetModule.cpp`, `root/uirendertarget.py`). The preview shows:
|
||||||
|
- a wearable item on a character of every race that may wear it;
|
||||||
|
- a monster, with its motions.
|
||||||
|
|
||||||
|
It is client only; the server is not involved.
|
||||||
|
|
||||||
|
## Entry points
|
||||||
|
|
||||||
|
| Where | How |
|
||||||
|
|---|---|
|
||||||
|
| Inventory | hold X and left-click the item |
|
||||||
|
| NPC shop | hold X and left-click the item |
|
||||||
|
| Wiki detail | the "模型预览" line, on weapon / armor / costume rows that have a model, and on every monster |
|
||||||
|
|
||||||
|
Without X the original click path runs unchanged. The inventory wrapper chains onto `mt_mobile_inventory`'s, because `mt_preview` is installed after it. There is no touch entry other than the wiki.
|
||||||
|
|
||||||
|
## Window (`ScriptLib/ModelPreviewScript.inc`, module `mt_preview`)
|
||||||
|
|
||||||
|
### Item mode
|
||||||
|
- `ItemSpec(vnum)` accepts:
|
||||||
|
- a weapon other than an arrow → `SetWeapon`;
|
||||||
|
- a body armor or a body costume → `SetArmor`;
|
||||||
|
- a hair costume → `SetHair`, which reads value3.
|
||||||
|
- The races are those not excluded by `ITEM_ANTIFLAG_{MALE,FEMALE,WARRIOR,ASSASSIN,SURA,SHAMAN}`, ordered warrior, assassin, sura, shaman, with male first. The window starts on the player's own race if it is allowed.
|
||||||
|
- `<` / `>` step through the allowed races.
|
||||||
|
|
||||||
|
### Mob mode
|
||||||
|
- `SelectModel(vnum)`.
|
||||||
|
- Motion buttons: 待机 1, 攻击 13, 受击 5, 死亡 11, 技能1–4 33–36 (`InterceptOnceMotion`).
|
||||||
|
|
||||||
|
### Controls
|
||||||
|
- Dragging with the left button turns the camera: absolute yaw/pitch from the press point, pitch clamped to ±60°.
|
||||||
|
- 放大 / 缩小 change the zoom in 5 % steps, clamped to −8..+12. Windows have no wheel event.
|
||||||
|
- 自动旋转 spins the model.
|
||||||
|
- 复位 rebuilds the model, which also resets the camera.
|
||||||
|
|
||||||
|
### Lifetime
|
||||||
|
- Render target index 1 is created at 300×330 when the window opens.
|
||||||
|
- It is removed on close or Esc, and on every re-open before it is created again. `GameWindow.Close` also calls `renderTarget.Destroy()`.
|
||||||
|
- The host frees the GPU image 120 frames after its last use.
|
||||||
|
|
||||||
|
## Native side
|
||||||
|
|
||||||
|
- `renderTarget` Python module (`port/UserInterface/PythonRenderTargetModule.cpp`) → `CRenderTargetManager` → `CRenderTarget`, which owns a `CInstanceBase` and a `CGraphicRenderTargetTexture`.
|
||||||
|
- `CPythonApplication` calls `DeformModels` / `UpdateModels` / `RenderModels` around the character manager.
|
||||||
|
|
||||||
|
### Port differences from AVA2
|
||||||
|
- Player races (0..7) are created as `TYPE_PC`. 40250 reserves the armor/weapon/hair parts only for PCs, so AVA2's `TYPE_NPC` crashed on the first `ChangeArmor`.
|
||||||
|
- The model sits at the world origin, where culling hides it. Instead of AVA2's `SetAlwaysRender`, it is shown again before `Deform` and `Render`. Its text tail is detached.
|
||||||
|
- The background quad is drawn inside the render target, in `RenderModel`. `RenderBackgrounds` is a no-op.
|
||||||
|
- Wiki affects are not ported.
|
||||||
|
- The texture has 1 mip level.
|
||||||
|
|
||||||
|
### Host (Vulkan)
|
||||||
|
- A colour render target is `D3DFMT_X8R8G8B8` / `A8R8G8B8` with `D3DUSAGE_RENDERTARGET`, named `rt:<id>:<w>x<h>:c`.
|
||||||
|
- It gets its own RGBA8 offscreen pass (pipeline key bits 29–30: 0 none, 1 shadow, 2 colour) and is cleared to black.
|
||||||
|
- Shadow targets keep the previous path.
|
||||||
|
- Side effect: SnowEnvironment's blur targets now take the colour path. Snow blur is off by default.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
|
- `tests/wiki/test_model_preview.py` covers:
|
||||||
|
- `ItemSpec` races and slots;
|
||||||
|
- race stepping and fallback;
|
||||||
|
- motions and zoom clamps;
|
||||||
|
- drag;
|
||||||
|
- reset;
|
||||||
|
- the view drawing the target;
|
||||||
|
- no live target after close, Esc, or 5 re-opens;
|
||||||
|
- the inventory and shop wrappers;
|
||||||
|
- wiki links and module order.
|
||||||
|
- ctest 49/49.
|
||||||
|
- Live, channel5 13040, macOS client, 2026-10-16:
|
||||||
|
- armor 11299 on a warrior;
|
||||||
|
- sword 19 after a 90°/20° turn;
|
||||||
|
- wild dog 101 with the attack motion;
|
||||||
|
- boss 691 zoomed in with spin.
|
||||||
|
- The main scene was unchanged.
|
||||||
|
- 120 open/close cycles (30 paced, plus 60 in one frame) did not grow RSS: 668 MB before, 593 MB after.
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
# macOS UI 清晰度
|
||||||
|
|
||||||
|
原生客户端按 macOS 窗口的逻辑尺寸布局,在 Retina 的物理像素尺寸上绘制 UI。
|
||||||
|
本轮保持 40250 的窗口尺寸、格子、图标位置和点击逻辑,通过更细的纹理和字形改善显示。
|
||||||
|
|
||||||
|
- `hd_ui.pak` 提供 2× UI 图片;原版 EPK 继续负责逻辑尺寸和 UV。高清纹理不改变道具数据。
|
||||||
|
- 加载顺序为显式 `MT_HD_UI_PAK`、应用资源目录、客户端工作目录。缺失或无效时记录一次日志并使用原图。
|
||||||
|
- mac 打包必须包含通过索引/PNG 检查的高清包,同时包含 SDL3、Vulkan loader 和 MoltenVK。
|
||||||
|
- 轴对齐图片的起点对齐物理像素;宽高、UV 和旋转保持不变。一比一显示使用 point 采样,其余缩放保留 linear。
|
||||||
|
- 字体按物理像素/逻辑像素比向上取整生成 1–4× 字形。Retina 字形保留 8 位覆盖率,1× 路径保持原版阈值。
|
||||||
|
- 窗口尺寸、显示器和显示倍率变化时,在脚本帧之间重建字体页。字符信息节点地址和原字号/字距保留。
|
||||||
|
|
||||||
|
构建高清包使用现有 Real-ESRGAN 管线:先放大 4×,再缩到 2×,恢复原图低频残差与纹理,
|
||||||
|
对透明边缘填色和可平铺背景补边。模型不会恢复原图中不存在的真实细节,因此保留原版素材开关便于对照。
|
||||||
|
工具来源:[Real-ESRGAN 官方发布](https://github.com/xinntao/Real-ESRGAN/releases/tag/v0.2.5.0)。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python3 scripts/build_hd_ui.py --esrgan build/tools/realesrgan \
|
||||||
|
--client build/zh-locale/Client --locale zh --out build/hd-ui/hd_ui.pak
|
||||||
|
python3 scripts/verify_hd_ui.py build/hd-ui/hd_ui.pak
|
||||||
|
cmake --build build/release --target mt_native_render -j8
|
||||||
|
scripts/package_mac_app.sh build/release build/zh-locale/Client dist/Metin2.app build/hd-ui/hd_ui.pak
|
||||||
|
```
|
||||||
|
|
||||||
|
临时关闭高清图片:`MT_HD_UI=0 dist/Metin2.app/Contents/MacOS/Metin2`。
|
||||||
|
字体强制倍率:`MT_FONT_OVERSAMPLE=1`(用于原版对照)或 `2` 等;默认自动适应显示器。
|
||||||
|
启动日志应显示 `[hd_ui] loaded ... textures` 和 `UI glyph raster: 2x ...`(普通 Retina 屏)。
|
||||||
|
|
||||||
|
验证:`host.ui_quality` 检查物理像素对齐、采样选择和无效高清索引回退;`port.text` 在
|
||||||
|
1→2→3→1→2× 中检查字符指针、字号、字距、页面尺寸和 8 位透明度。旧字体实现不能通过这些新增检查。
|
||||||
|
实际应用用本地测试服务器打开背包、填入武器/防具/消耗品并截取原尺寸画面,检查背包与工具栏;
|
||||||
|
截图仅用于清晰度验收,不是 Windows 像素完全等价声明。应用为本地 ad-hoc 签名构建。
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
# 原生移动端触控优化
|
||||||
|
|
||||||
|
2026-09-30 首批优化,适用于 SDL3 / Vulkan 客户端。移动端 UI 由 PORT 模块提供,资源中的 40250 Python 脚本不改写。
|
||||||
|
|
||||||
|
## 已实现
|
||||||
|
|
||||||
|
- 六个快捷键围绕攻击键形成单层弧线;自动狩猎放在弧线外侧。按钮、间距和摇杆随 UI 尺寸一起调整。
|
||||||
|
- 保留真实物品 / 技能图标和数量,增加技能冷却秒数、未学习遮罩和激活技能绿环。状态来自 CPythonPlayer;技能可否释放仍由原有逻辑判断,不把这些展示状态当作完整施法条件。
|
||||||
|
- 根据 SDL 窗口显示倍率与实际像素高度,把 48dp 换算为 UI 坐标下的触摸目标。战斗按钮直径和物品操作行使用这一目标;现有背包格子与其他原版窗口尚未整体重排。
|
||||||
|
- 单击背包/装备显示原物品说明,双击调用原使用/穿戴/卸下方法;不再弹出移动端操作面板。
|
||||||
|
- 拖动调用原有物品移动和快捷槽绑定流程;拖到 NPC 商店背景或货架先显示出售确认。双击和拖放核对页码、物品编号、数量、背包可见性与确认状态,失效手势取消;长按继续沿用原右键使用行为。
|
||||||
|
- 修复每帧重排导致浮动摇杆起点回到默认位置;同一按钮和 UI 手势保留原手指所有权,避免另一根手指覆盖。
|
||||||
|
|
||||||
|
实现入口:`src/host/touch_controller.h`、`src/host/vk_frame.cpp`、`src/platform/ScriptLib/PythonBoot.cpp`、`MobileInventoryScript.inc`。
|
||||||
|
|
||||||
|
## 验证
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cmake --build build/release --target mt_native_render -j8
|
||||||
|
cmake --build build/native --target port_login_flow_test -j8
|
||||||
|
MT_TEST_MOBILE=1 ctest --test-dir build/native -R '^port.login_flow$' --output-on-failure
|
||||||
|
ctest --test-dir build/native -R '^port.login_flow$' --output-on-failure
|
||||||
|
./android/build.sh --no-deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
移动模式的离线登录测试额外覆盖摇杆跨帧保留起点、真实触点单击说明、双击穿脱、拖动换位、出售确认/取消与翻页失效。桌面模式继续覆盖既有登录、战斗、商店、仓库流程。
|
||||||
|
|
||||||
|
## 后续工作
|
||||||
|
|
||||||
|
- 可保存的按钮位置 / 大小、自定义固定 / 浮动摇杆和视角灵敏度。
|
||||||
|
- 目标切换、就近 NPC 交互与拾取入口。
|
||||||
|
- 背包格子及商店、任务窗口的完整手机布局、拖放目标高亮。
|
||||||
|
- Android 真机验证多指连续战斗、挖孔安全区、屏幕密度和长时间手持体验。构建通过及桌面截图不等于真机手感验收。
|
||||||
|
|
||||||
|
## 2026-10-14:参考 D2R Mobile 的单层技能弧
|
||||||
|
|
||||||
|
参考仓库 [d2r-mobile](https://github.com/jhaizhou-ops/d2r-mobile),检查版本 `685d3ddef8bf75768fd4c51228566f2e8d2a5182`。
|
||||||
|
参考入口是 `dm/ios/Sources/dm_touch_controls.c` 的 `dm_tc_layout_make`:主操作键旁的单层技能弧,以及移动区与战斗区分开。
|
||||||
|
本次采用布局思路,未引入其游戏资源或兼容层代码。
|
||||||
|
|
||||||
|
- 保留左下浮动摇杆、右下大攻击键,六个快捷槽全部在同一条弧线上,不拆成两层,也不将第五、第六槽移到底部。
|
||||||
|
- 六槽相对攻击键的距离相同,相邻角度相差 24 度。间距覆盖实际命中使用的 1.25 倍半径,避免相邻命中区域交叠。
|
||||||
|
- 整组上移,为原有生命、法力、经验和菜单底栏留出空间。自动狩猎在弧线左侧独立放置,保留点击切换与长按设置。
|
||||||
|
- 六槽编号、图标、数量、冷却、拖入绑定和原有使用逻辑保持对应。摇杆头与底盘同步缩放。
|
||||||
|
- `--mobile` 在 Mac 验收时同样隐藏原桌面快捷栏,与 Android 展示路径一致。桌面模式沿用原布局。
|
||||||
|
- 几何统一放在 `src/host/touch_layout.h`,渲染和触摸命中共用计算结果。
|
||||||
|
|
||||||
|
检查命令:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cmake --build build/native --target host_touch_layout_test port_login_flow_test -j8
|
||||||
|
ctest --test-dir build/native -R '^host.touch_layout$' --output-on-failure
|
||||||
|
MT_TEST_MOBILE=1 ctest --test-dir build/native -R '^port.login_flow$' --output-on-failure
|
||||||
|
ctest --test-dir build/native -R '^port.login_flow$' --output-on-failure
|
||||||
|
JOBS=8 ./android/build.sh --no-deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
几何检查覆盖 640×360、800×600、超宽横屏、放大触摸目标和平板,检查安全边界、单层顺序、最小触摸尺寸和命中间距。
|
||||||
|
Mac 移动模式离线场景渲染截图在 `build/touch-layout-validation/mobile.png`。Android 真机手持与多指手感仍需实测。
|
||||||
|
|
||||||
|
其他值得借鉴的设计及适配优先级见 [D2R-MOBILE-REFERENCE.md](D2R-MOBILE-REFERENCE.md)。
|
||||||
|
|
||||||
|
## 2026-10-14:按用户截图调整 HUD 分区
|
||||||
|
|
||||||
|
参考用户提供的横屏实机截图,在上一版单层技能弧上继续调整。实现仅在触摸模式安装的 PORT 模块 `src/platform/ScriptLib/MobileHUDScript.inc`,不修改原资源包里的 Python 文件。
|
||||||
|
|
||||||
|
- 左上:职业头像、角色名、等级、生命/法力数值及原版红、蓝、耐力三条;有效能量加成显示剩余分钟,状态图标放在下方。所有数值来自当前玩家数据,没有收到最大值时显示 `--`。
|
||||||
|
- 右上:角色、背包、好友、设置四个圆形入口;小地图向下留出菜单行。头像也可打开角色面板。
|
||||||
|
- 左侧:任务、帮助、聊天,沿用现有界面动作。矮屏或触摸目标放大时改为横排,避开摇杆。原来的小帮助图标不重复显示。
|
||||||
|
- 左下:浮动摇杆;右下:大攻击键及六技能单层弧;空槽保留编号,绑定后显示原图标和数量/冷却。
|
||||||
|
- 底部:第 7、8 个本地快捷槽,可绑定药水等物品。点击和拖入绑定与原快捷栏一致;没有额外生成物品或修改物品效果。
|
||||||
|
- 以深棕底和金铜色圆边统一菜单及战斗控件,聊天消息移到摇杆右侧。原桌面底栏在触摸模式隐藏,菜单通过原有回调打开。
|
||||||
|
- HUD 显隐接入原任务栏的 Show/Hide,离开游戏时恢复原方法并释放回调。HUD 容器本身不可命中,只有实际按钮接收点击,移动区域不会被整屏容器挡住。
|
||||||
|
|
||||||
|
验证文件在 `build/mobile-hud-validation/`:`mobile.png` 是 Mac 移动模式的离线场景截图,截图中的生命/法力使用测试钩子设置以展示条形效果,非真实服务器状态;`mobile-test.log` 与 `desktop-test.log` 为回归记录。
|
||||||
|
`host.touch_layout` 同时检查新增物品快捷槽与技能、攻击、自动狩猎的扩展命中范围不交叠。
|
||||||
|
Android 产物为 `android/app/build/outputs/apk/debug/app-debug.apk`,未自动安装到手机;真机多指和长期手持体验仍需实测。
|
||||||
|
|
||||||
|
### 经验球与原版状态栏样式恢复
|
||||||
|
|
||||||
|
用户要求四颗经验球留在左下、头像及红蓝耐力条沿用之前的样式。左上改为复用原 TaskBar 的 `Gauge_Board`:原边框、HP/SP 动画贴图、恢复覆盖层和黄色 ST 条整体重挂到移动 HUD,职业头像仍取原角色资源。状态变化调用原 `RefreshStatus` / `RefreshStamina` 更新,保留原计算逻辑。
|
||||||
|
|
||||||
|
`EXP_Gauge_Board` 与四个 `EXPGauge` 点整体移到左下角;继续使用原版按四分之一填充经验球的 `SetExperience`,旁边增加经验百分比,移除顶部新画的经验细条。隐藏/显示 HUD、屏幕尺寸变化和离开游戏的父节点恢复都覆盖这些组件。
|
||||||
|
|
||||||
|
最新预览 `build/mobile-hud-validation/mobile.png` 中的 850/1000 HP、420/600 SP、70/100 耐力和 62.50% 经验来自离线测试钩子,用于检查颜色、填充和位置。
|
||||||
|
|
||||||
|
后续微调:头像外圈缩为 34 个 UI 像素,与原版红蓝耐力三条的外框整体同高;裁掉旧状态底图左侧的大球装饰。移动 HUD 将聊天窗口查看和输入状态的背景色设为透明,保留消息文字、滚动和输入功能,离开游戏恢复原实例颜色。已检查离线渲染预览并重新构建 Android APK。
|
||||||
|
|
||||||
|
## 物品手势调整:单击说明、双击穿脱、拖放移动/出售
|
||||||
|
|
||||||
|
- `MobileInventoryScript.inc` 移除单击操作面板。单击只显示原 Tooltip,不把物品挂到指针;双击使用原 `UseItemSlot`,穿戴与卸下仍由原客户端校验并向服务端发请求。
|
||||||
|
- 双击核对第一次点选的窗口、页码、全局格子、物品编号、数量及时间。换页、换物品、出现确认窗口后不执行旧双击。
|
||||||
|
- 拖动仍先走原 `SelectItemSlot` 拿起,再交给原背包、装备或快捷槽的目标处理。NPC 商店背景/标题/货架均可作为出售落点;通过实际拾取到的窗口及祖先识别,遮挡在上面的其他窗口不会触发出售。
|
||||||
|
- 商店出售调用原背包 `__SellItem`,保留禁止出售检查、确认/取消和确认时物品身份复核;不直接绕过确认发出售包。私人商店不增加此入口。
|
||||||
|
- 开着背包/商店时,窗口绘制在战斗覆盖层前面,命中也优先窗口;HUD 菜单回到普通 UI 层,避免遮住装备格。
|
||||||
|
- 不修改服务端,也不绕过商店开启时不能卸装备等已有规则。长按仍使用原右键行为;拆分堆叠和一键整理未在此次增加。
|
||||||
|
|
||||||
|
客户端内的离线测试夹具增加装备穿/脱和物品换位回复,只在 `MT_TEST_MOBILE` 测试环境启用。回归覆盖单击无使用请求、双击穿戴/卸下的实际格子变化、拖动换位、换页取消、出售取消保留物品以及确认后物品/金币变化。运行日志:`build/mobile-hud-validation/gestures-test.log`。
|
||||||
|
|
||||||
|
## D2R 默认摇杆与技能外观(2026-10-14)
|
||||||
|
|
||||||
|
参照 d2r-mobile `dm/ios/Sources/DmTouchOverlay.m`(参考检出 `685d3ddef8bf75768fd4c51228566f2e8d2a5182`)的颜色、透明度和构图,用客户端绘图命令独立绘制,不引入参考项目的游戏贴图。
|
||||||
|
|
||||||
|
- 技能使用深色圆底、古铜外圈和暗色内圈;闲置底色 alpha 0.48、外圈 0.54,按住恢复至 0.92 / 1.0。
|
||||||
|
- 空技能槽显示小铜色加号;已绑定的 Metin2 图标保持清晰,占直径 64%,保留冷却、激活和数量提示。
|
||||||
|
- 浮动摇杆改为闲置淡圆环、带双圈和四角星的摇杆头;操作时增强透明度并显示朝向弧,移除十字刻度和蓝色连线。摇杆头半径为 23 × UI 缩放。
|
||||||
|
- 圆底使用不重叠扫描条绘制,避免原先矩形交叠形成十字暗块。保留原命中区域、浮动原点、移动计算和六技能单层弧线。
|
||||||
|
|
||||||
|
验证:`host.touch_layout` 与 `MT_TEST_MOBILE=1` 的 `port.login_flow` 均通过(57.16 秒),浮动原点测试改为检查实际底圈起点。macOS 渲染预览为 `build/mobile-hud-validation/d2r-style.png`;Android APK 构建成功,未安装到真机。日志为 `build/mobile-style-test.log`、`build/mobile-style-android-build.log`。
|
||||||
@@ -44,6 +44,20 @@ metin2-client 是 40250 Windows 客户端的跨平台版本。**首要目标是
|
|||||||
| 2026-09-29 | 移动端专有功能(触控、自动狩猎、账号注册、帧率设置)以 PORT 模块形式注入,不改 40250 脚本 | 40250 脚本字节保持不变,账本 `RUN_AS_IS` 仍成立 |
|
| 2026-09-29 | 移动端专有功能(触控、自动狩猎、账号注册、帧率设置)以 PORT 模块形式注入,不改 40250 脚本 | 40250 脚本字节保持不变,账本 `RUN_AS_IS` 仍成立 |
|
||||||
| 2026-09-29 | **背包扩到 5 页**(225 格,40250 为 2 页 90 格):服务端补丁 + DB 迁移在 `tools/server/inventory-5-pages/`,客户端 `c_Inventory_Page_Count = 5`、`TQuickSlot.Position` 改 WORD、`mt_inventory` 模块补 5 个页签和写死 2 页的脚本;装备/龙魂/腰带格整体后移 135,快捷栏封包长度变化,旧客户端不再兼容 | 用户要求的玩法扩展;203 已部署并实测 |
|
| 2026-09-29 | **背包扩到 5 页**(225 格,40250 为 2 页 90 格):服务端补丁 + DB 迁移在 `tools/server/inventory-5-pages/`,客户端 `c_Inventory_Page_Count = 5`、`TQuickSlot.Position` 改 WORD、`mt_inventory` 模块补 5 个页签和写死 2 页的脚本;装备/龙魂/腰带格整体后移 135,快捷栏封包长度变化,旧客户端不再兼容 | 用户要求的玩法扩展;203 已部署并实测 |
|
||||||
|
|
||||||
|
2026-09-30 用户授权扩展:自动狩猎引怪改为服务端披风式追击,免费选择 3/10/20 个实际怪物队伍;
|
||||||
|
见 `tools/server/autohunt-pull/README.md`,203 已部署并实测 3 组/9 只怪物。原披风物品保持不变。
|
||||||
|
|
||||||
|
2026-09-30 后续授权:狩猎范围为 35/100/150 米,引怪搜索及专属追击距离同步;石头优先,无石头再打怪。
|
||||||
|
服务器倍率和经验/金币/掉落活动加成通过独立 PORT 状态消息显示在原增益栏,原版角色增益脚本不修改。
|
||||||
|
见 `tools/server/autohunt-pull-range/README.md`,203 已更新服务端并保留二进制回滚备份。
|
||||||
|
|
||||||
|
2026-09-30 用户授权扩展:移动戒指列出 203 已登记的全部 65 张地图,按六类分页,包含活动、战争和测试地图;
|
||||||
|
受限副本走原有入口,活动保留入场流程,测试传送仅限 GM。见 `tools/server/ring-warp/README.md`。
|
||||||
|
|
||||||
|
2026-10-01 用户授权扩展:自动狩猎增加基于已加载地图阻挡与场景碰撞的有界 A*,追怪/拾取/返回检查可达性;
|
||||||
|
可选原地复活并恢复后继续;技能按独立技能 ID 选择,支持确认下马后施法及施法后重新骑乘。
|
||||||
|
见 `docs/AUTO-HUNT-ENHANCEMENTS.md`,不修改原版打包 Python 脚本及手动移动。
|
||||||
|
|
||||||
## 3. 三个层和代码位置
|
## 3. 三个层和代码位置
|
||||||
|
|
||||||
| 层 | 40250 单元 | 做法 | 位置 |
|
| 层 | 40250 单元 | 做法 | 位置 |
|
||||||
@@ -204,8 +218,8 @@ PORT 扩展(40250 没有对应物,只为移动端/平台而加;不能改 4
|
|||||||
- macOS:`brew install cmake sdl3 vulkan-headers vulkan-loader molten-vk shaderc`;构建见根目录 README
|
- macOS:`brew install cmake sdl3 vulkan-headers vulkan-loader molten-vk shaderc`;构建见根目录 README
|
||||||
(`-DMT_BUILD_NATIVE_RENDER=ON`,目标 `mt_native_render`)。
|
(`-DMT_BUILD_NATIVE_RENDER=ON`,目标 `mt_native_render`)。
|
||||||
- Android:NDK 27.2(`ANDROID_NDK_HOME` 指向它)、openjdk@21、Android SDK;`adb` 用 `/opt/homebrew/bin/adb`。
|
- Android:NDK 27.2(`ANDROID_NDK_HOME` 指向它)、openjdk@21、Android SDK;`adb` 用 `/opt/homebrew/bin/adb`。
|
||||||
`./android/build.sh Release --install` 构建安装 APK,`./android/push-client.sh [--locale zh] <Client>` 推送资源
|
`./android/build.sh [--launch]` 构建 APK,连着手机时自动安装并增量同步中文资源(`android/push-client.sh`;
|
||||||
(APK 只含代码,资源在应用数据目录)。启动前先唤醒手机。
|
APK 只含代码,资源在应用数据目录)。启动前先唤醒手机。
|
||||||
- Python 3:用于 `port_map.py` 和其他审计脚本。Python 2.7.18 只在复核 `py_embed_spike.py` 时需要。
|
- Python 3:用于 `port_map.py` 和其他审计脚本。Python 2.7.18 只在复核 `py_embed_spike.py` 时需要。
|
||||||
- 真服账号、密码不写进仓库或 audit 账本。
|
- 真服账号、密码不写进仓库或 audit 账本。
|
||||||
|
|
||||||
@@ -232,3 +246,28 @@ python3 .agents/skills/metin2-40250-parity-audit/scripts/port_map.py check
|
|||||||
```
|
```
|
||||||
|
|
||||||
然后按第 4 节"下一步"继续,每完成一步在第 4、6 节更新状态并提交。
|
然后按第 4 节"下一步"继续,每完成一步在第 4、6 节更新状态并提交。
|
||||||
|
|
||||||
|
2026-10-14 用户授权扩展:小地图旁增加“研究”入口,适配 AVA2 风格生物学家窗口。
|
||||||
|
客户端模块 `BiologScript.inc` 和 `tools/server/biolog/` 复用当前服务器 30~94 级收集任务,保留 NPC 状态、原冷却和奖励,不迁移成 AVA2 的 `bio.*`。
|
||||||
|
新增远程接取/逐份提交/任务石/领奖入口,药水为原任务 71035;92/94 级奖励继续通过原任务对话选择。
|
||||||
|
203 已部署该扩展,13 个 game cores 恢复;备份 `/root/backup-biolog/20261015-023604`。
|
||||||
|
专用测试角色已验证接取、扣料、冷却拦截、重登一致;528 组原 NPC/远程 Lua 对照和桌面/触摸回归通过。详见 `tools/server/biolog/README.md`。
|
||||||
|
|
||||||
|
2026-10-14 后续用户明确要求完全使用 AVA2 生物学家实现,且不考虑旧角色。已替换此前的原任务远程适配:
|
||||||
|
使用 AVA2 原 do_bio 和 13 阶段(30~105 级)配置,独立 bio.* 进度;71035/30250 道具、选择奖励、70028 重选、22 项原研究商店及新增研究属性战斗效果接入。
|
||||||
|
203 备份 `/root/backup-biolog-ava2/20261015-030954`;旧 collect_quest 事件已停用,不迁移原进度、不清除旧角色历史属性。
|
||||||
|
新增物品与图标通过 Client/pack/biolog.eix/.epk 和首位 Index 注册提供,升级客户端时须同步此资源补丁。
|
||||||
|
AVA2 生物学家最终验收:6,674 组源实现对照、实际战斗计算、桌面/触摸回归,以及联机提交/辅助道具/选奖/兑换/重选/重登/全部完成检查均通过。
|
||||||
|
70028 原型按 AVA2 改为 ITEM_QUEST,资源模板总数 29;完成角色的历史选项也会返回,支持继续重选。
|
||||||
|
最新备份:物品 `/root/backup-biolog-ava2/20261015-031709`,game `/root/backup-biolog-ava2-game/20261015-032329`。
|
||||||
|
Mac 和 Android 更新包在 dist/*AVA2Bio-20261014.zip,Android 包含 APK 与必需的 biolog 资源补丁。
|
||||||
|
|
||||||
|
### 2026-10-15:AVA2 百科查询首批
|
||||||
|
|
||||||
|
用户授权按 AVA2 七项迁移计划开始开发。已接入当前服务端模板目录、中文/ID 搜索、物品/怪物分页、升级材料关联跳转、生物学家材料图标入口及独立 wiki 资源包。服务端仅增加公开资料只读导出工具;203 未部署或重启。阶段 0 查询协议/能力握手及阶段 1 模型预览尚未完成,掉落/宝箱及其余功能仍待实现。范围、证据与限制见 `AVA2-WIKI-IMPLEMENTATION.md`。
|
||||||
|
|
||||||
|
### 2026-10-15:只读掉落/宝箱/属性查询
|
||||||
|
|
||||||
|
新增当前服务端已加载分组的只读查询、来源反查、NORMAL/PCT 宝箱模式、角色有效属性快照,以及客户端能力协商/请求匹配/分页/降级。接入百科、怪物目标和触控背包提示;保持原开箱及经济行为。FreeBSD 独立构建、协议及触控回归通过;没有替换 203 运行程序。未完成副本、洗练、日历/战令与模型预览,边界及证据见 `AVA2-READONLY-FEATURES.md`。
|
||||||
|
|
||||||
|
2026-10-15 再续:龙穴/周任务信息与提醒、共享真实掉落开关的活动日历已实现并在隔离环境验证。副本仅首批龙穴;活动仅月光宝箱/圣诞袜,生产未部署,无生产排期。自动洗练/锁定、战令、模型预览、批量开箱仍待实现。见 AVA2-DUNGEON-CALENDAR.md。
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
# Mi 8 Lite 真机适配(2026-09-30)
|
||||||
|
|
||||||
|
已在连接的 Mi 8 Lite 上安装优化版 Android 客户端。相同村庄、24 只测试怪物(总计 28 个 actor)、
|
||||||
|
60% 场景分辨率、MSAA 1×、30 FPS 上限下,完整场景从约 4.9 FPS 提高到约 30 FPS;
|
||||||
|
默认 75% 场景分辨率、MSAA 2× 也达到约 30 FPS,UI 保持 2280×1080 屏幕分辨率。
|
||||||
|
|
||||||
|
## 设备与方法
|
||||||
|
|
||||||
|
- Xiaomi Mi 8 Lite(platina),Snapdragon 660 / Adreno 512,4 GB RAM,2280×1080 / 60 Hz。
|
||||||
|
- LineageOS 22.2-20260103-UNOFFICIAL-platina,Android 15 / API 35;本轮没有更换系统或 GPU 驱动。
|
||||||
|
- APK 内的原生代码以 Release 构建;使用同一份中文资源,版本替换通过 `adb install -r` 保留资源。
|
||||||
|
- 本地测试服 `metin2_map_a1`,`--fake-mobs 24`;完整场景包含地形、角色、特效、触控与 UI。
|
||||||
|
- 每次排除加载后第一个 2 秒窗口,再取 6 个 2 秒窗口平均;完整场景做重复测试。
|
||||||
|
- 手机经 USB 充电,电池温度约 28–32°C;电流/功率读数不可用,本轮不能评价续航或长期热降频。
|
||||||
|
|
||||||
|
## 实现
|
||||||
|
|
||||||
|
1. 每次绘制的固定管线状态由动态 storage buffer 改为 std140 动态 uniform buffer,
|
||||||
|
使 GPU 使用适合常量广播的访问路径;1264 字节布局保持一致,骨骼调色板仍用 storage buffer。
|
||||||
|
2. 片元管线按两个纹理阶段的操作、参数及透明测试开关/函数进行 specialization,
|
||||||
|
编译时排除不使用的混合与 discard 分支;透明参考值、雾、材质因子仍是动态参数。
|
||||||
|
管线缓存包含全部 specialization 值,避免不同材质误用同一管线。
|
||||||
|
3. Android Adreno 512 在没有保存帧率偏好时默认省电模式(30 FPS);保存设置和显式测试参数优先。
|
||||||
|
场景分辨率、抗锯齿及其他 GPU 的初始帧率设置保持原有默认值。
|
||||||
|
4. 修复 Android 切后台时显示 Surface 丢失导致的退出:获取图像和提交显示均处理
|
||||||
|
`VK_ERROR_SURFACE_LOST_KHR`,下一次 SDL 生命周期处理后重建 Surface、交换链与显示信号量。
|
||||||
|
5. 性能工具支持选择场景分辨率、MSAA 和帧率上限,并允许新安装设备的性能日志目录为空。
|
||||||
|
|
||||||
|
`--generic-shaders` / `MT_GENERIC_SHADERS=1` 可关闭片元专用化用于诊断,仍保留 uniform buffer 优化。
|
||||||
|
|
||||||
|
## 测量
|
||||||
|
|
||||||
|
| 构建 / 完整场景 | 场景比例 / MSAA | 平均 FPS | GPU ms |
|
||||||
|
| --- | --- | ---: | ---: |
|
||||||
|
| 优化前 | 0.60 / 1× | 4.88 | 205.51 |
|
||||||
|
| 优化前重复 | 0.60 / 1× | 4.87 | 205.54 |
|
||||||
|
| 仅 uniform buffer | 0.60 / 1× | 11.80 | 84.91 |
|
||||||
|
| 仅 uniform buffer 重复 | 0.60 / 1× | 11.73 | 85.16 |
|
||||||
|
| 加片元 specialization | 0.60 / 1× | 29.97 | 26.94 |
|
||||||
|
| 加片元 specialization 重复 | 0.60 / 1× | 30.00 | 26.37 |
|
||||||
|
| 优化后较高画质 | 0.75 / 2× | 30.02 | 27.33 |
|
||||||
|
| 优化后全分辨率测试 | 1.00 / 2× | 30.03 | 29.54 |
|
||||||
|
|
||||||
|
仅跳过地形的分段测试:优化前 15.45 FPS / GPU 64.72 ms,uniform buffer 后 29.98 FPS / 26.87 ms,
|
||||||
|
再专用化后 30.05 FPS / 21.06 ms。正常版本保留地形;分段测试只用于定位开销。
|
||||||
|
|
||||||
|
60% 同参数对比约提升 6.1 倍,GPU 时间减少约 87%。FPS 已触及测试上限,不能据此推算 60 FPS 能力。
|
||||||
|
实时动画导致重复启动时的绘制数略有变化;录制帧的对比另用完全一致的绘制数据。
|
||||||
|
|
||||||
|
这些结果说明此前低帧率有很大的客户端渲染优化空间;它们不能单独证明驱动没有其他问题。
|
||||||
|
|
||||||
|
## 画面与功能验证
|
||||||
|
|
||||||
|
录制村庄的完整绘制数据,对优化前、uniform buffer 版及专用化版分别回放;
|
||||||
|
另回放已有的刺客技能和目标透明度混合捕获。屏幕像素比较排除动态 FPS 显示矩形
|
||||||
|
`x=[140,340), y=[0,50)` 后,三种场景均为 **0 个不同像素**;目标透明度捕获连 FPS 区域也完全相同。
|
||||||
|
这是对选定捕获的回归检查,未覆盖所有地图和技能。
|
||||||
|
|
||||||
|
Android Release 和 macOS Release 构建通过;真机默认配置、移动、背包、切前后台与正常登录启动的结果
|
||||||
|
见下方最终测试结果及截图。测试结束恢复正常服务器选择界面,没有自动登录测试账号。
|
||||||
|
|
||||||
|
## 原始证据
|
||||||
|
|
||||||
|
所有文件在 `build/qa/xiaomi8lite-adaptation-20260930/`(构建产物,不入 Git):
|
||||||
|
|
||||||
|
- `baseline/`、`ubo/`、`specialized/`、`quality75/`、`quality100/`:CSV、截图、内存快照、汇总 JSON。
|
||||||
|
- `default-profile.csv` / `default-profile.json`:最终安装版的默认参数测试。
|
||||||
|
- `adaptation.mtdr`、`*-replay.bmp`、`baseline-assassin-skill.bmp` / `final-assassin-skill.bmp`、
|
||||||
|
`baseline-destalpha.bmp` / `final-destalpha.bmp`、`pixel-comparison.json`:相同绘制数据回放及像素差异。
|
||||||
|
- `movement.png`、`inventory.png`、`resume.png`、`normal-login.png`:功能截图。
|
||||||
|
- `final.apk`:最终已安装版本;`resume-build.log` / `macos-build.log`:最终构建记录。
|
||||||
|
|
||||||
|
本轮没有进行真实服务器的账号登录、多人战斗、长时间挂机和副本压力测试;30 FPS 结论适用于上述测试场景。
|
||||||
|
|
||||||
|
## 最终安装版结果
|
||||||
|
|
||||||
|
未传分辨率、MSAA、帧率参数时,日志确认 `msaa=2 render_scale=0.750000 fps_mode=0 fps_cap=30`。
|
||||||
|
6 个有效窗口平均 29.98 FPS、GPU 27.20 ms,帧时间 p95 平均 33.80 ms,RSS 约 565 MB。
|
||||||
|
触控移动和背包打开通过截图检查。切后台测试中 Surface 在 present 阶段丢失,恢复前台后重建成功,
|
||||||
|
进程 PID 10734 保持不变,原游戏场景和背包继续显示;随后在服务器选择界面重复两次切前后台,
|
||||||
|
PID 11014 同样保持不变(`resume-cycles.json`)。最终恢复服务器选择界面,崩溃缓冲区为空。
|
||||||
|
|
||||||
|
最终 APK SHA256:`c414589acf29c1fe71dc6efc8ccf6526847a90116bbf4f0b399f4caee4ed15cf`。
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
# 小米 8 Lite 真机测试(2026-09-30)
|
||||||
|
|
||||||
|
已安装 Release 原生库的 debug 签名 APK,并同步 1273 个中文客户端资源文件(约 1474 MB)。
|
||||||
|
设备为 MI 8 Lite / platina、SDM660、Adreno 512、约 4 GB RAM,Android 15 API 35,
|
||||||
|
LineageOS 22.2-20260103-UNOFFICIAL,GPU Vulkan 1.1.128,OpenGL ES 3.2,4 KB 页。
|
||||||
|
屏幕 2280×1080 横屏 / 60 Hz;驱动构建日期 2020 年。手机时钟比工作区日期早进一天,CSV 名称保留手机原值。
|
||||||
|
|
||||||
|
## 结果
|
||||||
|
|
||||||
|
- 正常启动显示中文服务器选择及空账号登录页;软键盘可弹出;应用切后台返回正常。
|
||||||
|
- 本地模拟登录经过真实客户端登录/选人/加载流程,进入 `metin2_map_a1`,24 只怪物及 4 个其他角色。
|
||||||
|
- 触控摇杆后角色移动,背包可通过 I 键打开。背包窗口与右侧触控技能按钮重叠,需另行优化遮挡。
|
||||||
|
- 场景、角色、怪物和背包均显示,渲染可运行,但目前性能不能满足流畅游玩。
|
||||||
|
- 默认设置(75% 场景分辨率、2x MSAA)8 个两秒采样窗口:约 3.25 FPS,GPU 平均约 312 ms,RSS 约 580 MB。
|
||||||
|
- 60% 场景分辨率、关闭 MSAA,同场景 8 个两秒采样窗口:约 5 FPS,GPU 平均约 204 ms,RSS 约 594 MB。
|
||||||
|
- 50% 场景分辨率、关闭 MSAA:静止场景约 6.3–6.4 FPS,GPU 约 157 ms;移动和开背包后场景不同,不用于同场景均值比较。
|
||||||
|
- 日志显示 GPU 等待远高于脚本/CPU 时间,优先排查地形、多层混合、透明覆盖及片元着色开销,单纯降分辨率不足以达到 30 FPS。
|
||||||
|
- ROM 的 ADPF PerformanceHint/PowerHAL 不可用,客户端按已有回退路径运行;日志有 AHardwareBuffer 小尺寸探测失败,未阻断此次 Vulkan 启动。
|
||||||
|
|
||||||
|
## 修复的闪退
|
||||||
|
|
||||||
|
初版 APK 在进入游戏的 `BuildProcessCRC -> GetFileCRC32 -> GetHFILECRC32` 阶段发生 `std::bad_alloc` / SIGABRT。
|
||||||
|
`GetExcutedFileName` 当前报告工作目录;POSIX `fopen` 可以打开目录,Android 的目录 seek 偏移可能极大,
|
||||||
|
CRC 文件适配器因此尝试分配异常大的缓冲区。40250 的普通 Win32 文件打开不接受目录。
|
||||||
|
|
||||||
|
文件适配层现在先检查 FILE 指向普通文件,拒绝目录/空句柄并检查 seek 错误,普通文件 CRC 和位置保持不变。
|
||||||
|
`port_utils_test` 通过;审计 `port_map.py check` 为 0 错误。重新构建、安装后两次模拟登录均成功进入地图。
|
||||||
|
未改变游戏登录协议或绕过 CRC 校验逻辑。
|
||||||
|
|
||||||
|
## 范围与后续
|
||||||
|
|
||||||
|
这是短时真机功能及性能测试,不是长时间温升或功耗测试(USB 充电中)。
|
||||||
|
尚未提供游戏测试账号,因此未登录真实服务器,未验证服务器战斗、技能命中、自动狩猎、移动戒指或切地图。
|
||||||
|
建议下一轮用真实账号复核;性能方面先增加 GPU 分项测试,再处理渲染瓶颈,最后决定低配默认参数。
|
||||||
|
本次未修改默认画质,手机最终恢复正常登录入口,模拟登录仅由测试启动参数启用。
|
||||||
|
|
||||||
|
截图、CSV 和 logcat 位于 `build/qa/xiaomi8lite-20260930/`;APK 位于 `android/app/build/outputs/apk/debug/app-debug.apk`。
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
# 小米 8 Lite 官方 Global 系统游戏测试(2026-09-30)
|
||||||
|
|
||||||
|
## 结论
|
||||||
|
|
||||||
|
官方 Global Android 10 可以启动当前客户端、进入本地村庄、使用摇杆移动、打开背包和恢复前台。
|
||||||
|
相同绘制尺寸和场景下,与之前 LineageOS 的帧率及 GPU 耗时几乎一致,换回原厂系统没有解决低 FPS。
|
||||||
|
这组证据不支持把当前场景的主要性能问题归因于第三方 ROM 独有的驱动异常;优先优化客户端地形渲染。
|
||||||
|
不能据此证明所有 ROM 行为相同,或保证其他场景和游戏具有相同表现。
|
||||||
|
|
||||||
|
## 系统与条件
|
||||||
|
|
||||||
|
同一设备:MI 8 Lite / platina / Snapdragon 660 / Adreno 512 / 约 4 GB RAM。
|
||||||
|
本轮实际 fingerprint 为 `Xiaomi/platina/platina:10/QKQ1.190910.002/V12.0.3.0.QDTMIXM:user/release-keys`,
|
||||||
|
MIUI 12 Global,Android 10 API 29,bootloader 保持解锁。
|
||||||
|
|
||||||
|
- 原厂:Vulkan 1.1.87;GLES 3.2 V@415.0,2019-09-28 驱动。
|
||||||
|
- 之前 LineageOS 22.2 / Android 15:Vulkan 1.1.128;GLES 3.2 V@0490.0,2020-09-02 驱动。
|
||||||
|
- 两轮均为 Release 原生库,2280×1080 窗口,60% 场景分辨率、无 MSAA、30 FPS 上限。
|
||||||
|
- 同一 `metin2_map_a1`,24 只模拟怪物,共 28 个角色;每组丢弃首个加载后窗口,取 6 个两秒窗口。
|
||||||
|
- 全场景每帧 225 次 3D 绘制、约 295,763 顶点;两轮均 USB 充电。
|
||||||
|
- 之前电池温度 35–36°C,本轮 36–37°C;这是电池温度,不是 GPU 温度。
|
||||||
|
|
||||||
|
## 相同尺寸对比
|
||||||
|
|
||||||
|
| 条件 | LineageOS FPS | LineageOS GPU ms | Global FPS | Global GPU ms | Global 绘制次数 |
|
||||||
|
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||||
|
| 完整场景 | 4.88 | 205.3 | 4.90 | 204.8 | 225 |
|
||||||
|
| 关闭地形 | 15.45 | 64.7 | 15.20 | 65.9 | 100 |
|
||||||
|
| 关闭角色及角色阴影 | 5.13 | 194.5 | 5.20 | 193.6 | 192 |
|
||||||
|
| 关闭特效 | 4.88 | 205.6 | 4.88 | 205.7 | 224 |
|
||||||
|
| 关闭触控覆盖 | 4.88 | 205.5 | 4.90 | 203.7 | 225 |
|
||||||
|
| 关闭全部 3D | 30.03 | 17.7 | 29.98 | 18.1 | 0 |
|
||||||
|
| 重复完整场景 | 4.83 | 206.4 | 4.83 | 206.4 | 225 |
|
||||||
|
|
||||||
|
完整场景首组仅约 0.3% 的帧率差异,重复组则相同到显示精度;没有可确认的性能提升。
|
||||||
|
关闭地形使原厂系统约从 4.90 升至 15.20 FPS、GPU 从 204.8 降至 65.9 ms;地形仍是主要瓶颈。
|
||||||
|
关闭全部 3D 后达到 30 FPS 上限,不能解释为完整游戏已能达到 30 FPS。
|
||||||
|
本地静止场景没有密集技能释放,本表不能代表真实战斗特效的成本。
|
||||||
|
|
||||||
|
## 测试中修复的 Android 10 兼容问题
|
||||||
|
|
||||||
|
1. `android/sync_client.py` 的 tar 原先写入 root 属主;原厂旧版 tar 对应用用户执行 chown 时失败。
|
||||||
|
已改为实际应用 UID/GID,完整同步 1,273 个文件(含首次设置种子)、约 1,473.8 MiB 成功;再次增量同步 1,272 个资源全部未变化。
|
||||||
|
2. SDL 窗口原先未标记全屏,其异步窗口样式覆盖 Activity 的隐藏系统栏设置,Android 10 下画面只有 2198×954。
|
||||||
|
Android 原生窗口改为 SDL 全屏;API 28/29 允许沿屏幕短边使用刘海区域。安装后 CSV 和截图确认 2280×1080,状态栏及导航栏消失。
|
||||||
|
|
||||||
|
第一轮小画面约 5.8 FPS 的结果存在绘制面积差异,不能作为驱动对比结论。
|
||||||
|
保留在 `build/qa/xiaomi8lite-global-20260930/isolation/`;上表采用修复全屏后的 `fullscreen/`。
|
||||||
|
Android Release 构建成功,修复版本已经安装到设备。未改地形画质或地形算法。
|
||||||
|
|
||||||
|
## 功能与限制
|
||||||
|
|
||||||
|
- 官方系统成功加载 Vulkan,中文资源显示,真实服务器选择界面能打开;手机可 ping 通 192.168.21.203。
|
||||||
|
- 本地模拟场景:摇杆移动前后截图确认地形、怪物和角色姿态变化;I 键打开五页背包。正常服务器选择界面按 Home 后,点击桌面图标可恢复原界面,截图为 `resume-icon.png`;单独使用 `am start` 未成功把画面切回前台。
|
||||||
|
- 本轮日志未发现客户端 Fatal signal / FATAL EXCEPTION。
|
||||||
|
- 未取得游戏测试账号,未进行真实账号登录、联网战斗或切地图验证。
|
||||||
|
- GPU 时钟和忙碌节点仍拒绝普通 shell 读取,不能给出实际 GPU 调频曲线。
|
||||||
|
- 原厂 Thermal HAL 可用,已保存 CPU/GPU/电池温度;Android 10 上 ADPF 不可用,客户端正常回退。
|
||||||
|
- 背包仍存在触控按钮覆盖问题,截图留存;本轮没有修改背包布局。
|
||||||
|
- 测试后恢复图标启动的正常真实服务器登录入口,全部渲染开启。
|
||||||
|
|
||||||
|
## 证据与下一步
|
||||||
|
|
||||||
|
本轮 CSV、截图、系统属性、Vulkan 能力、温度、资源同步和构建日志:
|
||||||
|
`build/qa/xiaomi8lite-global-20260930/`。
|
||||||
|
之前的对照:[渲染分项测试](XIAOMI8LITE-RENDER-ISOLATION-20260930.md)。
|
||||||
|
|
||||||
|
下一步优先分析地形多层纹理混合、重复覆盖和通用固定功能着色器的采样成本,在保留可见结果的前提下减少 GPU 工作量。
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# 小米 8 Lite 渲染分项测试(2026-09-30)
|
||||||
|
|
||||||
|
同一台 MI 8 Lite / Android 15 LineageOS 22.2 / Adreno 512 Vulkan 1.1.128。
|
||||||
|
Release 原生库、同一村庄、24 只怪物、相同相机,60% 场景分辨率、无 MSAA、30 FPS 上限。
|
||||||
|
每组丢弃第一个加载后采样窗口,取 6 个两秒窗口;最后重复基准。手机处于 USB 充电状态。
|
||||||
|
|
||||||
|
| 条件 | FPS 均值 | GPU ms 均值 | 每帧 3D 绘制次数 | 电池温度 |
|
||||||
|
| --- | ---: | ---: | ---: | ---: |
|
||||||
|
| 基准 | 4.88 | 205.3 | 225 | 35.0°C |
|
||||||
|
| 关闭地形绘制 | 15.45 | 64.7 | 100 | 35.0°C |
|
||||||
|
| 关闭角色及角色阴影 | 5.13 | 194.5 | 191 | 35.0°C |
|
||||||
|
| 关闭特效绘制 | 4.88 | 205.6 | 224 | 36.0°C |
|
||||||
|
| 关闭触控覆盖绘制 | 4.88 | 205.5 | 225 | 36.0°C |
|
||||||
|
| 关闭全部 3D 场景绘制 | 30.03 | 17.7 | 0 | 36.0°C |
|
||||||
|
| 重复基准 | 4.83 | 206.4 | 225 | 36.0°C |
|
||||||
|
|
||||||
|
关闭地形后帧率约为基准的 3.16 倍,GPU 耗时减少约 141 ms(69%);关闭角色仅带来小幅提升。
|
||||||
|
关闭特效和触控覆盖基本无变化,但静止场景没有密集技能特效,不能据此推断战斗特效成本。
|
||||||
|
关闭全部 3D 后达到 30 FPS 上限,证明这个测试下 UI/显示链路可以达到该目标,不代表完整游戏已达到 30 FPS。
|
||||||
|
重复基准与初始基准接近(帧率约低 1%),本轮未观察到随测试时间明显恶化的现象。
|
||||||
|
|
||||||
|
## 判断与下一步
|
||||||
|
|
||||||
|
优先针对地形路径分析:多层 splat 混合、重复覆盖、每块地形的绘制次数、纹理采样和通用固定功能着色器。
|
||||||
|
本轮是关闭绘制的定位实验,没有降低正式地形质量,也没有交付性能优化;正常启动全部绘制仍开启。
|
||||||
|
硬件性能和驱动均可能影响这条路径,结果不能单独证明第三方 ROM 有问题,也不能完全排除它。
|
||||||
|
驱动统计显示 Vulkan 加载失败次数为 0;这只证明加载成功,不证明着色器性能正常。
|
||||||
|
|
||||||
|
## GPU 调频证据限制
|
||||||
|
|
||||||
|
普通 shell 和应用 run-as 均被拒绝读取 kgsl GPU 频率/忙碌节点。
|
||||||
|
`adb root` 被系统拒绝,提示开发者选项未允许 root 调试;未修改该设置,ADB 仍是普通 shell。
|
||||||
|
因此未取得负载下 GPU 时钟,不能排除固定低频或调度问题;未执行原厂 ROM 的对照测试。
|
||||||
|
Thermal HAL 不可用,表中的温度是电池传感器,不是 GPU 温度。
|
||||||
|
|
||||||
|
## 复现与验证
|
||||||
|
|
||||||
|
测试开关 `--diagnostic-skip-render terrain|characters|effects|touch|scene` 仅关闭指定绘制,不改变角色更新或网络。
|
||||||
|
自动化工具:`python3 tools/perf/run_render_isolation.py build/qa/render-isolation`。
|
||||||
|
本轮 Android 构建通过,7 组均成功进入同一场景;截图确认各开关对应的绘制确实消失。
|
||||||
|
审计检查 0 错误。CSV、截图、内存快照及 summary.json 保存于 `build/qa/xiaomi8lite-isolation-20260930/`。
|
||||||
|
测试结束自动恢复正常登录入口。手机时钟与工作区日期相差一天,原始 CSV 保留设备时间。
|
||||||
@@ -34,7 +34,7 @@ build/native/src/host/mt_native_render \
|
|||||||
--live-client build/zh-locale/Client --login-screen --width 1024 --height 768
|
--live-client build/zh-locale/Client --login-screen --width 1024 --height 768
|
||||||
```
|
```
|
||||||
|
|
||||||
Android:`./android/push-client.sh --locale zh`(默认推送 `build/zh-locale/Client`,符号链接按
|
Android:`./android/build.sh` 连着手机时自动执行 `./android/push-client.sh --locale zh`(默认推送 `build/zh-locale/Client`,输入变化时先重新生成,符号链接按
|
||||||
目标文件复制,并以 `locale_zh.cfg` 写入设备上的 `locale.cfg`)。
|
目标文件复制,并以 `locale_zh.cfg` 写入设备上的 `locale.cfg`)。
|
||||||
|
|
||||||
物品与怪物原型从 40250 原版解压,按线上 40250 服务端 `gb2312name` 的 VNUM 快照
|
物品与怪物原型从 40250 原版解压,按线上 40250 服务端 `gb2312name` 的 VNUM 快照
|
||||||
|
|||||||
@@ -0,0 +1,258 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Builds hd_ui.pak: the 40250 UI textures at twice their resolution, for the native texture loader.
|
||||||
|
|
||||||
|
The phone lays the 40250 UI out 600 logical pixels high and magnifies it about 1.8x onto the screen, so
|
||||||
|
the 1x art (32x32 icons, board frames) looks soft. This reads every UI image the client would load
|
||||||
|
(d:/ymir work/ui/, icon/, locale/<locale>/) from the registered packs (first registered pack wins, as
|
||||||
|
CEterPackManager), upscales it 4x with Real-ESRGAN (realesrgan-x4plus, ncnn-vulkan build) and
|
||||||
|
Lanczos-reduces it to exactly 2x. The engine keeps the 1x size for layout and UVs; the host only
|
||||||
|
samples finer texels, so nothing about the 40250 UI changes but the texel density.
|
||||||
|
|
||||||
|
scripts/build_hd_ui.py --esrgan DIR [--client build/zh-locale/Client] [--locale zh] [--out FILE]
|
||||||
|
|
||||||
|
DIR holds the realesrgan-ncnn-vulkan binary and its models/ (github.com/xinntao/Real-ESRGAN releases,
|
||||||
|
v0.2.5.0). Neither the tool nor the pak enters git: the output is Ymir art (see .gitignore).
|
||||||
|
|
||||||
|
Grain: realesrgan-x4plus smooths the stone and paper fills of the boards; two rounds of back-projection
|
||||||
|
(the source minus the result box-reduced to 1x, enlarged and added) put that texture back.
|
||||||
|
|
||||||
|
Edges: each image is padded before upscaling so the network sees context at the border. An image whose
|
||||||
|
opposite edges continue each other (a tiling board fill) is padded by wrapping, so its repeats meet
|
||||||
|
without a seam; others by reflection. Colours under fully transparent pixels are bled in from their
|
||||||
|
opaque neighbours first, so the upscaled alpha edges carry no dark fringe.
|
||||||
|
|
||||||
|
Pak format (little endian): "MTHD", u32 version (1), u32 count, then count x {u16 name length, name
|
||||||
|
bytes (the pack path, lowercase), u32 offset, u32 size}, then the PNG payloads at their offsets.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import io
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import struct
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import tempfile
|
||||||
|
from concurrent.futures import ProcessPoolExecutor
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
from PIL import Image, ImageFilter
|
||||||
|
|
||||||
|
REPO = Path(__file__).resolve().parents[1]
|
||||||
|
sys.path.insert(0, str(REPO / "tools/epk_scan"))
|
||||||
|
sys.path.insert(0, str(REPO / ".agents/skills/metin2-40250-parity-audit/scripts"))
|
||||||
|
import epk_scan # noqa: E402
|
||||||
|
import refroot # noqa: E402
|
||||||
|
|
||||||
|
IMAGE_EXTS = (".tga", ".dds", ".png", ".jpg", ".bmp")
|
||||||
|
MAX_SIDE = 1024 # larger images (none in the UI dirs today) are left at 1x
|
||||||
|
PAD = 8 # source pixels of context around each image
|
||||||
|
MODEL = "realesrgan-x4plus"
|
||||||
|
BACK_PROJECT_ROUNDS = 2
|
||||||
|
VERSION = 1
|
||||||
|
|
||||||
|
|
||||||
|
def pack_entries(client: Path):
|
||||||
|
"""{pack path: reader} for the first registered pack holding each name."""
|
||||||
|
_, keys, order, packs, _ = epk_scan.load(client, refroot.reference_root())
|
||||||
|
seen = {}
|
||||||
|
for name, _folder in order:
|
||||||
|
p = packs[name]
|
||||||
|
if p["missing"]:
|
||||||
|
continue
|
||||||
|
for e in p["entries"]:
|
||||||
|
seen.setdefault(e["name"], (p["epk"], e))
|
||||||
|
return keys, seen
|
||||||
|
|
||||||
|
|
||||||
|
def read_entry(keys, epk: Path, e: dict) -> bytes:
|
||||||
|
with open(epk, "rb") as f:
|
||||||
|
f.seek(e["pos"])
|
||||||
|
stored = f.read(e["size"])
|
||||||
|
if e["type"] == 0:
|
||||||
|
return stored
|
||||||
|
f.seek(e["pos"])
|
||||||
|
obj = f.read(epk_scan.lz_object_len(stored[:16]))
|
||||||
|
return epk_scan.lz_object(obj, keys["s_adwEterPackSecurityKey"] if e["type"] == 2 else None)
|
||||||
|
|
||||||
|
|
||||||
|
def wanted(name: str, locale: str) -> bool:
|
||||||
|
# SCREEN waypoint sprites need their original black RGB under alpha=0.
|
||||||
|
# The shared minimap atlas must not pass through alpha-edge colour bleeding.
|
||||||
|
if name == "d:/ymir work/ui/minimap.dds":
|
||||||
|
return False
|
||||||
|
if not name.endswith(IMAGE_EXTS):
|
||||||
|
return False
|
||||||
|
return (name.startswith("d:/ymir work/ui/") or name.startswith("icon/")
|
||||||
|
or name.startswith(f"locale/{locale}/"))
|
||||||
|
|
||||||
|
|
||||||
|
def tiles(a: np.ndarray, axis: int) -> bool:
|
||||||
|
"""Whether the image continues across the edges of `axis` (1: left/right, 0: top/bottom)."""
|
||||||
|
if a.shape[axis] < 4 or a[..., 3].min() < 255:
|
||||||
|
return False
|
||||||
|
rgb = a[..., :3].astype(np.int32)
|
||||||
|
first, last = np.take(rgb, 0, axis=axis), np.take(rgb, -1, axis=axis)
|
||||||
|
wrap = np.abs(first - last).mean()
|
||||||
|
inner = np.abs(np.diff(rgb, axis=axis)).mean()
|
||||||
|
return wrap <= max(2.0, 1.5 * inner)
|
||||||
|
|
||||||
|
|
||||||
|
def bleed(im: Image.Image) -> Image.Image:
|
||||||
|
"""Fills the colour of fully transparent pixels from nearby opaque ones (premultiplied blur)."""
|
||||||
|
a = np.asarray(im).astype(np.float32)
|
||||||
|
alpha = a[..., 3:4] / 255.0
|
||||||
|
if alpha.min() > 0:
|
||||||
|
return im
|
||||||
|
fill = a[..., :3].copy()
|
||||||
|
for radius in (2, 6, 16, 48):
|
||||||
|
pre = Image.fromarray(np.clip(a[..., :3] * alpha, 0, 255).astype(np.uint8))
|
||||||
|
w = Image.fromarray((alpha[..., 0] * 255).astype(np.uint8))
|
||||||
|
pre_b = np.asarray(pre.filter(ImageFilter.GaussianBlur(radius))).astype(np.float32)
|
||||||
|
w_b = np.asarray(w.filter(ImageFilter.GaussianBlur(radius))).astype(np.float32)[..., None]
|
||||||
|
ok = (w_b > 0.5) & (alpha == 0)
|
||||||
|
est = pre_b / np.maximum(w_b / 255.0, 1e-6)
|
||||||
|
fill = np.where(ok, est, fill)
|
||||||
|
alpha_known = (alpha > 0) | ok
|
||||||
|
if alpha_known.all():
|
||||||
|
break
|
||||||
|
out = a.copy()
|
||||||
|
out[..., :3] = np.where(alpha == 0, fill, a[..., :3])
|
||||||
|
return Image.fromarray(np.clip(out, 0, 255).astype(np.uint8), "RGBA")
|
||||||
|
|
||||||
|
|
||||||
|
def prepare(job):
|
||||||
|
"""Decodes one pack image into a padded RGBA PNG for the upscaler; returns its metadata or None."""
|
||||||
|
idx, name, data, work = job
|
||||||
|
try:
|
||||||
|
im = Image.open(io.BytesIO(data))
|
||||||
|
im.load()
|
||||||
|
except Exception:
|
||||||
|
return None
|
||||||
|
im = im.convert("RGBA")
|
||||||
|
w, h = im.size
|
||||||
|
if max(w, h) > MAX_SIDE or min(w, h) < 2:
|
||||||
|
return None
|
||||||
|
a = np.asarray(im)
|
||||||
|
tile_x, tile_y = tiles(a, 1), tiles(a, 0)
|
||||||
|
src = np.asarray(bleed(im))
|
||||||
|
px, py = min(PAD, w), min(PAD, h)
|
||||||
|
src = np.pad(src, ((0, 0), (px, px), (0, 0)), mode="wrap" if tile_x else "reflect")
|
||||||
|
src = np.pad(src, ((py, py), (0, 0), (0, 0)), mode="wrap" if tile_y else "reflect")
|
||||||
|
Image.fromarray(src, "RGBA").save(work / "in" / f"{idx}.png", compress_level=1)
|
||||||
|
return {"idx": idx, "name": name, "w": w, "h": h, "px": px, "py": py,
|
||||||
|
"alpha": bool(a[..., 3].min() < 255)}
|
||||||
|
|
||||||
|
|
||||||
|
def original(meta, work: Path) -> Image.Image:
|
||||||
|
src = Image.open(work / "in" / f"{meta['idx']}.png").convert("RGBA")
|
||||||
|
return src.crop((meta["px"], meta["py"], meta["px"] + meta["w"], meta["py"] + meta["h"]))
|
||||||
|
|
||||||
|
|
||||||
|
def back_project(hd: Image.Image, src: Image.Image, rounds: int = BACK_PROJECT_ROUNDS) -> Image.Image:
|
||||||
|
"""Adds back what the upscale lost at the source scale, so the result box-reduces to the source.
|
||||||
|
|
||||||
|
realesrgan-x4plus denoises, and the fine stone and paper grain of the 40250 boards is what it takes
|
||||||
|
for noise: the frames come out sharp but the fills flat. The residual (source minus the result
|
||||||
|
reduced to 1x), bicubic-enlarged and added, restores that grain while the network's edges stay."""
|
||||||
|
a = np.asarray(hd).astype(np.float32)
|
||||||
|
ref = np.asarray(src).astype(np.float32)
|
||||||
|
for _ in range(rounds):
|
||||||
|
down = np.asarray(Image.fromarray(np.clip(a + 0.5, 0, 255).astype(np.uint8), "RGBA").resize(src.size, Image.BOX))
|
||||||
|
residual = ref - down.astype(np.float32)
|
||||||
|
a += np.stack([np.asarray(Image.fromarray(residual[..., c]).resize(hd.size, Image.BICUBIC)) for c in range(4)], -1)
|
||||||
|
return Image.fromarray(np.clip(a + 0.5, 0, 255).astype(np.uint8), "RGBA")
|
||||||
|
|
||||||
|
|
||||||
|
def finish(job):
|
||||||
|
"""Crops the padding off the 4x result and reduces it to 2x; returns (name, png bytes) or None."""
|
||||||
|
meta, work = job
|
||||||
|
path = work / "out" / f"{meta['idx']}.png"
|
||||||
|
if not path.exists():
|
||||||
|
return None
|
||||||
|
up = Image.open(path).convert("RGBA")
|
||||||
|
s = 4
|
||||||
|
up = up.crop((meta["px"] * s, meta["py"] * s, (meta["px"] + meta["w"]) * s, (meta["py"] + meta["h"]) * s))
|
||||||
|
hd = back_project(up.resize((meta["w"] * 2, meta["h"] * 2), Image.LANCZOS), original(meta, work))
|
||||||
|
if not meta["alpha"]:
|
||||||
|
hd.putalpha(255)
|
||||||
|
buf = io.BytesIO()
|
||||||
|
hd.save(buf, "PNG", compress_level=6)
|
||||||
|
return meta["name"], buf.getvalue()
|
||||||
|
|
||||||
|
|
||||||
|
def write_pak(out: Path, items: list[tuple[str, bytes]]) -> None:
|
||||||
|
items = sorted(items)
|
||||||
|
offset = 12 + sum(2 + len(n.encode("latin-1")) + 8 for n, _ in items)
|
||||||
|
header = [b"MTHD", struct.pack("<II", VERSION, len(items))]
|
||||||
|
entries = []
|
||||||
|
for name, data in items:
|
||||||
|
raw = name.encode("latin-1")
|
||||||
|
entries.append(struct.pack("<H", len(raw)) + raw + struct.pack("<II", offset, len(data)))
|
||||||
|
offset += len(data)
|
||||||
|
tmp = out.with_suffix(".tmp")
|
||||||
|
with open(tmp, "wb") as f:
|
||||||
|
f.write(b"".join(header) + b"".join(entries))
|
||||||
|
for _, data in items:
|
||||||
|
f.write(data)
|
||||||
|
os.replace(tmp, out)
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
|
ap.add_argument("--esrgan", type=Path, default=os.environ.get("MT_ESRGAN"), required="MT_ESRGAN" not in os.environ,
|
||||||
|
help="directory with realesrgan-ncnn-vulkan and models/ (or MT_ESRGAN)")
|
||||||
|
ap.add_argument("--client", type=Path, default=REPO / "build/zh-locale/Client")
|
||||||
|
ap.add_argument("--locale", default="zh")
|
||||||
|
ap.add_argument("--out", type=Path, help="default: <client>/hd_ui.pak")
|
||||||
|
ap.add_argument("--work", type=Path, help="keep intermediates here (default: a temporary directory)")
|
||||||
|
ap.add_argument("--reuse", action="store_true",
|
||||||
|
help="keep the upscaled images already in --work and only redo the 2x reduction and the pak")
|
||||||
|
ap.add_argument("--limit", type=int, default=0, help="only the first N images (a quick look)")
|
||||||
|
args = ap.parse_args()
|
||||||
|
out = args.out or args.client / "hd_ui.pak"
|
||||||
|
binary = args.esrgan / "realesrgan-ncnn-vulkan"
|
||||||
|
if not binary.exists():
|
||||||
|
sys.exit(f"{binary} not found")
|
||||||
|
|
||||||
|
keys, seen = pack_entries(args.client)
|
||||||
|
names = sorted(n for n in seen if wanted(n, args.locale))
|
||||||
|
if args.limit:
|
||||||
|
names = names[:args.limit]
|
||||||
|
print(f"{len(names)} UI images in {args.client}/pack")
|
||||||
|
|
||||||
|
if args.reuse and not (args.work and (args.work / "manifest.json").exists()):
|
||||||
|
sys.exit("--reuse needs a --work directory from an earlier run")
|
||||||
|
work = args.work or Path(tempfile.mkdtemp(prefix="hd_ui_"))
|
||||||
|
try:
|
||||||
|
if args.reuse:
|
||||||
|
metas = json.loads((work / "manifest.json").read_text())
|
||||||
|
else:
|
||||||
|
for sub in ("in", "out"):
|
||||||
|
shutil.rmtree(work / sub, ignore_errors=True)
|
||||||
|
(work / sub).mkdir(parents=True)
|
||||||
|
jobs = [(i, n, read_entry(keys, *seen[n]), work) for i, n in enumerate(names)]
|
||||||
|
with ProcessPoolExecutor() as pool:
|
||||||
|
metas = [m for m in pool.map(prepare, jobs, chunksize=16) if m]
|
||||||
|
print(f"prepared {len(metas)} (skipped {len(names) - len(metas)} undecodable or oversized)")
|
||||||
|
(work / "manifest.json").write_text(json.dumps(metas))
|
||||||
|
subprocess.run([str(binary), "-i", str(work / "in"), "-o", str(work / "out"), "-n", MODEL, "-s", "4",
|
||||||
|
"-f", "png"], cwd=args.esrgan, check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||||
|
with ProcessPoolExecutor() as pool:
|
||||||
|
items = [r for r in pool.map(finish, [(m, work) for m in metas], chunksize=16) if r]
|
||||||
|
if len(items) != len(metas):
|
||||||
|
sys.exit(f"incomplete upscale: {len(items)} of {len(metas)} images; archive was not replaced")
|
||||||
|
write_pak(out, items)
|
||||||
|
print(f"wrote {out}: {len(items)} images, {out.stat().st_size / 2**20:.1f} MB")
|
||||||
|
finally:
|
||||||
|
if not args.work:
|
||||||
|
shutil.rmtree(work, ignore_errors=True)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -346,10 +346,19 @@ def build(en: Path, zh: Path, output: Path, client_base: Path,
|
|||||||
names_dir / "item_names_zh_overlay.txt")
|
names_dir / "item_names_zh_overlay.txt")
|
||||||
mob_conversion = convert_names(names_dir / "mob_names_zh.txt", mob_names,
|
mob_conversion = convert_names(names_dir / "mob_names_zh.txt", mob_names,
|
||||||
names_dir / "mob_names_zh_overlay.txt")
|
names_dir / "mob_names_zh_overlay.txt")
|
||||||
|
# item_limits_server.tsv: item limits changed on our server, so the tooltip matches what it enforces.
|
||||||
|
limits = names_dir / "item_limits_server.tsv"
|
||||||
|
if (names_dir / "item_stones_server.tsv").is_file() and not limits.is_file():
|
||||||
|
raise ValueError("stone overlay requires the item limits table argument")
|
||||||
|
if (names_dir / "item_shapes_server.tsv").is_file() and not (names_dir / "item_stones_server.tsv").is_file():
|
||||||
|
raise ValueError("item shapes require the stone overlay argument")
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
[str(proto_tool), str(en / "item_proto"), str(en / "mob_proto"),
|
[str(proto_tool), str(en / "item_proto"), str(en / "mob_proto"),
|
||||||
str(item_names), str(mob_names), str(locale_dir / "item_proto"),
|
str(item_names), str(mob_names), str(locale_dir / "item_proto"),
|
||||||
str(locale_dir / "mob_proto")],
|
str(locale_dir / "mob_proto")] + ([str(limits)] if limits.is_file() else [])
|
||||||
|
+ ([str(names_dir / "item_stones_server.tsv")] if (names_dir / "item_stones_server.tsv").is_file() else []),
|
||||||
|
# item_shapes_server.tsv follows the stone overlay (positional): size and flags of new-use items.
|
||||||
|
+ ([str(names_dir / "item_shapes_server.tsv")] if (names_dir / "item_shapes_server.tsv").is_file() else []),
|
||||||
check=True, capture_output=True, text=True,
|
check=True, capture_output=True, text=True,
|
||||||
)
|
)
|
||||||
report["proto"] = {
|
report["proto"] = {
|
||||||
@@ -381,6 +390,68 @@ def build(en: Path, zh: Path, output: Path, client_base: Path,
|
|||||||
return report_path
|
return report_path
|
||||||
|
|
||||||
|
|
||||||
|
def build_biolog(output: Path, pack_tool: Path):
|
||||||
|
"""AVA2 biology is part of the current client; rebuilding the locale must retain its item patch."""
|
||||||
|
import importlib.util
|
||||||
|
import tarfile
|
||||||
|
root = REPO / "tools/server/biolog"
|
||||||
|
ava = REPO.parent / "AVA2"
|
||||||
|
archive = ava / "2. Backup SF+SRC and SQL/FILES+SRC.tgz"
|
||||||
|
if not archive.is_file():
|
||||||
|
raise ValueError("AVA2 biology requires the local FILES+SRC.tgz reference")
|
||||||
|
proto_tool = tool("biolog_proto_patch")
|
||||||
|
if not proto_tool.is_file():
|
||||||
|
raise ValueError("build biolog_proto_patch before generating the Chinese client")
|
||||||
|
stage = output.parent / "biolog"
|
||||||
|
stage.mkdir(parents=True, exist_ok=True)
|
||||||
|
proto = stage / "ava2-item-proto.txt"
|
||||||
|
with tarfile.open(archive, "r:gz") as source:
|
||||||
|
member = source.extractfile("home/srv1/db/item_proto.txt")
|
||||||
|
if member is None:
|
||||||
|
raise ValueError("AVA2 item table missing")
|
||||||
|
proto.write_bytes(member.read())
|
||||||
|
spec = importlib.util.spec_from_file_location("biolog_assets", root / "make_assets.py")
|
||||||
|
module = importlib.util.module_from_spec(spec)
|
||||||
|
spec.loader.exec_module(module)
|
||||||
|
module.prepare(proto, ava / "1. Client DEV/pack_maker", output.parent / "locale-src/zh",
|
||||||
|
stage, proto_tool.resolve(), pack_tool.resolve())
|
||||||
|
for extension in ("eix", "epk"):
|
||||||
|
shutil.copy2(stage / ("biolog." + extension), output / "pack" / ("biolog." + extension))
|
||||||
|
index = output / "pack/Index"
|
||||||
|
lines = index.read_bytes().replace(b"\r\n", b"\n").splitlines()
|
||||||
|
if b"biolog" not in lines:
|
||||||
|
lines[1:1] = [b"*", b"biolog"]
|
||||||
|
index.write_bytes(b"\r\n".join(lines) + b"\r\n")
|
||||||
|
return {"stages": 13, "item_templates": 29, "pack": "biolog", "first_priority": True}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def build_wiki(output: Path, pack_tool: Path):
|
||||||
|
"""A versioned public server catalogue; original script and proto packs stay intact."""
|
||||||
|
source = REPO / "data/wiki/catalogue.txt"
|
||||||
|
manifest = json.loads((source.parent / "manifest.json").read_text())
|
||||||
|
import hashlib
|
||||||
|
raw = source.read_bytes()
|
||||||
|
header, payload = raw.split(b"\n", 1)
|
||||||
|
if hashlib.sha256(payload).hexdigest() != manifest["catalogue_sha256"]:
|
||||||
|
raise ValueError("wiki catalogue checksum mismatch; regenerate from server tables")
|
||||||
|
if header != ("MTWIKI\t1\t" + manifest["catalogue_sha256"]).encode("ascii"):
|
||||||
|
raise ValueError("unsupported wiki catalogue header")
|
||||||
|
stage = output.parent / "wiki"
|
||||||
|
assets = stage / "assets/wiki"
|
||||||
|
assets.mkdir(parents=True, exist_ok=True)
|
||||||
|
shutil.copy2(source, assets / "catalogue.txt")
|
||||||
|
subprocess.run([str(pack_tool.resolve()), str(stage / "wiki"), str(assets.parent), ""], check=True)
|
||||||
|
for extension in ("eix", "epk"):
|
||||||
|
shutil.copy2(stage / ("wiki." + extension), output / "pack" / ("wiki." + extension))
|
||||||
|
index = output / "pack/Index"
|
||||||
|
lines = index.read_bytes().replace(b"\r\n", b"\n").splitlines()
|
||||||
|
if b"wiki" not in lines:
|
||||||
|
lines[1:1] = [b"*", b"wiki"]
|
||||||
|
index.write_bytes(b"\r\n".join(lines) + b"\r\n")
|
||||||
|
return manifest
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
parser.add_argument("--english", type=Path, default=DEFAULT_EN)
|
parser.add_argument("--english", type=Path, default=DEFAULT_EN)
|
||||||
@@ -393,6 +464,10 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
report_path = build(args.english, args.chinese, args.output, args.client_base,
|
report_path = build(args.english, args.chinese, args.output, args.client_base,
|
||||||
args.proto_tool, args.name_tables, args.pack_tool)
|
args.proto_tool, args.name_tables, args.pack_tool)
|
||||||
|
report = json.loads(report_path.read_text())
|
||||||
|
report["biolog"] = build_biolog(args.output, args.pack_tool)
|
||||||
|
report["wiki"] = build_wiki(args.output, args.pack_tool)
|
||||||
|
report_path.write_text(json.dumps(report, ensure_ascii=False, indent=2)+"\n", encoding="utf-8")
|
||||||
print(f"Built {args.output / 'pack/locale_zh.eix'} (.epk), registered in pack/Index")
|
print(f"Built {args.output / 'pack/locale_zh.eix'} (.epk), registered in pack/Index")
|
||||||
print(f"Report: {report_path}")
|
print(f"Report: {report_path}")
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
# Portable local macOS bundle with private Client assets and the validated 2x UI archive.
|
||||||
|
# scripts/package_mac_app.sh [BUILD_DIR] [CLIENT_DIR] [OUT] [HD_UI_PAK]
|
||||||
|
set -euo pipefail
|
||||||
|
repo=${0:A:h:h}
|
||||||
|
build=${1:-$repo/build/release}
|
||||||
|
client=${2:-$repo/build/zh-locale/Client}
|
||||||
|
out=${3:-$repo/dist/Metin2.app}
|
||||||
|
pak=${4:-${MT_HD_UI_PAK:-$repo/build/hd-ui/hd_ui.pak}}
|
||||||
|
bin=$build/src/host/mt_native_render
|
||||||
|
[[ -x "$bin" ]] || { echo "missing native executable: $bin" >&2; exit 1; }
|
||||||
|
[[ -d "$client/pack" ]] || { echo "missing Client/pack: $client" >&2; exit 1; }
|
||||||
|
[[ -f "$pak" ]] || { echo "missing HD UI archive: $pak (run scripts/build_hd_ui.py first)" >&2; exit 1; }
|
||||||
|
python3 "$repo/scripts/verify_hd_ui.py" "$pak"
|
||||||
|
signing_identity=${MT_CODESIGN_IDENTITY:--}
|
||||||
|
version=$(git -C "$repo" describe --always --dirty 2>/dev/null || echo dev)
|
||||||
|
mkdir -p "${out:A:h}"
|
||||||
|
stage=$(mktemp -d "${out:A}.tmp.XXXXXX")
|
||||||
|
trap 'rm -rf "$stage"' EXIT
|
||||||
|
mkdir -p "$stage/Contents/MacOS" "$stage/Contents/Resources" "$stage/Contents/Frameworks"
|
||||||
|
cp "$bin" "$stage/Contents/MacOS/mt_native_render"
|
||||||
|
cp "$build/src/host/native.vert.spv" "$build/src/host/native.frag.spv" "$build/src/host/python27.zip" "$stage/Contents/Resources/"
|
||||||
|
cp "$repo/branding/icon/macos/AppIcon.icns" "$stage/Contents/Resources/"
|
||||||
|
cp "$pak" "$stage/Contents/Resources/hd_ui.pak"
|
||||||
|
# Materialize source links so the bundle is portable; clone asset data on APFS.
|
||||||
|
cp -cRL "$client" "$stage/Contents/Resources/Client" 2>/dev/null || {
|
||||||
|
mkdir -p "$stage/Contents/Resources/Client"
|
||||||
|
rsync -aL "$client/" "$stage/Contents/Resources/Client/"
|
||||||
|
}
|
||||||
|
for lib in libvulkan.1.dylib libSDL3.0.dylib; do
|
||||||
|
dependency=$(otool -L "$bin" | awk -v name="$lib" '$1 ~ name "$" {print $1; exit}')
|
||||||
|
[[ -f "$dependency" ]] || { echo "cannot resolve $lib: $dependency" >&2; exit 1; }
|
||||||
|
cp "$dependency" "$stage/Contents/Frameworks/$lib"
|
||||||
|
install_name_tool -change "$dependency" "@rpath/$lib" "$stage/Contents/MacOS/mt_native_render"
|
||||||
|
install_name_tool -id "@rpath/$lib" "$stage/Contents/Frameworks/$lib"
|
||||||
|
done
|
||||||
|
for rpath in ${(f)"$(otool -l "$bin" | awk '/LC_RPATH/ {getline; getline; print $2}')"}; do
|
||||||
|
install_name_tool -delete_rpath "$rpath" "$stage/Contents/MacOS/mt_native_render"
|
||||||
|
done
|
||||||
|
install_name_tool -add_rpath '@executable_path/../Frameworks' "$stage/Contents/MacOS/mt_native_render"
|
||||||
|
molten=${MT_MOLTENVK:-/opt/homebrew/opt/molten-vk/lib/libMoltenVK.dylib}
|
||||||
|
[[ -f "$molten" ]] || molten=/usr/local/opt/molten-vk/lib/libMoltenVK.dylib
|
||||||
|
[[ -f "$molten" ]] || { echo "missing MoltenVK (set MT_MOLTENVK)" >&2; exit 1; }
|
||||||
|
cp "$molten" "$stage/Contents/Frameworks/libMoltenVK.dylib"
|
||||||
|
cat > "$stage/Contents/Resources/MoltenVK_icd.json" <<'JSON'
|
||||||
|
{"file_format_version":"1.0.0","ICD":{"library_path":"../Frameworks/libMoltenVK.dylib","api_version":"1.2.0","is_portability_driver":true}}
|
||||||
|
JSON
|
||||||
|
cat > "$stage/Contents/MacOS/Metin2" <<'SH'
|
||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
CONTENTS_DIR="$(cd "$(dirname "$0")/.." && pwd -P)"
|
||||||
|
RESOURCES_DIR="$CONTENTS_DIR/Resources"
|
||||||
|
export VK_ICD_FILENAMES="$RESOURCES_DIR/MoltenVK_icd.json"
|
||||||
|
# Resource lookup also works when Finder starts us with cwd=/ or Client is overridden.
|
||||||
|
: "${MT_HD_UI_PAK:=$RESOURCES_DIR/hd_ui.pak}"
|
||||||
|
export MT_HD_UI_PAK
|
||||||
|
cd "$RESOURCES_DIR"
|
||||||
|
exec "$CONTENTS_DIR/MacOS/mt_native_render" --login-screen \
|
||||||
|
--live-client "${MT_CLIENT_DIR:-$RESOURCES_DIR/Client}" \
|
||||||
|
--live-server "${MT_SERVER:-192.168.21.203:11000:13000}" \
|
||||||
|
--width 1280 --height 800 "$@"
|
||||||
|
SH
|
||||||
|
chmod +x "$stage/Contents/MacOS/Metin2"
|
||||||
|
cat > "$stage/Contents/Info.plist" <<PLIST
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0"><dict>
|
||||||
|
<key>CFBundleName</key><string>Metin2</string>
|
||||||
|
<key>CFBundleDisplayName</key><string>Metin2</string>
|
||||||
|
<key>CFBundleIdentifier</key><string>org.metin2port.client</string>
|
||||||
|
<key>CFBundleExecutable</key><string>Metin2</string>
|
||||||
|
<key>CFBundleIconFile</key><string>AppIcon</string>
|
||||||
|
<key>CFBundlePackageType</key><string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key><string>0.1</string>
|
||||||
|
<key>CFBundleVersion</key><string>$version</string>
|
||||||
|
<key>LSMinimumSystemVersion</key><string>12.0</string>
|
||||||
|
<key>LSApplicationCategoryType</key><string>public.app-category.role-playing-games</string>
|
||||||
|
<key>NSHighResolutionCapable</key><true/>
|
||||||
|
<key>NSLocalNetworkUsageDescription</key><string>连接局域网中的 Metin2 游戏服务器,查询频道状态并登录游戏。</string>
|
||||||
|
</dict></plist>
|
||||||
|
PLIST
|
||||||
|
for library in "$stage"/Contents/Frameworks/*.dylib; do codesign --force --sign "$signing_identity" "$library"; done
|
||||||
|
codesign --force --sign "$signing_identity" --identifier org.metin2port.client.renderer "$stage/Contents/MacOS/mt_native_render"
|
||||||
|
codesign --force --deep --sign "$signing_identity" "$stage"
|
||||||
|
codesign --verify --deep --strict "$stage"
|
||||||
|
# Publish only after validating the complete replacement bundle.
|
||||||
|
rm -rf "$out"
|
||||||
|
mv "$stage" "$out"
|
||||||
|
trap - EXIT
|
||||||
|
echo "$out"
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Validate a complete MTHD archive before including private HD art in a mac bundle."""
|
||||||
|
import pathlib
|
||||||
|
import struct
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
def verify(path):
|
||||||
|
data = pathlib.Path(path).read_bytes()
|
||||||
|
if len(data) < 12 or data[:4] != b'MTHD':
|
||||||
|
raise ValueError('invalid MTHD header')
|
||||||
|
version, count = struct.unpack_from('<II', data, 4)
|
||||||
|
if version != 1 or not 0 < count <= 100000:
|
||||||
|
raise ValueError('invalid archive version/count')
|
||||||
|
index, entries, names = 12, [], set()
|
||||||
|
for _ in range(count):
|
||||||
|
if index + 2 > len(data): raise ValueError('truncated index')
|
||||||
|
size, = struct.unpack_from('<H', data, index)
|
||||||
|
index += 2
|
||||||
|
if not 0 < size <= 4096 or index + size + 8 > len(data): raise ValueError('invalid entry')
|
||||||
|
name = data[index:index+size].decode('latin1')
|
||||||
|
index += size
|
||||||
|
offset, length = struct.unpack_from('<II', data, index)
|
||||||
|
index += 8
|
||||||
|
if name in names or not length or offset + length > len(data): raise ValueError('invalid payload range')
|
||||||
|
names.add(name)
|
||||||
|
entries.append((name, offset, length))
|
||||||
|
for name, offset, length in entries:
|
||||||
|
image = data[offset:offset+length]
|
||||||
|
if offset < index or length < 33 or image[:8] != b'\x89PNG\r\n\x1a\n' or image[12:16] != b'IHDR':
|
||||||
|
raise ValueError('invalid PNG: ' + name)
|
||||||
|
w, h = struct.unpack_from('>II', image, 16)
|
||||||
|
if not 0 < w <= 4096 or not 0 < h <= 4096: raise ValueError('invalid dimensions: ' + name)
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
try:
|
||||||
|
print(f'HD UI archive valid: {verify(sys.argv[1])} textures')
|
||||||
|
except (ValueError, OSError, IndexError, struct.error) as error:
|
||||||
|
sys.exit(str(error))
|
||||||
@@ -125,6 +125,17 @@ struct BoneTrack {
|
|||||||
void sample(float t, Transform& out) const;
|
void sample(float t, Transform& out) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Preserve group boundaries: an animation can contain an auxiliary object group before its model.
|
||||||
|
struct AnimationTrackGroup {
|
||||||
|
std::string name;
|
||||||
|
Transform initial_placement;
|
||||||
|
int32_t accumulation_flags = 0;
|
||||||
|
float loop_translation[3] = {0.0f, 0.0f, 0.0f};
|
||||||
|
std::vector<TextTrack> text_tracks;
|
||||||
|
size_t first_track = 0;
|
||||||
|
size_t track_count = 0;
|
||||||
|
};
|
||||||
|
|
||||||
struct Animation {
|
struct Animation {
|
||||||
std::string name;
|
std::string name;
|
||||||
float duration = 0.0f;
|
float duration = 0.0f;
|
||||||
@@ -137,6 +148,7 @@ struct Animation {
|
|||||||
int32_t accumulation_flags = 0;
|
int32_t accumulation_flags = 0;
|
||||||
float loop_translation[3] = {0.0f, 0.0f, 0.0f};
|
float loop_translation[3] = {0.0f, 0.0f, 0.0f};
|
||||||
std::vector<BoneTrack> tracks;
|
std::vector<BoneTrack> tracks;
|
||||||
|
std::vector<AnimationTrackGroup> track_groups;
|
||||||
// t 处每个 track 的局部 4x4(granny_transform 组合语义,行主序)。
|
// t 处每个 track 的局部 4x4(granny_transform 组合语义,行主序)。
|
||||||
// out 按 tracks 顺序;bone_index 见各 track。
|
// out 按 tracks 顺序;bone_index 见各 track。
|
||||||
void sample_local(float t, std::vector<Mat4>& out) const;
|
void sample_local(float t, std::vector<Mat4>& out) const;
|
||||||
|
|||||||