

ZombieJoiner is a PEAK BepInEx mod that lets the host spawn computer-controlled zombie companions. These zombies are generated in-game, listen to player ping markers, and try to travel to the marked destination by simulating normal character movement.
| Key | Action |
|---|---|
| J | Spawn a controlled zombie near the local player |
| K | Delete the nearest controlled zombie |
| Player ping | Set the zombie destination |
When a zombie is spawned, the mod creates a MushroomZombie object and attaches a custom controller to it. The controller reads the most recent player ping marker and treats that point as the active destination.
Instead of using a simple straight-line movement command, the zombie tries to move more like an in-game character. It checks the terrain around itself, decides whether the destination is directly reachable, and then chooses an action such as walking, detouring, climbing, jumping, or dropping down.
The path system is based on several action types:
The controller continuously replans while moving. If a route segment fails, the zombie records that failure and tries to avoid repeating the same bad route immediately.
ZombieJoiner does not rely on a full NavMesh. The AI uses local probing and player-like input simulation. This makes it flexible in dynamic terrain, but it also means the zombie may sometimes make imperfect decisions in complex areas.
The current navigation approach is best suited for:
The navigation can be less reliable when:
The zombie follows the latest ping marker as a coordinate, but it does not fully understand player intent. A human player can tell the difference between a wall ping, an edge ping, a platform ping, or a route hint. The zombie currently treats the marker mainly as a destination point and then tries to resolve a nearby standable position.
The local path planner is mostly greedy. It looks around itself and chooses a nearby action that appears useful. This works for simple movement, but it may not always pick the same route a real player would choose. For example, a player may walk around to a ramp, while the zombie may try to climb a nearby wall.
Climbing and jump-grab logic are intentionally available so the zombie can handle vertical terrain, but these actions can sometimes be too aggressive. If the zombie is near a wall and the goal is above it, it may attempt to climb even when a safer player-like route exists nearby.
Drop-down and gap-jump decisions are also approximate. The zombie checks whether a landing point appears valid, but it cannot perfectly evaluate every danger or special terrain case. For this reason, extreme cliffs, narrow ledges, and unusual map geometry may still cause bad movement.
To reduce crashes and broken states, the mod includes defensive checks around common failure points such as missing characters, missing data objects, destroyed GameObjects, invalid Photon ownership, deleted zombies, and stale interaction references.
The zombie AI is intended to be driven by the client that owns the spawned zombie object. Remote clients should mostly receive visual and network state updates. If ownership or room state changes unexpectedly, the zombie may temporarily stop moving until the owning client or host state is valid again.
For the most stable results, spawn and delete zombies as the host or master client.
The mod exposes basic BepInEx configuration values after first launch:
SpawnZombieKey: key used to spawn a zombie. Default: J.DeleteZombieKey: key used to delete the nearest zombie. Default: K.ZombiePrefabName: Photon prefab name used for the zombie. Default: MushroomZombie.SpawnForwardOffset: distance in front of the player where the zombie spawns.SpawnNearPlayer: whether the zombie should spawn near the local player.ZombieJoiner 是一个用于 PEAK 的 BepInEx 模组。
它可以在游戏中生成一个由电脑控制的僵尸角色,让僵尸根据玩家的标点自动移动、爬墙、绕路、跳跃或下落,尽量到达玩家指定的位置。
| 按键 | 功能 |
|---|---|
| J | 生成一个电脑僵尸 |
| K | 删除最近的电脑僵尸 |
按键可以在 BepInEx 生成的配置文件中修改。
模组启动后会在 BepInEx 配置目录中生成配置文件。
常见配置项包括:
| 配置项 | 默认值 | 说明 |
|---|---|---|
| SpawnZombieKey | J | 生成僵尸的按键 |
| DeleteZombieKey | K | 删除最近僵尸的按键 |
| ZombiePrefabName | MushroomZombie | 要生成的僵尸 prefab 名称 |
| SpawnForwardOffset | 2.5 | 在玩家前方多少距离生成僵尸 |
| SpawnNearPlayer | true | 是否在玩家附近生成僵尸 |
ZombieJoiner 的僵尸寻路并不是传统 NavMesh 寻路,而是模拟玩家输入进行移动。
整体流程大致如下:
这套寻路逻辑更偏向“局部地形判断”,不是完整地图级寻路。
优点:
可能的不足:
模组中加入了一些防崩溃处理:
MushroomZombie、Character、CharacterData 和 PhotonView 是否存在。PhotonNetwork.Destroy。ZombieJoiner.dll 放入:##作者
BepInEx/plugins/