随机遭遇

随机遭遇

RandomEncounter 随机遇敌,在原先敌人的基础上,随机生成一部分敌人(非boss)。可在配置文件config.lua中修改生成概率和额外生成敌人数量, 有三种生成方式本章节怪物、周围同类型怪物还有全游戏怪物。

随机遇敌 RandomEncounter v0.1.7 — 发布页介绍

中文标题 随机遇敌|可配置的额外普通敌人

中文简短介绍 靠近普通敌人时,按设定概率在附近额外生成敌人。支持当前区域、当前章节或跨章节全局名单抽取,可调整概率、数量、上限与间隔;不生成 BOSS,新增敌人不会继续触发增怪。

中文详细介绍

简介 / Description 为熟悉的探索路线增加一些变化:保留原有敌人,在玩家靠近符合条件的普通敌人时,随机增加新的战斗对手。额外敌人使用游戏原生模型、动画、属性与战斗 AI。

默认从当前章节抽取,触发概率为 50%,每次额外生成 1 只,同时最多存在 6 只新增敌人。每只符合条件的原怪在一轮刷新中只判定一次;不是持续按时间无限刷怪,也不会由新增敌人引发连锁生成。

安装步骤 / Installation instructions

  1. 先安装适用于《明末:渊虚之羽》且能正常加载 Lua MOD 的 UE4SS,保留其公共 UEHelpers 模块。
  2. 完全退出游戏,解压 RandomEncounter_v0.1.7.zip。
  3. 将包内 Project_Plague 文件夹合并到含 Project_Plague.exe 的游戏根目录。
  4. 确认以下文件存在: Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/Scripts/main.lua Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/config.lua Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/enabled.txt
  5. 保留空白 enabled.txt 启用标记,完整重启游戏并读取存档。进入可操作状态后靠近支持的普通敌人,等待约 10–20 秒;候选较多或落点需要重试时可能更久。

更新时先备份个人 config.lua,再覆盖同名 MOD 文件并恢复需要保留的配置值。不要保留改名的重复副本,也不要替换整个 Mods 文件夹。本包不附带或覆盖 UE4SS 加载器,无需替换 mods.txt。

主要功能 / Main features • 当前区域随机:从触发原怪附近已加载、存活且敌对的受支持原怪类型中抽取。默认半径 80 米,“区域”指附近空间范围,不是整个章节。 • 章节随机:设置 EnemyPool = "chapter",从实时所在章节的支持名单抽取,采用该章属性;不要求敌人已在附近出现。第一至第五章分别支持 37、40、36、43、12 类普通敌人。读档或转章期间无法确定章节时暂停,章节改变会取消未生成的旧队列。 • 全局随机:从跨章节的 72 类受支持普通敌人中抽取。使用原生属性,不自动把后期敌人的强度缩放到当前章节。 • 支持名单包含 72 类普通敌人、108 个完整蓝图路径、213 个原生属性编号,包含 33 个章节专用蓝图和 3 个装甲别名。类别包含武器/体型变体,不等于 72 个完全不同的模型。仍不是全部原版普通敌人。 • 不生成 BOSS;排除友方 NPC、宠物和已识别的任务变体等不适合的触发对象。 • 新增敌人不会再次触发增怪,数量上限同时计入存活和初始化中的新增敌人。 • 配置生成概率、每次数量、总上限、范围以及检查和生成间隔。 • 生成前检查导航、地面与碰撞;没有合适落点就跳过。概率命中不等于一定生成成功。 • 在菜单、暂停、BOSS 战或失去角色控制期间暂停新生成;休息、死亡和换图时清理或重置相应状态。 • 新增敌人的奖励限制为赤汞和经过筛选的普通消耗品,不发放任务物品、首杀技能点、唯一奖励或装备。原怪沿用自身的奖励和任务处理。

