Great Tang Journey West (rzrmud)

✅ 可玩

大唐西游 YWX人造人

rzrmud

🔑 fluffos / Mud@2026 更新 a5b5af6 2026-10-28 源码 下载 ZIP

▶ 开始游玩 · Play Now

站点自称"YWX人造人"(原开发者的昵称/团队名),北美总站,自 2006 年 2 月 3 日运行至今(存档信息显示已有五百多个注册玩家,是这批 archive 里"真实运营过"证据最扎实的一个)。与本项目转换的"梦幻西游"(mhxy) 同属西游记神话世界观的一支,但引擎实现是独立的一支(不使用 nitan/Lonely 家族那套全局属性存取机制,而是每个对象自带属性存取方法,架构上更规范)。新角色从长安城"南城客栈"起步,白素贞、唐三藏、店小二等《西游记》经典角色以 NPC 形式登场,成长线围绕门派拜师、五行攻击/防御属性与道行修真境界展开,整体节奏偏休闲,并附带较完整的新手礼包机制。

English

A North America-hosted Journey to the West game, self-branded 'YWX Cyborg' after its original developer/team, continuously running since February 2006 with over five hundred registered player accounts on record — among the most solidly 'actually operated' archives in this collection. It shares its mythic Journey to the West setting with sibling game mhxy but runs on an independently engineered codebase, with per-object attribute accessors rather than the shared global-store architecture common to the nitan/Lonely family. New characters begin at the South City Inn in Chang'an, greeted by classic characters like Bai Suzhen and Tang Sanzang, and follow a cultivation-focused progression built around sects, Five Elements attack/defense attributes, and Taoist cultivation realms, with a fairly generous newbie starter-kit system.

README

内容亮点

在线试玩

https://mudlibs.fluffos.info/rzrmud/

管理员账号 / Admin account

警告:对外公开架设前请务必修改这两个密码。

本地运行

cd libs/rzrmud
~/src/fluffos/build-debug/src/driver config.fluffos

游戏端口:40020。

NOTES · 移植与修复记录

rzrmud — 大唐西游 YWX人造人 (Great Tang Journey to the West)

Archive: rzrmud.20130220.tar.gz. Port: 40020. Status: done (boots clean, connects, plays through the age-verification gate, MOTD, username validation, and into new-player registration with zero crashes).

What this is

A different lineage from the "NT/nitan/Lonely" family (archives #21/#22) — generic-looking MudOS 0.9.20-era mudlib, 9096 .c files, bundled with prebuilt 32-bit Linux driver binaries (driver, driver_2s_64bit_int, ignored — we use our own fluffos build). Archive nests the actual mudlib root one level down at rzrmud/world/.

Notably, this lib's adm/obj/simul_efun.lpc does not define a global set/query/delete at all (unlike the nitan family) — every object that uses bare query(...)/set(...) relies entirely on its own inherit NPC;-style base class providing them locally. This is the architecturally *correct* pattern (see AGENTS.md §15's writeup of why the nitan family's simul_efun-based version is broken on this driver) — no this_object()-during-simul_efun-call trap here since the fallback path essentially isn't used.

Fixes applied

None beyond the standard mechanical pipeline (convert_lib.sh's encoding/rename/ref-fix/static→nosave passes). Booted clean and reached deep into the login flow (age gate → MOTD → username validation → "new player" registration sub-flow asking for an English name) on the first attempt, zero runtime or compile errors in debug.log.

Known content gap (not fixed — see AGENTS.md §13)

scripts/lpcc_check.sh sweep: 9096 files, 8865 pass / 231 fail (97.5%). The largest failure clusters are a genuine but narrow content gap, not an engine bug:

Interactive test result

Connects, full ASCII-art banner renders, no crashes through: age- verification prompt → MOTD/rules screen → username prompt (validates length/alphabetic correctly) → "new" registration path → English-name sub-prompt (also validates correctly). Did not create a full character or play further into the game world (out of scope for this pass).

Post-hoc fix: UTF8-native is_chinese/registration (AGENTS.md §15h)

Applied in a later batch pass across the whole project: is_chinese/is_chinese2 in the shared chinese.lpc simul_efun fragment used GBK byte-range checks that silently never match real Chinese text once strings are UTF-8 (this driver's str[i] returns a Unicode codepoint, not a GBK byte). This broke character registration specifically -- any real Chinese name was rejected. Fixed the range check to test the CJK Unicode block instead, and halved the GBK-byte-calibrated length bounds in check_legal_name to match. See AGENTS.md §15h for the full writeup; confirmed via a real interactive registration test (Chinese surname + given name reaching the next prompt).

Re-verification pass: driver rebuild + formatter + WASM (2026-07-23)

WASM-enablement pass (2026-07-24): loopback-allow + admin seeding

Gates patched (same 西游记-lineage shapes as mhxy/mohuanshiji; loopback = 127.0.0.1, any 127.*, or an empty/malformed non-dotted-quad string, which is what current WASM builds return):

Admin account: fluffos, 登陆密码 Mud@2026, 管理密码 Mud@2026admin (this lineage sets the admin/recovery password FIRST and requires the two to differ), Chinese name 浮浮, granted (admin) via /adm/etc/wizlist (normalized CRLF→LF). Verified: real-flow registration reaching 南城客栈, re-login ("您使用了登陆密码成功登陆!"), update /adm/daemons/band.lpc succeeds. Saves at data/login/f/fluffos.o + data/user/f/fluffos.o (untracked, not gitignored — orchestrator must add; note this lib also ships a large pre-existing tracked player base under data/user/, which was left untouched). Fresh normal registration (秦风/testqa) re-verified end-to-end and its saves removed. debug.log: only transient cold-cache "Eval interrupted / Too long evaluation" lines during the first world entry (lazy compiles of big content files; a warm-cache login+look+score session afterwards added zero new error lines) — same known mega-content shape as mhxy, not introduced by this pass.

深度功能测试 / Deep functional test (2026-07-24, round two)

First real *playthrough* pass on this lib (all prior passes verified only registration + look/score/quit + admin login, or watched boot output/WASM). Read doc/help/newbie in full first — it correctly named the fight-vs-kill safety distinction, apprentice/learn syntax, the general command set, and pointed at help combat/help menpai. Played as an ordinary new player through registration, exploration, a real (non-lethal) fight, organic skill-learning and sect-joining, a shop list/buy attempt, a real quit (including mid-combat), a real wall-clock-gap reconnect via the restore/login path, native driver (build-debug). Found and fixed three distinct bugs, one of which is a genuinely new class for this project's catalog.

Test characters (both kept, not cleaned up, as representative playthrough evidence):

Several other ids (linshuang, linxue, linxue2, linxueqi, linxueb) were created and abandoned during trial-and-error discovery of this lib's exact registration-prompt sequence (id must be 3–8 plain English letters, no digits — several attempts failed that check) and their save files were deleted before finishing; not left behind.

Bug 1 (NEW bug class): reconnecting mid gift-allocation permanently strands a new character with every command silently blocked

File:line of the fix: obj/user.lpc's reconnect() (~line 252); structural root is adm/daemons/logind.lpc's enter_world() (the no_gift → move("/d/wiz/init") routing) and d/wiz/init.lpc's init() (schedules the auto "start" trigger only on the room's original entry).

``lpc // BEFORE: void reconnect() { set_heart_beat(1); set_temp("netdead", 0); remove_netdead_enemy(); remove_call_out("user_dump"); remove_call_out("do_net_dead"); tell_object(this_object(), "重新连线完毕。\n"); } // AFTER: (see obj/user.lpc for the full comment) — appends: if (query("no_gift") && objectp(env = environment(this_object())) && base_name(env) == "/d/wiz/init") { env->get_start0(this_object()); } ``

Bug 2 (existing AGENTS.md §7.17 class, applied proactively): unbounded init()/reset() reentrancy — this lib has the identical vulnerable shape in 15 files

std/room.lpc's setup() calls this_object()->reset(); synchronously as the last step of every room's create() — the exact structural precondition for AGENTS.md §7.17 (found live on xiyouji). Grepped for the vulnerable create_identity()/force-load-by-path shape (call_other(where, "???")) and found it copy-pasted, byte-identical, into 15 of this lib's ~16 sect/zone "senior disciple" entrance NPCs (the 16th, d/npc/zhangmen.lpc, has the same create_identity() function defined but its own init() never calls it, so it's inert — checked, not fixed):

d/jjf/npc/zhangmen.lpc          d/qujing/kusong/npc/zhangmen.lpc
d/nanhai/npc/zhangmen.lpc       d/qujing/wudidong/npc/zhangmen.lpc
d/sea/npc/zhangmen.lpc          d/qujing/wuzhuang/npc/zhangmen.lpc
d/xueshan/npc/zhangmen.lpc      d/kunlun/npc/zhangmen.lpc
d/death/npc/zhangmen.lpc        d/shushan/npc/zhangmen.lpc
d/sanxian/npc/zhangmen.lpc      d/moon/npc/zhangmen.lpc
d/lingtai/npc/zhangmen.lpc      d/pansi/npc/zhangmen.lpc
d/death/npc/guiwang.lpc (calls the same "/d/death/new-walk2" room)

Applied the exact §7.17 fix, mechanically, to all 15 files plus std/room.lpc: 1. std/room.lpc: nosave int resetting_now; guard at the top/every return path of reset(). 2. Each of the 15 files: nosave int in_init_now; guard around the whole body of init(). 3. Each of the 15 files' create_identity(): prefer environment(this_object()) over the call_other(where, "???")/find_object(where) force-load when it already matches where by base_name().

One mechanical mistake caught by compile-checking every edited file with lpcc before restarting the driver (not just eyeballing the diff): my first pass inserted the new nosave int in_init_now; declaration between the two existing inherit NPC;/inherit F_SAVE; lines — Illegal to inherit after defining global variables. — moved it after both inherits. All 15 files plus std/room.lpc, obj/user.lpc, d/wiz/init.lpc compile clean (lpcc config.fluffos <file>, checked individually, zero error:/Fail to load object lines).

Live verification: walked a fresh linqx all the way to /d/jjf/front_yard2 (练武场, the room directly analogous to xiyouji's front_yard2 — houses this lib's d/jjf/npc/zhangmen.lpc, title "大唐 天下兵马大元帅") — first visit of this boot for that room, post-fix: no crash, debug.log line count unchanged, exactly one zhangmen NPC present (not a duplicated pair, which is what the unfixed bug produces). Only /d/jjf/front_yard2 was live-verified this way; the other 13 sect/zone rooms were fixed by code-shape match only, per this project's own established practice for this exact bug class (§7.17's own writeup did the same for 8 of xiyouji's 9 sects) — honestly unverified live. Suggestive supporting evidence found by accident: during this same session, work/data/zhangmen/zhangmen_ao_guang.o (the *East Sea Dragon Palace* sect's persisted zhangmen-NPC save — d/sea/npc/zhangmen.lpc, a room I never navigated to) got silently rewritten mid-session with drastically degraded stats (combat_exp 1,200,000 → 100,000, all skills 200 → a flat 60, daoxing 1,500,000 → 100,000) — consistent with a duplicate, freshly-initialized clone's create_identity()/ init_identity() overwriting the good save via a background heartbeat/wandering-bot visit, i.e. exactly this bug's signature, happening on a sect I never touched. Reverted that file (pre-existing tracked shipped data, not part of my intended fix, restored via git restore) rather than "fix" it by hand — but it's worth citing as independent evidence this bug class is real here, beyond the one room directly reproduced.

