Level 120 (L1-L5): AVA2 maps, drops, dungeons, dungeon timer UI
- tools/server/level-120: sbtest install of the 120 exp table and the unsigned exp column. - tools/server/ava2-maps: the 10 AVA2 maps (pack, map data, regen, designed drops) for sbtest; Ava2MapsScript.inc, gr2 texture and mob_proto tests. - tools/server/ava2-dungeons: snow / ship defence / Meley quests ported from AVA2 (make_quests.py + install.sh). - mt_dungeon_timer (DungeonTimerScript.inc): AVA2 dungeon timer in place of the minimap (RefreshDungeonTimer) and the hydra mast HP bar (gethydrahp). - Autohunt skips a target that is hit but takes no damage for 4 s (blocked Meley statues) and keeps it skipped for 60 s; FindCloseTarget now honours the skip list. Meley full run passed on sbtest with the Mac client. Not deployed live. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
657e49e52a
commit
a1e7da68a4
@@ -23,7 +23,7 @@ REPO = Path(__file__).resolve().parents[1]
|
||||
DEFAULT_EN = REPO.parent / "40250/Server Client TMP4/Client/Eternexus/locale_en/locale/en"
|
||||
DEFAULT_ZH = REPO.parent / "server_extracted/client_locale/longju/locale/taiwan"
|
||||
DEFAULT_OUTPUT = REPO / "build/zh-locale/Client"
|
||||
BUILD_DIRS = ("build/release", "build/native")
|
||||
BUILD_DIRS = ("build/release", "build/native", "build/switchbot-check")
|
||||
LOCALE_CFG = "10002 936 zh\n"
|
||||
DEFAULT_NAMES = REPO / "data/zh_40250"
|
||||
FORMAT = re.compile(r"%(?:\([^)]*\))?[-+#0 ]*\d*(?:\.\d+)?[diouxXeEfFgGcrs%]")
|
||||
@@ -464,6 +464,36 @@ def build_ava2_items(output: Path, pack_tool: Path):
|
||||
"locked": len(report["locked"]), "assets": report["assets"], "pack": "ava2items"}
|
||||
|
||||
|
||||
def build_ava2_maps(output: Path, pack_tool: Path):
|
||||
"""AVA2 maps/dungeons + their monsters, layered over ava2items (see tools/server/ava2-maps)."""
|
||||
import importlib.util
|
||||
root = REPO / "tools/server/ava2-maps"
|
||||
ava = REPO.parent / "AVA2/TEST"
|
||||
reader = REPO.parent / "metin2-server/src/server/db/src/ProtoReader.cpp"
|
||||
if not (ava / "1. Client DEV/pack_maker").is_dir() or not reader.is_file():
|
||||
raise ValueError("AVA2 maps need ../AVA2/TEST (pack_maker + extracted server tree) and ../metin2-server")
|
||||
tools = [tool(name) for name in ("mob_proto_patch", "gr2_textures")]
|
||||
if not all(path.is_file() for path in tools):
|
||||
raise ValueError("build mob_proto_patch and gr2_textures before generating the Chinese client")
|
||||
spec = importlib.util.spec_from_file_location("ava2_maps", root / "make_maps.py")
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
stage = output.parent / "ava2-maps"
|
||||
# Reads the effective pack chain (ava2items' locale/zh/mob_proto included), so it must run after build_ava2_items.
|
||||
report = module.prepare(ava, reader, output, stage, tools[0].resolve(), tools[1].resolve(), pack_tool.resolve())
|
||||
for extension in ("eix", "epk"):
|
||||
shutil.copy2(stage / ("ava2maps." + extension), output / "pack" / ("ava2maps." + extension))
|
||||
index = output / "pack/Index"
|
||||
lines = index.read_bytes().replace(b"\r\n", b"\n").splitlines()
|
||||
if b"ava2maps" in lines:
|
||||
del lines[lines.index(b"ava2maps") - 1:lines.index(b"ava2maps") + 1]
|
||||
at = lines.index(b"ava2items") - 1
|
||||
lines[at:at] = [b"*", b"ava2maps"]
|
||||
index.write_bytes(b"\r\n".join(lines) + b"\r\n")
|
||||
return {"mobs": report["mobs"], "races": report["races"], "files": report["files"],
|
||||
"misses": len(report["misses"]), "pack": "ava2maps"}
|
||||
|
||||
|
||||
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"
|
||||
@@ -505,6 +535,7 @@ def main():
|
||||
report = json.loads(report_path.read_text())
|
||||
report["biolog"] = build_biolog(args.output, args.pack_tool)
|
||||
report["ava2_items"] = build_ava2_items(args.output, args.pack_tool)
|
||||
report["ava2_maps"] = build_ava2_maps(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")
|
||||
|
||||
Reference in New Issue
Block a user