前置要求 / Requirements • Windows 版《明末:渊虚之羽》(WUCHANG: Fallen Feathers)。 • 与当前游戏版本兼容、可正常加载 Lua MOD 的 UE4SS,包含公共 UEHelpers 模块。 • 本包为独立 Lua MOD,不需要宠物 MOD、BuffDuration 或黑神话的 RandomEncounter MOD,也不包含自定义 PAK。 • 包内提供脚本、启用标记及说明,不附带 UE4SS、存档、DLL 或 SHA 校验文件。

配置方法 / Configuration 编辑以下文件,保存后重启游戏: Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/config.lua

Enabled = true 总开关;false 停用。 EnemyPool = "chapter" 默认当前章节;"region" 当前区域;"global" 跨章节支持名单。 SpawnChance = 50 概率 0–100;0 停止本 MOD 的生成逻辑。 ExtraCountMin = 1 每次最少新增数量,1–6。 ExtraCountMax = 1 每次最多新增数量,1–6。 MaxAlive = 6 新增敌人总上限,1–20;不包括原版敌人。 RegionRadiusMeters = 80 区域池半径,10–200 米。 TriggerDistanceMeters = 35 玩家到原怪的触发距离,10–80 米。 SpawnMinDistanceMeters = 3 距触发原怪的最小生成距离,2–15 米。 SpawnMaxDistanceMeters = 6 最大生成距离,3–20 米。 CheckIntervalSeconds = 0.5 检查间隔,0.5–2 秒。 SpawnIntervalSeconds = 2 两次生成的最小间隔,2–10 秒。 DebugLogging = false 详细诊断日志开关。

以上为字段解释,直接在原 config.lua 中修改对应值,并保留引号、逗号及 return { ... } 结构。章节模式每类敌人等概率,优先使用审核通过的该章专用蓝图和属性;基础/章节/装甲别名不会重复增加同类权重;无法识别章节时不会自动改为全局。默认采用 chapter;保留旧配置的用户可修改 EnemyPool 并重启切换模式。更完整的配置说明和排查步骤见包内 说明_中文.md 与 README_English.md;完整类型、蓝图与章节属性对应见 敌人名单_中英文.md。

性能与兼容性 默认采用分批检查与分阶段生成。若希望减少负担,可设置 MaxAlive = 2、CheckIntervalSeconds = 1、SpawnIntervalSeconds = 3,并关闭详细日志。额外敌人的 AI、动画和加载仍会增加开销,较高数量不代表更好的运行效果。 与其他改变敌人初始化、AI、刷新或死亡奖励的 MOD 同用时,实际组合需分别验证。内置普通消耗品掉落表不会自动继承其他 MOD 的掉落表改动。

验证与反馈 v0.1.7 已通过 6 个 Lua 文件的编译检查及 53 项离线回归。扩充名单和章节专用蓝图已完成静态核对,尚未逐种实机验证。v0.1.5 的本机实测日志已确认第二章大西军督军普通变体生成成功、AI 初始化通过,休息后也恢复生成,测试者反馈已正常。 尚未逐项实测全部敌人、跨章节全局抽取、战斗与奖励细节或帧率表现。若未出现额外敌人,先检查附近敌人是否受支持、概率、数量上限与出生位置;排查时可临时设为当前区域、100% 概率、上限 2 只并开启 DebugLogging。 反馈时请提供游戏版本、UE4SS 版本、所在区域、config.lua,以及 Project_Plague/Binaries/Win64/ue4ss/UE4SS.log 中带 [RandomEncounter] 的记录。

停用与卸载 临时停用:将 Enabled 改为 false 并重启游戏。 卸载:完全退出游戏,删除 Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter 文件夹。无需删除 UE4SS 或其他 MOD。

致谢 / Shout outs 感谢《明末:渊虚之羽》开发团队提供的游戏与原生敌人资源,感谢 UE4SS 项目贡献者提供的 MOD 工具。 感谢黑神话 RandomEncounter MOD 作者带来的玩法灵感。本版针对《明末》独立实现,不包含黑神话游戏资源,也不要求安装该 MOD。 感谢参与测试并反馈读档、性能和生成问题的玩家。

============================================================

English title RandomEncounter | Configurable Extra Enemies

English summary Adds a configurable chance to spawn extra ordinary enemies near native encounters. Choose nearby, current-chapter or cross-chapter supported enemy types, adjust chance, counts and intervals. No bosses; extra enemies cannot trigger further spawns.

English full description

Description Add variety to familiar exploration routes by meeting extra opponents near eligible ordinary enemies. Existing enemies remain in place, while additional enemies use the game's native models, animations, stats and combat AI.

Defaults are a chapter pool, a 50% chance, one extra enemy per encounter and a cap of six extras. Each eligible original gets one roll per refresh cycle. This is not an endless timer-based spawner, and generated enemies cannot start another chain of encounters.

Installation instructions

  1. Install a working UE4SS version compatible with WUCHANG: Fallen Feathers, including its shared UEHelpers module and Lua mod support.
  2. Fully exit the game and extract RandomEncounter_v0.1.7.zip.
  3. Merge the archive's Project_Plague folder into the game root containing Project_Plague.exe.
  4. Confirm that these files exist: Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/Scripts/main.lua Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/config.lua Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/enabled.txt
  5. Keep the empty enabled.txt marker, fully restart and load a save. Once gameplay is available, approach supported ordinary enemies and allow roughly 10–20 seconds. Larger candidate lists or placement retries may take longer.

When updating, back up your config.lua, replace this mod's files and restore your preferred setting values. Avoid renamed duplicate copies. Do not replace the entire Mods folder. This archive does not bundle or replace the UE4SS loader; replacing mods.txt is unnecessary.

Main features • Region pool: draw from loaded, living, hostile and supported native types near the encounter anchor. The default radius is 80 metres. Region means the nearby area, not an entire chapter. • Chapter pool: set EnemyPool = "chapter" to draw supported types with stats from the currently loaded chapter, including types absent nearby. Chapters 1–5 support 37, 40, 36, 43 and 12 types, respectively. Pauses when chapter data is unavailable or transitioning, and cancels queued spawns on chapter changes. • Global pool: draw from 72 supported ordinary enemy types across chapters. Enemies retain their native stats; later-game strength is not scaled down to the current chapter. • A curated list of 72 types, 108 exact blueprints and 213 native stat IDs, including 33 chapter-specific blueprints and three armor aliases. Types include weapon/body variants, not 72 completely distinct base meshes. This still does not include every ordinary enemy. • No bosses are spawned. Friendly NPCs, pets, recognized quest variants and other unsuitable anchors are excluded. • Extra enemies cannot trigger further generation. The cap counts both living and initializing extras. • Configurable chance, minimum/maximum count, total cap, distances, check interval and spawn interval. • Navigation, ground and collision checks before spawning. Unsuitable positions are skipped; a successful roll does not guarantee a successful spawn. • New generation pauses during menus, pause screens, boss fights and loss of player control. Rest, death and map transitions clean up or reset relevant state. • Extra-enemy rewards are restricted to Red Mercury and filtered ordinary consumables. Quest items, first-kill skill points, unique rewards and equipment are excluded. Original enemies retain their own reward and quest handling.

Requirements • The Windows version of WUCHANG: Fallen Feathers. • A working UE4SS installation compatible with your game version, with Lua mod support and the shared UEHelpers module. • This is a standalone Lua mod. Pet mods, BuffDuration and the Black Myth: Wukong RandomEncounter mod are not required. There is no custom PAK in this archive. • Includes scripts, an enable marker and documentation. UE4SS, saves, DLLs and SHA checksum files are not bundled.

Configuration Edit this file, save it and restart the game: Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter/config.lua

