可配置僵尸 AI
Configurable Zombie AI 是一个模组,旨在让服务器管理员和整合包作者更容易地调整原版僵尸的行为,以适应高难度生存环境。
该模组没有将僵尸行为硬编码为单一配置文件,而是向服务器操作员暴露了运行时命令,使他们能够在不重启世界的情况下更改僵尸检测、获取、保持和切换目标的方式。设置与世界数据一起保存,并立即应用于已加载的僵尸。
功能特性
- 修改僵尸跟随范围(可配置)。
- 可选地允许僵尸忽略视线检查。
- 可选地防止僵尸自然消失。
- 用可配置的目标获取逻辑替换原版的“选择最近的有效目标”行为。
- 可选地允许僵尸使用加权规则随时间重新评估并切换目标。
- 添加易于使用的管理员命令,用于在全局或指定半径内清除僵尸。
- 同时适用于僵尸、僵尸村民以及来自 SNC Datapack 的纯巨人 (Pure Titans)。
该模组保留了原版的目标家族机制。僵尸仍然只能针对原版允许的目标类型进行攻击,但目标池内部的选择逻辑变得可配置。
兼容性
- Minecraft:
1.16.5 - Forge:
36.x或更高版本(1.16.5分支) - 语言/运行时:通过 KotlinForForge 使用 Kotlin
- 实现细节:Sponge Mixin 注入加上 Kotlin 运行时逻辑
- 不兼容 Zombies Ignore LOS 和 Zombies Apocalyptic AI 这两个模组。本模组正是为了替代它们而开发的。
配置工作原理
- 所有设置均通过游戏内命令进行修改。
- 命令根路径:
czai和configurablezombieai - 权限等级:操作员等级
2 - 设置保存在世界数据中,因此重启后依然有效。
- 当设置更改时,已加载的僵尸会立即刷新。
命令参考
以下示例使用短根命令,但每个命令也可以使用 configurablezombieai 作为前缀来运行。
核心命令
| 命令 | 描述 |
|---|---|
czai enable |
启用模组的所有行为。 |
czai disable |
禁用模组的所有行为,并为已加载的僵尸恢复原版跟随范围。 |
czai status |
打印当前的实时配置。 |
czai ignore_LOS <true |
false> |
czai despawn_prevention <true |
false> |
czai visibility_range <blocks> |
设置僵尸跟随范围/检测距离。 |
获取调优
这些设置影响在原版已经决定可能运行目标目标后,僵尸如何选择一个初始目标。
| 命令 | 描述 |
|---|---|
czai acquisition distance_variability_from_closest_target <blocks> |
以给定距离扩展候选池,使其超出最近的目标。 |
czai acquisition chance_to_auto-select_closest_target <percent> |
保证选择最近可用目标的几率。设置为 100 时,最近的目标总是被选中。设置为 0 时,获取池中的任何候选者都可能被选中。 |
切换调优
切换功能默认关闭。启用后,僵尸会定期在当前目标家族内重新随机选择目标。
| 命令 | 描述 |
|---|---|
czai switching enabled <true |
false> |
czai switching interval <ticks> |
每个僵尸评估目标切换的频率。 |
czai switching search_radius <blocks> |
用于收集切换备选目标的半径。 |
czai switching proximity_bias <value> |
正值倾向于较近的候选者;负值倾向于较远的候选者。 |
czai switching current_target_bias <value> |
正值使僵尸更有可能保持在当前目标上。 |
czai switching closer_than_current_target_bias <value> |
正值奖励比当前目标更近的候选者。 |
实用命令
注意:你需要等级 2 权限(OP)才能使用这些命令。
| 指令 | 描述 |
|---|---|
czai kill all |
在所有已加载维度中消灭所有已生成的僵尸。 |
czai kill radius <blocks> |
消灭执行命令的玩家周围指定范围内的僵尸。 |
默认值
| 设置 | 默认值 |
|---|---|
| 模组启用 | true |
| 忽略视线阻挡 | false |
| 防止自然消失 | false |
| 可见范围 | 35.0 格 |
| 获取距离可变性 | 0.0 格 |
| 自动选择最近目标的概率 | 100.0% |
| 切换目标功能启用 | false |
| 切换间隔 | 40 刻 |
| 切换搜索半径 | 16.0 格 |
| 切换近距离偏好 | 0.0 |
| 切换当前目标偏好 | 1.0 |
| 切换比当前目标更近的偏好 | 1.5 |
目标锁定说明
- 获取目标时仍遵循原版的目标类别,例如玩家、村民、铁傀儡以及陆地上的小海龟。
- 切换目标时不会跨越目标家族进行跳跃。如果僵尸当前正在追逐一名村民,那么在切换检查期间,它只会将该村民与其他潜在的村民候选者进行比较。
- 无视视线阻挡功能仍然遵循攻击有效性检查以及配置的可见范围限制。
Configurable Zombie AI
Configurable Zombie AI is a mod that makes vanilla zombies easier to tune for harder survival servers and modpacks.
Instead of hardcoding one zombie behavior profile, the mod exposes runtime commands for server operators so they can change how zombies detect, acquire, keep, and switch targets without restarting the world. Settings are stored with the world and apply to loaded zombies immediately.
What It Does
- Changes zombie follow range (configurable).
- Optionally lets zombies ignore line of sight checks.
- Optionally prevents zombies from despawning naturally.
- Replaces vanilla "pick the nearest valid target" behavior with configurable target acquisition.
- Optionally lets zombies re-evaluate and switch targets over time using weighted rules.
- Adds easy-to-use admin commands to kill zombies globally or within a radius.
- Works on both zombies, zombie villagers, and Pure Titans from the SNC Datapack.
The mod keeps vanilla target families intact. A zombie can still only target the kinds of entities vanilla would normally allow, but the selection logic inside those target pools becomes configurable.
Compatibility
- Minecraft:
1.16.5 - Forge:
36.xor newer in the1.16.5line - Language/runtime: Kotlin via KotlinForForge
- Implementation details: Sponge Mixin injections plus Kotlin runtime logic
- NOT compatible with the Zombies Ignore LOS and the Zombies Apocalyptic AI mods. Both of which this mod was written to replace.
How Configuration Works
- All settings are changed in-game through commands.
- Command roots:
czaiandconfigurablezombieai - Permission level: operator level
2 - Settings are saved in world data, so they persist across restarts.
- When settings change, loaded zombies are refreshed immediately.
Command Reference
Examples below use the short root command, but every command also works with configurablezombieai instead of czai.
Core Commands
| Command | Description |
|---|---|
czai enable |
Enables all mod behavior. |
czai disable |
Disables all mod behavior and restores vanilla follow range for loaded zombies. |
czai status |
Prints the current live configuration. |
czai ignore_LOS <true |
false> |
czai despawn_prevention <true |
false> |
czai visibility_range <blocks> |
Sets the zombie follow range / detection distance. |
Acquisition Tuning
These settings affect how a zombie picks an initial target after vanilla has already decided that a target goal may run.
| Command | Description |
|---|---|
czai acquisition distance_variability_from_closest_target <blocks> |
Expands the initial candidate pool beyond the closest target by the given distance. |
czai acquisition chance_to_auto-select_closest_target <percent> |
Chance to guarantee the closest available target is chosen. At 100, the closest target always wins. At 0, any candidate in the acquisition pool may be chosen. |
Switching Tuning
Switching is off by default. When enabled, zombies periodically re-roll their target inside the same target family as the current one.
| Command | Description |
|---|---|
czai switching enabled <true |
false> |
czai switching interval <ticks> |
How often each zombie evaluates target switching. |
czai switching search_radius <blocks> |
Radius used to collect alternative targets for switching. |
czai switching proximity_bias <value> |
Positive values favor nearer candidates; negative values favor farther ones. |
czai switching current_target_bias <value> |
Positive values make the zombie more likely to stay on its current target. |
czai switching closer_than_current_target_bias <value> |
Positive values reward candidates that are closer than the current target. |
Utility Commands
Note: You need level 2 permissions (OP) to use these commands.
| Command | Description |
|---|---|
czai kill all |
Kills all loaded zombies across every loaded dimension. |
czai kill radius <blocks> |
Kills zombies within a radius of the executing player. |
Default Values
| Setting | Default |
|---|---|
| Mod enabled | true |
| Ignore line of sight | false |
| Prevent despawn | false |
| Visibility range | 35.0 blocks |
| Acquisition distance variability | 0.0 blocks |
| Chance to auto-select closest target | 100.0% |
| Switching enabled | false |
| Switching interval | 40 ticks |
| Switching search radius | 16.0 blocks |
| Switching proximity bias | 0.0 |
| Switching current target bias | 1.0 |
| Switching closer-than-current-target bias | 1.5 |
Targeting Notes
- Acquisition still respects vanilla target categories such as players, villagers, iron golems, and baby turtles on land.
- Switching does not jump between target families. If a zombie is currently chasing a villager, it will only compare that villager against other villager candidates during a switching pass.
- Line-of-sight bypass still respects attack validity checks and the configured visibility range.
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Configurable Zombie AI
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
在此版本中首次发布。 缺少 0.2.x 系列的功能。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