Star War Hero

✅ 可玩

星战英雄

xzyx

🔑 fluffos / Mud@2026 更新 85d6a35 2026-09-02 源码 下载 ZIP

▶ 开始游玩 · Play Now

本游戏全名《乱世风沙之星战英雄》,属于早期国产 MudOS(xkx 系)派生的武侠 Mud。虽然名字听起来像科幻题材,实际是一款以江湖门派、内功外功为核心玩法的传统武侠 Mud,"星战"只是原作者取的一个响亮站名,与太空战争无关。

English

The game's full title is "Sands of a Turbulent World: Star War Hero," an early domestic MudOS title in the "xkx" lineage. Despite the sci-fi-sounding name, it's actually a traditional wuxia MUD built around jianghu sects and internal/external martial cultivation — "Star War" was simply a catchy name chosen by the original author, with no connection to space warfare. New characters start in a "Recruit Camp" and pick one of four founding factions with deliberately sci-fi-flavored names layered onto the wuxia setting (Phoenix Star, Special Forces, the Temple, and the Royal Clan) — joining Special Forces, for example, puts a character under recruiter NPC Jiang Shipang with the starting title "4th-Generation Squad Leader." This surviving archive appears to be an early "core" build: classic sect zones referenced elsewhere in the code (Wudang, Shaolin, Huashan, Emei, Tangmen, Mingjiao) are not actually included — only scattered object references (e.g. on the bulletin board) still point to them.

README

内容亮点

在线试玩

https://mudlibs.fluffos.info/xzyx/

管理员账号 / Admin account

警告:这是一个公开的默认密码,仅供本地/浏览器试玩。正式对外开服前
请务必修改此默认密码。

本地运行

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

游戏端口:40002

NOTES · 移植与修复记录

星战英雄.rar → xzyx

Status: DONE — boots clean, playable over telnet

Full ANSI-art banner + Chinese login flow confirmed working. This lib is the 2nd pilot and is where the FluffOS driver bug (AGENTS.md §8) and the message_combatd mudlib bug (below) were found and fixed.

What was fixed