Enabled = true Master switch; false disables the mod. EnemyPool = "chapter" Current chapter (default); "region" nearby; "global" across chapters. SpawnChance = 50 Percentage, 0–100; 0 disables generation logic. ExtraCountMin = 1 Minimum extra enemies per encounter, 1–6. ExtraCountMax = 1 Maximum extra enemies per encounter, 1–6. MaxAlive = 6 Extra-enemy cap, 1–20; excludes original enemies. RegionRadiusMeters = 80 Nearby pool radius, 10–200 metres. TriggerDistanceMeters = 35 Player-to-original activation distance, 10–80 metres. SpawnMinDistanceMeters = 3 Minimum spawn offset from the original, 2–15 metres. SpawnMaxDistanceMeters = 6 Maximum spawn offset, 3–20 metres. CheckIntervalSeconds = 0.5 Check interval, 0.5–2 seconds. SpawnIntervalSeconds = 2 Minimum time between spawns, 2–10 seconds. DebugLogging = false Detailed diagnostic logging.

These lines explain the settings. Edit their values inside the supplied config.lua, preserving quotes, commas and the return { ... } structure. Chapter mode gives each family equal weight, prefers a reviewed chapter blueprint and native stats and never falls back to global when chapter data is unavailable. Chapter is the default; users retaining older configs can change EnemyPool and restart. Full configuration and troubleshooting details are included in README_English.md and 说明_中文.md.

Performance and compatibility Checks run in batches, and loading, placement and spawning run in separate stages. For a lighter setup, use MaxAlive = 2, CheckIntervalSeconds = 1, SpawnIntervalSeconds = 3, and keep detailed logging off. Native AI, animations and loading still add overhead; higher counts can cost more performance. Combinations with mods that alter enemy initialization, AI, resets or death rewards require individual validation. The bundled consumable loot table does not automatically inherit changes from other loot-table mods.

Validation and feedback Version 0.1.7 passed compilation checks for all six Lua files and 53 offline regressions. The expanded roster and chapter blueprints have static review; individual in-game validation remains pending. Local v0.1.5 live logs confirm extra spawning and AI initialization for an ordinary Chapter 2 Da Xi Army Overseer variant, including resumed spawning after a shrine rest. The tester confirmed that it works. Not every enemy, cross-chapter global encounter, combat/reward detail or frame-rate result has been individually tested. If no extras appear, check supported nearby enemies, chance, cap and placement. For diagnosis, temporarily use the region pool, 100% chance, a cap of two and DebugLogging enabled. For reports, include your game and UE4SS versions, location, config.lua, and relevant [RandomEncounter] entries from Project_Plague/Binaries/Win64/ue4ss/UE4SS.log.

Disabling and removal To disable temporarily, set Enabled = false and restart. To uninstall, fully exit and remove Project_Plague/Binaries/Win64/ue4ss/Mods/RandomEncounter. UE4SS and other mods can remain installed.

Shout outs Thanks to the WUCHANG: Fallen Feathers developers for the game and its native enemy assets, and to the UE4SS contributors for their modding tools. Thanks to the author of Black Myth: Wukong RandomEncounter for the gameplay inspiration. This version was implemented separately for WUCHANG, contains no Wukong game assets and does not require that mod. Thanks to the players who tested the mod and reported loading, performance and spawning issues.

0.1.7 名单与版本说明 / Roster and version notes 完整名单见 敌人名单_中英文.md。章节版本采用原生独立蓝图;无专用蓝图时使用审核通过的基础蓝图加该章属性。缺少该章属性就不进入该章池。BOSS、NPC/助战、任务/首杀/红眼、复活型 AI、固定机关/树妖及特殊交互怪物继续排除。新增名单经过静态核对与离线检查,尚未逐种完成实机验证。 See 敌人名单_中英文.md for all types and exact selections. Reviewed chapter blueprints take precedence; otherwise a reviewed base class uses native stats for that chapter. Missing chapter stats omit the family. Bosses, NPCs/companions, quest/unique/red-eye/resurrection variants, fixed traps/tree ambushes and special interaction creatures remain excluded. Expanded coverage has static and offline validation, not exhaustive live testing.