Bug 3 (NEW bug class): uncatchable eval-cost abort during the START_ROOM's cold first compile can permanently strand a logging-in player with no environment

File:line: adm/daemons/logind.lpc's enter_world() (~line 916, the !catch(load_object(startroom)) block) and its structural fallout in cmds/usr/quit.lpc (~line 75).

`` 执行时段错误:*Can't catch eval cost too big error. 程式:/adm/daemons/logind.lpc 第 916 行 ` preceded by an ordinary *Too long evaluation trace rooted in /feature/save.lpc's restore(), called (via feature/vendor_sale.lpc → std/char/npcsave.lpc) from /d/city/npc/xiaoer.lpc's create(), called (via make_inventory()) from /d/city/kezhan.lpc (南城客栈, this lib's START_ROOM) — i.e. the START_ROOM's own first-ever compile of this boot cascades into populating it with the shopkeeper NPC, whose restore() (small save file, ~1.5KB — the *cost* here is the cumulative eval budget of the whole synchronous first-time compile chain, not one expensive operation) tips the eval-cost counter over the limit. Unlike an ordinary *Too long evaluation, this second, immediately-following error is explicitly marked uncatchable by the driver — it aborts enter_world() entirely at that exact point, skipping every line after it, including the existing if (!environment(user)) user->move(START_ROOM); safety net a few lines further down (a comment there, "by canoe 修改多物品时突然quit 不能进mud Bug", shows the original authors already anticipated and patched a *similar*-shaped bug once — but that fallback is itself inside the same synchronous call and is just as exposed to this uncatchable-abort class). The player is left fully connected but with environment(me) == 0 — look degrades gracefully ("你的四周 灰蒙蒙地一片,什么也没有" — this lib's std look already handles a null environment), but quit does not: message("system", ..., environment(me), me) passes the literal integer 0 where message() requires a string/array/object, throwing *Bad argument 3 to EFUN message() and aborting quit() itself before it reaches me->save() — so the character is stuck with no room and can't even cleanly log out (though the character's on-disk save is unaffected, since the abort happens before save()` runs).

Memory-growth investigation (informational — not fixed, not conclusively a bug)

Mid-session, the orchestrator force-killed a driver instance of this lib that had grown to 8.2GB RSS and climbing, out of shared-host safety concerns. Investigated afterward with tight self-imposed RSS caps (killed my own test instances well before any risk threshold):

What was tested and confirmed working

Not verified live (explicit, not silently skipped)

Process-hygiene note (self-reported)

Early in this session, before fully internalizing AGENTS.md §10.5's "kill by exact PID, verify cwd first" rule, I ran ps aux | grep driver after a background driver of mine appeared to have died (a stray SIGTERM — see below), saw two driver config.fluffos processes, and killed both by PID without checking their cwd first. Both turned out to belong to other libs (xuanjianlu, shzs) — i.e. two other agents' sessions, not mine. New processes for those same two libs appeared moments later (either those agents' own retry logic, or purely coincidental relaunches by their sessions — I have no way to tell which after the fact). Flagging this prominently rather than burying it: if either of those sessions lost work because of this, that's on this session's account. From that point on I verified readlink -f /proc/<pid>/cwd before every kill. Separately (and unrelated to that mistake): this lib's own driver was killed by a genuine external SIGTERM at least twice during this session even when launched via the tool's run_in_background option — matches AGENTS.md §10.5's already-documented "stray SIGTERM between tool calls" environment quirk; not a mudlib bug.

Fail-closed retrofit (2026-07-24)

Same correction as the sibling mhxy/mohuanshiji: the loopback carve-out originally ALSO treated any empty/non-string/unparseable IP as trusted-local (fail-open, defensive against an older WASM query_ip_number() bug now fixed upstream). Tightened to strict loopback only across band.lpc (×4), securityd.lpc's match_wiz_site, ipd.lpc (falls back to "未知地区" for unparseable input instead of "本地连接"), and logind.lpc's local_conn flag. Re-verified loopback login, look, update, and quit all still work after tightening.

logind.lpc's do_counter(): the AGENTS.md §7.9 fresh-checkout bomb, live on the published site (2026-07-29)

Reported live: the WASM page at mudlibs.fluffos.info/rzrmud/ was permanently stuck at "connecting…" — fluffos_connect() genuinely returning -1, traced via the Logs tab to new_conn_handler: logon() on object obj/login#0 has failed with the underlying error *Bad argument 1 to sscanf, Expected: string Got: 0 inside do_counter() (adm/daemons/logind.lpc:1152, called from logon() via encoding()):

int do_counter() {
  int number;
  string file;
  file = read_file(FileName);   // FileName = "/adm/daemons/UserNumber"
  sscanf(file, "%d", number);   // crashes when read_file() returns 0
  ...

UserNumber (the visitor counter) is gitignored runtime data (libs/*/work/adm/daemons/UserNumber in the repo .gitignore), so it never exists in a fresh checkout — including the CI runner that packs the WASM site. It happened to exist on this session's own local disk (leftover from earlier local testing), which is exactly why every prior local verification pass here missed it: read_file() only returns 0 (triggering the crash) when the file is genuinely absent, and locally it never was. Textbook instance of the exact class AGENTS.md §7.9 already catalogs, just not one that had been found in this lib specifically before. Fixed with the standard stringp() guard; re-verified against a freshly packed local site with the file deliberately moved aside (reproducing the real fresh-checkout condition) — connects and reaches the registration prompt cleanly. Three more copies of the identical do_counter() exist (u/canoe/logind.lpc, u/canoe/lbak.lpc, adm/daemons/log_bak.lpc) but none are inherited/loaded by anything — wizard-workspace backups, left alone per the standing "don't fix dead code" policy.

§7.86 跨库扫描修复(留言板 post 崩溃)

深度功能测试第二轮 / Deep functional test round two (2026-08-15, post driver-upgrade re-test)

驱动于 2026-08-12 升级(引入 PR #1343/#1344、quest_times 语料修复) 后的重测。独立复核第一轮(2026-07-24)的三处修复均仍在代码中:obj/ user.lpc::reconnect() 的礼物精灵恢复补丁、do_counter() 的 stringp() 防护、log_error() 的大小写无关 "arning:" 警告过滤门 (这处已经是正确写法,未触发本 session 在 nt1 上踩过的小写坑)。

标准检查清单发现并修复的问题

现场验证

驱动干净启动(build-debug),以管理员账号 fluffos/Mud@2026 登 录,确认 目前权限:(admin),落地既有存档房间"南城客栈"(确认账号 存档正确持久化,无 nt1 那种"注册未满 30 分钟强行 kill 驱动导致密 码从未落盘"陷阱——本档案的账号是早前 pass 正常 quit 播种的,本轮 只是复用)。update /adm/daemons/logind 成功,确认 file.lpc/config.fluffos 两处修复编译干净、不影响正常巫师指令。 两次快速重连(各自独立 fluffos/Mud@2026 登录)均正确显示 目前权限:(admin),quit 均产生正常告别提示与断线。debug.log 全 程检查(1283 行):仅 4 处无害的宏定义/未使用变量相关误配匹配,无真 实错误。

本轮修改的文件

§7.100 sweep (2026-08-19)

Fixed the corpus-wide inherit ROOM; ... replace_program(ROOM); redundant-replace bug (AGENTS.md §7.100). 262 live occurrences deleted: 261 via scripted sweep (fix_710_room.py), plus 1 hand-fixed roommaker-tool template (obj/roommaker.lpc, simple string-builder variant). 7 already-commented-out instances left untouched. No real .lpc source found under work/data/. Verified via build-debug driver boot: clean compile, port 40020 listening, zero new "cannot replace"/"cannot bind" debug.log lines.

§7.30 uninitialized-mapping accessor sweep (2026-08-20)

Corpus-wide mechanical sweep of the feature/skill.lpc shared-lineage bug (confirmed independently on xiakexing2017/jqxz2015/haiyang2 via round-four testing): 3 accessor(s) in this file returned a raw never-initialized mapping instance variable (defaults to int 0, not ([]), until first assigned), crashing any unguarded keys()/sizeof()/indexing caller for a fresh/untrained character. Fixed at the accessor level (mapp(x) ? x : ([])) per the documented remedy. Verified via lpcc --batch static compile check only (not a live boot) as part of a large mechanical sweep; not individually functionally re-tested live on this lib.

AGENTS.md §7.19 fix: enable_player() reentrancy from init()

feature/command.lpc's enable_player() (wrapper around enable_commands()) was reachable from an NPC's init() (via the shared std/char.lpc setup() chain), and enable_commands() is only safe to call from create() -- calling it again on an object already living() makes the driver re-invoke that same object's init() as a side effect, which recursed back into enable_player() on the same call stack until "Too deep recursion" aborted the boot on a room's first-ever visit. Fixed with a true reentrancy flag (in_enable_player_now, set at entry, cleared before every return), NOT a living()-gated guard -- disable_player() in the same file legitimately re-calls enable_commands() while already living() (sleep/wakeup via cmds/std/sleep.lpc, revive via feature/damage.lpc), which a living() guard would silently break. Verified via lpcc --batch single-file compile check (PASS). Part of the corpus-wide §7.19 sweep (Batch C).

深度功能测试(§10.7,2026-10-04)— negative range ends

scripts/lpc_fix_negative_ranges.py: 5 line(s) in 2 file(s) count a range from the end with < (x[a..-1] -> x[a..<1], x[-2..] -> x[<2..]; KB 06 §7.209). In this driver a negative constant end gave "" / ({ }) and a negative start the whole value, so each of these returned the wrong slice; the compile warning A negative constant as the second element of arr[x..y] is gone from the files that compile. Range lvalues (s[0..-1] = text, the prepend idiom) are left alone. A paired compile of the changed files at HEAD and in the working tree showed no new error.

深度功能测试(§10.7,2026-10-05)— here-document terminators

scripts/lpc_fix_heredoc_terminator.py --all --apply: 1 here-document block(s) repaired (1 with the terminator glued to the last text line, 0 with it indented), so End of file in text block no longer hides the room or object behind them: d/moon/bedroom.lpc. The terminator must start its line (the lexer's own test, KB 04 §6.10); a glued one lost its newline in the GBK -> UTF-8 conversion together with a half character, which stays out.

深度功能测试(§10.7,2026-10-05)— tail() simul_efun

scripts/lpc_add_tail.py --apply: cmds/wiz/tail.lpc calls tail(file), an efun of the MudOS this archive ran on that FluffOS does not have (Undefined function tail: the command did not compile). adm/simul_efun/file.lpc now defines void tail(string file): the last 10 lines of the file, written to the player. Load check (HEAD against the working tree): 1 of the 1 tail command file(s) failed to load at HEAD, all load now, and the simul_efun file loads. KB 04 §6.2.

深度功能测试(§10.7,2026-10-05)— 任务表里的 .c 路径与任务守护进程的防护

scripts/lpc_dynamic_rows.py:d/obj/quest/dynamic_location、d/obj/quest/dynamic_quest 里 263 行写的是原档案的 .c 路径。转档时文件已改名 .lpc,而显式后缀按原样解析,load_object("/d/x.c")、new("/d/obj/quest/x.c") 返回 0 且不报错(KB 03 §4.2,KB 06 §7.220),所以 adm/daemons/questd.lpc 读到的每一行都加载不出来:随机任务和任务物品从未生成,在 create() 里直接对结果调用 tar->set() 的版本还会崩溃,连带加载它的 cron 守护进程和 give 的任务钩子。这些行已改为 .lpc;另有 4 行指向的文件两种后缀都不存在(档案缺内容),保持原样。 scripts/lpc_dynamic_quest_guard.py:1 处 spread_quest() 调用(init_dynamic_quest() 的循环里)包进 catch(),缺失的任务物品或编译不过的房间只跳过那一个任务,守护进程照常加载、其余任务照常生成。 验证:adm/daemons/questd.lpc和 cron 守护进程在新进程里加载(HEAD 一次,工作树三次,选房是随机的):HEAD 通过 1 个,工作树三次分别通过 2、2、2 个(共 2 个),无回退;adm/daemons/questd.lpc 原先加载失败,现在加载成功。

深度功能测试(§10.7,2026-10-05)— 房间列出的物件缺档时房间照常加载

房间基类 std/room.lpc:make_inventory() 用 catch() 包住 new(file),做不出来就返回 0;reset() 的 case 1: 拿到 0 就跳过这一项(if (!objectp(ob[list[i]])) break;)。档案里没有的 NPC 或物品(或 create() 出错的物件)原先会让列出它的房间整个加载失败(Bad argument 1 to environment(),或对 0 的 call_other()),连带这个房间后面的区域;现在房间照常加载,只是少了那个物件,下次 reset() 再试(KB 05 §7.25;scripts/lpc_resilient_room.py、scripts/lpc_room_reset_guard.py)。 验证:探针(scripts/lpc_room_reset_probe.py:房间基类列出一个不存在的物件,再调用 reset())HEAD 单件 崩溃、多件 崩溃,工作树 单件 OK、多件 OK。

深度功能测试(§10.7,2026-10-07)— 编译警告整理

scripts/lpc_warnings.py rzrmud --fix 加 scripts/lpc_fix_no_effect.py --apply:无用局部变量、varargs、转义等,共改动 932 个 .lpc 和若干 .h;d/dntg/doushuai/bgl1.lpc、u/canoe/yaoguai.lpc 的 for (n == 0; ...) 改成 =,两份 xuanyuan-archery.lpc 删去什么也不做的 (: throw_weapon :);,dns_master.lpc 把 #if PREF_* & SVC_TCP 移到 if 外面。 HEAD 与工作树分别加载(新进程):910 -> 910 通过,无回退;改过的头文件的 372 个包含者 358 -> 358 通过。d/city/npc/vikee.canoe.lpc 把 case 写成 cast,是没人引用的旧副本,未动。

启动时警告 98 -> 0;新进程登录正常。

深度功能测试(§10.7,2026-10-08)— .lpc 后缀的定宽切片

.c 改名 .lpc 时只改了字符串没改切片宽度:f[<2..] == ".lpc" 拿两个字符比四个字符,永远不成立(!= 永远成立),按后缀筛文件、去后缀的代码因此从不运行或截成 x.l(KB 06 §7.238)。scripts/lpc_lpc_suffix_slice.py --apply 改了 1 处比较、0 处去后缀(如 cmds/usr/cskill.lpc);改动的文件 HEAD 与工作树分别加载(新进程),无回退。

深度功能测试(§10.7,2026-10-12):vikee.canoe.lpc

深度功能测试(§10.7,2026-10-12):编译警告收尾

可编译文件中的编译警告 95 → 0(剩下 2 条在 u/vikee/10.10/score.lpc 及其 d/penglai/_._/ 副本里,这两个文件后半截每行末字符丢失,本身编译不过,不在范围内)。不加 pragma,逐条在源头修;与 shenmo 同日第二轮的同名文件用 lpc_twin_port.py 搬过来(7 个文件逐 token 相同),其余手改。

发现的真 bug:

其余:

改动的文件、引用改动头文件的文件与 include quest_* 的 NPC 共 153 个对象,HEAD 与工作树各载入一次:HEAD PASS 82,tree PASS 82,regress 0;FAIL 两边相同,都是 include 片段(quest*.lpc)或 npc/old/ 旧稿。lpc_audit_removed_locals.py 0 处待看。

转码吃掉的引号(2026-10-15,KB 03)

原档在右引号前有一个孤立的 GBK 前导字节,转 UTF-8 时连引号一起丢了(如 return name + HIM "发作身亡了;),字符串一直延续到后面,文件编译失败:/d/obj/books-nonskill/hmeng014。补回引号(scripts/lpc_fix_eaten_quote.py)。

空手使用兵器绝招(2026-10-15,KB 06 §7.246)

perform 指令允许直接点名招式(如 perform stick.ban),这些绝招读了 me->query_temp("weapon") 却从不检查,空手时 weapon->name() 报错(有的已先扣了内力)。在赋值后补 if (!objectp(weapon)) return notify_fail("你必须手持兵器才能使用这一招。\n");(scripts/lpc_fix_perform_weapon.py):yange-blade/dmyg、yueya-chan/feicha。

技能名拼错(2026-10-15,KB 06 §7.249)

query_skill() 里的技能名拼错了,或用的是本库改名前的旧名;本库没有这个技能,调用永远得 0:门槛(< N 就拒绝)永远过不去,相关功夫或绝招学不了、用不了;内功互斥(> N 就拒绝)从不生效;公式里这一项一直是 0。经汉字名(提示文字或中文名词典)或纯拼写差异(_/-、少一个连字符、相邻字母颠倒)核对后,改为本库的技能名(scripts/lpc_fix_skill_typo.py):sanqin-jiang→sanqing-jian(/daemon/class/zhenyuan/sanqing-jian/sanqing)。

用兵器的绝招空手施展时报错(内联写法)(2026-10-15,KB 06 §7.246)

绝招不存兵器变量,直接写 (me->query_temp("weapon"))->query("name")(或在拒绝判断里写 (weapon = me->query_temp("weapon"))->query("skill_type")),之前又没检查兵器:空手 perform 时报 Bad argument 1 to EFUN call_other(),内力等往往已经扣掉。在第一次用到它的那条语句前补上“你必须手持兵器才能使用这一招”的拒绝(scripts/lpc_fix_perform_weapon.py):liangyi-sword/yin。

NPC 带着本库没有的物品,载入失败(2026-10-15,KB 06 §7.73)

10 个文件、12 处在 create() 里 carry_object("<本库没有的文件>")->wear()(或 wield()、set_amount()),多是从别的系统搬来的 NPC 用了原系统的物品路径(最常见:/d/obj/cloth/cloth、/d/obj/weapon/staff/tc_staff、/d/city/npc/obj/changqiang)。本库 NPC 基类 std/char/npc.lpc 的 carry_object() 第一句是 if (file->query_unique()),对不存在的文件直接 call_other,驱动在这里报 call_other() couldn't find object,new() 来不及返回 0,所以只要 NPC 带着一件本库没有的物品就载入不了(调用处加判断对它无效)。在它前面补 if (!objectp(load_object(file))) return 0;(--base),缺的物品就跳过,NPC 照常载入;上面那些调用处同样改成带判断的块(基类以后改回去也不怕)。载入检查:改动的文件改前能载入 1 个,改后 9 个(8 个原来载入不了),没有退步;其余 2 个另有原因(多为 set_skill() 了本库没有的武功)。

去掉的预定义宏 SAVE_EXTENSION(2026-10-18,KB 04 §6.11)

老版 MudOS 给每个 LPC 对象预先定义了 SAVE_EXTENSION(".o");FluffOS 的 ChangeLog(COMPAT_BUSTER 一条)把它删了,改用 __SAVE_EXTENSION__。本库没有自己 #define 这个宏,用到它的文件一律 Undefined variable 'SAVE_EXTENSION',整个对象载入不了。改成 __SAVE_EXTENSION__(scripts/lpc_fix_predefined_macro.py):adm/daemons/network/netmail.lpc。netmail 是网络邮件守护进程(本库缺 mailer.h 等头文件,改后仍载入不了)。改后用 lpcc 逐个载入这些对象:0 个通过,1 个还有别的错误(adm/daemons/network/netmail:/adm/daemons/network/netmail.lpc:17: error: Cannot #include mailer.h)。

蓬莱三星的 ref() 是保留字(2026-10-18,KB 04 §6.14)

福星、禄星、寿星(d/penglai/npc/)里有一个函数叫 int ref (),call_out("ref", 20) 去调它;ref 在 FluffOS 里是关键字(引用),unexpected L_REF,三个 NPC 都载入不了。函数和 call_out 都改叫 reff(本系里 dtxyzjb、zitengzhan 早就这么改,call_out 却没跟着改):d/penglai/npc/luxing.lpc、d/penglai/npc/shouxing.lpc。改后载入:2/2 通过。

d/moon/obj/poem 两句诗丢了收尾的引号(2026-10-18,KB 03 §4.6)

string *poem 数组里 "不放玉花飞堕地,留在广寒宫阙。, 和 "把酒送春春不语,黄昏却下潇潇雨。, 的收尾引号没了(转码时跟半个汉字一起丢了),下一行的开引号把字符串合上,后面的诗句成了代码:Illegal character 0xe6,整个物件载入不了。补回 ",。载入:通过。

d/shendian/obj/niepan 的收尾引号变成了私用字符(2026-10-18,KB 03 §4.6)

set("long", HIR"……五种符号<U+E4D4>NOR); 里本该是 " 的位置是一个私用区字符(转码时半个汉字加引号被换成了它),Illegal character 0xee,整个物件载入不了。换回 "。载入:通过。

set_skill() 遇到本库没有文件的武功不再抛错(2026-10-18,KB 06 §7.256)

feature/skill.lpc 里的 set_skill()、map_skill()、prepare_skill() 碰到没有武功文件的名字就 error("F_SKILL: No such skill (…)"),调用它们的 NPC create() 整个中断:NPC 载入不了,刷出它的房间也少一个人。本库有 6 个对象设了本库没有文件的武功(8 个名字,最多的是 jinlong-strike、jinwu-blade、chanting)。三处都改成 return:这一门武功不给、不映射,对象照常载入,只是少了它(缺的武功本身仍是内容缺口)。抽样载入这些对象:6 个里 5 个通过,其余 1 个停在别的错误上(d/menggu/npc/long1:*Inherited file '/d/newguai/snowtu/npc/super_npc' does not exist!)。(scripts/lpc_guard_set_skill.py)

补回本库没有的基类文件(2026-10-18,KB 04 §6.15)

下面这些基类本库没有,继承它们的对象(房间、NPC、物品)整批载入不了(inherit XXX; 的宏没定义,或者 inherit "/std/…"; 的文件不在)。同系的库里有同名文件,两库有大量逐字节相同的文件(亲缘关系),所以从那边原样拷来,缺的宏补进全局头文件 include/globals.h:/std/weapon/unarmed(宏 UNARMED)←sjsh,2 个对象继承它,抽样 2/2 载入。每个基类补回后单独载入、再抽样载入使用它的对象,基类载不进来或者一个用户也载不进来的就撤掉(本库撤掉了它们,不再补)。(scripts/lpc_restore_bases.py)

武功名拼错的 NPC(2026-10-19,KB 06 §7.258)

set_skill("kunlun-shnfa", …)、map_skill("dodge", "shaolin-shnfa") 这样的调用把武功名拼错了:本库没有这个武功文件,有的是拼对的那个。以前这种 NPC 在 create() 里报 No such skill 载入不了;武功缺失时跳过之后它们能载入,可是少了那门武功(set_skill 被跳过,map_skill 映射不到,门派弟子用普通轻功/拳脚)。按核对过的对照表改正,共 14 处、14 个文件:dagonforce→dragonforce(4 处)、lahua-shou→lanhua-shou(3 处)、hellfire_whip→hellfire-whip(2 处)、dragon-step→dragonstep(2 处)、yange_blade→yange-blade(1 处)、changqaun→changquan(1 处)、cuixi-zhang→cuixin-zhang(1 处)。(scripts/lpc_fix_skill_names.py)

调用了父类没有的函数的对象(2026-10-19,KB 06 §7.259)

::create();、::init();、return ::buy_object(who, item); 这类调用写的是父类里有这个函数的版本;本库的父类没有,旧驱动把它当空操作(返回 0),现在的驱动在编译时就报 Unable to find the inherited function,整个对象载入不了。单独成句的调用删掉,return ::f(...) 改成 return 0;(void 函数里是 return;),与旧驱动的行为一致。共 1 处、1 个文件:::buy_object()(1 处)。只改了出错原因全是这一类的文件;还带着别的错误(多半是父类本身没了)的文件没动,等父类补回后再看。(scripts/lpc_fix_dangling_super.py)

武功基类缺少 NewRandom()(2026-10-19,KB 06 §7.261)

基本武功(boxing、houquan、westsword、taiji-quan 等)用 action[NewRandom(i, 20, level/5)] 挑招式;NewRandom() 和它调用的 sum() 在别的库的武功基类里有,本库的 /std/skill.lpc 是更精简的版本,没有,于是这些武功全都报 Undefined function NewRandom 编译不过,有这门武功的人物只能空手。把这一对函数(115 个库共用的同一份文字)补进武功基类,受益武功 6 个:/daemon/skill/boxing.lpc、/daemon/skill/houquan.lpc、/daemon/skill/taiji-quan.lpc、/daemon/skill/westsword.lpc。(scripts/lpc_restore_skill_helpers.py)

全局头文件丢了 1 个宏(2026-10-19,KB 04 §6.16)

/include/globals.h 里没有定义 NPC_D,用到它们的物件(名单里 1 个)编译时报 Undefined variable/Undefined function,整个物件载入不了(编译器在第一个未定义的名字上停下,后面的错误和警告都看不到)。同系的库在各自的头文件里都有这几行:照其中和本库共有文件最多的那个库,原样补到 /include/globals.h 最后一个 #define 之后,宏体里出现的路径在本库里都存在。名单里的物件除了这几个宏之外还有别的错误,暂时仍载入不了。(scripts/lpc_restore_defines.py)

出口指向不存在的房间(2026-10-19,KB 06 §7.257)

下列房间的出口写的文件不存在,而对面恰好只有一个房间的出口指回本房间,所以按对面的房间改正(笔误、大小写、路径少了一级):

改后房间照常载入(与 HEAD 逐个对比,没有退步),出口现在指向存在的房间。

RANK_D 对 0 的称呼(2026-10-19,KB 06 §7.273)

adm/daemons/rankd.lpc 的 query_respect()、query_rude()、query_self()、query_self_rude() 里 4 个函数开头补上 if (!objectp(ob)) ob = this_object();。NPC 在 create() 里写 "…" + RANK_D->query_respect(this_player()) + "…"(inquiry 对话、chat_msg),驱动自己跑 reset() 时没有人在场,this_player() 是 0。旧驱动里 0->query("age") 返回 0,称呼走默认分支;新驱动直接报 Bad argument 1 to EFUN call_other(),房间的 make_inventory() 吞掉错误,被打死的 NPC 再也刷新不回来。用 scripts/lpc_reach_census.py --walk 找到(xkx100 的武当弟子、一灯、汴梁书生…);修在守护程序里,不动 1,800 个 NPC 文件。

补回丢失的标点(2026-10-19,KB 03 §4.6)

转换时丢掉的分号、逗号、引号或文件末尾的 },共 1 个文件,修前 HEAD 载入失败。别的库里同路径的完好副本只比这里少几个标点,按它补回(括号里是那个库):/d/jz/npc/jiang.lpc(dtxyzjb)。修后与 HEAD 逐个对比载入:这 1 个物件全部载入,没有退步(scripts/lpc_restore_from_twin.py、lpc_fix_eaten_quote.py --comma、lpc_fix_eof_braces.py)。

旧驱动的类型宽松:缺省参数、无类型形参、数组初始化、class 变量(2026-10-19,KB 04 §6.19、§6.20)

原来的 MudOS 把调用少传的参数补 0、把没写类型的形参当 mixed、不检查变量的声明类型与初始值,也允许变量叫 class;这个驱动在编译时全部拒绝,整个物件载入失败。修了 1 个文件:/daemon/class/fuqiperform/perform.lpc(scripts/lpc_round_files.py 的修复轮:调用处补写 0、无类型形参补 mixed、string X = ({...}) 补星号、void 函数的返回值,以及 class 变量改名 pick_class)。逐个文件在 HEAD 和改后载入对比:这些文件里 1 个原来载入失败、现在载入,没有退步。

x != "a" || x != "b" 和 x == "a" && x == "b":同一个值的比较链永远成立/永远不成立(2026-10-20,KB 06 §7.282)

if (arg != "wan" || arg != "丸") return notify_fail(...) 对任何 arg 都为真,dir == "south" && dir == "north" 永远为假:条件下面的守卫要么永远拦、要么永远不拦。作者要的是“既不是 A 也不是 B”(&&)或“是 A 或 B”(||)。!= 链的 || 改成 &&(仅当条件下面是 return 的拒绝/守卫),== 链的 && 改成 ||(scripts/lpc_fix_cmp_chain.py)。改动:/d/liandan/baihuagu.h(1 处)。

member_array('/', str) 改为 strsrch(str, "/"):字符字面量的 member_array 按字节搜索(2026-10-20,KB 06 §7.283)

member_array('/', str) 里的 '/' 是整数,驱动按 UTF-8 字节搜索,返回字节偏移(带第三个参数时起点也是字节);最新的 FluffOS(923cdbc0)在字符串里有非 ASCII 文字时,对每个调用点警告一次(Warning: member_array(int, string) searches BYTES)。而 str[0..idx-1] 按字符切,中文字符串会在错误的位置截断。改为 strsrch(str, "/")(找不到同样返回 -1,按字符计数;scripts/lpc_fix_member_array_char.py,JSON 编码器等少数几处手改)。改动:/adm/daemons/vrm_server.lpc(1 处)。

call_out_info() 的每一项只有 3 个元素(2026-10-20,KB 06 §7.287)

驱动返回的是 ({ 物件, 函数, 延迟 }),不带 call_out 的参数,旧代码读第 4 项 info[i][3](callouts 指令、calloutd、cod 工具)一读就报 Array index out of bounds,指令从第一行起什么也打印不出来。改为 (sizeof(info[i]) > 3 ? info[i][3] : 0)(scripts/lpc_fix_callout_info.py)。改动:/cmds/wiz/callouts.lpc(1 处)。

if (x = 常量):条件里写成赋值的比较(2026-10-20,KB 06 §7.290)

if (arg = "button" || arg = "按钮")、if (!arg || arg = "") return 0;、else if (check = 0 && tempB != ""):把 == 写成了 =,条件的值就是那个常量,分支对所有非零数和任何字符串(连 "" 都算)永远成立、对 0 永远不成立,变量还被覆盖;驱动对此没有任何警告。每一处 = 改成 ==(scripts/lpc_fix_cond_assign.py,共 5 处)。改动:/cmds/wiz/dns.lpc(1 处)、/d/shendian/babu/obj/longzhua.lpc(4 处)。

callouts:sizeof(info[i]) == 4 把每一行都挡掉了(2026-10-20,KB 06 §7.287)

驱动的 call_out_info() 每项只有 3 个元素,输出行前的守卫 if (sizeof(info[i]) == 4) 永远不成立,指令只打印表头。改为 >= 3。改动:/cmds/wiz/callouts.lpc(1 处)。

socket / dumpsocket 指令:dump_socket_status() 驱动里没有(2026-10-20,KB 06 §7.291)

这些巫师指令 write(dump_socket_status());,MudOS 的 efun 在 FluffOS 里不存在,指令编译不过。在模拟 efun 文件里补了 dump_socket_status():用 socket_status() 排出同样的表(没有 sockets 包的构建,比如 WASM,只有表头;scripts/lpc_add_sefun.py dump_socket_status)。

登录密码超过 255 字节:crypt() 抛错(2026-10-20,KB 06 §7.294)

驱动的 crypt() 对超过 255 字节的密钥直接报错(Error in crypt(), check your salt),老驱动则按任意长度散列。在登录提示符下输入 256 字节以上的密码,密码检查那一行就抛错,连线停在一个裸的 > 提示符上,登录走不完(password 指令的旧密码检查同样);用 300 个 x 当参数的扫描发现的。/adm/obj/simul_efun.lpc 里补了一个同名的 simul_efun crypt(key, salt):只有超长的密钥才被截短(先截到 255 个字符,再逐字符截到 sizeof(to_buffer(key)) <= 255,限制按字节算,一个汉字占三个字节),再交给 efun::crypt();普通密码原样散列,已存的密码散列不受影响(scripts/lpc_add_sefun.py crypt)。

翻页器 start_more(read_file(...)):文件缺失时 explode(0)(2026-10-20,KB 06 §7.300)

东方故事系的翻页器 void start_more(string msg) { ... explode(msg, "\n") ... } 被这样调用:start_more(read_file(HELP_DIR + "help/topics"))、start_more(read_file(NEWS))。压缩包没带的文件使 read_file() 回 0,explode(0, ...) 在本驱动里报 Bad argument 1 to explode()(不带参数的 help 指令就是这样出错的),老驱动把 0 当空文本。在 start_more 开头加了 if (!stringp(msg)) return;(scripts/lpc_fix_start_more.py)。改动:/feature/more.lpc。

NPC 的 chat() 在 chat_msg 为空数组时下标越界(2026-10-21,KB 06 §7.334)

NPC 基类的 chat() 是 if (arrayp(msg = query(...))) { if (random(100) < chance) { rnd = random(sizeof(msg)); if (stringp(msg[rnd])) ...,不检查列表是否为空。本库现有的 NPC 文件里没有字面写成空 chat_msg 的(扫描只认 set("chat_msg", ({ })));守卫挡的是运行时才为空的列表和以后新增的 NPC。在 random(100) < chance 前面加 sizeof(msg) &&(scripts/lpc_fix_chat_empty.py;if (random(100) > chance) return 0; 的写法是 !sizeof(msg) ||)。改动:/obj/npc/smartnpc.lpc、/std/char/npc.lpc、/u/kugu/std/char/npc.lpc(共 3 个文件)。

巫师命令不带参数时对 0 调用 efun(2026-10-21,KB 06 §7.336)

巫师(管理员)把命令敲成不带参数时,驱动把 0 传给字符串参数;下面的命令第一句就把这个 0 交给 efun,运行时报 Bad argument 1 to ...,这条指令从来没有用过。用 scripts/lpcc_bare.py 不登录、在一次 lpcc 求值里以 0 调用 main() 逐个确认后,由 scripts/lpc_fix_bare_arg.py 在第一处使用参数的语句前加守卫:文件自带 int help(object me) 的,守卫是 if (!arg) return help(me);(help() 定义在 main() 之后的 2 个文件补了原型 int help(object me);,否则编译报 Undefined function help);没有 help() 的是 return notify_fail("…\n");。改动(4 个文件,括号里是接住 0 的 efun):/cmds/adm/admove.lpc(present)、/cmds/adm/baiban.lpc(sscanf)、/cmds/adm/dumpprog.lpc(new)、/cmds/wiz/call.lpc(replace_string)。加载检查 HEAD 与工作树对照,没有退步。

拼错的 call_out() / input_to() 目标(KB 06 §7.349,2026-10-21)

计时器或输入提示给驱动的函数名和文件里定义的差一个字母;驱动对不存在的函数静默不理,所以对应的计时从来没有触发过。调用和配套的 remove_call_out() 改成已定义的拼法:find_seal:disapprear → disappear(法术产生的封印十分钟后从不消失)。改动:/d/jjf/obj/find_seal.lpc。

注册到不存在函数的 add_action(2026-10-21,KB 06 §7.349)

add_action("函数", "动词") 绑定的函数,在对象本身、它包含的头文件、它继承的父类和继承它的子类里都没有定义(scripts/lpc_scan_callout_targets.py 静态解析,子类用传递闭包复核,scripts/lpc_verify_handlers.py 运行时 function_exists() 复核)。驱动从玩家最新的一条动作往回找,遇到这样的句子就报 *Function for verb 'drop' not found.,同一个动词的其他处理函数不再尝试(不是最新的一条就悄悄跳过)。删除了 17 条注册(10 个文件,scripts/lpc_fix_dead_add_action.py),动词留给别的处理函数:/d/changan/pinqiting.lpc(do_pass、do_resign)、/d/city/npc/duguoyin.lpc(do_vendor_list)、/d/eastway/npc/petboss.lpc(do_cost、do_list、do_upgrade)、/d/pansi/npc/qingxia.lpc(do_yes)、/d/qujing/jisaiguo/obj/luche.lpc(do_get、do_put)、/d/qujing/wudidong/cave2.lpc(do_push)、/d/zhuxian/npc/guard.lpc(do_bian)、/d/zhuxian/npc/guard1.lpc(do_bian)、/pet/pet.lpc(do_gongji)、/pet/petboss.lpc(do_cost、do_list、do_upgrade)。最多的函数名:do_cost 2 处、do_list 2 处、do_upgrade 2 处、do_push 2 处、do_bian 2 处。

调用了、但这个库自己的守护进程里没有的函数(2026-10-22,KB 06 §7.354)

MACRO->函数() 调用的函数在这个库的守护进程里不存在:call_other() 对不存在的函数不报错、只返回 0,所以这些功能(时间显示、昼夜事件、名字检查、价格文字……)一直没起作用。同一血统另一个库的同名守护进程里有这些函数,原文照抄到本库守护进程末尾(scripts/lpc_port_function.py;调用处传的参数个数、函数体用到的函数 / 全局变量 / 宏 / 字符串键都在本库里有,已核对;守护进程在 HEAD 和工作区都能加载,每个函数用固定参数各调用一次:HEAD 返回 0,现在返回正常的值):/adm/daemons/chinesed.lpc ← aoxiangtianji:chinese_month()(1 处调用)。

(: 函数 :) 指针指向对象自己没有定义的函数(2026-10-22,KB 06 §7.355)

item_desc / inquiry / chat_msg_combat 里的 (: 函数名 :) 指向本对象(含包含文件、继承的父类)没有函数体的函数:编译不报错,用到时驱动报 *Undefined lfun pointer called: 函数名(look 某物、ask NPC about 话题 直接出错,战斗 / 闲聊里的指针在 NPC 的 chat() 里出错,这一拍心跳的后半段被跳过)。scripts/lpc_scan_callout_targets.py --kinds=lfun。 还剩 2 个函数没有补(inquiry 1, chat_msg_combat 1):原型还在函数体丢了、或者根本没写过,没有可以直接补回的捐赠(别的库同一路径的文件里没有这个函数,或者它还要用本库没有的辅助函数、签名不同),不编造:/d/death/npc/yanluowang.lpc:ask_cancel、/d/xueshan/obj/hufabird.lpc:saysth。

运行期目录 log/nosave 不存在,写日志的 write_file() 直接报错(2026-10-22,KB 03 §4.3 补充)

这个库的 22 个文件里有 34 处 write_file("/log/nosave/...") / log_file("nosave/...")(static 改 nosave 时连字符串里的日志路径一起改了,原来是 log/static/):nosave/CRASHES、nosave/PURGE、nosave/NEWBIEGIFT 等。压缩包和站点包里没有这个目录,write_file() 在目录不存在时抛 *Wrong permissions for opening file /log/nosave/... for append. "No such file or directory",调用它的函数(杀人记录、重启记录、call 日志……)当场中断。把 log/nosave 记进 scripts/wasm_keep_dirs.txt(站点和 pristine 树都按它建空目录);没有把字符串改回 static。证明(scripts/lpcc_eval.py,catch(write_file("/log/nosave/ZZTEST", ...)),fqyy2 / hy5 / bmxkx2001 的新进程):补目录前报上面的错误,补后写成功。

读不到的留言板:"/clone/board/x"->foo(); 在 create() 里报错(2026-10-22,KB 06 §7.357)

xkx 系的房间在 setup() 之后写 "/clone/board/gaibang_r"->foo(); 来加载留言板(foo() 本来就没有定义,只为了触发加载)。这个库没有这个文件,call_other() 报 *call_other() couldn't find object '/clone/board/gaibang_r',对象留在内存里、load_object() 却抛错:玩家第一次走进房间就看到错误,写在 create() 中间的还会切掉后半段。scripts/lpc_fix_missing_foo.py 把 2 条单独成行的语句(/obj/board/xy_b;/d/g_quest/target/gumu.lpc、/d/target/gumu.lpc)注释掉并写明原因(别的房间里同样的语句本来就是作者自己注释掉的)。证明和 45 个库的整体加载检查见 KB 06 §7.357。

(: 函数名 :) 指针指向本库没有的函数:只含这个指针的行加了注释(2026-10-22,KB 06 §7.355 补充)

inquiry / item_desc / chat_msg* 里的 (: 函数名 :) 指向本对象(含包含文件、继承的父类)没有函数体的函数:用到时(ask、look、NPC 闲聊)驱动抛 *Undefined lfun pointer called: 函数名,这一拍心跳的后半段被跳过。这些函数没有可以补回的来源(别的库同一路径的文件里没有,或者它还要用本库没有的东西),所以 2 个文件里 2 行只含这个指针的行("cancel": (: ask_cancel :), (: saysth :),)加了注释,原文保留并写明原因,这一项当作没有这个话题 / 物品 / 闲聊条目(scripts/lpc_fix_dangling_lfun.py;#include 的文件在库里缺失的对象、指针不在整行上的写法没动)。 前提(function_exists())和加载检查(HEAD 与工作区对比,本库改动的 .lpc 文件)的结果见 KB 06 §7.355:没有一个回归。

汉字按字节切片的老写法没有换成按字符:改法名 "澄" + name[2..3]、辈分判断 name[0..1] == "澄" 等 3 处(2026-10-22,KB 06 §7.360)

原档按字节算字符串区间(一个汉字 2 字节):name[2..3] 是名字的第二个字,name[0..1] == "澄" 问名字是不是以「澄」开头。转成 UTF-8 之后,这个驱动的区间和 strlen() 都按字符算(strlen("澄观") 是 2,"澄观"[0..1] 是两个字),老算术原样留着、意思全变:拜入少林 / 武当 / 峨嵋等派的玩家被改成错误的法名(二字名 张三 变成一个字的 澄,更长的名字取到第三个字)。

本库 3 处(2 个文件):拼名字的赋值 3 处。例:name[0..1] → name[0..0](/d/nanhai/npc/master.lpc:104)。scripts/lpc_fix_gbk_slice.py 把下标按字符重算(社区的 UTF-8 版 xkx100utf8 里就是同样的写法,作对照);没有改的:截断(name = name[0..7],现在最多 8 个字,只是放宽)、ASCII 的区间(fname[0..3] == "room"、ctime(time())[4..19])和上下文看不出是汉字的区间。证明(scripts/lpcc_eval.py,bixiecanyang;其余各库是同一份文本):让澄字辈掌门 attempt_apprentice() 一个名叫「张三」的访客,HEAD 的法名是 慧,改后是 慧三;抽样 28 个库的 HEAD / 工作树加载对比 0 退步。工具不幂等([0..3] 折半得 [0..1],又是对齐区间),改过的文件记在 scripts/gbk_slice_converted.txt,不要重跑。

长度检查按字节写,旁边的提示按汉字写:4 处(2026-10-22,KB 06 §7.362)

老档的 strlen() 数字节(一个汉字 2 字节),转成 UTF-8 后它数字符:提示写「必须是 2 到 6 个中文字」的检查还是 strlen(name) < 4 || strlen(name) > 12,于是两三个字的房名、帮会名、群名、聊天室名、称号被提示自己说允许的那句话拒绝,上限却是提示的两倍;留言板的标题检查 i < 4 || i > 24 || i % 2 还会拒绝所有奇数个字的标题(post 你好吗)。本库 4 处(2 个文件):if ((strlen(name) < 4) || (strlen(name) > 16)) {(/d/city/npc/huangfeihong.lpc:49);if ((strlen(name) < 2) || (strlen(name) > 12)) {(/d/city/npc/zhangsunwuji.lpc:166)。scripts/lpc_fix_strlen_gate.py 以提示为准:条件里每个 strlen 门槛都恰是提示所说数字的两倍才折半,存长度的变量(i = strlen(arg);)的门槛和 || i % 2 奇偶项、其后循环的 i % 2 == 0 && 一并处理;提示里有英文 / 字母 / 字节的不动。证明(scripts/lpcc_eval.py,bxsj 的留言板,求值对象继承 NPC 并重写 edit() 记录调用,command("post 标题")):HEAD 拒绝「你好」和「你好吗」、放行 23 个字的标题;改后接受前两个、拒绝第三个;shenmo 的 named.lpc invalid_new_name("张三"):HEAD 回 名字只能是2-4个中文字。,改后回 0。抽样 24 + 15 个库的 HEAD / 工作树加载对比 0 退步。

按字节写的汉字循环、茶馆猜诗和同盟频道标题(2026-10-23,KB 06 §7.363)

老档按字节做「一个汉字」:while (i--) if (i % 2 == 0 && !is_chinese(name[i..<0])) 只检查偶数下标,奇数位上的拉丁字母(张a)会过;茶馆猜诗 mixup() 用 strlen(str)/2 再 j=j+j、str[k..k+1] 交换两字节;泥潭系 channeld 的 switch (strlen(fname)) case 4/6/8/10 和 strlen(family)==4/6 按字节长度给同盟 / 门派名加空格。本驱动的 strlen() 和区间都按字符算。scripts/lpc_fix_byte_char.py:去掉奇偶项、把区间改成 name[i..i],按字符重写 mixup() 并把 strlen(first)>=14 折成 7,频道标题的 case / 门派长度改成字符数(对照 aoxiangtianji)。本库 汉字循环 / is_chinese 区间 23 个文件;茶馆猜诗 mixup 1 个文件。证明(scripts/lpcc_eval.py):sjplii 的 check_legal_name 在 HEAD 接受「张a」、改后拒绝,两边都接受「张三」;xkx100 的 clubpoem->mixup("离离原上草") 得到「离离原草上」(真交换汉字);nitan_san 两字同盟名得到 【 兄 弟 】。关键对象加载通过。

黑风山 pusa1 用未声明的 ob 且函数外残留 call_out(2026-10-27,KB 06 §7.348 Also)

d/qujing/heifeng/npc/pusa1.lpc 的 announce_success(object who) 写成 if (!ob->query("obstacle/hf"))(Undefined variable 'ob'),同目录 pusa.lpc 是 who->query("obstacle/hf") == "done";who->save(); } 之后还残留 call_out("die"...); return; },落在函数外(unexpected L_STRING),对象无程序。改成与 pusa 相同的门,并删掉残留语句。证明:HEAD 加载失败;改后加载成功。

雪山 obj/hufabird set_level 缺 }(2026-10-27,KB 04 §6.28 Also)

d/xueshan/obj/hufabird.lpc 的 set_level 在 setup(); 后少了一个 },后面的 int heal_up() / leave / invocation / die 都嵌进了 set_level(unexpected '('),对象无程序;同目录 npc/hufabird.lpc 正常关闭。顺带:messege_vision→message_vision,return : die()→return ::die(),以及无 saysth 的 (: saysth :) 按 7.355 注释掉。证明:HEAD 加载失败;改后加载成功。

洗衣盆 is_container 映射缺值编不过(2026-10-27,KB 04 §6.28 Also)

d/gao/obj/pen.lpc(或 d/qujing/gao/obj/pen)的 is_container() 写成 set("objects", ([ "/u/bula/gao/obj/kaoji" ]));:映射只有键没有值(unexpected ']'),对象无程序。同族 hy5 / xyj2000 已把该函数注释掉。改成标准的 return 1;。证明:HEAD 加载失败;改后加载成功。

月宫 quest/road 模板缺 index(2026-10-27,KB 06 §7.348 Also)

d/moon/quest/road.lpc(及误放在 npc/road.lpc 的副本)出口写 sprintf("%d", index ± 1),却没有像 road1…road10 那样声明 int index = N;(Undefined variable 'index'),对象无程序。补上 int index = 5;(中间段,东西出口都能落到已有房间)。证明:HEAD 加载失败;改后加载成功。

星君/罗汉模板缺 ID 宏(2026-10-27,KB 06 §7.348 Also)

d/dntg/sky/stars/star.lpc 与 d/nanhai/luohan/npc/luohan.lpc 用 title[ID] / first_name[ID],真正带号的副本是 #define ID N 再 #include 本文件;单独编译模板时 Undefined variable 'ID'。加 #ifndef ID / #define ID 0 / #endif,带号 include 仍用各自的 N。证明:HEAD 模板加载失败;改后模板与 stars/5、luohan5 均加载成功。

雷神 check 在 stop_fight 定义之前调用且 call_out 缺逗号(2026-10-27,KB 04 §6.28 Also)

d/qujing/start/24/1.lpc 的 check() 里调用 stop_fight(who),函数却写在后面(Undefined function stop_fight);call_out("lost", 1 who) 少了逗号(unexpected L_DEFINED_NAME)。把 stop_fight 挪到 check 之前,并改成 call_out("lost", 1, who)。证明:HEAD 加载失败;改后加载成功。

玉皇 yuhuang1 去引号无法加载(2026-10-27,KB 04 §6.25 Also)

d/dntg/sky/npc/yuhuang1.lpc:字符串与路径几乎全部丢掉引号(set_name(玉皇大帝,…)、carry_object(/d/obj/cloth/mangpao)、setup() 后无 ;),下一句 int promote_me() 成语法错误。同目录手足 yuhuang.lpc 完好;用本库 yuhuang 字节覆盖 yuhuang1。证明:HEAD 加载失败;改后加载成功。

悬空 ::init / unique::init(2026-10-27,KB 06 §7.259 Also)

kugu-1/2/3、kunxian-suo 写 ::init();,tianyi 写 unique::init();,而 F_UNIQUE / ITEM / feature/unique 没有 init;本驱动编译报 Unable to find the inherited function 'init'(tianyi 带 in file 'unique'),物件无法加载。老驱动把空父调用当返回 0。lpc_fix_dangling_super.py 删掉这些语句;cloth::init() 保留。证明:HEAD 加载失败;改后加载成功。

dami 误调 init_unarmed(2026-10-27,KB 04 §6.25 Also)

d/obj/food/dami.lpc 继承 ITEM+F_FOOD 却调用 init_unarmed(5)(并 #include <weapon.h>),未继承空手兵器基类,驱动报 Undefined function init_unarmed。手足 hymud 已注释该行。删掉该调用与无用的 weapon 头。证明:HEAD 加载失败;改后加载成功。

深度功能测试(2026-10-27,§6.25 tell_object 参数顺序)

tell_object("…", me/who) 参数颠倒(消息当对象);改为 tell_object(me/who, "…")(guest.lpc)。证明:残渣 0;抽样 guest/rukou/forest_c 加载。

深度功能测试(2026-10-27,§6.25 tell_object 缺 me(自动放弃/愿否))

一参 tell_object("…") 在已有 me 时改为 tell_object(me, "…")(city.lpc)。证明:抽样 city / xiaolongnv 加载。

深度功能测试(2026-10-27,§6.25 tell_object 路径当房间)

tell_object("/…", …) → tell_room(load_object("/…"), …)(去掉 .lpc)。

深度功能测试(2026-10-27,§6.25 one-arg message_vision)

message_vision("…") 补第二参(me / TP / this_player())。

深度功能测试(2026-10-27,§6.10 未知 pragma save_binary/optimize)

删除本库中 FluffOS 不认的 #pragma save_binary / #pragma optimize… 行。