1. Encoding: 1942 files converted GB18030→UTF-8, 193 already UTF-8/ASCII, 15 skipped as genuinely binary (mudos.exe/.dll etc — bundled Windows driver binaries, irrelevant, left alone), 30 needed the lossy -c fallback (stray invalid bytes scattered through kungfu/skill/*, clone/book/*, d/fenghuang/fenghuang/*, a few welcome files, and data/emoted.o — all pre-existing single-byte corruption in the original archive, not something our pipeline introduced). 2. .c.lpc: 1909 files renamed. 132 literal .c" references auto-fixed by convert_lib.sh, 0 left over needing manual attention. 3. staticnosave: 51 files. 4. master.lpc does NOT have the §4 load_object-in-valid_read recursion bug (no load_object calls in this master at all) — checked, not needed here. 5. Config: removed 5 obsolete keys, set port number : 40002, mudlib directory to absolute work/ path, fixed log directory (was /adm/log, changed to /log to match the libs/<slug>/log/ convention — AGENTS.md §6). 6. Found and fixed a FluffOS driver bug (AGENTS.md §8): null backbone_domain dereference in mudlib_stats.cc's init_domain_for_ob(), triggered because this lib's master:: author_file() calls call_other(SIMUL_EFUN_OB, "author_file", ...) during master's own bootstrap (before backbone_domain is set), causing a SIGSEGV the first time that call chain loads a new object. Patched ~/src/fluffos/src/packages/mudlib_stats/mudlib_stats.cc; rebuilt both build/ and build-debug/. Systemic pattern, likely to recur on other libs — no re-diagnosis needed, just confirm the patched driver binaries are what's running. 7. Found and fixed a mudlib bug affecting 100+ files: every file under kungfu/skill/* calls message_combatd(msg, me, target) to print combat messages, but no such function is defined ANYWHERE in the lib (checked exhaustively — not a simul_efun, not on COMBAT_D, not anywhere). The signature exactly matches message_vision() (an existing, working simul_efun in adm/simul_efun/message.lpc) — old MudOS's weaker compile-time checking apparently let this ship broken (every combat skill's flavor-text message was silently a no-op under whatever driver this last ran on); this driver rejects undefined- function calls at load time, which is what surfaced it. Fixed by adding message_combatd() as a thin alias for message_vision() in adm/simul_efun/message.lpc (placed AFTER message_vision's own definition — same-file forward-reference didn't resolve, see AGENTS.md §8b) rather than touching 100+ call sites. 8. Full lpcc_check.sh sweep: 1729/1909 pass before the message_combatd fix → 1773/1909 pass after it + the driver's macro-nesting-depth fix (AGENTS.md, MAX_EXPANSION_NESTING) fixed clone/misc/{card,newcard}.lpc too. 136 failures remain, mostly the missing-zone-content and optional- network-daemon categories below.

Known remaining issues (not fixed — documented, low/no priority)

How to run

cd libs/xzyx
~/src/fluffos/build-debug/src/driver config.fluffos
# separately:
python3 ../../scripts/mudclient.py 127.0.0.1 40002 --timeout 10 --send "" --send "look" --send "quit"

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, loopback/uptime/throttle + admin seed)

Standard WASM-first pass per AGENTS.md §1.3(b)/(e) and §1.5. Loopback = 127.0.0.1, any 127. prefix, or an empty/non-string/malformed IP (covers older WASM query_ip_number() garbage). Gates patched:

Admin seed: registered fluffos / display 浮浮 / password Mud@2026 through the real flow (id → y → Chinese name → password x2 → gift y → email → gender m; one stray "What?" echo mid-flow is pre-existing prompt noise, not a failure). Granted (admin) by appending fluffos (admin) to /adm/etc/wizlist. Verified after reboot: login as fluffos → wizard-channel login broadcast + update /adm/daemons/logind → "重新编译 ...成功!".

Retest: fresh normal registration (qfxzyx / 秦风) re-verified end-to-end into 新手集中营 with look/score/quit correct; test saves removed. No new errors in log/debug.log.

Save files for the orchestrator to add (both paths tracked, not gitignored; note data/user/f/ and data/login/f/ are NEW directories — this lib previously had no ids starting with "f"):

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

First real *playthrough* pass on this lib (all prior passes verified only registration + look/score/quit/admin login, or watched boot output). Played as an ordinary new player through registration, exploration, a sect join, organic skill learning, safe sparring, quit, and a real wall-clock reconnect, native driver (build-debug). Read doc/help/newbie first (§10.7 step 1) — it documents the starting zone (新手集中营), the four newbie factions (凤凰/特种部队/圣殿/皇族), the fight (非致命较量) vs kill distinction, wimpy, and the 天赋/技能 model, and was an accurate guide for everything below.

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

Bug 1 found and fixed — new characters always spawn starving (food/water stuck at 0)

adm/daemons/logind.lpc:447, inside enter_world().

- Practical severity is muted by an unrelated safety net (feature/damage.lpc/damage1.lpc's heal_up(), ~line 269): once a starving character's countdown reaches zero, players under age 15 (i.e. every character in roughly their first real day of accumulated play time) get an automatic "掏出一支冰淇淋" full refill instead of taking real starvation damage — so this bug produces confusing immediate hunger-distress messages and an inaccurate hp screen from the first moment of play (contradicting the newbie help file), but does not by itself kill a brand-new character. Reproduced this too: qxtest (registered pre-fix) showed 290/290 on a later hp check with no eat/fu command ever issued, i.e. the auto-refill had already silently fired.

``lpc // BEFORE: if (!user->query("food") && !user->query("water") && ob->query("age") == 14) { // AFTER: if (!user->query("food") && !user->query("water") && user->query("age") == 14) { ``

Bug 2 found and fixed — sect recruitment (bai/attempt_apprentice/recruit) crashes every time, silently blocking the entire organic sect-join path

feature/command.lpc:29 — this is AGENTS.md §8.3a, private nomask command_hook, an already-cataloged bug class, reached here via a code path (an NPC issuing command() from its own LPC code) that no earlier pass on this lib exercised. xzyx was not previously on §8.3a's "affected so far" list; recommend adding it.

``lpc // BEFORE: private nomask int command_hook(string arg) { // AFTER: nomask int command_hook(string arg) { ``

What else was tested and confirmed working

Explicitly NOT verified live (say-so per §10.7 item 6)

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

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

Round-two re-verification against the current native build-debug driver (post-upgrade — pulls in PRs #1343/#1344 and the corpus-wide %-operator float-crash fix). Standard checklist + live playthrough-style verification.

Findings:

1. AGENTS.md §7.108 (clone/user/user.lpc's reconnect() missing enable_commands()): this lib has the kick-duplicate-login pattern (exec(old_link in both adm/daemons/logind.lpc and a stray unused u/lsg/logind.lpc copy). reconnect() lacked enable_commands() as its first statement, so a player confirming "y" to kick out their own already-connected duplicate session would reconnect into a permanently non-interactive character (every command silently no-ops). Fixed by adding enable_commands(); as the first line. Live-verified with two concurrent telnet sessions: session 2 logged in as fluffos, got the "赶出去,取而代之吗?(y/n)" prompt, confirmed y, and the resulting session correctly dispatched look (real room description) and score (real stat panel) — confirming the fix, not just a clean login. 2. adm/simul_efun/file.lpc: log_file() wrote directly via write_file() without ever calling assure_file() first, so the first write to any not-yet-existing log path would silently fail. Added the assure_file(LOG_DIR + file) call (plus a forward declaration, since assure_file() is defined later in the file) — same shape as the standard checklist fix applied across this window's other libs. Also null-guarded cat()'s write(read_file(file)) to write(read_file(file) || ""). 3. AGENTS.md §7.106 (cmds/ang/update.lpc): present(file, environment(me)) was called without guarding environment(me) first; added the environment(me) && guard. 4. config.fluffos: maximum evaluation cost was 1000000, below this project's standard safe value; raised to 5000000. 5. Already correct, no change needed: adm/obj/master.lpc's log_error() already uses the case-agnostic "arning:" substring match (AGENTS.md §7.10) — no genuine bug here. No adm/daemons/closed.lpc exists in this lib's tree, so AGENTS.md §7.107 does not apply.

Live verification summary: booted the native driver on port 40002 (only pre-existing compile warnings, no fatals — one benign, self-limiting "Too deep recursion" during httpd.lpc's optional load, caught by the driver's own recursion guard, does not block boot; Initializations complete / Accepting telnet connections both printed). Logged in as the seeded fluffos admin (Mud@2026), confirmed real write access via update /adm/simul_efun/file (recompiled successfully). Ran the two-session kick-duplicate-login reconnect test described above and confirmed the §7.108 fix live. No new errors surfaced in log/debug.log (unchanged from the prior pass — this driver instance didn't append fresh entries to it, console output captured separately showed nothing beyond pre-existing warnings). Killed the driver by exact PID when done.

本轮修改的文件 / Files modified this round:

§7.100 sweep (2026-08-19)

Fixed the corpus-wide inherit ROOM; ... replace_program(ROOM); redundant-replace bug (AGENTS.md §7.100). 176 live occurrences deleted: 173 via scripted sweep (fix_710_room.py), plus 2 hand-fixed irregular shapes (same lineage as sj/shiji) — clone/misc/roommaker.lpc's string-builder, and both d/fenghuang/fenghuang/taikong.lpc (space before semicolon, single-line file) and d/huang/zoulang4.lpc (two redundant calls on one CRLF line, fixed via a single Edit spanning both instances). 4 already-commented-out instances left untouched. No real .lpc source found under work/data/. Verified via build-debug driver boot: clean compile, zero new "cannot replace"/"cannot bind" debug.log lines; confirmed serving via raw-socket connect on port 40002.

§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): 4 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.

深度功能测试第四轮 / Round-four deep functional test (2026-08-20)

Targeted follow-up on this lib's own two explicitly-flagged, previously unreached §10.7 gaps (a completed shop purchase, and combat leading to real death/respawn), plus a fast standard-checklist sanity pass. Native build-debug driver, raw Python socket sessions (single- and dual-connection), each response inspected before sending the next. log/debug.log watched continuously throughout.

Standard checklist sanity pass — all already clean, no changes needed

Bug found and fixed — give.lpc compile error breaks the give command's partial-stack-split path for every player, lib-wide

cmds/std/give.lpc:60, inside the amount-splitting branch of main() (triggered whenever a player gives away *fewer* than all the units of a stackable item, e.g. give 1 gold to X when carrying 2).

`` /cmds/std/give.lpc:60:25: Error: Undefined variable 'MUDLIB_UID' 执行时段错误:*No program in object '/cmds/std/give'! ` Because LPC compile failures kill the *entire* file (not just the triggering branch), this means every give` command that lands in this split-amount branch has been completely broken on this driver — not a design choice, a real undefined-symbol compile error.

Gap 1: shop purchase — RESOLVED, completed live, correct

The task's suggested pattern (clone the lib's own coin/money object, give it to a test character, per mhxy's clone /clone/money/silver precedent) was tried first and turned out not to apply to this lib: qxtest was given a cloned 二两黄金 (2-tael gold, clone/money/gold.lpc, value 20000) and walked to d/budui/shougou.lpc (废品收购站, the lib's pawn/sell room, staffed by 娇娇/nvlaoban.lpc which wires feature/dealer.lpc's do_sell) — sell gold was rejected with "黄金一文不值!" (worthless). Traced why: feature/dealer.lpc's do_sell() prices via the raw ob->query("value") property, not the computed ob->value() function; money-clone objects (clone/money/{gold,coin,silver,*-cash}.lpc) never set("value", ...) — only inherit/item/money.lpc's value() override computes one dynamically. Cross-checked inherit/room/hockshop.lpc (the other sell path, pawn/sell-outright) too: it explicitly special-cases and rejects money_id-tagged items ("你要卖「钱」?"/"你要当「钱」?"). Confirmed via d/budui/npc/robot-xiaoer.lpc, adm/npc/moye.lpc, adm/npc/luban.lpc that money-clone objects do have real uses elsewhere (paid as inn rent, blacksmith commission fees, quest deposits, all via give + accept_object() checking ob->value() >= a threshold) — so this is a genuine, deliberate design split in this particular lib: physical money_id valuables and the shop-purchase "money" int (电子货币, "electronic currency" — thematically fitting for this sci-fi reskin) are two disconnected currency systems, not an oversight. Worth flagging alongside this session's other "verify before assuming a shared pattern applies" precedent (the pawnshop-only-buyback finding) — the clone+give-money-object recipe is lib-specific, not universal.

Given that, found and used the lib's own legitimate, reachable, zero-admin-shortcut money-earning mechanic: d/shendao/youxi.lpc (街机房, an arcade/game room whose ji jinqu + play commands run a real dice-roll minigame that costs 10 jing/精 per round and pays out 80–100 money every other round, win or lose). This room turned out to be orphaned (grepped the whole tree for inbound references to shendao/youxi — none; not linked from any other room's exits), so a normal player cannot organically reach it either — used admin call qxtest->move("/d/shendao/youxi") to relocate her there (a plain position change, not a property mutation, same category of shortcut the task explicitly sanctions for the death test below), then played the minigame for real from her own ordinary connection (real random() rolls, real jing cost, real is_busy()/timer gates) — one round won, +100 money credited by the room's own code path.

Moved back to d/budui/foodshop.lpc (call qxtest->move(...), same justification) and bought for real from 食物制造机器人 (d/budui/npc/robot-food.lpc):

log/debug.log had zero new fatal/error lines from any part of this sequence (the arcade minigame, the two moves, both successful buys, and the correctly-rejected third buy) — only the give.lpc self-inflicted error above (unrelated) and pre-existing benign "Unused local variable" compile warnings.

Gap 2: combat leading to death/respawn — RESOLVED, completed live, correct

Per the task's explicit precedent (kept qxtest untouched as the clean representative character), registered a new, separate, throwaway character for this test: dstest / 死士, password Test12345, through the real registration flow. Confirmed cmds/std/kill.lpc has no safety gate of any kind against real danger (no wimpy pre-check, no level/strength restriction — matches this session's cross-lib precedent that fight is the guarded/safe command and kill is not).

Used admin call dstest->move("/d/budui/bdguangchang1") to place her with the same 特种兵 NPC (tezhongbing.lpc, combat_exp 30000, vs. dstest's fresh-character stats) used for the safe fight test in the original round-one pass, then had dstest issue kill bing from her own ordinary connection — a real, un-gated fight, full turn-by-turn combat log, ending in an actual loss:

你两眼一闭,接著屁都看不到了....
你光荣牺牲了。
【马路传闻】某人:死士被特种兵杀死了。

Moved into d/death/gate.lpc (鬼门关) where 白无常 (d/death/npc/wgargoyle.lpc) picked up the standard staged death_stage() ghost-dialogue sequence (5 stages × 5s, guarded by death_stage_active per the §7.112 branch audit above) fully unattended — reconnected afterward and confirmed no stuck state, no duplicate/orphaned reentry, no debug.log error: dstest had been correctly reincarnated and moved to /d/taikong/gangkou (太空港口, this NPC's designated respawn destination), title reset to 老百姓/普通百姓, HP/food/water all at fresh-respawn values, inventory correctly cleared of her pre-death items down to just a fresh mailbox (per wgargoyle.lpc's DROP_CMD->do_drop + new("/clone/misc/mailbox") logic). log/debug.log gained zero new fatal/error lines across the entire kill → death → staged ghost dialogue → reincarnate → respawn pipeline.

dstest is being kept, not cleaned up, as playthrough evidence (same convention as qxtest/wjtest from the original round-one pass). Save files: work/data/user/d/dstest.o, work/data/login/d/dstest.o (d/ already existed for prior "d"-prefixed ids in this lib).

本轮修改的文件 / Files modified this round:

Save files updated/added this round: