Update README with detailed mod installation and configuration instructions for ZomboidForge.
This commit is contained in:
1 parent
a0d1ec2feb
commit
c56046469e
3 files changed
+190
-10
No files matched your search
@@ -50,7 +50,7 @@ Unset variables keep the value in the server `.ini` (or the game default).
|
||||
| `MODS` | | Mod IDs, Build 42 format: `\ModA;\ModB` |
|
||||
| `WORKSHOP_ITEMS` | | Workshop item IDs: `123;456` |
|
||||
| `RCON_PASSWORD` | | Written into the `.ini` on every start; RCON is disabled without it |
|
||||
| `JVM_MIN_HEAP` | | `-Xms` |
|
||||
| `JVM_MIN_HEAP` | `JVM_MAX_HEAP` | `-Xms` |
|
||||
| `JVM_MAX_HEAP` | `8g` | `-Xmx` |
|
||||
| `STEAM` | `1` | `0` runs the server without Steam |
|
||||
| `SOFT_RESET` | | `true` starts once in soft reset mode (`-Dsoftreset`); unset it afterwards |
|
||||
@@ -64,20 +64,61 @@ Notes:
|
||||
items (`/data/steamapps`). The server runs as UID 1000. A bind-mounted host directory
|
||||
must be writable by UID 1000 (`chown 1000:1000 <dir>`); with rootless Podman, use
|
||||
`--userns=keep-id:uid=1000,gid=1000` to map it to your own user.
|
||||
- **Java mods:** mount a directory at `/forge` (e.g. `-v ./forge:/forge`) with one folder
|
||||
per mod: `mods/<id>/<id>.jar`, optional `mods/<id>/lib/*.jar`, and the mod's settings in
|
||||
`mods/<id>/config.toml`. A missing `config.toml` is created from the mod's defaults when
|
||||
the folder is writable by UID 1000. `[forge]` `enabled = false` in it switches the mod off.
|
||||
A mod that cannot be loaded (missing dependency, wrong game version, game classes that do
|
||||
not exist in the running version, failing `onLoad`) stops the server with exit code 1 and
|
||||
lists every problem in the log. Optional `/forge/forge.toml`: `[main_thread] budget_ms`
|
||||
(time per tick for mods' main-thread tasks, default 2) and `[shutdown] timeout_s` (time
|
||||
mod threads get to finish when the server stops, default 10).
|
||||
- **Stopping:** `SIGTERM` triggers the game's own save-and-quit. Allow enough time for large
|
||||
worlds (`podman stop -t 120`, `stop_grace_period` in compose).
|
||||
|
||||
For local testing there is `compose.yaml` (`podman compose up --build`, settings from `.env`).
|
||||
|
||||
## Mods
|
||||
|
||||
ZomboidForge loads server-side Java mods. They run only on the server, so players keep the
|
||||
official, unmodified client. Project Zomboid's own Lua and Workshop mods are configured as
|
||||
usual with `MODS` and `WORKSHOP_ITEMS`.
|
||||
|
||||
### Installing mods
|
||||
|
||||
Mount a directory at `/forge` with one folder per mod:
|
||||
|
||||
```
|
||||
forge/
|
||||
├── forge.toml optional global settings
|
||||
└── mods/
|
||||
└── <id>/
|
||||
├── <id>.jar the mod
|
||||
├── lib/*.jar libraries of the mod (optional)
|
||||
└── config.toml settings of the mod (optional)
|
||||
```
|
||||
|
||||
```sh
|
||||
podman run ... -v ./forge:/forge zomboidforge
|
||||
```
|
||||
|
||||
- **Settings:** a missing `config.toml` is created from the mod's defaults when the folder is
|
||||
writable by UID 1000; otherwise the defaults are used without a file. Keys missing from
|
||||
`config.toml` take the default.
|
||||
- **Switching a mod off:** `enabled = false` in the `[forge]` table of its `config.toml`.
|
||||
Mods that depend on it then fail to load.
|
||||
- **Failures:** a mod that cannot be loaded stops the server with exit code 1, and the log
|
||||
lists every problem. Examples: a missing or too old dependency, an unsupported game
|
||||
version, game classes or methods that do not exist in the running version, invalid
|
||||
settings, an exception in the mod's startup code.
|
||||
- **Changes** to mods and their settings take effect when the server restarts.
|
||||
|
||||
`forge.toml`, every key optional:
|
||||
|
||||
```toml
|
||||
[main_thread]
|
||||
budget_ms = 2 # time per tick for tasks that mods hand to the main thread
|
||||
|
||||
[shutdown]
|
||||
timeout_s = 10 # time the mods' threads get to finish when the server stops
|
||||
```
|
||||
|
||||
### Mod development
|
||||
|
||||
Writing a mod (descriptor, entry point, threads, events, settings, startup checks):
|
||||
[MOD_DEVELOPMENT.md](MOD_DEVELOPMENT.md).
|
||||
|
||||
## Development
|
||||
|
||||
Requires JDK 25 (the game's runtime). The Gradle build compiles against a local vanilla
|
||||
|
||||
Reference in new issue
Block a user