Compare commits
4
Commits
ff660ac76d
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
226c909d19 | ||
|
|
e1094d96a2 | ||
|
|
8fdd1b9b03 | ||
|
|
29cb4484c1 |
No files matched your search
@@ -0,0 +1,34 @@
|
||||
# Builds the mod for every v* tag and publishes it as a release with lua_mod_automator.zip
|
||||
# attached, so .../releases/download/latest/lua_mod_automator.zip always serves the newest one.
|
||||
# Pre-release tags (containing "-") are built and tested but not released (see ci/release.sh).
|
||||
# Uses the repository secret RELEASE_TOKEN (a token with "repository: Read and Write") when it
|
||||
# exists, else the job's automatic token.
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
||||
with:
|
||||
# release.sh reads the v* tag on HEAD
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-java@cf277c60eb25467037889841efdb72551f06f6c3 # v4.9.1
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "25"
|
||||
|
||||
# The build runs without the token; only the publish step gets it.
|
||||
- name: Build
|
||||
run: ci/release.sh build
|
||||
|
||||
- name: Publish
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN || secrets.GITEA_TOKEN }}
|
||||
run: ci/release.sh publish
|
||||
+14
-65
@@ -1,18 +1,16 @@
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
*.md
|
||||
!README.md
|
||||
/lib
|
||||
.*/
|
||||
!.gitea/
|
||||
|
||||
# Log file
|
||||
build/
|
||||
out/
|
||||
*.class
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
@@ -20,58 +18,9 @@
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
# ---> Kotlin
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
# Kotlin Gradle plugin data, see https://kotlinlang.org/docs/whatsnew20.html#new-directory-for-kotlin-data-in-gradle-projects
|
||||
.kotlin/
|
||||
# ---> Gradle
|
||||
.gradle
|
||||
**/build/
|
||||
!src/**/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Avoid ignore Gradle wrapper properties
|
||||
!gradle-wrapper.properties
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# Eclipse Gradle plugin generated files
|
||||
# Eclipse Core
|
||||
.project
|
||||
# JDT-specific (Eclipse Java Development Tools)
|
||||
.classpath
|
||||
*.lib
|
||||
*.exe
|
||||
*.dll
|
||||
*.so
|
||||
|
||||
.env
|
||||
@@ -1,3 +1,171 @@
|
||||
# LuaModAutomator
|
||||
|
||||
[ZomboidForge](https://git.security-command.org/Overlord/ZomboidForge) mod that automatically updates Lua Mods on the Server via a provided, public Steam Collection.
|
||||
A [ZomboidForge](https://git.security-command.org/Overlord/ZomboidForge) mod that takes a
|
||||
Project Zomboid server's mod list from a public Steam Workshop collection. At every start it
|
||||
reads the collection and sets `Mods=`, `WorkshopItems=`, and `Map=` before the server uses
|
||||
them, so the collection is the only place to maintain the mod list: change it on Steam,
|
||||
restart the server, done. While the server runs, it checks the collection periodically and
|
||||
logs when it no longer matches, or when items received updates on Steam.
|
||||
|
||||
Players keep the official, unmodified client; the mod runs on the server only.
|
||||
|
||||
## Requirements
|
||||
|
||||
- ZomboidForge 0.4.0 or newer, Project Zomboid Build 42 (dedicated server)
|
||||
- Steam mode (the default of the ZomboidForge image), which the Workshop download needs
|
||||
- a **Public** Steam Workshop collection: unlisted, friends-only, and private collections are
|
||||
invisible to Steam's Web API
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download the newest release and unpack it into `<forge>/mods/`, which gives
|
||||
`<forge>/mods/lua_mod_automator/`:
|
||||
|
||||
```shell
|
||||
curl --fail --location --output lua_mod_automator.zip \
|
||||
https://git.security-command.org/Overlord/LuaModAutomator/releases/download/latest/lua_mod_automator.zip
|
||||
unzip -o lua_mod_automator.zip -d <forge>/mods/
|
||||
```
|
||||
|
||||
Every release also carries `lua_mod_automator-<version>.zip` for a fixed version. To update,
|
||||
remove `lua_mod_automator.jar` and `lib/` from the mod's folder first and unpack the new zip;
|
||||
`config.toml` is not part of the zip and stays.
|
||||
2. Create `<forge>/mods/lua_mod_automator/config.toml` with at least the collection:
|
||||
|
||||
```toml
|
||||
collection = "https://steamcommunity.com/sharedfiles/filedetails/?id=<collection id>"
|
||||
```
|
||||
|
||||
3. Restart the server. The log lists the resolved mods.
|
||||
|
||||
With the ZomboidForge container image, leave `MODS` and `WORKSHOP_ITEMS` unset: the mod
|
||||
replaces those values at every start anyway.
|
||||
|
||||
## How the mod list is built
|
||||
|
||||
For every item of the collection, Steam's Web API returns its title, tags, and description.
|
||||
|
||||
- **Mod IDs** come from description lines such as `Mod ID: Foo` or `ModID = Foo; Bar`. An item
|
||||
without one stays in `WorkshopItems=` (so the server downloads it) but is left out of `Mods=`,
|
||||
with a warning; `[items.<id>] mod_ids` supplies it. The same applies to items Steam returns no
|
||||
details for (private, unlisted, or removed items inside the collection).
|
||||
- **Buckets** decide the load order: `map` (a `Map Folder:` line in the description),
|
||||
`framework` (the Steam tag *Framework*), or `misc`. Buckets load in the order of
|
||||
`[order] buckets`, items within a bucket in collection order.
|
||||
- **Order**: the items of `[order] priority` load first, in that order; then items with a
|
||||
`position` move to that place, lowest position first.
|
||||
- **`Map=`**: the `Map Folder:` folders of map items in load order, followed by
|
||||
`[ini] base_map`, each once.
|
||||
|
||||
Values go into the server's `.ini` (`[ini] write`), so `showoptions` and the file show what runs.
|
||||
|
||||
### When Steam cannot be reached
|
||||
|
||||
The server always starts. The mod uses, in this order:
|
||||
|
||||
1. the collection, resolved live from Steam;
|
||||
2. the last successful resolution of the same collection, cached in the world's
|
||||
`zomboidforge.db`;
|
||||
3. the values already in the `.ini`.
|
||||
|
||||
Every fallback is logged as a warning. An invalid `config.toml` leaves the `.ini` as it is.
|
||||
|
||||
## Settings
|
||||
|
||||
`<forge>/mods/lua_mod_automator/config.toml` overrides the defaults key by key; keys left out
|
||||
keep their default. Every setting, with its default where it has one:
|
||||
|
||||
```toml
|
||||
# The collection: its URL or numeric id. Empty (default): the mod does nothing.
|
||||
collection = "https://steamcommunity.com/sharedfiles/filedetails/?id=1234567890"
|
||||
|
||||
[ini]
|
||||
write = true # save the resolved Mods=, WorkshopItems=, Map= into the .ini
|
||||
manage_map = true # false: Map= is left alone
|
||||
base_map = ["Muldraugh, KY"] # Map= ends with these folders, after those of the map items
|
||||
|
||||
[steam]
|
||||
timeout_s = 20 # seconds per Web API request
|
||||
|
||||
[drift]
|
||||
interval_min = 30 # minutes between drift checks while running; 0 turns them off
|
||||
|
||||
[order]
|
||||
buckets = ["map", "patches", "framework", "misc"] # default: ["map", "framework", "misc"]
|
||||
priority = ["3543229299", "UnifiedCarryWeightFramework"] # default: []; workshop ids or Mod IDs
|
||||
|
||||
# Overrides per item (default: none). The key is a workshop id or a Mod ID of an item in the
|
||||
# collection; Mod IDs with characters other than letters, digits, _ and - need quotes.
|
||||
# Every field is optional.
|
||||
|
||||
[items.3790407759] # Steam returns no description for it
|
||||
mod_ids = ["RconDataBridge"] # replaces the Mod IDs parsed from the description
|
||||
title = "RCON Data Bridge" # name in the logged mod list
|
||||
|
||||
[items.2553809727]
|
||||
bucket = "misc" # tagged Framework on Steam, but loads with the rest
|
||||
|
||||
[items.SomeFixPack]
|
||||
bucket = "patches" # a custom bucket, listed in [order] buckets
|
||||
|
||||
[items.ISA] # addressed by Mod ID
|
||||
position = 3 # place 3 of the final list (applied after priority)
|
||||
|
||||
[items."Better.Lights"] # quoted: the Mod ID contains a dot
|
||||
mod_ids = ["BetterLights"] # the item ships BetterLights and BetterLights_Lite: load one
|
||||
|
||||
[items.2345678901]
|
||||
exclude = true # left out of Mods=, WorkshopItems=, and Map=
|
||||
```
|
||||
|
||||
Problems that do not stop the mod are logged as warnings: `[items]` keys or `priority`
|
||||
entries that match no item, two keys naming the same item (the workshop-id key wins field by
|
||||
field), Mod IDs named by two items (`Mods=` lists them once), unknown keys. An item that lands
|
||||
in a bucket missing from `[order] buckets` is an error: the mod then falls back as if Steam
|
||||
could not be reached.
|
||||
|
||||
## While the server runs
|
||||
|
||||
Every `[drift] interval_min` minutes the mod resolves the collection again and logs, once per
|
||||
change:
|
||||
|
||||
- how the collection differs from what the server runs: items or Mod IDs added, removed, or in
|
||||
another order, a different `Map=`;
|
||||
- items that were updated on Steam after the server started. Clients that download the new
|
||||
version may not be able to join until the server restarts and downloads it too.
|
||||
|
||||
The mod never restarts the server; changes apply at the next start.
|
||||
|
||||
### `/collection`
|
||||
|
||||
An admin command for the in-game chat, the server console, and RCON (capability
|
||||
`ManipulateMods`, like vanilla's `checkModsNeedUpdate`):
|
||||
|
||||
| Command | Does |
|
||||
|---------------------|---------------------------------------------------------------------------------|
|
||||
| `/collection` | where the running mod list comes from, its counts, and the last drift check |
|
||||
| `/collection check` | starts a drift check now; the result goes to the log and the next `/collection` |
|
||||
|
||||
## Building
|
||||
|
||||
Needs JDK 25 and the ZomboidForge Gradle plugin, which Gradle downloads. The game jar comes
|
||||
from a local Steam installation of Project Zomboid or its dedicated server, or from a steamcmd
|
||||
download (see ZomboidForge's mod development guide).
|
||||
|
||||
```shell
|
||||
./gradlew build # compiles, tests, checks the mod against the game, and packs build/distributions/
|
||||
./gradlew runServer # a ZomboidForge server in a container with the mod (default settings: idle)
|
||||
```
|
||||
|
||||
`runServer` mounts the mod read-only, so it runs with the default settings, in which the mod
|
||||
is idle. To try it with a collection, copy `build/mod/lua_mod_automator/` into a server's mods
|
||||
directory (or set `zomboidForge.deployDirectory` and run `./gradlew deployMod`) and add a
|
||||
`config.toml` there.
|
||||
|
||||
Pushing a tag `v<version>` that matches `version` in `build.gradle.kts` builds the mod and
|
||||
publishes it as a release (`.gitea/workflows/release.yml`, `ci/release.sh`). Tags containing
|
||||
`-` (e.g. `v0.2.0-rc.1`) are built and tested but not released.
|
||||
|
||||
## License
|
||||
|
||||
[GNU Affero General Public License v3.0](LICENSE)
|
||||
@@ -0,0 +1,41 @@
|
||||
plugins {
|
||||
id("dev.overlord.zomboidforge.mod") version "0.4.0" // the plugin's version is the ZomboidForge API version
|
||||
}
|
||||
|
||||
version = "0.1.0"
|
||||
|
||||
zomboidForge {
|
||||
id = "lua_mod_automator"
|
||||
name = "LuaModAutomator"
|
||||
entrypoint = "dev.overlord.luamodautomator.LuaModAutomatorMod"
|
||||
game("42") // ServerOptions, GameServer, CommandBase
|
||||
serverImage = "git.security-command.org/overlord/zomboidforge:0.4.0-pz42.21"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.google.code.gson:gson:2.13.2") // bundled into the mod's lib/
|
||||
|
||||
compileOnly("org.jetbrains:annotations:26.0.2")
|
||||
testCompileOnly("org.jetbrains:annotations:26.0.2")
|
||||
|
||||
// ZomboidForge's config.toml parser and binder, to bind the settings the way the server does.
|
||||
testImplementation("dev.overlord.zomboidforge:mod-tools:0.4.0")
|
||||
|
||||
testImplementation(platform("org.junit:junit-bom:6.1.3"))
|
||||
testImplementation("org.junit.jupiter:junit-jupiter")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
// Gson's Error Prone annotations matter only to the compiler; lib/ is the runtime classpath.
|
||||
configurations.runtimeClasspath {
|
||||
exclude(group = "com.google.errorprone")
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile>().configureEach {
|
||||
options.encoding = "UTF-8"
|
||||
options.compilerArgs.addAll(listOf("-Xlint:all", "-Xlint:-options", "-Xlint:-path"))
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
Executable
+213
@@ -0,0 +1,213 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Builds the mod for the v* git tag on HEAD and publishes it as a Gitea release, with the zip
|
||||
# attached twice: as lua_mod_automator-<version>.zip, and as lua_mod_automator.zip, the stable
|
||||
# name behind <server>/<owner>/<repo>/releases/download/latest/lua_mod_automator.zip.
|
||||
#
|
||||
# A pre-release tag (containing "-", e.g. v0.2.0-rc.1) is built and tested but not released.
|
||||
# The tag must match the version in build.gradle.kts.
|
||||
#
|
||||
# Usage:
|
||||
# ci/release.sh build downloads the game jar and builds the mod (tests and checkMod included)
|
||||
# ci/release.sh publish creates the release (or reuses the tag's release) and uploads the zip
|
||||
#
|
||||
# Environment:
|
||||
# GAME_JAR projectzomboid.jar to build against (build); default: downloaded from
|
||||
# the Steam branch PZ_BRANCH (default: public) with DepotDownloader
|
||||
# GITEA_TOKEN token with write access to the repository's releases (publish)
|
||||
# GITHUB_API_URL Gitea API, e.g. https://git.security-command.org/api/v1 (publish; set by Gitea Actions)
|
||||
# GITHUB_REPOSITORY owner/repo (publish; set by Gitea Actions)
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
shopt -s inherit_errexit
|
||||
|
||||
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
readonly REPO_ROOT
|
||||
|
||||
readonly MOD_ID="lua_mod_automator"
|
||||
readonly WORK_DIR="${REPO_ROOT}/build/ci"
|
||||
|
||||
# DepotDownloader downloads single files of a depot; steamcmd only whole apps. Same release
|
||||
# and checksum as ZomboidForge's image build.
|
||||
readonly DEPOT_DOWNLOADER_URL="https://github.com/SteamRE/DepotDownloader/releases/download/DepotDownloader_3.4.0/DepotDownloader-linux-x64.zip"
|
||||
readonly DEPOT_DOWNLOADER_SHA256="a999dec66b4850fc961bd50366696d23c2d0fad7b18790e6a5647b2f19097a53"
|
||||
|
||||
# Project Zomboid Dedicated Server: app and its depot with java/projectzomboid.jar.
|
||||
readonly PZ_APP="380870"
|
||||
readonly PZ_DEPOT="380871"
|
||||
|
||||
log() {
|
||||
echo "[release] $*" >&2
|
||||
}
|
||||
|
||||
fail() {
|
||||
log "$*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Prints the v* tag on HEAD, or nothing.
|
||||
release_tag() {
|
||||
git -C "${REPO_ROOT}" describe --tags --exact-match --match 'v*' 2> /dev/null || true
|
||||
}
|
||||
|
||||
run_gradle() {
|
||||
"${REPO_ROOT}/gradlew" --no-daemon --console=plain --project-dir "${REPO_ROOT}" "$@"
|
||||
}
|
||||
|
||||
project_version() {
|
||||
run_gradle --quiet properties --property version | sed --quiet 's/^version: //p'
|
||||
}
|
||||
|
||||
# Downloads java/projectzomboid.jar of the dedicated server and prints its path.
|
||||
download_game_jar() {
|
||||
local branch="${PZ_BRANCH:-public}"
|
||||
local tools="${WORK_DIR}/depotdownloader"
|
||||
local game="${WORK_DIR}/game"
|
||||
|
||||
mkdir --parents "${tools}" "${game}"
|
||||
|
||||
log "Downloading DepotDownloader"
|
||||
curl --fail --silent --show-error --location --output "${tools}/depotdownloader.zip" "${DEPOT_DOWNLOADER_URL}"
|
||||
echo "${DEPOT_DOWNLOADER_SHA256} ${tools}/depotdownloader.zip" | sha256sum --check --quiet
|
||||
unzip -q -o "${tools}/depotdownloader.zip" -d "${tools}"
|
||||
chmod +x "${tools}/DepotDownloader"
|
||||
|
||||
log "Downloading projectzomboid.jar of the Steam branch '${branch}'"
|
||||
echo "java/projectzomboid.jar" > "${tools}/files"
|
||||
"${tools}/DepotDownloader" -app "${PZ_APP}" -depot "${PZ_DEPOT}" -branch "${branch}" -filelist "${tools}/files" -dir "${game}" >&2
|
||||
|
||||
echo "${game}/java/projectzomboid.jar"
|
||||
}
|
||||
|
||||
build() {
|
||||
local tag="$1"
|
||||
local version="${tag#v}"
|
||||
local project
|
||||
local game_jar="${GAME_JAR:-}"
|
||||
|
||||
project="$(project_version)"
|
||||
if [[ "${project}" != "${version}" ]]; then
|
||||
fail "The tag '${tag}' does not match the version '${project}' in build.gradle.kts."
|
||||
fi
|
||||
|
||||
if [[ -z "${game_jar}" ]]; then
|
||||
game_jar="$(download_game_jar)"
|
||||
fi
|
||||
|
||||
log "Building ${MOD_ID} ${version} against '${game_jar}'"
|
||||
run_gradle "-Pzomboidforge.gameJar=${game_jar}" build
|
||||
}
|
||||
|
||||
# Calls the Gitea API; prints the response body. Extra arguments go to curl.
|
||||
api() {
|
||||
local method="$1"
|
||||
local path="$2"
|
||||
shift 2
|
||||
|
||||
curl --fail --silent --show-error \
|
||||
--request "${method}" \
|
||||
--header "Authorization: token ${GITEA_TOKEN}" \
|
||||
--header "Accept: application/json" \
|
||||
"$@" \
|
||||
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}${path}"
|
||||
}
|
||||
|
||||
# Prints the id of the tag's release, created when it does not exist yet.
|
||||
release_id() {
|
||||
local tag="$1"
|
||||
local status
|
||||
local body
|
||||
|
||||
status="$(curl --silent --output /dev/null --write-out '%{http_code}' \
|
||||
--header "Authorization: token ${GITEA_TOKEN}" \
|
||||
"${GITHUB_API_URL}/repos/${GITHUB_REPOSITORY}/releases/tags/${tag}")"
|
||||
|
||||
case "${status}" in
|
||||
200)
|
||||
log "Release '${tag}' exists; replacing its files"
|
||||
api GET "/releases/tags/${tag}" | jq --raw-output '.id'
|
||||
return
|
||||
;;
|
||||
404)
|
||||
;;
|
||||
*)
|
||||
fail "Cannot read the releases of '${GITHUB_REPOSITORY}' (HTTP ${status}); is GITEA_TOKEN valid for it?"
|
||||
;;
|
||||
esac
|
||||
|
||||
body="$(jq --null-input \
|
||||
--arg tag "${tag}" \
|
||||
--arg name "Release ${tag} - Stable, Automated" \
|
||||
--arg body "$(date --utc +%Y-%m-%d)"$'\n'"$(git -C "${REPO_ROOT}" rev-parse HEAD)" \
|
||||
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')"
|
||||
|
||||
log "Creating release '${tag}'"
|
||||
api POST "/releases" --header "Content-Type: application/json" --data "${body}" | jq --raw-output '.id'
|
||||
}
|
||||
|
||||
# Uploads ${file} as ${name}, replacing an attached file of that name.
|
||||
upload() {
|
||||
local id="$1"
|
||||
local file="$2"
|
||||
local name="$3"
|
||||
local existing
|
||||
|
||||
existing="$(api GET "/releases/${id}/assets" | jq --raw-output --arg name "${name}" '.[] | select(.name == $name) | .id')"
|
||||
if [[ -n "${existing}" ]]; then
|
||||
api DELETE "/releases/${id}/assets/${existing}" > /dev/null
|
||||
fi
|
||||
|
||||
api POST "/releases/${id}/assets?name=${name}" --form "attachment=@${file}" > /dev/null
|
||||
log "Attached '${name}'"
|
||||
}
|
||||
|
||||
publish() {
|
||||
local tag="$1"
|
||||
local version="${tag#v}"
|
||||
local zip="${REPO_ROOT}/build/distributions/${MOD_ID}-${version}.zip"
|
||||
local id
|
||||
|
||||
if [[ "${version}" == *-* ]]; then
|
||||
log "${tag} is a pre-release tag; nothing is released."
|
||||
return
|
||||
fi
|
||||
|
||||
: "${GITEA_TOKEN:?GITEA_TOKEN is not set}"
|
||||
: "${GITHUB_API_URL:?GITHUB_API_URL is not set}"
|
||||
: "${GITHUB_REPOSITORY:?GITHUB_REPOSITORY is not set}"
|
||||
|
||||
[[ -f "${zip}" ]] || fail "'${zip}' does not exist; run 'ci/release.sh build' first."
|
||||
|
||||
id="$(release_id "${tag}")"
|
||||
upload "${id}" "${zip}" "${MOD_ID}-${version}.zip"
|
||||
upload "${id}" "${zip}" "${MOD_ID}.zip"
|
||||
|
||||
log "Released ${tag}: ${GITHUB_SERVER_URL:-}/${GITHUB_REPOSITORY}/releases/tag/${tag}"
|
||||
}
|
||||
|
||||
main() {
|
||||
local step="${1:-}"
|
||||
local tag
|
||||
|
||||
tag="$(release_tag)"
|
||||
if [[ -z "${tag}" ]]; then
|
||||
fail "HEAD has no v* git tag (not a release commit, or a shallow clone without tags?); nothing to release."
|
||||
fi
|
||||
|
||||
case "${step}" in
|
||||
build)
|
||||
build "${tag}"
|
||||
;;
|
||||
publish)
|
||||
publish "${tag}"
|
||||
;;
|
||||
*)
|
||||
log "Usage: ci/release.sh build|publish"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Vendored
BIN
Binary file not shown.
+9
@@ -0,0 +1,9 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -0,0 +1,248 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh gradlew
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/<unknown>/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+112
@@ -0,0 +1,112 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem gradlew startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
@rem Catch executions from older scripts and ensure they exit cleanly.
|
||||
@rem This can be removed once we can be reasonably confident that few people
|
||||
@rem will be migrating directly to this new wrapper.
|
||||
goto afterSafetyNet
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
goto exitWithErrorLevel
|
||||
:afterSafetyNet
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
1>&2 echo.
|
||||
1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
1>&2 echo.
|
||||
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
|
||||
1>&2 echo location of your Java installation.
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
1>&2 echo.
|
||||
1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
1>&2 echo.
|
||||
1>&2 echo Please set the JAVA_HOME variable in your environment to match the
|
||||
1>&2 echo location of your Java installation.
|
||||
|
||||
"%COMSPEC%" /c exit 1
|
||||
goto exitWithErrorLevel
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel & goto exitWithErrorLevel
|
||||
|
||||
@rem This label must not be changed. We rely on old scripts being able to jump to this point.
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
@@ -0,0 +1,15 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven("https://git.security-command.org/api/packages/overlord/maven")
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
dependencyResolutionManagement {
|
||||
repositories {
|
||||
maven("https://git.security-command.org/api/packages/overlord/maven")
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "LuaModAutomator"
|
||||
@@ -0,0 +1,25 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The last successful resolution of a collection, a row of the table {@code resolutions} keyed
|
||||
* by collection id. The server falls back to it when Steam cannot be reached at startup.
|
||||
*
|
||||
* @param modList the lines of {@link Resolution#modList()}, joined by line breaks
|
||||
*/
|
||||
record CachedResolution(Instant resolvedAt, String mods, String workshopItems, String map, String modList)
|
||||
{
|
||||
static final String TABLE = "resolutions";
|
||||
|
||||
static CachedResolution of(Instant resolvedAt, ServerValues values, List<String> modList)
|
||||
{
|
||||
return new CachedResolution(resolvedAt, values.mods(), values.workshopItems(), values.map(), String.join("\n", modList));
|
||||
}
|
||||
|
||||
ServerValues values() { return new ServerValues(this.mods, this.workshopItems, this.map); }
|
||||
|
||||
List<String> modListLines() { return Arrays.asList(this.modList.split("\n")); }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import zombie.characters.Capability;
|
||||
import zombie.characters.Role;
|
||||
import zombie.commands.CommandArgs;
|
||||
import zombie.commands.CommandBase;
|
||||
import zombie.commands.CommandHelp;
|
||||
import zombie.commands.CommandName;
|
||||
import zombie.commands.RequiredCapability;
|
||||
import zombie.core.raknet.UdpConnection;
|
||||
|
||||
/**
|
||||
* {@code /collection}: where the running mod list comes from and the result of the last drift
|
||||
* check. {@code /collection check} starts a drift check on the mod thread. Works in the chat,
|
||||
* the server console, and RCON; needs the capability of vanilla's {@code checkModsNeedUpdate}.
|
||||
*/
|
||||
@CommandName(name = "collection")
|
||||
@CommandArgs(optional = "(\\S+)")
|
||||
@CommandHelp(helpText = "collection [check]: shows where the mod list comes from and the last drift check; 'check' starts a drift check", shouldTranslated = false)
|
||||
@RequiredCapability(requiredCapability = Capability.ManipulateMods)
|
||||
public class CollectionCommand extends CommandBase
|
||||
{
|
||||
public CollectionCommand(String username, Role role, String command, UdpConnection connection) { super(username, role, command, connection); }
|
||||
|
||||
@Override
|
||||
protected String Command()
|
||||
{
|
||||
@Nullable LuaModAutomatorMod mod = LuaModAutomatorMod.instance();
|
||||
@Nullable String argument = this.getCommandArg(0);
|
||||
|
||||
if (mod == null) return "LuaModAutomator is not loaded.";
|
||||
if (argument == null) return mod.report();
|
||||
if (argument.equalsIgnoreCase("check")) return mod.startCheck();
|
||||
|
||||
return "Unknown argument '" + argument + "'. Usage: /collection [check]";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,263 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* Turns the items of a collection and the settings into the load order: overrides from
|
||||
* {@code [items]}, buckets, {@code [order] priority}, and pinned positions.
|
||||
*
|
||||
* <p>Items are referenced by workshop id or by Mod ID. A reference of digits only is a
|
||||
* workshop id; any other is a Mod ID, matched ignoring case. A Mod ID refers to the first item
|
||||
* that has it.
|
||||
*/
|
||||
final class CollectionResolver
|
||||
{
|
||||
static final String MAP = "map";
|
||||
static final String FRAMEWORK = "framework";
|
||||
static final String MISC = "misc";
|
||||
|
||||
private CollectionResolver() {}
|
||||
|
||||
/**
|
||||
* @throws ConfigurationException when an item lands in a bucket that {@code order} does not list
|
||||
*/
|
||||
static Resolution resolve(List<WorkshopItem> collection, Settings.Order order, Map<String, Settings.Item> overrides) throws ConfigurationException
|
||||
{
|
||||
List<String> warnings = new ArrayList<>();
|
||||
Map<String, WorkshopItem> byId = new LinkedHashMap<>();
|
||||
Map<String, Settings.Item> resolved = CollectionResolver.overrides(collection, overrides, warnings);
|
||||
|
||||
for (WorkshopItem item : collection) byId.putIfAbsent(item.id(), item);
|
||||
|
||||
// Items with their overrides applied, in collection order.
|
||||
List<Resolution.Item> active = new ArrayList<>();
|
||||
List<Resolution.Item> excluded = new ArrayList<>();
|
||||
List<String> problems = new ArrayList<>();
|
||||
|
||||
for (WorkshopItem item : byId.values())
|
||||
{
|
||||
Settings.Item override = resolved.getOrDefault(item.id(), Settings.Item.NONE);
|
||||
Resolution.Item result = CollectionResolver.apply(item, override);
|
||||
|
||||
if (override.excluded())
|
||||
{
|
||||
excluded.add(result);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!order.buckets().contains(result.bucket()))
|
||||
problems.add("'" + result.title() + "' (" + item.id() + ") lands in bucket '" + result.bucket() + "', which [order] buckets does not list.");
|
||||
|
||||
if (result.modIds().isEmpty())
|
||||
{
|
||||
if (item.found())
|
||||
warnings.add("'" + result.title() + "' (" + item.id() + ") names no Mod ID in its description; it stays in WorkshopItems= but not in Mods=. Set [items." + item.id() + "] mod_ids to load it.");
|
||||
else
|
||||
warnings.add("Steam returns no details for " + item.id() + " (private, unlisted, or removed); it stays in WorkshopItems= but not in Mods=. Set [items." + item.id() + "] mod_ids to load it.");
|
||||
}
|
||||
|
||||
if (item.map() && item.mapFolders().isEmpty())
|
||||
warnings.add("'" + result.title() + "' (" + item.id() + ") has a Map Folder line without a folder name; it adds nothing to Map=.");
|
||||
|
||||
active.add(result);
|
||||
}
|
||||
|
||||
if (!problems.isEmpty()) throw new ConfigurationException(String.join(" ", problems));
|
||||
|
||||
List<Resolution.Item> ordered = CollectionResolver.order(active, order, resolved, CollectionResolver.index(collection, resolved), warnings);
|
||||
|
||||
CollectionResolver.duplicateModIds(ordered, warnings);
|
||||
|
||||
return new Resolution(List.copyOf(ordered), List.copyOf(excluded), List.copyOf(warnings));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@code overrides} keyed by workshop id. Workshop-id keys are matched first; Mod-ID keys are
|
||||
* matched against the Mod IDs the items then have. When two keys name the same item, the
|
||||
* fields of the workshop-id key win.
|
||||
*/
|
||||
private static Map<String, Settings.Item> overrides(List<WorkshopItem> collection, Map<String, Settings.Item> overrides, List<String> warnings)
|
||||
{
|
||||
Set<String> ids = new LinkedHashSet<>();
|
||||
Map<String, Settings.Item> byId = new HashMap<>();
|
||||
Map<String, String> keyOf = new HashMap<>();
|
||||
Map<String, Settings.Item> sorted = new TreeMap<>(overrides);
|
||||
|
||||
for (WorkshopItem item : collection) ids.add(item.id());
|
||||
|
||||
for (Map.Entry<String, Settings.Item> entry : sorted.entrySet())
|
||||
{
|
||||
if (!CollectionResolver.isWorkshopId(entry.getKey())) continue;
|
||||
|
||||
if (ids.contains(entry.getKey()))
|
||||
{
|
||||
byId.put(entry.getKey(), entry.getValue());
|
||||
keyOf.put(entry.getKey(), entry.getKey());
|
||||
}
|
||||
else
|
||||
{
|
||||
warnings.add("[items." + entry.getKey() + "] matches no item of the collection; ignored.");
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> index = CollectionResolver.index(collection, byId);
|
||||
|
||||
for (Map.Entry<String, Settings.Item> entry : sorted.entrySet())
|
||||
{
|
||||
if (CollectionResolver.isWorkshopId(entry.getKey())) continue;
|
||||
|
||||
String id = index.get(entry.getKey().toLowerCase(Locale.ROOT));
|
||||
|
||||
if (id == null)
|
||||
{
|
||||
warnings.add("[items." + CollectionResolver.quoted(entry.getKey()) + "] matches no item of the collection; ignored.");
|
||||
continue;
|
||||
}
|
||||
|
||||
Settings.Item existing = byId.get(id);
|
||||
|
||||
if (existing == null)
|
||||
{
|
||||
byId.put(id, entry.getValue());
|
||||
keyOf.put(id, CollectionResolver.quoted(entry.getKey()));
|
||||
}
|
||||
else
|
||||
{
|
||||
warnings.add("[items." + CollectionResolver.quoted(entry.getKey()) + "] and [items." + keyOf.get(id) + "] name the same item; [items." + keyOf.get(id) + "] wins where both set a field.");
|
||||
byId.put(id, existing.or(entry.getValue()));
|
||||
}
|
||||
}
|
||||
|
||||
return byId;
|
||||
}
|
||||
|
||||
/** Reference index: every workshop id to itself, every Mod ID (lowercase) to the first item that has it. */
|
||||
private static Map<String, String> index(List<WorkshopItem> collection, Map<String, Settings.Item> overrides)
|
||||
{
|
||||
Map<String, String> index = new HashMap<>();
|
||||
|
||||
for (WorkshopItem item : collection) index.put(item.id(), item.id());
|
||||
|
||||
for (WorkshopItem item : collection)
|
||||
{
|
||||
Settings.Item override = overrides.getOrDefault(item.id(), Settings.Item.NONE);
|
||||
|
||||
for (String modId : override.modIds().orElse(item.modIds())) index.putIfAbsent(modId.toLowerCase(Locale.ROOT), item.id());
|
||||
}
|
||||
|
||||
// Parsed Mod IDs that an override replaced still name their item.
|
||||
for (WorkshopItem item : collection)
|
||||
{
|
||||
for (String modId : item.modIds()) index.putIfAbsent(modId.toLowerCase(Locale.ROOT), item.id());
|
||||
}
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
private static Resolution.Item apply(WorkshopItem item, Settings.Item override)
|
||||
{
|
||||
List<String> modIds = override.modIds().map(List::copyOf).orElse(item.modIds());
|
||||
String title = override.title().orElse(item.title().isEmpty() ? "(untitled " + item.id() + ")" : item.title());
|
||||
String bucket = override.bucket().map(String::strip).orElseGet(() -> CollectionResolver.bucket(item));
|
||||
|
||||
return new Resolution.Item(item.id(), title, modIds, bucket, item.mapFolders(), item.timeUpdated());
|
||||
}
|
||||
|
||||
/** {@code map} with a {@code Map Folder} line, else {@code framework} with the Steam tag {@code Framework}, else {@code misc}. */
|
||||
private static String bucket(WorkshopItem item)
|
||||
{
|
||||
if (item.map()) return CollectionResolver.MAP;
|
||||
if (item.tags().stream().anyMatch(tag -> tag.equalsIgnoreCase("Framework"))) return CollectionResolver.FRAMEWORK;
|
||||
|
||||
return CollectionResolver.MISC;
|
||||
}
|
||||
|
||||
/**
|
||||
* Buckets in the order of {@code [order] buckets}, collection order within each; then the
|
||||
* {@code priority} items first; then every pinned item moved to its position, lowest first.
|
||||
*/
|
||||
private static List<Resolution.Item> order(List<Resolution.Item> items, Settings.Order order, Map<String, Settings.Item> overrides, Map<String, String> index, List<String> warnings)
|
||||
{
|
||||
Map<String, Resolution.Item> byId = new LinkedHashMap<>();
|
||||
List<String> base = new ArrayList<>();
|
||||
|
||||
for (Resolution.Item item : items) byId.put(item.id(), item);
|
||||
|
||||
for (String bucket : new LinkedHashSet<>(order.buckets()))
|
||||
{
|
||||
for (Resolution.Item item : items)
|
||||
{
|
||||
if (item.bucket().equals(bucket)) base.add(item.id());
|
||||
}
|
||||
}
|
||||
|
||||
Set<String> priority = new LinkedHashSet<>();
|
||||
|
||||
for (String reference : order.priority())
|
||||
{
|
||||
Optional<String> id = CollectionResolver.lookup(reference, index);
|
||||
|
||||
if (id.isEmpty())
|
||||
warnings.add("[order] priority: '" + reference + "' matches no item of the collection; ignored.");
|
||||
else if (byId.containsKey(id.get()))
|
||||
priority.add(id.get());
|
||||
}
|
||||
|
||||
List<String> ordered = new ArrayList<>(priority);
|
||||
base.stream().filter(id -> !priority.contains(id)).forEach(ordered::add);
|
||||
|
||||
List<String> pinned = new ArrayList<>();
|
||||
|
||||
for (String id : base)
|
||||
{
|
||||
if (overrides.getOrDefault(id, Settings.Item.NONE).position().isPresent()) pinned.add(id);
|
||||
}
|
||||
|
||||
pinned.sort(Comparator.comparingInt(id -> overrides.get(id).position().orElseThrow()));
|
||||
|
||||
for (String id : pinned)
|
||||
{
|
||||
ordered.remove(id);
|
||||
ordered.add(Math.clamp(overrides.get(id).position().orElseThrow() - 1, 0, ordered.size()), id);
|
||||
}
|
||||
|
||||
return ordered.stream().map(byId::get).toList();
|
||||
}
|
||||
|
||||
private static void duplicateModIds(List<Resolution.Item> items, List<String> warnings)
|
||||
{
|
||||
Map<String, Resolution.Item> first = new HashMap<>();
|
||||
|
||||
for (Resolution.Item item : items)
|
||||
{
|
||||
for (String modId : item.modIds())
|
||||
{
|
||||
Resolution.Item other = first.putIfAbsent(modId, item);
|
||||
|
||||
if (other != null && other != item)
|
||||
warnings.add("Mod ID '" + modId + "' is named by '" + other.title() + "' (" + other.id() + ") and '" + item.title() + "' (" + item.id() + "); Mods= lists it once.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static Optional<String> lookup(String reference, Map<String, String> index)
|
||||
{
|
||||
String key = reference.strip();
|
||||
return Optional.ofNullable(index.get(CollectionResolver.isWorkshopId(key) ? key : key.toLowerCase(Locale.ROOT)));
|
||||
}
|
||||
|
||||
private static boolean isWorkshopId(String reference) { return !reference.isEmpty() && reference.chars().allMatch(c -> c >= '0' && c <= '9'); }
|
||||
|
||||
/** {@code key} as written in a TOML table header: quoted when it is not a bare key. */
|
||||
private static String quoted(String key) { return key.matches("[A-Za-z0-9_-]+") ? key : "\"" + key + "\""; }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/** The settings do not fit the collection, for example an item lands in a bucket missing from {@code [order] buckets}. */
|
||||
final class ConfigurationException extends Exception
|
||||
{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
ConfigurationException(String message) { super(message); }
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Reads Mod IDs and map folders from a Workshop item's description. Authors write them as lines
|
||||
* such as {@code Mod ID: Foo}, {@code ModID = Foo; Bar}, or {@code Map Folder: Foo}, often inside
|
||||
* BBCode.
|
||||
*/
|
||||
final class DescriptionParser
|
||||
{
|
||||
private static final Pattern BBCODE = Pattern.compile("\\[[^\\]]*\\]");
|
||||
private static final Pattern MOD_IDS = Pattern.compile("(?im)^\\s*Mod\\s*IDs?\\h*[:=]\\h*(.+)$");
|
||||
private static final Pattern MAP_LINE = Pattern.compile("(?im)^\\s*Map\\s*Folder\\h*[:=]");
|
||||
private static final Pattern MAP_FOLDER = Pattern.compile("(?im)^\\s*Map\\s*Folder\\h*[:=]\\h*(.+)$");
|
||||
private static final Pattern SEPARATOR = Pattern.compile("[\\s,;]+");
|
||||
private static final Pattern MOD_ID = Pattern.compile("[A-Za-z0-9_.\\-]+");
|
||||
|
||||
private DescriptionParser() {}
|
||||
|
||||
static String stripBbcode(String description) { return DescriptionParser.BBCODE.matcher(description).replaceAll(""); }
|
||||
|
||||
/** Every Mod ID of every {@code Mod ID} line, each once, in order of appearance. */
|
||||
static List<String> modIds(String description)
|
||||
{
|
||||
Set<String> modIds = new LinkedHashSet<>();
|
||||
Matcher matcher = DescriptionParser.MOD_IDS.matcher(DescriptionParser.stripBbcode(description));
|
||||
|
||||
while (matcher.find())
|
||||
{
|
||||
for (String token : DescriptionParser.SEPARATOR.split(matcher.group(1).strip()))
|
||||
{
|
||||
if (DescriptionParser.MOD_ID.matcher(token).matches()) modIds.add(token);
|
||||
}
|
||||
}
|
||||
|
||||
return List.copyOf(modIds);
|
||||
}
|
||||
|
||||
/** Whether the description has a {@code Map Folder} line, which makes the item a map. */
|
||||
static boolean isMap(String description) { return DescriptionParser.MAP_LINE.matcher(DescriptionParser.stripBbcode(description)).find(); }
|
||||
|
||||
/**
|
||||
* The folder of every {@code Map Folder} line, each once, in order of appearance. A line
|
||||
* holds one folder, which may contain commas ({@code Muldraugh, KY}).
|
||||
*/
|
||||
static List<String> mapFolders(String description)
|
||||
{
|
||||
List<String> folders = new ArrayList<>();
|
||||
Matcher matcher = DescriptionParser.MAP_FOLDER.matcher(DescriptionParser.stripBbcode(description));
|
||||
|
||||
while (matcher.find())
|
||||
{
|
||||
String folder = matcher.group(1).strip();
|
||||
if (!folder.isEmpty() && !folders.contains(folder)) folders.add(folder);
|
||||
}
|
||||
|
||||
return List.copyOf(folders);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* How the collection differs from what the server runs: Workshop items and Mod IDs added,
|
||||
* removed, or in another order, and a changed {@code Map=}.
|
||||
*/
|
||||
record DriftReport(List<String> itemsAdded, List<String> itemsRemoved, boolean itemsReordered, List<String> modIdsAdded, List<String> modIdsRemoved, boolean modIdsReordered, boolean mapChanged)
|
||||
{
|
||||
/**
|
||||
* @param running the values the server runs with
|
||||
* @param current the values the collection resolves to now
|
||||
* @param compareMap whether {@code Map=} is managed and compared
|
||||
*/
|
||||
static DriftReport between(ServerValues running, ServerValues current, boolean compareMap)
|
||||
{
|
||||
List<String> runningItems = running.workshopIds();
|
||||
List<String> currentItems = current.workshopIds();
|
||||
List<String> runningMods = running.modIds();
|
||||
List<String> currentMods = current.modIds();
|
||||
|
||||
return new DriftReport(
|
||||
DriftReport.missingFrom(runningItems, currentItems),
|
||||
DriftReport.missingFrom(currentItems, runningItems),
|
||||
DriftReport.reordered(runningItems, currentItems),
|
||||
DriftReport.missingFrom(runningMods, currentMods),
|
||||
DriftReport.missingFrom(currentMods, runningMods),
|
||||
DriftReport.reordered(runningMods, currentMods),
|
||||
compareMap && !running.mapFolders().equals(current.mapFolders())
|
||||
);
|
||||
}
|
||||
|
||||
boolean isEmpty()
|
||||
{
|
||||
return this.itemsAdded.isEmpty() && this.itemsRemoved.isEmpty() && !this.itemsReordered
|
||||
&& this.modIdsAdded.isEmpty() && this.modIdsRemoved.isEmpty() && !this.modIdsReordered
|
||||
&& !this.mapChanged;
|
||||
}
|
||||
|
||||
/** One line, e.g. {@code 2 items added ('Foo' (123), ...); Mod IDs in another order}; {@code titles} maps workshop ids to titles. */
|
||||
String describe(Map<String, String> titles)
|
||||
{
|
||||
List<String> parts = new ArrayList<>();
|
||||
|
||||
if (!this.itemsAdded.isEmpty()) parts.add(DriftReport.count(this.itemsAdded.size(), "item") + " added (" + DriftReport.items(this.itemsAdded, titles) + ")");
|
||||
if (!this.itemsRemoved.isEmpty()) parts.add(DriftReport.count(this.itemsRemoved.size(), "item") + " removed (" + DriftReport.items(this.itemsRemoved, titles) + ")");
|
||||
if (this.itemsReordered) parts.add("items in another order");
|
||||
if (!this.modIdsAdded.isEmpty()) parts.add(DriftReport.count(this.modIdsAdded.size(), "Mod ID") + " added (" + String.join(", ", this.modIdsAdded) + ")");
|
||||
if (!this.modIdsRemoved.isEmpty()) parts.add(DriftReport.count(this.modIdsRemoved.size(), "Mod ID") + " removed (" + String.join(", ", this.modIdsRemoved) + ")");
|
||||
if (this.modIdsReordered) parts.add("Mod IDs in another order");
|
||||
if (this.mapChanged) parts.add("Map= changed");
|
||||
|
||||
return parts.isEmpty() ? "no differences" : String.join("; ", parts);
|
||||
}
|
||||
|
||||
/** Entries of {@code to} that {@code from} lacks, in the order of {@code to}. */
|
||||
private static List<String> missingFrom(List<String> from, List<String> to)
|
||||
{
|
||||
Set<String> present = new HashSet<>(from);
|
||||
return to.stream().filter(entry -> !present.contains(entry)).distinct().toList();
|
||||
}
|
||||
|
||||
/** Whether the entries both lists have are in another order. */
|
||||
private static boolean reordered(List<String> running, List<String> current)
|
||||
{
|
||||
Set<String> inRunning = new HashSet<>(running);
|
||||
Set<String> inCurrent = new HashSet<>(current);
|
||||
|
||||
return !running.stream().filter(inCurrent::contains).distinct().toList().equals(current.stream().filter(inRunning::contains).distinct().toList());
|
||||
}
|
||||
|
||||
private static String count(int count, String noun) { return count + " " + noun + (count == 1 ? "" : "s"); }
|
||||
|
||||
private static String items(List<String> ids, Map<String, String> titles)
|
||||
{
|
||||
List<String> named = new ArrayList<>();
|
||||
|
||||
for (String id : ids)
|
||||
{
|
||||
String title = titles.get(id);
|
||||
named.add(title == null ? id : "'" + title + "' (" + id + ")");
|
||||
}
|
||||
|
||||
return String.join(", ", named);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,405 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import static java.lang.System.Logger.Level.ERROR;
|
||||
import static java.lang.System.Logger.Level.INFO;
|
||||
import static java.lang.System.Logger.Level.WARNING;
|
||||
|
||||
import dev.overlord.zomboidforge.api.Mod;
|
||||
import dev.overlord.zomboidforge.api.storage.StorageException;
|
||||
import dev.overlord.zomboidforge.api.storage.Table;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.time.ZoneOffset;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Entry point. At startup, directly after Project Zomboid loaded the server's {@code .ini}, sets
|
||||
* {@code Mods=}, {@code WorkshopItems=}, and {@code Map=} from the configured Steam Workshop
|
||||
* collection: resolved live, else from the last cached resolution, else the {@code .ini} stays as
|
||||
* it is. The server always starts.
|
||||
*
|
||||
* <p>While the server runs, a drift check resolves the collection again every
|
||||
* {@code [drift] interval_min} minutes and logs how it differs from what the server runs, and
|
||||
* which items were updated on Steam since startup. Changes take effect at the next restart.
|
||||
*
|
||||
* <p>Threads: game objects ({@code ServerOptions}) on the main thread only, in {@link #onLoad()}
|
||||
* and {@link CollectionCommand}; drift checks on the mod thread.
|
||||
*/
|
||||
public final class LuaModAutomatorMod extends Mod
|
||||
{
|
||||
private static final String NO_CHECK = "No drift check yet.";
|
||||
private static final DateTimeFormatter TIME = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss 'UTC'").withZone(ZoneOffset.UTC);
|
||||
|
||||
/** The loaded instance, for {@link CollectionCommand}, which Project Zomboid creates. */
|
||||
private static volatile @Nullable LuaModAutomatorMod instance;
|
||||
|
||||
/** When the server started; the Workshop download comes after this, so later Steam updates are not on the server. */
|
||||
private final Instant startedAt = Instant.now();
|
||||
private final AtomicBoolean checkQueued = new AtomicBoolean();
|
||||
|
||||
// Set in onLoad(), read later. Tasks submitted after onLoad() see these values.
|
||||
private @Nullable Settings settings;
|
||||
private @Nullable String collectionId;
|
||||
private @Nullable SteamWorkshopApi api;
|
||||
private @Nullable Table<CachedResolution> cache;
|
||||
private ServerValues running = new ServerValues("", "", "");
|
||||
|
||||
// Read by /collection on the main thread.
|
||||
private volatile String startup = "LuaModAutomator is idle.";
|
||||
private volatile String lastCheck = LuaModAutomatorMod.NO_CHECK;
|
||||
|
||||
// Drift checks; the mod thread only, after onLoad().
|
||||
private final Set<String> loggedWarnings = new HashSet<>();
|
||||
private final Map<String, Long> reportedUpdates = new HashMap<>();
|
||||
private String lastDrift = "";
|
||||
private String lastFailure = "";
|
||||
|
||||
static @Nullable LuaModAutomatorMod instance() { return LuaModAutomatorMod.instance; }
|
||||
|
||||
@Override
|
||||
public void onLoad()
|
||||
{
|
||||
LuaModAutomatorMod.instance = this;
|
||||
this.commands().register(CollectionCommand.class);
|
||||
|
||||
this.running = ServerOptionsAdapter.read();
|
||||
|
||||
Settings settings;
|
||||
|
||||
try
|
||||
{
|
||||
settings = this.config().bind(Settings.class);
|
||||
}
|
||||
catch (IllegalStateException e)
|
||||
{
|
||||
this.log(ERROR, e.getMessage() + " The server keeps Mods=, WorkshopItems=, and Map= of its .ini.");
|
||||
this.startup = "config.toml is invalid (see the log); the mod list is the one of the .ini.";
|
||||
return;
|
||||
}
|
||||
|
||||
if (settings.collection().isBlank())
|
||||
{
|
||||
this.log(INFO, "No collection is set ('collection' in config.toml); the mod list is the one of the .ini.");
|
||||
this.startup = "No collection is set; the mod list is the one of the .ini.";
|
||||
return;
|
||||
}
|
||||
|
||||
Optional<String> collectionId = SteamWorkshopApi.collectionId(settings.collection());
|
||||
|
||||
if (collectionId.isEmpty())
|
||||
{
|
||||
this.log(ERROR, "'collection' (\"" + settings.collection() + "\") holds no collection id; the server keeps Mods=, WorkshopItems=, and Map= of its .ini.");
|
||||
this.startup = "'collection' holds no collection id; the mod list is the one of the .ini.";
|
||||
return;
|
||||
}
|
||||
|
||||
this.settings = settings;
|
||||
this.collectionId = collectionId.get();
|
||||
this.api = new SteamWorkshopApi(SteamWorkshopApi.BASE, Duration.ofSeconds(settings.steam().timeoutS()), "LuaModAutomator/" + this.version());
|
||||
this.cache = this.openCache();
|
||||
|
||||
Instant now = Instant.now();
|
||||
|
||||
try
|
||||
{
|
||||
Resolution resolution = this.resolve();
|
||||
ServerValues values = resolution.values(settings.ini().baseMap());
|
||||
|
||||
this.logWarnings(resolution.warnings());
|
||||
this.store(now, values, resolution.modList());
|
||||
this.apply(values);
|
||||
|
||||
resolution.modList().forEach(line -> this.log(INFO, line));
|
||||
this.startup = "Collection " + this.collectionId + ": resolved live from Steam at " + LuaModAutomatorMod.TIME.format(now) + "; "
|
||||
+ LuaModAutomatorMod.counts(values) + ", " + resolution.excluded().size() + " excluded, " + LuaModAutomatorMod.count(resolution.warnings().size(), "warning") + " (see the log).";
|
||||
}
|
||||
catch (SteamException | ConfigurationException e)
|
||||
{
|
||||
String reason = Objects.requireNonNullElse(e.getMessage(), e.getClass().getSimpleName());
|
||||
|
||||
this.log(WARNING, "Cannot resolve collection '" + this.collectionId + "': " + reason);
|
||||
this.fallBack(reason.endsWith(".") ? reason.substring(0, reason.length() - 1) : reason);
|
||||
}
|
||||
|
||||
this.log(INFO, this.startup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServerStarted()
|
||||
{
|
||||
Settings settings = this.settings;
|
||||
if (settings == null || settings.drift().intervalMin() == 0) return;
|
||||
|
||||
Duration interval = Duration.ofMinutes(settings.drift().intervalMin());
|
||||
this.modThread().scheduleWithFixedDelay(this::scheduledCheck, interval, interval);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopping()
|
||||
{
|
||||
SteamWorkshopApi api = this.api;
|
||||
if (api != null) api.close();
|
||||
}
|
||||
|
||||
/** The reply of {@code /collection}. Main thread. */
|
||||
String report()
|
||||
{
|
||||
Settings settings = this.settings;
|
||||
String check = this.lastCheck;
|
||||
|
||||
if (settings == null) return this.startup;
|
||||
if (settings.drift().intervalMin() == 0 && check.equals(LuaModAutomatorMod.NO_CHECK)) check = "Drift checks are off ('interval_min' in [drift]); '/collection check' runs one.";
|
||||
|
||||
return this.startup + "\n" + check;
|
||||
}
|
||||
|
||||
/** The reply of {@code /collection check}: queues a drift check on the mod thread. Main thread. */
|
||||
String startCheck()
|
||||
{
|
||||
if (this.settings == null) return "Nothing to check. " + this.startup;
|
||||
if (!this.checkQueued.compareAndSet(false, true)) return "A drift check is already running.";
|
||||
|
||||
try
|
||||
{
|
||||
this.modThread().execute(this::check);
|
||||
}
|
||||
catch (RejectedExecutionException e)
|
||||
{
|
||||
this.checkQueued.set(false);
|
||||
return "The server is stopping.";
|
||||
}
|
||||
|
||||
return "Drift check started; the result goes to the log and to the next /collection.";
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses the cached resolution of the collection, else keeps the values of the {@code .ini}.
|
||||
* Main thread, in {@link #onLoad()}.
|
||||
*
|
||||
* @param reason why Steam failed, without a final period
|
||||
*/
|
||||
private void fallBack(String reason)
|
||||
{
|
||||
Optional<CachedResolution> cached = this.cached();
|
||||
|
||||
if (cached.isEmpty())
|
||||
{
|
||||
this.log(WARNING, "No cached resolution of collection '" + this.collectionId + "'; the server keeps Mods=, WorkshopItems=, and Map= of its .ini.");
|
||||
this.startup = "Collection " + this.collectionId + ": Steam failed (" + reason + ") and nothing is cached; the mod list is the one of the .ini.";
|
||||
return;
|
||||
}
|
||||
|
||||
ServerValues values = cached.get().values();
|
||||
String time = LuaModAutomatorMod.TIME.format(cached.get().resolvedAt());
|
||||
|
||||
this.log(WARNING, "Using the cached resolution of collection '" + this.collectionId + "' from " + time + ".");
|
||||
this.apply(values);
|
||||
|
||||
cached.get().modListLines().forEach(line -> this.log(INFO, line));
|
||||
this.startup = "Collection " + this.collectionId + ": from the cache of " + time + ", since Steam failed (" + reason + "); " + LuaModAutomatorMod.counts(values) + ".";
|
||||
}
|
||||
|
||||
/** Sets the server options and saves the {@code .ini} when {@code [ini] write} says so. Main thread. */
|
||||
private void apply(ServerValues values)
|
||||
{
|
||||
Settings settings = Objects.requireNonNull(this.settings);
|
||||
|
||||
ServerOptionsAdapter.apply(values, settings.ini().manageMap());
|
||||
this.running = ServerOptionsAdapter.read();
|
||||
|
||||
if (!settings.ini().write()) return;
|
||||
|
||||
boolean saved;
|
||||
|
||||
try
|
||||
{
|
||||
saved = ServerOptionsAdapter.save();
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
this.logger().log(WARNING, "Cannot save the server's .ini.", e);
|
||||
saved = false;
|
||||
}
|
||||
|
||||
if (saved) this.log(INFO, "Saved Mods=, WorkshopItems=" + (settings.ini().manageMap() ? ", and Map=" : "") + " into Server/" + ServerOptionsAdapter.serverName() + ".ini.");
|
||||
else this.log(WARNING, "Cannot save the server's .ini (Server/" + ServerOptionsAdapter.serverName() + ".ini); the values apply to this run only.");
|
||||
}
|
||||
|
||||
private void scheduledCheck()
|
||||
{
|
||||
if (this.checkQueued.compareAndSet(false, true)) this.check();
|
||||
}
|
||||
|
||||
/** Resolves the collection again and reports how it differs from what the server runs. Mod thread; {@link #checkQueued} is set. */
|
||||
private void check()
|
||||
{
|
||||
Settings settings = Objects.requireNonNull(this.settings);
|
||||
Instant now = Instant.now();
|
||||
String time = LuaModAutomatorMod.TIME.format(now);
|
||||
|
||||
try
|
||||
{
|
||||
Resolution resolution = this.resolve();
|
||||
ServerValues current = resolution.values(settings.ini().baseMap());
|
||||
DriftReport drift = DriftReport.between(this.running, current, settings.ini().manageMap());
|
||||
String difference = drift.describe(LuaModAutomatorMod.titles(resolution));
|
||||
|
||||
this.logWarnings(resolution.warnings());
|
||||
this.store(now, current, resolution.modList());
|
||||
|
||||
if (!drift.isEmpty() && !difference.equals(this.lastDrift))
|
||||
this.log(WARNING, "The collection differs from the running mod list: " + difference + ". Restart the server to apply it.");
|
||||
else if (drift.isEmpty() && !this.lastDrift.isEmpty())
|
||||
this.log(INFO, "The collection matches the running mod list again.");
|
||||
|
||||
this.lastDrift = drift.isEmpty() ? "" : difference;
|
||||
this.lastFailure = "";
|
||||
|
||||
List<String> updated = this.updatedItems(resolution);
|
||||
|
||||
this.lastCheck = "Last drift check " + time + ": "
|
||||
+ (drift.isEmpty() ? "the collection matches the running mod list." : "the collection differs: " + difference + "; restart the server to apply it.")
|
||||
+ (updated.isEmpty() ? "" : "\nUpdated on Steam since startup: " + String.join(", ", updated) + "; restart the server to load the updates.");
|
||||
}
|
||||
catch (SteamException | ConfigurationException e)
|
||||
{
|
||||
if (!Objects.equals(e.getMessage(), this.lastFailure)) this.log(WARNING, "Drift check failed: " + e.getMessage());
|
||||
|
||||
this.lastFailure = Objects.requireNonNullElse(e.getMessage(), "");
|
||||
this.lastCheck = "Last drift check " + time + " failed: " + e.getMessage();
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
// Logged here, so the schedule goes on; a task that throws ends it.
|
||||
this.logger().log(ERROR, "Drift check failed.", e);
|
||||
this.lastCheck = "Last drift check " + time + " failed: " + e;
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.checkQueued.set(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Items the server runs that Steam updated after the server started, as {@code 'title' (id)};
|
||||
* logs each update once. Mod thread.
|
||||
*/
|
||||
private List<String> updatedItems(Resolution resolution)
|
||||
{
|
||||
Set<String> running = new HashSet<>(this.running.workshopIds());
|
||||
List<String> updated = new ArrayList<>();
|
||||
|
||||
for (Resolution.Item item : resolution.items())
|
||||
{
|
||||
if (!running.contains(item.id()) || item.timeUpdated() <= this.startedAt.getEpochSecond()) continue;
|
||||
|
||||
String name = "'" + item.title() + "' (" + item.id() + ")";
|
||||
updated.add(name);
|
||||
|
||||
if (!Objects.equals(this.reportedUpdates.put(item.id(), item.timeUpdated()), item.timeUpdated()))
|
||||
this.log(WARNING, name + " was updated on Steam at " + LuaModAutomatorMod.TIME.format(Instant.ofEpochSecond(item.timeUpdated())) + ", after the server started. Restart the server to load the update; clients with the new version may not be able to join until then.");
|
||||
}
|
||||
|
||||
return updated;
|
||||
}
|
||||
|
||||
private Resolution resolve() throws SteamException, ConfigurationException
|
||||
{
|
||||
Settings settings = Objects.requireNonNull(this.settings);
|
||||
SteamWorkshopApi api = Objects.requireNonNull(this.api);
|
||||
List<String> warnings = new ArrayList<>();
|
||||
|
||||
List<WorkshopItem> items = api.collection(Objects.requireNonNull(this.collectionId), warnings);
|
||||
Resolution resolution = CollectionResolver.resolve(items, settings.order(), settings.items());
|
||||
|
||||
if (warnings.isEmpty()) return resolution;
|
||||
|
||||
warnings.addAll(resolution.warnings());
|
||||
return new Resolution(resolution.items(), resolution.excluded(), List.copyOf(warnings));
|
||||
}
|
||||
|
||||
/** Logs the warnings not logged before. */
|
||||
private void logWarnings(List<String> warnings)
|
||||
{
|
||||
for (String warning : warnings)
|
||||
{
|
||||
if (this.loggedWarnings.add(warning)) this.log(WARNING, warning);
|
||||
}
|
||||
}
|
||||
|
||||
private @Nullable Table<CachedResolution> openCache()
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.storage().table(CachedResolution.TABLE, CachedResolution.class);
|
||||
}
|
||||
catch (StorageException e)
|
||||
{
|
||||
this.logger().log(WARNING, "Cannot open the cache table '" + CachedResolution.TABLE + "'; resolutions are not cached.", e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private Optional<CachedResolution> cached()
|
||||
{
|
||||
Table<CachedResolution> cache = this.cache;
|
||||
if (cache == null) return Optional.empty();
|
||||
|
||||
try
|
||||
{
|
||||
return cache.get(Objects.requireNonNull(this.collectionId));
|
||||
}
|
||||
catch (StorageException e)
|
||||
{
|
||||
this.logger().log(WARNING, "Cannot read the cached resolution of collection '" + this.collectionId + "'.", e);
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
private void store(Instant resolvedAt, ServerValues values, List<String> modList)
|
||||
{
|
||||
Table<CachedResolution> cache = this.cache;
|
||||
if (cache == null) return;
|
||||
|
||||
try
|
||||
{
|
||||
cache.set(Objects.requireNonNull(this.collectionId), CachedResolution.of(resolvedAt, values, modList));
|
||||
}
|
||||
catch (StorageException e)
|
||||
{
|
||||
this.logger().log(WARNING, "Cannot cache the resolution of collection '" + this.collectionId + "'.", e);
|
||||
}
|
||||
}
|
||||
|
||||
private void log(System.Logger.Level level, String message) { this.logger().log(level, message); }
|
||||
|
||||
private static String counts(ServerValues values)
|
||||
{
|
||||
return LuaModAutomatorMod.count(values.workshopIds().size(), "Workshop item") + ", " + LuaModAutomatorMod.count(values.modIds().size(), "Mod ID") + ", Map=" + values.map();
|
||||
}
|
||||
|
||||
private static String count(int count, String noun) { return count + " " + noun + (count == 1 ? "" : "s"); }
|
||||
|
||||
private static Map<String, String> titles(Resolution resolution)
|
||||
{
|
||||
Map<String, String> titles = new HashMap<>();
|
||||
|
||||
for (Resolution.Item item : resolution.items()) titles.put(item.id(), item.title());
|
||||
for (Resolution.Item item : resolution.excluded()) titles.put(item.id(), item.title());
|
||||
|
||||
return titles;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A resolved collection: the items in load order with their overrides applied, the excluded
|
||||
* items, and the warnings found on the way.
|
||||
*/
|
||||
record Resolution(List<Resolution.Item> items, List<Resolution.Item> excluded, List<String> warnings)
|
||||
{
|
||||
/**
|
||||
* An item with its overrides applied.
|
||||
*
|
||||
* @param modIds empty when neither the description nor {@code [items]} names one
|
||||
* @param mapFolders the folders of its {@code Map Folder} lines
|
||||
* @param timeUpdated the last update on Steam, in seconds since the epoch; 0 when unknown
|
||||
*/
|
||||
record Item(String id, String title, List<String> modIds, String bucket, List<String> mapFolders, long timeUpdated) {}
|
||||
|
||||
/** The server option values: every Mod ID once, every item, and the map folders followed by {@code baseMap}. */
|
||||
ServerValues values(List<String> baseMap)
|
||||
{
|
||||
Set<String> modIds = new LinkedHashSet<>();
|
||||
Set<String> folders = new LinkedHashSet<>();
|
||||
|
||||
for (Item item : this.items)
|
||||
{
|
||||
modIds.addAll(item.modIds());
|
||||
folders.addAll(item.mapFolders());
|
||||
}
|
||||
|
||||
for (String folder : baseMap)
|
||||
{
|
||||
if (!folder.isBlank()) folders.add(folder.strip());
|
||||
}
|
||||
|
||||
return new ServerValues(
|
||||
modIds.stream().map(modId -> "\\" + modId).collect(Collectors.joining(";")),
|
||||
this.items.stream().map(Item::id).collect(Collectors.joining(";")),
|
||||
String.join(";", folders)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The numbered mod list for the log, one line per item: number, title, workshop id, and
|
||||
* Mod IDs, in aligned columns; the excluded items follow.
|
||||
*/
|
||||
List<String> modList()
|
||||
{
|
||||
List<String> lines = new ArrayList<>();
|
||||
int number = String.valueOf(this.items.size()).length();
|
||||
int title = 0;
|
||||
int modIds = 0;
|
||||
|
||||
for (Item item : this.items)
|
||||
{
|
||||
title = Math.max(title, item.title().length());
|
||||
modIds = Math.max(modIds, Resolution.modIds(item).length());
|
||||
}
|
||||
|
||||
lines.add("# Mod list");
|
||||
|
||||
for (int i = 0; i < this.items.size(); i++)
|
||||
{
|
||||
Item item = this.items.get(i);
|
||||
lines.add(("# %" + number + "d. %-" + title + "s %10s %-" + modIds + "s").formatted(i + 1, item.title(), item.id(), Resolution.modIds(item)).stripTrailing());
|
||||
}
|
||||
|
||||
if (!this.excluded.isEmpty())
|
||||
{
|
||||
lines.add("# Excluded");
|
||||
for (Item item : this.excluded) lines.add("# %s %s".formatted(item.title(), item.id()));
|
||||
}
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
||||
private static String modIds(Item item) { return item.modIds().isEmpty() ? "(no Mod ID)" : String.join(", ", item.modIds()); }
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import zombie.network.GameServer;
|
||||
import zombie.network.ServerOptions;
|
||||
|
||||
/**
|
||||
* Reads and sets {@code Mods=}, {@code WorkshopItems=}, and {@code Map=} in
|
||||
* {@code ServerOptions}, and saves the server's {@code .ini}. Main thread only.
|
||||
*
|
||||
* <p>{@code GameServer.main} reads the three options after ZomboidForge's {@code onLoad}
|
||||
* (Project Zomboid 42.21): {@code Map=} for {@code Core.gameMap}, {@code Mods=} for the mods
|
||||
* the server loads and sends to clients, {@code WorkshopItems=} for the Workshop download.
|
||||
*/
|
||||
final class ServerOptionsAdapter
|
||||
{
|
||||
private ServerOptionsAdapter() {}
|
||||
|
||||
static ServerValues read()
|
||||
{
|
||||
ServerOptions options = ServerOptions.instance;
|
||||
|
||||
return new ServerValues(
|
||||
Objects.requireNonNullElse(options.mods.getValue(), ""),
|
||||
Objects.requireNonNullElse(options.workshopItems.getValue(), ""),
|
||||
Objects.requireNonNullElse(options.map.getValue(), "")
|
||||
);
|
||||
}
|
||||
|
||||
/** Sets {@code Mods=} and {@code WorkshopItems=}, and {@code Map=} when {@code map} is {@code true}. */
|
||||
static void apply(ServerValues values, boolean map)
|
||||
{
|
||||
ServerOptions options = ServerOptions.instance;
|
||||
|
||||
options.mods.setValue(values.mods());
|
||||
options.workshopItems.setValue(values.workshopItems());
|
||||
if (map) options.map.setValue(values.map());
|
||||
}
|
||||
|
||||
/** Writes every option into {@code <cache>/Server/<server name>.ini}; {@code false} when that failed. */
|
||||
static boolean save() { return ServerOptions.instance.saveServerTextFile(GameServer.serverName); }
|
||||
|
||||
static String serverName() { return GameServer.serverName; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The values of the server options {@code Mods=}, {@code WorkshopItems=}, and {@code Map=}, as
|
||||
* written in the {@code .ini}: entries separated by {@code ;}, Mod IDs prefixed with {@code \}.
|
||||
*/
|
||||
record ServerValues(String mods, String workshopItems, String map)
|
||||
{
|
||||
/** The Mod IDs, without the {@code \} prefix, as Project Zomboid reads them. */
|
||||
List<String> modIds() { return ServerValues.entries(this.mods.replace("\\", "")); }
|
||||
|
||||
List<String> workshopIds() { return ServerValues.entries(this.workshopItems); }
|
||||
|
||||
List<String> mapFolders() { return ServerValues.entries(this.map); }
|
||||
|
||||
private static List<String> entries(String value) { return Arrays.stream(value.split(";")).map(String::strip).filter(entry -> !entry.isEmpty()).toList(); }
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* The mod's settings from {@code config.toml}. TOML keys are the snake_case of the component
|
||||
* names ({@code manageMap} reads {@code manage_map}).
|
||||
*
|
||||
* @param collection the Steam Workshop collection, as a URL or a numeric id; empty: the mod does nothing
|
||||
* @param items overrides per item; keys are workshop ids or Mod IDs of items in the collection
|
||||
*/
|
||||
record Settings(String collection, Settings.Ini ini, Settings.Steam steam, Settings.Drift drift, Settings.Order order, Map<String, Settings.Item> items)
|
||||
{
|
||||
/**
|
||||
* @param write whether the resolved values are saved into the server's {@code .ini}
|
||||
* @param manageMap whether {@code Map=} is set; {@code false} leaves it as it is
|
||||
* @param baseMap map folders after those of the map items, in this order
|
||||
*/
|
||||
record Ini(boolean write, boolean manageMap, List<String> baseMap) {}
|
||||
|
||||
/** @param timeoutS seconds per Steam Web API request */
|
||||
record Steam(int timeoutS)
|
||||
{
|
||||
Steam
|
||||
{
|
||||
if (timeoutS < 1) throw new IllegalArgumentException("'timeout_s' must be at least 1, found " + timeoutS);
|
||||
}
|
||||
}
|
||||
|
||||
/** @param intervalMin minutes between drift checks while the server runs; 0 turns them off */
|
||||
record Drift(int intervalMin)
|
||||
{
|
||||
Drift
|
||||
{
|
||||
if (intervalMin < 0) throw new IllegalArgumentException("'interval_min' must be 0 or more, found " + intervalMin);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param buckets the bucket sequence of the load order
|
||||
* @param priority items loaded first, in this order; workshop ids or Mod IDs
|
||||
*/
|
||||
record Order(List<String> buckets, List<String> priority) {}
|
||||
|
||||
/**
|
||||
* Overrides of one item; every field is optional.
|
||||
*
|
||||
* @param modIds replaces the Mod IDs parsed from the description
|
||||
* @param title the item's name in the logged mod list
|
||||
* @param bucket replaces the bucket chosen from the description and tags
|
||||
* @param position 1-based place in the final list, applied after {@code priority}
|
||||
* @param exclude whether the item is left out of {@code Mods=}, {@code WorkshopItems=}, and {@code Map=}
|
||||
*/
|
||||
record Item(Optional<List<String>> modIds, Optional<String> title, Optional<String> bucket, Optional<Integer> position, Optional<Boolean> exclude)
|
||||
{
|
||||
static final Item NONE = new Item(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty());
|
||||
|
||||
Item
|
||||
{
|
||||
if (position.isPresent() && position.get() < 1) throw new IllegalArgumentException("'position' must be at least 1, found " + position.get());
|
||||
}
|
||||
|
||||
boolean excluded() { return this.exclude.orElse(false); }
|
||||
|
||||
/** These overrides, with the fields this item does not set taken from {@code other}. */
|
||||
Item or(Item other)
|
||||
{
|
||||
return new Item(
|
||||
this.modIds.or(other::modIds),
|
||||
this.title.or(other::title),
|
||||
this.bucket.or(other::bucket),
|
||||
this.position.or(other::position),
|
||||
this.exclude.or(other::exclude)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/** Steam cannot be reached, or does not describe the collection. The message says why. */
|
||||
final class SteamException extends Exception
|
||||
{
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
SteamException(String message) { super(message); }
|
||||
|
||||
SteamException(String message, Throwable cause) { super(message, cause); }
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.net.URLEncoder;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* The two calls of Steam's public Web API ({@code ISteamRemoteStorage}, no key) that list a
|
||||
* collection and describe its items. Only Public collections are visible to it.
|
||||
*/
|
||||
final class SteamWorkshopApi implements AutoCloseable
|
||||
{
|
||||
static final URI BASE = URI.create("https://api.steampowered.com/ISteamRemoteStorage/");
|
||||
|
||||
/** Steam's limit of ids per {@code GetPublishedFileDetails} call. */
|
||||
private static final int BATCH = 100;
|
||||
|
||||
/** {@code result} of an id Steam does not know, or does not show (not Public). */
|
||||
private static final int NOT_FOUND = 9;
|
||||
|
||||
/** {@code filetype} of a child that is itself a collection. */
|
||||
private static final int COLLECTION = 2;
|
||||
|
||||
private static final Pattern COLLECTION_ID = Pattern.compile("(?:[?&]id=)?(\\d{2,})");
|
||||
|
||||
private final HttpClient client;
|
||||
private final URI base;
|
||||
private final Duration timeout;
|
||||
private final String userAgent;
|
||||
|
||||
SteamWorkshopApi(URI base, Duration timeout, String userAgent)
|
||||
{
|
||||
this.client = HttpClient.newBuilder().connectTimeout(timeout).followRedirects(HttpClient.Redirect.NORMAL).build();
|
||||
this.base = base;
|
||||
this.timeout = timeout;
|
||||
this.userAgent = userAgent;
|
||||
}
|
||||
|
||||
/** The collection id in {@code setting}, a collection URL or a bare id. */
|
||||
static Optional<String> collectionId(String setting)
|
||||
{
|
||||
Matcher matcher = SteamWorkshopApi.COLLECTION_ID.matcher(setting.strip());
|
||||
return matcher.find() ? Optional.of(matcher.group(1)) : Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
* The items of the collection, in Steam's order. Nested collections are skipped with a
|
||||
* warning in {@code warnings}.
|
||||
*
|
||||
* @throws SteamException when Steam cannot be reached, or the collection is not Public or not a collection
|
||||
*/
|
||||
List<WorkshopItem> collection(String collectionId, List<String> warnings) throws SteamException
|
||||
{
|
||||
List<String> ids = new ArrayList<>();
|
||||
|
||||
for (JsonObject child : this.children(collectionId))
|
||||
{
|
||||
String id = SteamWorkshopApi.string(child, "publishedfileid");
|
||||
|
||||
if (SteamWorkshopApi.integer(child, "filetype") == SteamWorkshopApi.COLLECTION)
|
||||
warnings.add("'" + id + "' is a collection inside the collection; its items are not included.");
|
||||
else if (!id.isEmpty())
|
||||
ids.add(id);
|
||||
}
|
||||
|
||||
return this.items(ids);
|
||||
}
|
||||
|
||||
/** The collection's children, sorted by {@code sortorder}. */
|
||||
private List<JsonObject> children(String collectionId) throws SteamException
|
||||
{
|
||||
Map<String, String> form = new LinkedHashMap<>();
|
||||
form.put("collectioncount", "1");
|
||||
form.put("publishedfileids[0]", collectionId);
|
||||
|
||||
JsonObject response = this.post("GetCollectionDetails/v1/", form);
|
||||
JsonArray details = SteamWorkshopApi.array(response, "collectiondetails");
|
||||
|
||||
if (details.isEmpty() || !details.get(0).isJsonObject())
|
||||
throw new SteamException("Steam returned no details for collection '" + collectionId + "'.");
|
||||
|
||||
JsonObject collection = details.get(0).getAsJsonObject();
|
||||
int result = SteamWorkshopApi.integer(collection, "result");
|
||||
|
||||
if (result == SteamWorkshopApi.NOT_FOUND)
|
||||
throw new SteamException("Steam has no public collection '" + collectionId + "': check the id, or set the collection's visibility to Public.");
|
||||
if (result != 1)
|
||||
throw new SteamException("Steam returned result " + result + " for collection '" + collectionId + "'.");
|
||||
|
||||
JsonArray children = SteamWorkshopApi.array(collection, "children");
|
||||
|
||||
if (children.isEmpty())
|
||||
throw new SteamException("'" + collectionId + "' has no items; it may be a single Workshop item rather than a collection.");
|
||||
|
||||
List<JsonObject> sorted = new ArrayList<>();
|
||||
|
||||
for (JsonElement child : children)
|
||||
{
|
||||
if (child.isJsonObject()) sorted.add(child.getAsJsonObject());
|
||||
}
|
||||
|
||||
sorted.sort(Comparator.comparingInt(child -> SteamWorkshopApi.integer(child, "sortorder")));
|
||||
|
||||
return sorted;
|
||||
}
|
||||
|
||||
/** Details of {@code ids}, in their order; ids Steam returns nothing for are {@link WorkshopItem#missing}. */
|
||||
List<WorkshopItem> items(List<String> ids) throws SteamException
|
||||
{
|
||||
Map<String, JsonObject> byId = new HashMap<>();
|
||||
|
||||
for (int start = 0; start < ids.size(); start += SteamWorkshopApi.BATCH)
|
||||
{
|
||||
List<String> batch = ids.subList(start, Math.min(start + SteamWorkshopApi.BATCH, ids.size()));
|
||||
Map<String, String> form = new LinkedHashMap<>();
|
||||
|
||||
form.put("itemcount", String.valueOf(batch.size()));
|
||||
for (int i = 0; i < batch.size(); i++) form.put("publishedfileids[" + i + "]", batch.get(i));
|
||||
|
||||
for (JsonElement entry : SteamWorkshopApi.array(this.post("GetPublishedFileDetails/v1/", form), "publishedfiledetails"))
|
||||
{
|
||||
if (entry.isJsonObject()) byId.put(SteamWorkshopApi.string(entry.getAsJsonObject(), "publishedfileid"), entry.getAsJsonObject());
|
||||
}
|
||||
}
|
||||
|
||||
List<WorkshopItem> items = new ArrayList<>(ids.size());
|
||||
|
||||
for (String id : ids)
|
||||
{
|
||||
JsonObject entry = byId.get(id);
|
||||
|
||||
if (entry == null || SteamWorkshopApi.integer(entry, "result") != 1)
|
||||
{
|
||||
items.add(WorkshopItem.missing(id));
|
||||
continue;
|
||||
}
|
||||
|
||||
List<String> tags = new ArrayList<>();
|
||||
|
||||
for (JsonElement tag : SteamWorkshopApi.array(entry, "tags"))
|
||||
{
|
||||
if (tag.isJsonObject()) tags.add(SteamWorkshopApi.string(tag.getAsJsonObject(), "tag"));
|
||||
}
|
||||
|
||||
items.add(WorkshopItem.of(id, SteamWorkshopApi.string(entry, "title"), SteamWorkshopApi.string(entry, "description"), tags, SteamWorkshopApi.number(entry, "time_updated")));
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
/** {@code response} of a form-encoded {@code POST} to {@code method}. */
|
||||
private JsonObject post(String method, Map<String, String> form) throws SteamException
|
||||
{
|
||||
String body = form.entrySet().stream()
|
||||
.map(entry -> URLEncoder.encode(entry.getKey(), StandardCharsets.UTF_8) + "=" + URLEncoder.encode(entry.getValue(), StandardCharsets.UTF_8))
|
||||
.collect(Collectors.joining("&"));
|
||||
|
||||
HttpRequest request = HttpRequest.newBuilder(this.base.resolve(method))
|
||||
.timeout(this.timeout)
|
||||
.header("User-Agent", this.userAgent)
|
||||
.header("Content-Type", "application/x-www-form-urlencoded")
|
||||
.POST(HttpRequest.BodyPublishers.ofString(body))
|
||||
.build();
|
||||
|
||||
HttpResponse<String> response;
|
||||
|
||||
try
|
||||
{
|
||||
response = this.client.send(request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new SteamException("Cannot reach the Steam Web API ('" + method + "'): " + SteamWorkshopApi.reason(e) + ".", e);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
Thread.currentThread().interrupt();
|
||||
throw new SteamException("Interrupted while waiting for the Steam Web API ('" + method + "').", e);
|
||||
}
|
||||
|
||||
if (response.statusCode() != 200)
|
||||
throw new SteamException("The Steam Web API ('" + method + "') returned HTTP " + response.statusCode() + ".");
|
||||
|
||||
try
|
||||
{
|
||||
JsonElement root = JsonParser.parseString(response.body());
|
||||
JsonElement result = root.isJsonObject() ? root.getAsJsonObject().get("response") : null;
|
||||
|
||||
if (result == null || !result.isJsonObject()) throw new JsonParseException("no 'response' object");
|
||||
|
||||
return result.getAsJsonObject();
|
||||
}
|
||||
catch (JsonParseException | IllegalStateException e)
|
||||
{
|
||||
throw new SteamException("The Steam Web API ('" + method + "') returned an unreadable response: " + e.getMessage() + ".", e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() { this.client.shutdownNow(); }
|
||||
|
||||
private static String reason(Exception e) { return e.getMessage() == null ? e.getClass().getSimpleName() : e.getMessage(); }
|
||||
|
||||
private static JsonArray array(JsonObject object, String key)
|
||||
{
|
||||
JsonElement value = object.get(key);
|
||||
return value != null && value.isJsonArray() ? value.getAsJsonArray() : new JsonArray();
|
||||
}
|
||||
|
||||
private static String string(JsonObject object, String key)
|
||||
{
|
||||
JsonElement value = SteamWorkshopApi.primitive(object, key);
|
||||
return value == null ? "" : value.getAsString();
|
||||
}
|
||||
|
||||
private static long number(JsonObject object, String key)
|
||||
{
|
||||
JsonElement value = SteamWorkshopApi.primitive(object, key);
|
||||
|
||||
try { return value == null ? 0 : value.getAsLong(); }
|
||||
catch (NumberFormatException e) { return 0; }
|
||||
}
|
||||
|
||||
private static int integer(JsonObject object, String key) { return (int) SteamWorkshopApi.number(object, key); }
|
||||
|
||||
private static @Nullable JsonElement primitive(JsonObject object, String key)
|
||||
{
|
||||
JsonElement value = object.get(key);
|
||||
return value != null && value.isJsonPrimitive() ? value : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An item of the collection as Steam describes it, with the values parsed from its description.
|
||||
*
|
||||
* @param id the workshop id
|
||||
* @param found whether Steam returned details; private, unlisted, or removed items have none
|
||||
* @param title the title on Steam, trimmed; empty without details
|
||||
* @param tags the Steam tags
|
||||
* @param timeUpdated the last update on Steam, in seconds since the epoch; 0 without details
|
||||
* @param modIds the Mod IDs from the description
|
||||
* @param map whether the description has a {@code Map Folder} line
|
||||
* @param mapFolders the folders of those lines
|
||||
*/
|
||||
record WorkshopItem(String id, boolean found, String title, List<String> tags, long timeUpdated, List<String> modIds, boolean map, List<String> mapFolders)
|
||||
{
|
||||
static WorkshopItem missing(String id) { return new WorkshopItem(id, false, "", List.of(), 0, List.of(), false, List.of()); }
|
||||
|
||||
static WorkshopItem of(String id, String title, String description, List<String> tags, long timeUpdated)
|
||||
{
|
||||
return new WorkshopItem(
|
||||
id, true, title.strip(), List.copyOf(tags), timeUpdated,
|
||||
DescriptionParser.modIds(description),
|
||||
DescriptionParser.isMap(description),
|
||||
DescriptionParser.mapFolders(description)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* LuaModAutomator: the server's {@code Mods=}, {@code WorkshopItems=}, and {@code Map=} come
|
||||
* from a public Steam Workshop collection, resolved at every start.
|
||||
*
|
||||
* <p>Only {@link dev.overlord.luamodautomator.LuaModAutomatorMod},
|
||||
* {@link dev.overlord.luamodautomator.ServerOptionsAdapter}, and
|
||||
* {@link dev.overlord.luamodautomator.CollectionCommand} use game classes; everything else runs
|
||||
* without the game.
|
||||
*
|
||||
* @noinspection UnstableApiUsage, RedundantSuppression
|
||||
*/
|
||||
@NotNullByDefault
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import org.jetbrains.annotations.NotNullByDefault;
|
||||
@@ -0,0 +1,35 @@
|
||||
# LuaModAutomator: Mods=, WorkshopItems=, and Map= of the server come from a Steam Workshop
|
||||
# collection, resolved at every start. <forge>/mods/lua_mod_automator/config.toml overrides
|
||||
# these defaults key by key; a missing key keeps its default.
|
||||
|
||||
# The collection: its URL or numeric id. It must be Public; unlisted, friends-only, and private
|
||||
# collections are invisible to Steam's Web API. Empty: the mod does nothing.
|
||||
collection = ""
|
||||
|
||||
[ini]
|
||||
write = true # save the resolved values into the server's .ini
|
||||
manage_map = true # false: Map= stays as it is
|
||||
base_map = ["Muldraugh, KY"] # Map= ends with these folders, after those of the map items
|
||||
|
||||
[steam]
|
||||
timeout_s = 20 # seconds per Web API request
|
||||
|
||||
[drift]
|
||||
interval_min = 30 # minutes between drift checks while the server runs; 0 turns them off
|
||||
|
||||
[order]
|
||||
# Items land in "map" (a Map Folder line in the description), "framework" (the Steam tag
|
||||
# Framework), or "misc", unless [items] says otherwise. Custom bucket names are allowed.
|
||||
buckets = ["map", "framework", "misc"]
|
||||
priority = [] # items loaded first, in this order: workshop ids or Mod IDs
|
||||
|
||||
# Overrides per item. The key is a workshop id or a Mod ID of an item in the collection; Mod
|
||||
# IDs with characters other than letters, digits, _ and - need quotes. Every field is optional.
|
||||
#
|
||||
# [items.3790407759]
|
||||
# mod_ids = ["RconDataBridge"] # replaces the Mod IDs parsed from the description
|
||||
# title = "RCON Data Bridge" # name in the logged mod list
|
||||
# bucket = "misc" # replaces the automatic bucket
|
||||
# position = 1 # 1-based place in the final list, applied after priority
|
||||
# exclude = true # left out of Mods=, WorkshopItems=, and Map=
|
||||
[items]
|
||||
@@ -0,0 +1,216 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class CollectionResolverTest
|
||||
{
|
||||
private static final Settings.Order DEFAULT_ORDER = new Settings.Order(List.of("map", "framework", "misc"), List.of());
|
||||
|
||||
private static final List<WorkshopItem> COLLECTION = List.of(
|
||||
CollectionResolverTest.item("100", "Misc One", "Mod ID: MiscOne"),
|
||||
CollectionResolverTest.framework("200", "Framework", "Mod ID: Frame"),
|
||||
CollectionResolverTest.item("300", "A Map", "Mod ID: MapMod\nMap Folder: SomeTown"),
|
||||
CollectionResolverTest.item("400", "Misc Two", "Mod ID: MiscTwo; MiscTwoExtra"),
|
||||
CollectionResolverTest.item("500", "Misc Three", "Mod ID: MiscThree")
|
||||
);
|
||||
|
||||
@Test
|
||||
void bucketsInOrderCollectionOrderWithin() throws ConfigurationException
|
||||
{
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, Map.of());
|
||||
|
||||
assertEquals(List.of("300", "200", "100", "400", "500"), CollectionResolverTest.ids(resolution));
|
||||
assertEquals(List.of(), resolution.warnings());
|
||||
}
|
||||
|
||||
@Test
|
||||
void customBucketOrder() throws ConfigurationException
|
||||
{
|
||||
Settings.Order order = new Settings.Order(List.of("framework", "late", "misc", "map"), List.of());
|
||||
Map<String, Settings.Item> items = Map.of("100", CollectionResolverTest.bucket("late"));
|
||||
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, order, items);
|
||||
|
||||
assertEquals(List.of("200", "100", "400", "500", "300"), CollectionResolverTest.ids(resolution));
|
||||
}
|
||||
|
||||
@Test
|
||||
void bucketMissingFromOrderIsAnError()
|
||||
{
|
||||
Map<String, Settings.Item> items = Map.of("MiscOne", CollectionResolverTest.bucket("patches"));
|
||||
|
||||
ConfigurationException e = assertThrows(ConfigurationException.class, () -> CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, items));
|
||||
assertTrue(e.getMessage().contains("'patches'"), e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void priorityByWorkshopIdAndModId() throws ConfigurationException
|
||||
{
|
||||
Settings.Order order = new Settings.Order(CollectionResolverTest.DEFAULT_ORDER.buckets(), List.of("500", "misctwoextra", "Unknown"));
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, order, Map.of());
|
||||
|
||||
assertEquals(List.of("500", "400", "300", "200", "100"), CollectionResolverTest.ids(resolution));
|
||||
assertEquals(List.of("[order] priority: 'Unknown' matches no item of the collection; ignored."), resolution.warnings());
|
||||
}
|
||||
|
||||
@Test
|
||||
void pinsAfterPriorityLowestFirstClamped() throws ConfigurationException
|
||||
{
|
||||
Settings.Order order = new Settings.Order(CollectionResolverTest.DEFAULT_ORDER.buckets(), List.of("500"));
|
||||
Map<String, Settings.Item> items = Map.of(
|
||||
"100", CollectionResolverTest.position(1),
|
||||
"MiscThree", CollectionResolverTest.position(99),
|
||||
"Frame", CollectionResolverTest.position(3)
|
||||
);
|
||||
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, order, items);
|
||||
|
||||
assertEquals(List.of("100", "200", "300", "400", "500"), CollectionResolverTest.ids(resolution));
|
||||
}
|
||||
|
||||
@Test
|
||||
void excludedItemsLeaveEveryValue() throws ConfigurationException
|
||||
{
|
||||
Map<String, Settings.Item> items = Map.of("MapMod", CollectionResolverTest.exclude());
|
||||
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, items);
|
||||
ServerValues values = resolution.values(List.of("Muldraugh, KY"));
|
||||
|
||||
assertEquals(List.of("200", "100", "400", "500"), CollectionResolverTest.ids(resolution));
|
||||
assertEquals(List.of("300"), resolution.excluded().stream().map(Resolution.Item::id).toList());
|
||||
assertEquals("\\Frame;\\MiscOne;\\MiscTwo;\\MiscTwoExtra;\\MiscThree", values.mods());
|
||||
assertEquals("200;100;400;500", values.workshopItems());
|
||||
assertEquals("Muldraugh, KY", values.map());
|
||||
}
|
||||
|
||||
@Test
|
||||
void modIdOverrideReplacesParsedIds() throws ConfigurationException
|
||||
{
|
||||
Map<String, Settings.Item> items = Map.of("400", CollectionResolverTest.modIds("MiscTwo"));
|
||||
|
||||
ServerValues values = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, items).values(List.of());
|
||||
|
||||
assertEquals("\\MapMod;\\Frame;\\MiscOne;\\MiscTwo;\\MiscThree", values.mods());
|
||||
}
|
||||
|
||||
@Test
|
||||
void itemWithoutDetailsStaysInWorkshopItemsOnly() throws ConfigurationException
|
||||
{
|
||||
List<WorkshopItem> collection = List.of(CollectionResolverTest.item("100", "Misc One", "Mod ID: MiscOne"), WorkshopItem.missing("900"));
|
||||
Resolution resolution = CollectionResolver.resolve(collection, CollectionResolverTest.DEFAULT_ORDER, Map.of());
|
||||
ServerValues values = resolution.values(List.of());
|
||||
|
||||
assertEquals("\\MiscOne", values.mods());
|
||||
assertEquals("100;900", values.workshopItems());
|
||||
assertEquals("(untitled 900)", resolution.items().get(1).title());
|
||||
assertEquals(1, resolution.warnings().size());
|
||||
assertTrue(resolution.warnings().getFirst().startsWith("Steam returns no details for 900"), resolution.warnings().getFirst());
|
||||
}
|
||||
|
||||
@Test
|
||||
void itemWithoutDetailsIsReachedByItsOverriddenModId() throws ConfigurationException
|
||||
{
|
||||
List<WorkshopItem> collection = List.of(CollectionResolverTest.item("100", "Misc One", "Mod ID: MiscOne"), WorkshopItem.missing("900"));
|
||||
Map<String, Settings.Item> items = Map.of("900", new Settings.Item(Optional.of(List.of("Hidden")), Optional.of("Hidden Mod"), Optional.empty(), Optional.empty(), Optional.empty()));
|
||||
|
||||
Resolution resolution = CollectionResolver.resolve(collection, new Settings.Order(List.of("misc"), List.of("Hidden")), items);
|
||||
|
||||
assertEquals(List.of("900", "100"), CollectionResolverTest.ids(resolution));
|
||||
assertEquals("Hidden Mod", resolution.items().getFirst().title());
|
||||
assertEquals("\\Hidden;\\MiscOne", resolution.values(List.of()).mods());
|
||||
assertEquals(List.of(), resolution.warnings());
|
||||
}
|
||||
|
||||
@Test
|
||||
void workshopIdKeyWinsOverModIdKey() throws ConfigurationException
|
||||
{
|
||||
Map<String, Settings.Item> items = Map.of(
|
||||
"100", new Settings.Item(Optional.empty(), Optional.of("By Id"), Optional.empty(), Optional.empty(), Optional.empty()),
|
||||
"MiscOne", new Settings.Item(Optional.empty(), Optional.of("By Mod ID"), Optional.of("framework"), Optional.empty(), Optional.empty())
|
||||
);
|
||||
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, items);
|
||||
Resolution.Item item = resolution.items().stream().filter(candidate -> candidate.id().equals("100")).findFirst().orElseThrow();
|
||||
|
||||
assertEquals("By Id", item.title());
|
||||
assertEquals("framework", item.bucket());
|
||||
assertEquals(List.of("[items.MiscOne] and [items.100] name the same item; [items.100] wins where both set a field."), resolution.warnings());
|
||||
}
|
||||
|
||||
@Test
|
||||
void unknownItemKeysAreWarnings() throws ConfigurationException
|
||||
{
|
||||
Map<String, Settings.Item> items = Map.of("999", CollectionResolverTest.exclude(), "No.Such-Mod", CollectionResolverTest.exclude());
|
||||
|
||||
Resolution resolution = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, items);
|
||||
|
||||
assertEquals(5, resolution.items().size());
|
||||
assertEquals(List.of(
|
||||
"[items.999] matches no item of the collection; ignored.",
|
||||
"[items.\"No.Such-Mod\"] matches no item of the collection; ignored."
|
||||
), resolution.warnings());
|
||||
}
|
||||
|
||||
@Test
|
||||
void duplicateModIdsAreListedOnce() throws ConfigurationException
|
||||
{
|
||||
List<WorkshopItem> collection = List.of(CollectionResolverTest.item("100", "One", "Mod ID: Shared"), CollectionResolverTest.item("200", "Two", "Mod ID: Shared, Own"));
|
||||
Resolution resolution = CollectionResolver.resolve(collection, CollectionResolverTest.DEFAULT_ORDER, Map.of());
|
||||
|
||||
assertEquals("\\Shared;\\Own", resolution.values(List.of()).mods());
|
||||
assertEquals(1, resolution.warnings().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
void mapFoldersThenBaseMapEachOnce() throws ConfigurationException
|
||||
{
|
||||
List<WorkshopItem> collection = List.of(
|
||||
CollectionResolverTest.item("100", "Town", "Mod ID: Town\nMap Folder: Town\nMap Folder: Muldraugh, KY"),
|
||||
CollectionResolverTest.item("200", "City", "Mod ID: City\nMap Folder: City")
|
||||
);
|
||||
|
||||
ServerValues values = CollectionResolver.resolve(collection, CollectionResolverTest.DEFAULT_ORDER, Map.of()).values(List.of("Muldraugh, KY", "Riverside, KY"));
|
||||
|
||||
assertEquals("Town;Muldraugh, KY;City;Riverside, KY", values.map());
|
||||
}
|
||||
|
||||
@Test
|
||||
void modListIsAligned() throws ConfigurationException
|
||||
{
|
||||
Map<String, Settings.Item> items = Map.of("500", CollectionResolverTest.exclude());
|
||||
|
||||
List<String> modList = CollectionResolver.resolve(CollectionResolverTest.COLLECTION, CollectionResolverTest.DEFAULT_ORDER, items).modList();
|
||||
|
||||
assertEquals(List.of(
|
||||
"# Mod list",
|
||||
"# 1. A Map 300 MapMod",
|
||||
"# 2. Framework 200 Frame",
|
||||
"# 3. Misc One 100 MiscOne",
|
||||
"# 4. Misc Two 400 MiscTwo, MiscTwoExtra",
|
||||
"# Excluded",
|
||||
"# Misc Three 500"
|
||||
), modList);
|
||||
}
|
||||
|
||||
private static List<String> ids(Resolution resolution) { return resolution.items().stream().map(Resolution.Item::id).toList(); }
|
||||
|
||||
private static WorkshopItem item(String id, String title, String description) { return WorkshopItem.of(id, title, description, List.of("Build 42"), 0); }
|
||||
|
||||
private static WorkshopItem framework(String id, String title, String description) { return WorkshopItem.of(id, title, description, List.of("Build 42", "framework"), 0); }
|
||||
|
||||
private static Settings.Item bucket(String bucket) { return new Settings.Item(Optional.empty(), Optional.empty(), Optional.of(bucket), Optional.empty(), Optional.empty()); }
|
||||
|
||||
private static Settings.Item position(int position) { return new Settings.Item(Optional.empty(), Optional.empty(), Optional.empty(), Optional.of(position), Optional.empty()); }
|
||||
|
||||
private static Settings.Item exclude() { return new Settings.Item(Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), Optional.of(true)); }
|
||||
|
||||
private static Settings.Item modIds(String... modIds) { return new Settings.Item(Optional.of(List.of(modIds)), Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty()); }
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DescriptionParserTest
|
||||
{
|
||||
@Test
|
||||
void modIdsOfEverySpelling()
|
||||
{
|
||||
String description = """
|
||||
Some text about the mod.
|
||||
Mod ID: Foo
|
||||
ModID = Bar; Baz
|
||||
modids:Qux, Foo
|
||||
Mod IDs : Spaced.Name-1
|
||||
Workshop ID: 123456
|
||||
""";
|
||||
|
||||
assertEquals(List.of("Foo", "Bar", "Baz", "Qux", "Spaced.Name-1"), DescriptionParser.modIds(description));
|
||||
}
|
||||
|
||||
@Test
|
||||
void modIdsInsideBbcode()
|
||||
{
|
||||
assertEquals(List.of("Foo", "Bar"), DescriptionParser.modIds("[h1]Info[/h1]\n[b]Mod ID:[/b] [i]Foo[/i]\n[list][*]Mod ID: Bar[/list]"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void modIdsWithWindowsLineBreaks()
|
||||
{
|
||||
assertEquals(List.of("Ping", "PingWheel"), DescriptionParser.modIds("Workshop ID: 1\r\nMod ID: Ping\r\nMod ID: PingWheel\r\n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void modIdsSkipInvalidTokens()
|
||||
{
|
||||
assertEquals(List.of("Foo", "Bar"), DescriptionParser.modIds("Mod ID: Foo (Bar) Bar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void emptyModIdLineDoesNotReadTheNextLine()
|
||||
{
|
||||
assertEquals(List.of(), DescriptionParser.modIds("Mod ID:\nWorkshop ID: 123"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void noModId()
|
||||
{
|
||||
assertEquals(List.of(), DescriptionParser.modIds("A mod without its id. The mod id is somewhere else."));
|
||||
}
|
||||
|
||||
@Test
|
||||
void mapFolders()
|
||||
{
|
||||
String description = """
|
||||
[b]Map Folder:[/b] Muldraugh, KY
|
||||
MapFolder = RavenCreek
|
||||
Map Folder: RavenCreek
|
||||
""";
|
||||
|
||||
assertTrue(DescriptionParser.isMap(description));
|
||||
assertEquals(List.of("Muldraugh, KY", "RavenCreek"), DescriptionParser.mapFolders(description));
|
||||
}
|
||||
|
||||
@Test
|
||||
void mapLineWithoutFolder()
|
||||
{
|
||||
assertTrue(DescriptionParser.isMap("Map Folder:\nWorkshop ID: 1"));
|
||||
assertEquals(List.of(), DescriptionParser.mapFolders("Map Folder:\nWorkshop ID: 1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void notAMap()
|
||||
{
|
||||
assertFalse(DescriptionParser.isMap("Adds a map of the area to the loot tables."));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class DriftReportTest
|
||||
{
|
||||
private static final ServerValues RUNNING = new ServerValues("\\A;\\B;\\C", "1;2;3", "Town;Muldraugh, KY");
|
||||
|
||||
@Test
|
||||
void noDifference()
|
||||
{
|
||||
DriftReport report = DriftReport.between(DriftReportTest.RUNNING, DriftReportTest.RUNNING, true);
|
||||
|
||||
assertTrue(report.isEmpty());
|
||||
assertEquals("no differences", report.describe(Map.of()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void backslashesAndSpacesDoNotCount()
|
||||
{
|
||||
ServerValues fromIni = new ServerValues("A; B ;C", " 1;2;3 ", "Town; Muldraugh, KY");
|
||||
|
||||
assertTrue(DriftReport.between(fromIni, DriftReportTest.RUNNING, true).isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
void addedRemovedAndReordered()
|
||||
{
|
||||
ServerValues current = new ServerValues("\\B;\\A;\\D", "2;1;4", "Town;Muldraugh, KY");
|
||||
DriftReport report = DriftReport.between(DriftReportTest.RUNNING, current, true);
|
||||
|
||||
assertEquals(List.of("4"), report.itemsAdded());
|
||||
assertEquals(List.of("3"), report.itemsRemoved());
|
||||
assertTrue(report.itemsReordered());
|
||||
assertEquals(List.of("D"), report.modIdsAdded());
|
||||
assertEquals(List.of("C"), report.modIdsRemoved());
|
||||
assertTrue(report.modIdsReordered());
|
||||
assertFalse(report.mapChanged());
|
||||
assertEquals(
|
||||
"1 item added ('New' (4)); 1 item removed (3); items in another order; 1 Mod ID added (D); 1 Mod ID removed (C); Mod IDs in another order",
|
||||
report.describe(Map.of("4", "New"))
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
void additionsAloneAreNoReordering()
|
||||
{
|
||||
ServerValues current = new ServerValues("\\A;\\X;\\B;\\C", "1;9;2;3", "Town;Muldraugh, KY");
|
||||
DriftReport report = DriftReport.between(DriftReportTest.RUNNING, current, true);
|
||||
|
||||
assertFalse(report.itemsReordered());
|
||||
assertFalse(report.modIdsReordered());
|
||||
}
|
||||
|
||||
@Test
|
||||
void mapOnlyWhenManaged()
|
||||
{
|
||||
ServerValues current = new ServerValues("\\A;\\B;\\C", "1;2;3", "Muldraugh, KY");
|
||||
|
||||
assertTrue(DriftReport.between(DriftReportTest.RUNNING, current, true).mapChanged());
|
||||
assertTrue(DriftReport.between(DriftReportTest.RUNNING, current, false).isEmpty());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import dev.overlord.zomboidforge.core.config.TomlModConfig;
|
||||
import dev.overlord.zomboidforge.core.config.TomlTree;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Binds {@code config.toml} with ZomboidForge's own parser and binder, as the server does. */
|
||||
class SettingsTest
|
||||
{
|
||||
private static final String DEFAULTS = "/META-INF/zomboidforge/config.toml";
|
||||
|
||||
@Test
|
||||
void defaults()
|
||||
{
|
||||
Settings settings = SettingsTest.bind("");
|
||||
|
||||
assertEquals("", settings.collection());
|
||||
assertEquals(new Settings.Ini(true, true, List.of("Muldraugh, KY")), settings.ini());
|
||||
assertEquals(20, settings.steam().timeoutS());
|
||||
assertEquals(30, settings.drift().intervalMin());
|
||||
assertEquals(new Settings.Order(List.of("map", "framework", "misc"), List.of()), settings.order());
|
||||
assertEquals(Map.of(), settings.items());
|
||||
}
|
||||
|
||||
@Test
|
||||
void everySetting()
|
||||
{
|
||||
List<String> warnings = new CopyOnWriteArrayList<>();
|
||||
Settings settings = SettingsTest.bind("""
|
||||
collection = "https://steamcommunity.com/sharedfiles/filedetails/?id=123456"
|
||||
|
||||
[ini]
|
||||
write = false
|
||||
base_map = ["Muldraugh, KY", "Riverside, KY"]
|
||||
|
||||
[steam]
|
||||
timeout_s = 5
|
||||
|
||||
[drift]
|
||||
interval_min = 0
|
||||
|
||||
[order]
|
||||
buckets = ["map", "patches", "framework", "misc"]
|
||||
priority = ["3543229299", "UnifiedCarryWeightFramework"]
|
||||
|
||||
[items.3790407759]
|
||||
mod_ids = ["RconDataBridge"]
|
||||
title = "RCON Data Bridge"
|
||||
|
||||
[items.SomeFixPack]
|
||||
bucket = "patches"
|
||||
|
||||
[items.ISA]
|
||||
position = 3
|
||||
|
||||
[items."Better.Lights"]
|
||||
mod_ids = ["BetterLights"]
|
||||
|
||||
[items.2553809727]
|
||||
exclude = true
|
||||
colour = "red"
|
||||
""", warnings);
|
||||
|
||||
assertEquals("https://steamcommunity.com/sharedfiles/filedetails/?id=123456", settings.collection());
|
||||
assertEquals(new Settings.Ini(false, true, List.of("Muldraugh, KY", "Riverside, KY")), settings.ini());
|
||||
assertEquals(5, settings.steam().timeoutS());
|
||||
assertEquals(0, settings.drift().intervalMin());
|
||||
assertEquals(List.of("map", "patches", "framework", "misc"), settings.order().buckets());
|
||||
assertEquals(List.of("3543229299", "UnifiedCarryWeightFramework"), settings.order().priority());
|
||||
|
||||
assertEquals(5, settings.items().size());
|
||||
assertEquals(Optional.of(List.of("RconDataBridge")), settings.items().get("3790407759").modIds());
|
||||
assertEquals(Optional.of("RCON Data Bridge"), settings.items().get("3790407759").title());
|
||||
assertEquals(Optional.of("patches"), settings.items().get("SomeFixPack").bucket());
|
||||
assertEquals(Optional.of(3), settings.items().get("ISA").position());
|
||||
assertEquals(Optional.of(List.of("BetterLights")), settings.items().get("Better.Lights").modIds());
|
||||
assertTrue(settings.items().get("2553809727").excluded());
|
||||
assertFalse(settings.items().get("ISA").excluded());
|
||||
|
||||
assertEquals(List.of("config.toml: unknown key 'items.2553809727.colour'."), warnings);
|
||||
}
|
||||
|
||||
@Test
|
||||
void invalidValues()
|
||||
{
|
||||
assertThrows(IllegalStateException.class, () -> SettingsTest.bind("[steam]\ntimeout_s = 0"));
|
||||
assertThrows(IllegalStateException.class, () -> SettingsTest.bind("[drift]\ninterval_min = -1"));
|
||||
assertThrows(IllegalStateException.class, () -> SettingsTest.bind("[items.123]\nposition = 0"));
|
||||
assertThrows(IllegalStateException.class, () -> SettingsTest.bind("[items.123]\nmod_ids = \"Foo\""));
|
||||
assertThrows(IllegalStateException.class, () -> SettingsTest.bind("collection = 123"));
|
||||
}
|
||||
|
||||
static Settings bind(String overrides) { return SettingsTest.bind(overrides, new CopyOnWriteArrayList<>()); }
|
||||
|
||||
/** The shipped defaults with {@code overrides} on top, bound like the server binds them; warnings go to {@code warnings}. */
|
||||
static Settings bind(String overrides, List<String> warnings)
|
||||
{
|
||||
Map<String, Object> values = TomlTree.merge(TomlTree.parse(SettingsTest.shippedDefaults()), TomlTree.parse(overrides));
|
||||
return new TomlModConfig(values, new RecordingLogger(warnings)).bind(Settings.class);
|
||||
}
|
||||
|
||||
private static String shippedDefaults()
|
||||
{
|
||||
try (InputStream in = Objects.requireNonNull(SettingsTest.class.getResourceAsStream(SettingsTest.DEFAULTS), SettingsTest.DEFAULTS))
|
||||
{
|
||||
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private record RecordingLogger(List<String> messages) implements System.Logger
|
||||
{
|
||||
@Override
|
||||
public String getName() { return "test"; }
|
||||
|
||||
@Override
|
||||
public boolean isLoggable(Level level) { return true; }
|
||||
|
||||
@Override
|
||||
public void log(Level level, @Nullable ResourceBundle bundle, @Nullable String message, @Nullable Throwable thrown) { this.messages.add(String.valueOf(message)); }
|
||||
|
||||
@Override
|
||||
public void log(Level level, @Nullable ResourceBundle bundle, @Nullable String format, @Nullable Object... params)
|
||||
{
|
||||
// log(Level, String) arrives here without parameters; MessageFormat would drop its quotes.
|
||||
this.messages.add(params == null || params.length == 0 ? String.valueOf(format) : MessageFormat.format(String.valueOf(format), params));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,297 @@
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import com.sun.net.httpserver.HttpServer;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.URI;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/** Against a local server that answers with responses recorded from the Steam Web API. */
|
||||
class SteamWorkshopApiTest
|
||||
{
|
||||
private static final String COLLECTION = "GetCollectionDetails/v1/";
|
||||
private static final String DETAILS = "GetPublishedFileDetails/v1/";
|
||||
|
||||
private final List<Map<String, String>> requests = new CopyOnWriteArrayList<>();
|
||||
private final Map<String, Function<Map<String, String>, Response>> handlers = new LinkedHashMap<>();
|
||||
|
||||
private HttpServer server;
|
||||
private SteamWorkshopApi api;
|
||||
|
||||
private record Response(int status, String body, Duration delay)
|
||||
{
|
||||
static Response ok(String body) { return new Response(200, body, Duration.ZERO); }
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
void start() throws IOException
|
||||
{
|
||||
this.server = HttpServer.create(new InetSocketAddress("127.0.0.1", 0), 0);
|
||||
this.server.createContext("/ISteamRemoteStorage/", this::handle);
|
||||
this.server.start();
|
||||
|
||||
this.api = this.api(Duration.ofSeconds(5));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void stop()
|
||||
{
|
||||
this.api.close();
|
||||
this.server.stop(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
void collectionIdFromUrlOrId()
|
||||
{
|
||||
assertEquals(Optional.of("1234567890"), SteamWorkshopApi.collectionId("https://steamcommunity.com/sharedfiles/filedetails/?id=1234567890"));
|
||||
assertEquals(Optional.of("1234567890"), SteamWorkshopApi.collectionId("https://steamcommunity.com/sharedfiles/filedetails/?searchtext=&id=1234567890"));
|
||||
assertEquals(Optional.of("1234567890"), SteamWorkshopApi.collectionId(" 1234567890 "));
|
||||
assertEquals(Optional.empty(), SteamWorkshopApi.collectionId("my collection"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void recordedCollection() throws SteamException
|
||||
{
|
||||
this.recorded();
|
||||
|
||||
List<String> warnings = new ArrayList<>();
|
||||
List<WorkshopItem> items = this.api.collection(SteamWorkshopApiTest.recordedId(), warnings);
|
||||
|
||||
assertEquals(31, items.size());
|
||||
assertEquals(List.of(), warnings);
|
||||
assertEquals("3765409550", items.getFirst().id());
|
||||
assertEquals("MRE Mod [B42.20.3]", items.getFirst().title());
|
||||
assertEquals(List.of("bdtmre"), items.getFirst().modIds());
|
||||
assertTrue(items.getFirst().timeUpdated() > 0);
|
||||
|
||||
WorkshopItem map = items.stream().filter(item -> item.id().equals("3543229299")).findFirst().orElseThrow();
|
||||
assertTrue(map.map());
|
||||
assertEquals(List.of("map_distanciado"), map.mapFolders());
|
||||
|
||||
assertEquals(Map.of("collectioncount", "1", "publishedfileids[0]", SteamWorkshopApiTest.recordedId()), this.requests.getFirst());
|
||||
assertEquals("31", this.requests.get(1).get("itemcount"));
|
||||
}
|
||||
|
||||
/** The defaults reproduce the output of the Python script the mod replaces, for the same responses. */
|
||||
@Test
|
||||
void defaultsMatchTheScript() throws SteamException, ConfigurationException
|
||||
{
|
||||
this.recorded();
|
||||
|
||||
Settings settings = SettingsTest.bind("");
|
||||
Resolution resolution = CollectionResolver.resolve(this.api.collection(SteamWorkshopApiTest.recordedId(), new ArrayList<>()), settings.order(), settings.items());
|
||||
ServerValues values = resolution.values(settings.ini().baseMap());
|
||||
List<String> expected = SteamWorkshopApiTest.resource("script-output.txt").lines().toList();
|
||||
|
||||
List<String> actual = new ArrayList<>(resolution.modList());
|
||||
actual.add("Mods=" + values.mods());
|
||||
actual.add("WorkshopItems=" + values.workshopItems());
|
||||
|
||||
assertEquals(expected, actual);
|
||||
assertEquals("map_distanciado;Muldraugh, KY", values.map());
|
||||
assertEquals(List.of(), resolution.warnings());
|
||||
}
|
||||
|
||||
@Test
|
||||
void collectionNotPublic()
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> Response.ok("""
|
||||
{"response":{"result":1,"resultcount":1,"collectiondetails":[{"publishedfileid":"123","result":9}]}}
|
||||
"""));
|
||||
|
||||
SteamException e = assertThrows(SteamException.class, () -> this.api.collection("123", new ArrayList<>()));
|
||||
assertTrue(e.getMessage().contains("Public"), e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void singleItemIsNotACollection()
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> Response.ok("""
|
||||
{"response":{"result":1,"resultcount":1,"collectiondetails":[{"publishedfileid":"123","result":1}]}}
|
||||
"""));
|
||||
|
||||
SteamException e = assertThrows(SteamException.class, () -> this.api.collection("123", new ArrayList<>()));
|
||||
assertTrue(e.getMessage().contains("has no items"), e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void httpError()
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> new Response(503, "unavailable", Duration.ZERO));
|
||||
|
||||
SteamException e = assertThrows(SteamException.class, () -> this.api.collection("123", new ArrayList<>()));
|
||||
assertTrue(e.getMessage().contains("HTTP 503"), e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void unreadableResponse()
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> Response.ok("<html>Error</html>"));
|
||||
|
||||
SteamException e = assertThrows(SteamException.class, () -> this.api.collection("123", new ArrayList<>()));
|
||||
assertTrue(e.getMessage().contains("unreadable"), e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void timeout()
|
||||
{
|
||||
this.api.close();
|
||||
this.api = this.api(Duration.ofMillis(300));
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> new Response(200, "{}", Duration.ofSeconds(3)));
|
||||
|
||||
SteamException e = assertThrows(SteamException.class, () -> this.api.collection("123", new ArrayList<>()));
|
||||
assertTrue(e.getMessage().contains("Cannot reach"), e.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void nestedCollectionsAreSkipped() throws SteamException
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> Response.ok("""
|
||||
{"response":{"collectiondetails":[{"publishedfileid":"1","result":1,"children":[
|
||||
{"publishedfileid":"30","sortorder":1,"filetype":0},
|
||||
{"publishedfileid":"20","sortorder":2,"filetype":2},
|
||||
{"publishedfileid":"10","sortorder":0,"filetype":0}]}]}}
|
||||
"""));
|
||||
this.handlers.put(SteamWorkshopApiTest.DETAILS, SteamWorkshopApiTest::details);
|
||||
|
||||
List<String> warnings = new ArrayList<>();
|
||||
List<WorkshopItem> items = this.api.collection("1", warnings);
|
||||
|
||||
assertEquals(List.of("10", "30"), items.stream().map(WorkshopItem::id).toList());
|
||||
assertEquals(List.of("'20' is a collection inside the collection; its items are not included."), warnings);
|
||||
}
|
||||
|
||||
@Test
|
||||
void detailsInBatchesOfAHundred() throws SteamException
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.DETAILS, SteamWorkshopApiTest::details);
|
||||
|
||||
List<String> ids = IntStream.rangeClosed(1, 150).mapToObj(String::valueOf).toList();
|
||||
List<WorkshopItem> items = this.api.items(ids);
|
||||
|
||||
assertEquals(ids, items.stream().map(WorkshopItem::id).toList());
|
||||
assertEquals(List.of("100", "50"), this.requests.stream().map(form -> form.get("itemcount")).toList());
|
||||
assertEquals("101", this.requests.get(1).get("publishedfileids[0]"));
|
||||
|
||||
// The fake answers only for even ids; odd ones have no details.
|
||||
assertTrue(items.get(1).found());
|
||||
assertEquals(List.of("Mod2"), items.get(1).modIds());
|
||||
assertFalse(items.get(0).found());
|
||||
}
|
||||
|
||||
/** Details for every even id of the request: title {@code Item <id>}, Mod ID {@code Mod<id>}. */
|
||||
private static Response details(Map<String, String> form)
|
||||
{
|
||||
int count = Integer.parseInt(form.get("itemcount"));
|
||||
|
||||
String entries = IntStream.range(0, count)
|
||||
.mapToObj(i -> form.get("publishedfileids[" + i + "]"))
|
||||
.filter(id -> Integer.parseInt(id) % 2 == 0)
|
||||
.map(id -> "{\"publishedfileid\":\"%s\",\"result\":1,\"title\":\"Item %s\",\"description\":\"Mod ID: Mod%s\",\"tags\":[],\"time_updated\":1}".formatted(id, id, id))
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
return Response.ok("{\"response\":{\"result\":1,\"publishedfiledetails\":[" + entries + "]}}");
|
||||
}
|
||||
|
||||
private void recorded()
|
||||
{
|
||||
this.handlers.put(SteamWorkshopApiTest.COLLECTION, form -> Response.ok(SteamWorkshopApiTest.resource("collection-details.json")));
|
||||
this.handlers.put(SteamWorkshopApiTest.DETAILS, form -> Response.ok(SteamWorkshopApiTest.resource("published-file-details.json")));
|
||||
}
|
||||
|
||||
/** The id of the recorded collection. */
|
||||
private static String recordedId()
|
||||
{
|
||||
JsonObject response = JsonParser.parseString(SteamWorkshopApiTest.resource("collection-details.json")).getAsJsonObject().getAsJsonObject("response");
|
||||
return response.getAsJsonArray("collectiondetails").get(0).getAsJsonObject().get("publishedfileid").getAsString();
|
||||
}
|
||||
|
||||
private SteamWorkshopApi api(Duration timeout)
|
||||
{
|
||||
return new SteamWorkshopApi(URI.create("http://127.0.0.1:" + this.server.getAddress().getPort() + "/ISteamRemoteStorage/"), timeout, "LuaModAutomator/test");
|
||||
}
|
||||
|
||||
private void handle(HttpExchange exchange) throws IOException
|
||||
{
|
||||
try (exchange)
|
||||
{
|
||||
String method = exchange.getRequestURI().getPath().substring("/ISteamRemoteStorage/".length());
|
||||
Map<String, String> form = SteamWorkshopApiTest.form(new String(exchange.getRequestBody().readAllBytes(), StandardCharsets.UTF_8));
|
||||
|
||||
this.requests.add(form);
|
||||
|
||||
Function<Map<String, String>, Response> handler = this.handlers.get(method);
|
||||
Response response = handler == null ? new Response(404, "", Duration.ZERO) : handler.apply(form);
|
||||
|
||||
if (!response.delay().isZero()) SteamWorkshopApiTest.sleep(response.delay());
|
||||
|
||||
byte[] body = response.body().getBytes(StandardCharsets.UTF_8);
|
||||
exchange.sendResponseHeaders(response.status(), body.length);
|
||||
|
||||
try (OutputStream out = exchange.getResponseBody()) { out.write(body); }
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
// The client gave up (timeout test).
|
||||
}
|
||||
}
|
||||
|
||||
private static Map<String, String> form(String body)
|
||||
{
|
||||
Map<String, String> form = new LinkedHashMap<>();
|
||||
|
||||
for (String pair : body.split("&"))
|
||||
{
|
||||
String[] parts = pair.split("=", 2);
|
||||
form.put(URLDecoder.decode(parts[0], StandardCharsets.UTF_8), parts.length < 2 ? "" : URLDecoder.decode(parts[1], StandardCharsets.UTF_8));
|
||||
}
|
||||
|
||||
return form;
|
||||
}
|
||||
|
||||
static String resource(String name)
|
||||
{
|
||||
try (InputStream in = Objects.requireNonNull(SteamWorkshopApiTest.class.getResourceAsStream("/steam/" + name), name))
|
||||
{
|
||||
return new String(in.readAllBytes(), StandardCharsets.UTF_8);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new UncheckedIOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void sleep(Duration delay)
|
||||
{
|
||||
try { Thread.sleep(delay); }
|
||||
catch (InterruptedException e) { Thread.currentThread().interrupt(); }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
/** @noinspection UnstableApiUsage, RedundantSuppression */
|
||||
@NotNullByDefault
|
||||
package dev.overlord.luamodautomator;
|
||||
|
||||
import org.jetbrains.annotations.NotNullByDefault;
|
||||
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"response": {
|
||||
"result": 1,
|
||||
"resultcount": 1,
|
||||
"collectiondetails": [
|
||||
{
|
||||
"publishedfileid": "3787051719",
|
||||
"result": 1,
|
||||
"children": [
|
||||
{
|
||||
"publishedfileid": "3765409550",
|
||||
"sortorder": 0,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3778868211",
|
||||
"sortorder": 1,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3780532913",
|
||||
"sortorder": 2,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3782920935",
|
||||
"sortorder": 3,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3782735637",
|
||||
"sortorder": 4,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3790452346",
|
||||
"sortorder": 5,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3790089095",
|
||||
"sortorder": 6,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3571222611",
|
||||
"sortorder": 7,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3776262249",
|
||||
"sortorder": 8,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3795414660",
|
||||
"sortorder": 9,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3794207681",
|
||||
"sortorder": 10,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3792194626",
|
||||
"sortorder": 11,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3119788162",
|
||||
"sortorder": 12,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3787424467",
|
||||
"sortorder": 13,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3790407759",
|
||||
"sortorder": 14,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3781944805",
|
||||
"sortorder": 15,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "2969455858",
|
||||
"sortorder": 16,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3543229299",
|
||||
"sortorder": 17,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3738669352",
|
||||
"sortorder": 18,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3596259242",
|
||||
"sortorder": 19,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "2956146279",
|
||||
"sortorder": 20,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3387957272",
|
||||
"sortorder": 21,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3744455714",
|
||||
"sortorder": 22,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3749026793",
|
||||
"sortorder": 23,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3682045254",
|
||||
"sortorder": 24,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "2553809727",
|
||||
"sortorder": 25,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3428369137",
|
||||
"sortorder": 27,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3426448380",
|
||||
"sortorder": 29,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3580276809",
|
||||
"sortorder": 30,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3659195975",
|
||||
"sortorder": 32,
|
||||
"filetype": 0
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3811212929",
|
||||
"sortorder": 33,
|
||||
"filetype": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,821 @@
|
||||
{
|
||||
"response": {
|
||||
"result": 1,
|
||||
"resultcount": 31,
|
||||
"publishedfiledetails": [
|
||||
{
|
||||
"publishedfileid": "3765409550",
|
||||
"result": 1,
|
||||
"title": "MRE Mod [B42.20.3]",
|
||||
"description": "Completely rewritten from scratch with many new features!\r\n\r\nConfirmed to work with B42.20.3 SP. Works for MP.\r\nFree to add and remove from your current save.\r\n[img]https://i.imgur.com/R5zXX4u.png[/img]\r\n\r\n[h2]What does this mod do?[/h2]\r\nMRE Mod adds 36 different Meals Ready to Eat to the game. It includes 2026 Menus 1–24 from Boxes A and B, plus 1993 Menus 1–12 from Box C. The mod is designed to keep MREs simple and treat each one as a complete meal, without the extra packaging items you’d usually find in a real MRE.\r\n\r\nMRE Loot Boxes are also added to loot distribution. When you find an unopened box, you can open it to receive 12 MREs based on the box type you found.\r\n\r\nThe mod includes several sandbox options so you can customize it to your liking. You can choose to spawn only 1993 MREs, only 2026 MREs, or both. You can also disable loot boxes entirely, adjust MRE spawn rates, and choose between balanced vanilla-style nutrition or more realistic nutrition values.\r\n\r\nIt also includes craft able MRE boxes, letting you make your own storage box for MREs. Craft the boxes and collect them all!\r\n\r\n[img]https://i.imgur.com/l2R5DHb.png[/img]\r\n[h2]Stability[/h2]\r\nYou should have a bug and error free experience. If you encounter any issues please reach out. This was built on B42.19 and will be updated to work for B42.20 and beyond.\r\n\r\n[h2]Roadmap[/h2]\r\nMy goal with this mod is absolute stability for a long term no wipe server. This mod is feature complete. The only updates will be to fix bugs and to ensure smooth operations for each game update. For the latest updates and to view the changelog visit my[url=https://lab.bravodarkthirty.com/project-zomboid/mre-mod-42.19] personal Gitlab [/url]\r\n\r\n[h2]Features:[/h2]\r\nCan add mid save\r\nSpawns 36 different MREs in the world.\r\nCraft 3 different MRE Boxes to store your MREs.\r\nRare MRE Loot Boxes that provide 12 MREs when opened.\r\nSandbox options to control the nutrition stats of each MREs.\r\nSandbox options to choose what MREs you want in the game, 1993 only, 2026 only or both.\r\nSandbox options to disable MRE loot boxes.\r\nSandbox options to adjust the MRE spawn rates.\r\ncustom 3d modeled MRE and MRE boxes.\r\nability to convert MREs from my older B42 MRE Mod if necessary\r\n\r\n[img]https://i.imgur.com/o8LVolW.png[/img]\r\n[h2]Bugs:[/h2]\r\nCurrently when eating a MRE it is not properly in your hand. This is only cosmetic.\r\nB42.20 MP when opening a loot box MRE you only get 1 MRE. This is for MP only SP still works.\r\n\r\n[h2]Support Me[/h2]\r\nIf you like my mods support me by liking and awarding the mod. If you want to give more, you can buy me coffee!\r\n[url=https://ko-fi.com/bravodarkthirty][img]https://i.imgur.com/5pG9WrL.png[/img][/url]\r\n\r\n[H2]Mod Info[/H2]\r\nWorkshop ID: 3765409550\r\nMod ID: bdtmre",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Food"
|
||||
},
|
||||
{
|
||||
"tag": "Models"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
}
|
||||
],
|
||||
"time_updated": 1785950508
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3778868211",
|
||||
"result": 1,
|
||||
"title": "Nick's Turn Off Fridges",
|
||||
"description": "[h1]How to use[/h1]\n[list]\n[*] Right click a fridge or freezer and pick [b]Unplug Fridge[/b] (or [b]Unplug Freezer[/b]). Your character walks over and flips it.\n[*] Right click the same appliance and pick [b]Plug In Fridge[/b] to bring it back. Cooling resumes and the generator picks it up again.\n[*] Or tick [b]Auto-Unplug Fridge[/b] to let that unit look after itself. It is a per-appliance setting, not a global one, so you can leave one fridge running and let the rest of the kitchen switch off. Unplugging or plugging in by hand takes that unit back off auto.\n[/list]\n\n[h1]Compatibility[/h1]\n[list]\n[*] Build 42. Singleplayer, co-op, and dedicated servers.\n[*] Safe to add to an existing save.\n[*] Modded fridges and freezers work automatically, as long as they use the standard container types the base game does.\n[*] Plug everything back in before removing the mod. See the FAQ.\n[/list]\n\n[h1]Translations[/h1]\nSpanish, Portuguese, French, Italian, German, Czech, Norwegian, Finnish, Indonesian, Catalan, Chinese, Korean, Russian, Ukrainian, Turkish, Hungarian and Thai. Each one is built from the words the base game already uses for fridges, freezers, and the generator.\n\nIf something is worded wrong, post the correction in the comments. Your language does not have to be in the list above - anything missing simply shows in English, so a translation is welcome for any of them.\n\n[h1]FAQ[/h1]\n[b]Is there any point before the power goes out?[/b] Nope.\n\n[b]What happens if I disable the mod while a fridge/freezer is unplugged?[/b] The unplugged state is stored on the appliance itself, so plug everything back in first. The save loads fine either way, but a fridge left unplugged when the mod is removed stays inert (no power draw, no cooling) until the mod comes back.\n\nFound a bug? Post in the comments. A log excerpt from Zomboid/console.txt makes it much easier to fix. On a co-op host, coop-console.txt too.\n\nWorkshop ID: 3778868211\nMod ID: NicksTurnOffFridges",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1786677303
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3780532913",
|
||||
"result": 1,
|
||||
"title": "Nick's Sledgehammer Fix",
|
||||
"description": "The sledgehammer destroys the wall you actually picked.\n\n[h1]What this fixes[/h1]\n[b]Corner walls come out backwards.[/b] An L-corner is a single object holding two faces. Highlight the west face, swing, and the west face is what is left standing while the north one disappears. Every corner you knock through takes the wrong half with it.\n\n[b]Wall-mounted objects are stripped off the wrong side.[/b] This one is not limited to corners. Sledge a north wall and the game removes a light, sign, or shelf mounted on the [i]west[/i] wall of the same square instead, and reaches into the wrong neighbouring square looking for the far face.\n\n[h1]Compatibility[/h1]\n[list]\n[*] Build 42. Singleplayer and multiplayer.\n[*] Safe to add to an existing save, and safe to remove.\n[*] It replaces [i]ISDestroyStuffAction:complete()[/i], so it will conflict with any other mod that replaces the same function. Whichever loads last wins.\n[/list]\n\nFound a bug? Post in the comments. A log excerpt from Zomboid/console.txt makes it much easier to fix. On a co-op host, coop-console.txt too.\n\nWorkshop ID: 3780532913\nMod ID: NicksSledgehammerFix",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "building"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788038259
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3782920935",
|
||||
"result": 1,
|
||||
"title": "Nick's Inventory Selection Fix",
|
||||
"description": "Stops inventory selections deselecting themselves.\n\n[h1]What's broken[/h1]\nProject Zomboid rebuilds the inventory list constantly: whenever an item ages, gets wet, or a container changes. Each rebuild saves your selection and puts it back afterwards. The game restores a single item when it should restore the whole row. The next rebuild then can't find anywhere to put that item, so your selection disappears.\n\n[h1]Compatibility[/h1]\n[list]\n[*]Build 42. Singleplayer and multiplayer.\n[*]Replaces ISInventoryPane:restoreSelection() and wraps ISInventoryPane:onMouseDown(), so it will conflict with any other mod that replaces those same functions. Inventory overhaul mods are the ones to watch.\n[/list]\n\n[h1]Credits[/h1]\nShift-click fix comes from Jenek's \"NISF Shift Range Fix\" companion mod.\n\nFound a bug? Post in the comments. A log excerpt from Zomboid/console.txt makes it much easier to fix.\n\nWorkshop ID: 3782920935\nMod ID: NicksInventorySelectionFix",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788058371
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3782735637",
|
||||
"result": 1,
|
||||
"title": "Nick's Moveable Workstations",
|
||||
"description": "Pick up your crafting stations and set them back down wherever you want.\n\n[h1]Whats included[/h1]\n[list]\n[*] Advanced Furnace\n[*] Advanced Kiln\n[*] Butcher Hook\n[*] Chopping Block\n[*] Dome Kiln\n[*] Fire Pit (Stone Blocks)\n[*] Fire Pit (Stones)\n[*] Grindstone\n[*] Metal Bandsaw\n[*] Pottery Bench\n[*] Primitive Forge\n[*] Primitive Furnace\n[*] Primitive Kiln\n[*] Simple Forge\n[*] Simple Furnace\n[*] Stone Mill\n[/list]\n\n[h1]Not included[/h1]\nThe Advanced Forge is left out due to it being a combination of a forge, anvil and quench trough all built together as a single object. The game cannot safely pick that up and set it back down in one piece, so it stays where you build it.\n\nOne other isn't covered yet:\n[list]\n[*] Charcoal Burning Pile\n[/list]\n\n[h1]Compatibility[/h1]\n[list]\n[*] Build 42. Singleplayer and multiplayer.\n[*] Safe to add and remove mid-save. Put stations back down before removing it, though. A station in your inventory when the mod goes away is an object the game can no longer place.\n[/list]\n\nFound a bug? Post in the comments. A log excerpt from Zomboid/console.txt makes it much easier to fix. On a co-op host, coop-console.txt too.\n\nWorkshop ID: 3782735637\nMod ID: NicksMoveableWorkstations",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "building"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788286194
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3790452346",
|
||||
"result": 1,
|
||||
"title": "Nick's Rideable Elevators",
|
||||
"description": "Makes most elevators rideable. Call an elevator, walk in, pick a floor, ride the elevator car to your floor, and step out. Works in singleplayer and multiplayer.\n\nWhile my experience testing has been pretty good for the most part, there are bound to be bugs with how this mod renders you riding the elevator car. Post any bugs you find in the comments and I'll try my best to fix them. I had to get [b]very[/b] creative to get the live car riding to work (the car is literally just placed items made to look like walls and floors).\n\n[h1]How to use it[/h1]\nThere are two ways to call a car and two ways to pick a floor.\n\n[b]Calling the car[/b]:\n[list]\n[*] Right click the ground and choose [b]Call elevator[/b], or\n[*] Left click the wall call button.\n[/list]\n\n[b]Picking a floor[/b]:\n[list]\n[*] Right click and choose [b]Elevator[/b], or\n[*] Left click the panel on the car wall\n[/list]\n\n[h1]Power[/h1]\nThe elevator needs power, either by the grid or a generator placed within the radius of the shaft. Power is judged for the whole shaft at once, so one generator runs the entire tower and you can never be left stranded halfway up with the power cutting out floor by floor.\n\n[h1]Riding[/h1]\n[list]\n[*] The car moves one second per floor, though you can change this in the settings. You can walk around inside the car as it moves, and nothing you do (including swinging a weapon) drops you out mid-ride.\n[*] You keep full control the entire time. Attacking, shoving, or getting shoved won't eject you.\n[*] However a ride ends, you end up on solid ground. Arrive normally and you walk out through the open doors. If anything unusual happens instead (you die, the game hits an error, you disconnect), you're set down on a floor you can walk off of, outside the shaft.\n[*] The car carries players and nothing else. No zombies, no items, no dragged corpses ride along.\n[*] A zombie in the car or in any doorway blocks the doors from closing. The car won't depart until it's cleared out.\n[*] A moving car is heard by zombies on every floor it passes. You can turn it off to ride silently.\n[*] The call chime, the doors, the arrival ding, and the motor hum are just audio, they don't attract zombies. Other players near a shaft hear the door and ding cues too.\n[/list]\n\n[h1]Floors[/h1]\n[list]\n[*] Ground floor is [b]1[/b], basements are [b]B1, B2[/b], and so on.\n[*] A shaft that only serves the upper part of a building lists only those floors. A shaft running from the 6th floor up starts its list at 6, with no floor 1.\n[*] A floor the car can't stop at is still listed, just greyed out.\n[/list]\n\n[h1]Multiplayer[/h1]\n[list]\n[*] Everyone standing in the car rides together. Nobody gets left behind and nobody overrides a trip that's already moving. Once a car is called or riding, it's committed to that trip until it finishes.\n[*] Other players riding with you sees you rise smoothly, the same as you see yourself. No stuttering or snapping between floors.\n[/list]\n\n[h1]Settings (per player)[/h1]\n[list]\n[*] [b]Ride speed[/b]: How fast the car travels. Adjustable from 0.25× to 4×. At 1× a floor takes about a second.\n[*] [b]Lifts make noise[/b]: The zombie-attracting noise above. On by default.\n[*] [b]Sound effects[/b]: The cosmetic chime/doors/ding/motor. On by default.\n[*] [b]Light the elevator car[/b]: The interior light. On by default.\n[/list]\n\n[h1]Lethal Empty Shafts (sandbox setting)[/h1]\nThis is the one setting that can get you killed, and it's on by default. With it on, every shaft becomes an open pit on every floor except the one the car is currently parked at. Calling a car and stepping in as the doors open is always safe, but if you open a shaft door on a floor the car isn't at and walk in, you fall.\n\n[h1]How it finds elevators[/h1]\nIt reads the map's own room data. Every elevator the mappers actually drew works, including the ones that have doors but no elevator floor tiles. On the flip side, a shaft the mappers sealed with no doors at all (ie. garage-style shafts) isn't supported.\n\n[h1]Adding and removing it mid-save[/h1]\nIt [i]should[/i] be safe to do either.\n[list]\n[*] Everything the mod puts in the world is harmless. All of them are ordinary vanilla objects. Remove the mod and they leave no holes and throw no errors.\n[*] Car positions and your settings are just numbers in the save data, they are harmless if you disable the mod.\n[*] The one exception is Lethal Empty Shafts. While it's on, the mod really does strip the floors out of the shafts, and those holes stay in the save. They sit inside sealed rooms that nothing but the elevator doors can reach, so they're not really a hazard, but it's the one setting that leaves a mark on the world after the mod is gone.\n[/list]\n\n[h1]Compatibility[/h1]\n[list]\n[*] Build 42.20+\n[*] Singleplayer and multiplayer\n[/list]\n\n[h1]Found a bug?[/h1]\nPost in the comments. As I said up above, a mod like this is bound to bLine truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1790450736
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3790089095",
|
||||
"result": 1,
|
||||
"title": "Better Corpse Burning",
|
||||
"description": "[h1][img]https://i.ibb.co/9kvZL1H9/Better-Corpse-Burning.png[/img][/h1]\r\n\r\n[h2]🆕 Latest update: v1.19[/h2]\r\nFavorite fire starters are now protected: BCB uses a non-favorite lighter, match or other fire starter first, and only uses a favorite one when no usable non-favorite source remains. Addon finder overrides continue to work throughout the complete burn action.\r\n\r\n🔥 Burn multiple corpses at once. Light one, watch them all go up in flames.\r\n\r\n[hr][/hr]\r\n\r\n[h2][img]https://i.ibb.co/CK43Nqd7/What-Does-t-Do.png[/img][/h2]\r\n\r\n[list]\r\n[*]⛓️ [b]Chain reaction:[/b] Light one corpse and nearby corpses catch fire too. No more burning them one by one.\r\n[*]⛽ [b]No gasoline needed:[/b] Just a lighter or matches\r\n[*]🔄 [b]Replaces vanilla:[/b] Hides the gasoline-requiring vanilla \"Burn Corpse\" option\r\n[/list]\r\n\r\n[hr][/hr]\r\n\r\n[h2][img]https://i.ibb.co/jv0mg67X/Sandbox-Settings.png[/img][/h2]\r\n\r\n⚙️ Fully configurable from the in-game Sandbox menu:\r\n\r\n[list]\r\n[*]⏱️ [b]Time Per Corpse:[/b] How long each corpse takes to burn (default: 110 min)\r\n[*]🔥 [b]Fire Spread Radius:[/b] How far fire spreads to nearby corpses (default: 4 tiles, 0 to disable)\r\n[*]💨 [b]Fire Spread Speed:[/b] How fast fire spreads between corpses. Lower = faster (default: 150 frames, recommended: 30-50 for co-op)\r\n[*]🚫 [b]Remove Vanilla Burn:[/b] Hide the vanilla \"Burn Corpse\" context menu option\r\n[*][img]https://i.ibb.co/278pfb7S/Petrol.png[/img] [b]Require Petrol:[/b] Optionally require gasoline alongside fire source (for realism)\r\n[*]⛽ [b]Petrol per Corpse:[/b] How much petrol per corpse (default: 0.1L, a 10L can burns ~100 corpses)\r\n[*][img]https://i.ibb.co/4gpc3HN4/Vodka.webp[/img] [b]Require Alcohol:[/b] Optionally require any alcoholic beverage (Beer, Vodka, Whiskey, Wine, Gin, Rum, Tequila, Brandy, Scotch, Champagne, Cider, etc.) alongside fire source\r\n[*]🍷 [b]Alcohol per Corpse:[/b] How much alcohol per corpse (default: 0.2L)\r\n[*][img]https://i.ibb.co/tPvhjJbk/Cologne.webp[/img] [b]Require Cologne:[/b] Optionally require Cologne alongside fire source\r\n[*]💐 [b]Cologne per Corpse:[/b] How much cologne per corpse (default: 0.05L)\r\n[*]🏠 [b]Allow Indoor Burning:[/b] Burn corpses inside buildings (default: enabled). Uncheck to protect structures from accidental fires\r\n[*]🔥 [b]Fire Uses per Corpse:[/b] How many times the fire source is used per corpse, so you can tune how fast lighters and matches drain (0 = never drains, default: 1)\r\n[*]🧯 [b]Extinguish Fire When Done:[/b] Automatically put out the fire shortly after all corpses in the chain are burning, protecting your base from lingering flames (default: disabled)\r\n[*]✨ [b]No Ash Remains:[/b] Burn marks and ash piles are cleaned up automatically after the fire goes out (default: disabled)\r\n[/list]\r\n\r\n[list]\r\n[*]💡 [b]Fuel tips:[/b] You can enable multiple fuel requirements at once ([img]https://i.ibb.co/278pfb7S/Petrol.png[/img] + [img]https://i.ibb.co/4gpc3HN4/Vodka.webp[/img] + [img]https://i.ibb.co/tPvhjJbk/Cologne.webp[/img]). If any of the enabled fuel types is in your inventory, you're good to go. Fuel is also found inside bags and nested containers. For example, if both \"Require Petrol\" and \"Require Alcohol\" are on, having either a petrol can OR a bottle of whiskey is enough.\r\n[/list]\r\n\r\n[hr][/hr]\r\n\r\n[h2][img]https://i.ibb.co/LX3q3kDh/How-t-Works.png[/img][/h2]\r\n\r\nWhen you light a corpse, the fire spreads to nearby corpses one by one with a realistic delay. Each burning corpse ignites its neighbors, creating a chain reaction. You can adjust the spread speed and radius from sandbox settings.\r\n\r\n[hr][/hr]\r\n\r\n[h2][img]https://i.ibb.co/QvJJDXdr/Supported-Fire-Sources.png[/img][/h2]\r\n\r\n[i]Note: Fire sources are consumed like in vanilla. Disposable lighters and matches have very low use cost per corpse, so they last a long time. This is vanilla game behavior.[/i]\r\n\r\n[hr][/hr]\r\n\r\n[h2][img]https://i.ibb.co/7tBMzKdR/Compatibility.png[/img][/h2]\r\n[h2][img]https://i.ibb.co/Y4cCrg5Y/Singleplayer-Checkmark.png[/img][/h2]\r\n[h2][img]https://i.ibb.co/6RXXGdVh/Coop.png[/img][/h2]\r\n[h2][img]https://i.ibb.co/BDwMzvY/All-Languages.png[/img][/h2]\r\n\r\n[hr][/hr]\r\n\r\n[h2][img]https://i.ibb.co/xtyqTjPy/Notes.png[/img][/h2]\r\n\r\n[list]\r\n[*]🆕 [b]v1.19:[/b] Favorite fire starters are protected and used only as a last resort.\r\n[*]🆕 [b]v1.18:[/b] Addon finder overrides now work throughout the complete burn action.\r\n[*]🆕 [b]v1.17:[/b] Fuel containers inside bags and nested containers are now found automatically. Fuel is consumed once per corpse, not per fire-spread tile.\r\n[*]📝 Adds \"Burn Corpse\" option to the right-click context menu\r\n[*]🔧 Fire spread can be disabled from sandbox settings\r\n[*]🔄 Vanilla \"Burn Corpse\" option can be re-enabled from sandbox settings\r\n[*]⚠️ FirLine truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1790632326
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3571222611",
|
||||
"result": 1,
|
||||
"title": "Darker Map & Satellite View",
|
||||
"description": "[img]https://imgur.com/BaUyxax.png[/img]\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\nNewest Addition:\r\nOptional Sound Overlay\r\n\r\nPlan your sound range directly on the world map.\r\nIncludes presets for generators, helicopters, alarms, car horns, shouting and whistling, plus a custom radius slider.\r\nThe overlay also takes zombie hearing lore and weather into account.\r\n\r\n[img]https://imgur.com/b6xZRDj.png[/img]\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\n\r\n[h1]TwisTonFire - Darker Map[/h1]\r\n\r\nMake the Project Zomboid world map easier on the eyes, cleaner to use, and more useful at a glance.\r\n\r\nDarker Map improves the vanilla world map with [b]adjustable unexplored-area darkness[/b], [b]extra terrain display modes[/b], [b]custom map button icons[/b], [b]saved map settings[/b], and a new [b]collapse / expand system[/b] for a cleaner button layout.\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\n[h2]Main Features[/h2]\r\n\r\n[list]\r\n[*][b]Adjustable map darkness[/b]\r\n[list]\r\n[*]Adds a darkness slider directly to the world map UI.\r\n[*]Lets you control how dark unexplored areas should look.\r\n[*]Useful if vanilla fog feels too bright, too flat, or too washed out.\r\n[/list]\r\n\r\n[*][b]Extra terrain display toggle[/b]\r\n[list]\r\n[*]Adds a dedicated terrain toggle button to the map.\r\n[*]Lets you quickly switch between multiple map display styles.\r\n[*]Gives you more control without relying on debug-only tools.\r\n[/list]\r\n\r\n[*][b]Three map display modes[/b]\r\n[list]\r\n[*][b]Vanilla Vector View[/b] - the normal Project Zomboid map style.\r\n[*][b]Terrain View[/b] - a cleaner terrain / satellite-style map image.\r\n[*][b]Terrain + Buildings[/b] - terrain imagery with building overlays for easier reading.\r\n[/list]\r\n\r\n[*][b]Collapse / expand map buttons[/b]\r\n[list]\r\n[*]Adds a new collapse / expand button to the world map button row.\r\n[*]Lets you keep the map UI more compact when you want a cleaner screen.\r\n[*]The collapse button sits at the far left of the map controls.\r\n[/list]\r\n\r\n[*][b]Custom collapsed-mode Mod Options[/b]\r\n[list]\r\n[*]Choose which map buttons stay visible while the row is collapsed.\r\n[*]You can decide this button-by-button in Mod Options.\r\n[*]This lets you keep only the controls you actually want on screen.\r\n[/list]\r\n\r\n[*][b]Improved Symbols toggle behavior[/b]\r\n[list]\r\n[*]Includes a Mod Option that changes how the Symbols toggle works.\r\n[*]When enabled, the Symbols button hides [b]only the legend[/b] instead of hiding both the legend and the map symbols.\r\n[*]Map symbols are also forced to stay visible when that option is active, so old hidden states do not carry over.\r\n[/list]\r\n\r\n[*][b]Saved settings[/b]\r\n[list]\r\n[*]Your darkness setting is saved.\r\n[*]Your selected terrain mode is saved.\r\n[*]Important world map options are also remembered.\r\n[*]No need to set everything up again every time you open the map.\r\n[/list]\r\n\r\n[*][b]Custom map button icons[/b]\r\n[list]\r\n[*]Replaces simple vanilla button labels with proper custom icons.\r\n[*]Includes custom icons for center, erase all, symbols, and the new collapse / expand toggle.\r\n[*]The symbols button updates its icon depending on its current state.\r\n[/list]\r\n\r\n[*][b]Cleaner world map experience[/b]\r\n[list]\r\n[*]Designed to feel like a natural extension of the vanilla world map.\r\n[*]Focuses on readability, convenience, and a more polished UI.\r\n[*]Adds useful features without turning the map into a bloated mess.\r\n[/list]\r\n[/list]\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\n[h2]Why use this mod?[/h2]\r\n\r\nVanilla world map settings work, but they leave a lot of room for improvement.\r\n\r\nDarker Map gives you [b]more visual control[/b], [b]better terrain readability[/b], [b]saved map preferences[/b], and [b]a cleaner button layout[/b] while still keeping the map easy and intuitive to use.\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\n[h2]Notes[/h2]\r\n[list]\r\n[*]Made for [b]Project Zomboid Build 42[/b].\r\n[*]This mod focuses on [b]world map UI and map presentation[/b].\r\n[*]Settings are stored so your preferred setup stays consistent.\r\n[*]Designed for players who want a cleaner map without losing useful controls.\r\n[/list]\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\n[h1]More Features here:[/h1]\r\n[b]If you want more map features like this:[/b]\r\n[img]https://i.imgur.com/TDg8f8q.gif[/img]\r\n[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3627539752]Go to TwisTonFire - Map Improvements[/url]\r\n[img]https://imgur.com/RQYClYI.png[/img]\r\n[quote]\r\n[h2]Compatibility[/h2]\r\n[table]\r\n[tr]\r\n[th]Mode[/th]\r\n[th]42.12[/th]\r\n[th]42.13[/th]\r\n[th]42.15[/th]\r\n[th]42.16[/th]\r\n[th]42.17[/th]\r\n[th]42.18[/th]\r\n[th]42.19[/th]\r\n[th]42.20[/th]\r\n[/tr]\r\n\r\n[tr]\r\n[td][b]Singleplayer[/b][/td]\r\n[td]✅[/td]\r\n[td]✅[/td]\r\n[td]✅[/td]\r\n[td]✅[/td]\r\n[td]Line truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Map"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1786768161
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3776262249",
|
||||
"result": 1,
|
||||
"title": "Ping Items! Friends! 42.20 MP Official",
|
||||
"description": "Found something useful in a drawer? Ping it for your friends to see where it is. Too many zombies nearby? Ping retreat! And so much more\r\n\r\n[img]https://i.imgur.com/fD6OdJ5.gif[/img]\r\n[hr][/hr]\r\n[h1]Ping Items on the ground, in containers, vehicles, players, zombies![/h1]\r\n[img]https://i.imgur.com/t9HSw5Y.gif[/img]\r\n\r\n[h1]Tactical Ping Wheel![/h1] Click gifs for sound\r\n[url=https://i.imgur.com/iJ27Epy.mp4][img]https://i.imgur.com/c4TeFrJ.gif[/img][/url]\r\n\r\n[h1]League of Legends spam your friends! Authentic sound effects![/h1]\r\n[url=https://i.imgur.com/FdB6rQT.mp4][img]https://i.imgur.com/nB4TScD.gif[/img][/url]\r\n\r\n[h1]Included Mod Options[/h1]\r\n[list]\r\n[*][b]Ping Items! Friends! - Core[/b] — Required.\r\n[*][b]Ping Items! Friends! - Default Wheel[/b] — Tactical pings! (Optional)\r\n[*][b]Ping Items! Friends! - LoL Wheel[/b] — LoL's ping wheel (Optional)\r\n[*][b]Only enable one optional mod.[/b]\r\n[/list]\r\n\r\n[h1]Local Player Settings[/h1]\r\n[b]Default hotkey: ~[/b] (configurable per player in Options > Mods > World Ping System)\r\n[b]Show Chatbox Ping Notifications[/b] Enabled (Default), Disabled\r\n[b]Ping Wheel Volume[/b] 0%–100% (Default: 25%)\r\n\r\n[h1]Sandbox Settings[/h1]\r\n[b]Ping Visibility Range[/b] 15 Tiles, 30 Tiles (Default), 50 Tiles, Unlimited\r\n[b]Ping Duration[/b] 2–10 Seconds (Default: 3 Seconds)\r\n[b]Automatic Ping Cooldown[/b] None, 1 Second (Default), 2 Seconds, 5 Seconds\r\n[b]Restrict to Faction or Safehouse[/b] Enabled, Disabled (Default)\r\n\r\n[h1]Current Status[/h1]\r\nThe mod is fully functional, works mid-save, and multiplayer compatible!\r\n[b]Tap[/b] the hotkey for standard pings\r\n[b]Hold[/b] the hotkey for ping wheel.\r\nSupports Korean, Spanish, German, Russian, Chinese localization\r\nSupports 2 button configuration using keyboard and mouse i.e shift + left click\r\n\r\nI'm actively working on new features and improvements. Translation requests? Let me know in the comments!\r\n\r\n[url=https://steamcommunity.com/id/FistOTN/myworkshopfiles/?appid=108600][img]https://i.imgur.com/cO8YgIZ.png[/img][/url]\r\n\r\n[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3780827697][img]https://i.imgur.com/gdfrzob.gif[/img][/url][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3781966719][img]https://i.imgur.com/QiJni0F.png[/img][/url]\r\n[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3790259769][img]https://i.imgur.com/RZiNWpz.png[/img][/url]\r\n\r\nWorkshop ID: 3776262249\r\nCore Mod ID: PingItemsFriends\r\nDefault Wheel Mod ID: PingItemsFriendsDefaultWheel\r\nLoL Wheel Mod ID: PingItemsFriendsLoLWheel\r\n\r\nWorkshop ID: 3776262249\r\nMod ID: PingItemsFriends\r\nMod ID: PingItemsFriendsDefaultWheel\r\nMod ID: PingItemsFriendsLoLWheel",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Map"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Silly/Fun"
|
||||
},
|
||||
{
|
||||
"tag": "Vehicles"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1786839220
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3795414660",
|
||||
"result": 1,
|
||||
"title": "Fitted Barricades",
|
||||
"description": "Makes barricades fit the window or door they're nailed to. Vanilla uses the same four planks on every opening. With this mod the barricade covers the whole opening.\n\n[h2]How it works[/h2]\nBarricade as normal. If the opening is bigger than the vanilla barricade, it takes more planks: tall house windows, church windows, diner and shop fronts, the full-glass panels next to store doors, and every door. Small windows get the normal four-plank barricade.\n\nA tall house window takes six planks, a shop front nine, a door seven. The planks are spaced the same as vanilla. A tall opening takes two sheets of metal or two sets of bars instead of one. Keep picking Barricade and the planks fill the opening from the middle outward.\n\nRemoving a barricade gives you every plank, sheet or bar back. Each barricade is made of the game's own barricade objects, just more of them, so nothing new is written to your save.\n\n[h2]What stays vanilla[/h2]\n[list]\n[*]Small windows, where four planks already cover the glass.\n[*]A few very large windows that span more than one wall tile: the double-height Seahorse panes, some police station and theatre fronts.\n[*]A wall where the window has been removed entirely and only the hole is left.\n[/list]\n\n[h2]Balance[/h2]\nEvery plank has the same health as a vanilla plank, and the same goes for sheets and bars. A nine-plank window costs eighteen nails instead of eight, and it's more than twice as tough as a four-plank one. Zombies have to break every plank to get in.\n\nPlanks break one at a time, like vanilla. Three planks or one metal sheet block sight, like vanilla.\n\n[h2]Multiplayer[/h2]\nThe extra planks are ordinary barricade objects, so they save and sync like any other. Works as far as I have tested, but I haven't tried a dedicated server. Let me know if something breaks.\n\n[h2]Compatibility[/h2]\n[list]\n[*]Build 42 only. Works on 42.20 (stable) and 42.21 (unstable).\n[*]Adds new tiles, doesn't touch any vanilla files. Safe to add to an existing save. Barricades that are already up get refitted as the area loads, and you can add more planks to them.\n[*]Safe to remove. Every barricade stays up and works like the vanilla barricades it's made of.\n[/list]\n\n[h2]The rest of the set[/h2]\nSame idea on different things: whatever goes over an opening should fit the opening. Each one works on its own, they don't overlap, and none of them touch a vanilla file.\n\n[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3785740658][img]https://images.steamusercontent.com/ugc/11810053326347896396/BAC2DE2B8B6F5579A4F5F0C02DC1D365FFE78DA5/[/img][/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3794207681][img]https://images.steamusercontent.com/ugc/11949640646152024147/951BB1502A99B420FCCDB378A7B50001792AD437/[/img][/url]\n\nFound a window that should get a fitted barricade but doesn't? Leave a comment.\n\nWorkshop ID: 3795414660\nMod ID: FittedBarricades",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788563329
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3794207681",
|
||||
"result": 1,
|
||||
"title": "Fitted Sheets",
|
||||
"description": "Makes the sheet fit the window it's hanging on. Vanilla uses the same small sheet on every window. With this mod the sheet covers the whole pane.\n\n[h2]How it works[/h2]\nAdd Sheet works as normal. If the window is bigger than the vanilla sheet, the one that goes up is cut to match the glass: tall house windows, church windows, diner and shop fronts, the full-glass panels next to store doors. Small windows get the normal sheet.\n\nSheets that are already hanging get refitted as the area loads, including ones you hung before installing the mod and ones the game put up on its own.\n\nThe mod doesn't hang sheets itself. The game adds its sheet the normal way and the mod swaps in one that fits, so open/close, refunds, barricades, saves and multiplayer sync are untouched vanilla.\n\n[h2]What stays vanilla[/h2]\n[list]\n[*]Doors, glass storefront doors included. Only windows get fitted.\n[*]A few very large windows that span more than one wall tile: the double-height Seahorse panes, some police station and theatre fronts.\n[/list]\n\n[h2]Multiplayer[/h2]\nWorks as far as I have tested, since it's the vanilla sheet underneath. Let me know if something breaks.\n\n[h2]Compatibility[/h2]\n[list]\n[*]Build 42 only. Works on 42.20 (stable) and 42.21 (unstable).\n[*]Adds new tiles, doesn't touch any vanilla files. Safe to add to an existing save.\n[*]If you uninstall, take your sheets down first. Ones left up turn invisible but still block sight. You can still click them to remove them.\n[/list]\n\n[h2]The rest of the set[/h2]\nSame idea on different things: whatever goes over an opening should fit the opening. Each one works on its own, they don't overlap, and none of them touch a vanilla file.\n\n[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3785740658][img]https://images.steamusercontent.com/ugc/11810053326347896396/BAC2DE2B8B6F5579A4F5F0C02DC1D365FFE78DA5/[/img][/url] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3795414660][img]https://images.steamusercontent.com/ugc/15679859386331631812/AF71E75C204D75228538052D3EF9AFBF96E816CB/[/img][/url]\n\nFound a window that should get a fitted sheet but doesn't? Leave a comment.\n\nWorkshop ID: 3794207681\nMod ID: FittedSheets",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Textures"
|
||||
}
|
||||
],
|
||||
"time_updated": 1790355251
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3792194626",
|
||||
"result": 1,
|
||||
"title": "AEBS Misc",
|
||||
"description": "Lets the server choose Imperial or Metric (or Both) units for AEBS radio broadcasts, and adds toggleable Water and Power shutoff warnings to the AEBS feed.\n\nWorkshop ID: 3792194626\nMod ID: AEBSMisc",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788019152
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3119788162",
|
||||
"result": 1,
|
||||
"title": "42.21 | Every Texture Optimized",
|
||||
"description": "[B]Supports Mid-Game, Multiplayer and Safe to Remove:[/B]\r\nThe main work is done, all textures have been optimized.\r\nFuture updates will focus on improving the mod. Expect major and minor updates.\r\n\r\n[B]Latest Update:[/B]\r\n- Added a restriction that prevents users from activating both features at the same time.\r\n- Integrated an optimized version of the mod: [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3401621798]Transparent Glasses[/URL] by [URL=https://steamcommunity.com/id/singlain]Singlain[/URL].\r\n\r\n[I]Let's get the likes up to 9000, guys, not much left.[/I]\r\n\r\n[HR]\r\n[H3]Mod Purpose:[/H3]\r\nSqueezes maximum performance out of all textures while preserving their quality as much as technically possible. It also improves some of the original textures.\r\nMust-have if you have a lot of junk or zombies in your location and many more.\r\n[H3]Available Features:[/H3]\r\n[B]•[/B] [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3119788162]Well Balanced[/URL] – Personal favorite, good price between quality and performance. [U]Try this first.[/U]\r\n[B]•[/B] [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3119788162]Maximum Performance[/URL] – The main goal here is to maximize performance for Steam Decks, Laptops and low-end PCs. A loss in quality is inevitable, but within reasonable limits.\r\n[H3]Future Plans:[/H3]\r\n[B]•[/B] [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3119788162]HD Textures[/URL] – Improves the detail of vanilla textures without losing performance.\r\n[B]•[/B] [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3119788162]Project Optimized[/URL] – Optimization of Vanilla+ textures from other mod authors.\r\n[strike][B]•[/B] [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3119788162]Absolutely Lossless[/URL] – Here, every pixel is identical to the original, all the magic lies in the resource-intensive optimization by my side.[/strike]\r\n[H3]Version for Build 41:[/H3]\r\n[url=https://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=2812026801]41.78 | Every Texture Optimized[/url]\r\n[H3]How to install:[/H3]\r\nSimply activate the mod in the game or overwrite the game files.\r\nI'll give a more detailed answer to the second option in the future.\r\n[H3]Compatibility:[/H3]\r\nIn most cases, it is compatible with any mods, put it above all others in the list so that other mods can overwrite it.\r\n[H3]Credits:[/H3]\r\n- [URL=https://steamcommunity.com/sharedfiles/filedetails/?id=3401621798]Transparent Glasses[/URL] by [URL=https://steamcommunity.com/id/singlain]Singlain[/URL].\r\n[H3]Restrictions:[/H3]\r\nI allow you to use my mod.\r\nIf you decide to edit or reupload it please give me credit in the description.\r\n\r\n[HR]\r\n[b]Workshop ID:[/b] 3119788162\r\n[b]Mod ID:[/b] ETO_B\r\n[b]Mod ID:[/b] ETO_P",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Animals"
|
||||
},
|
||||
{
|
||||
"tag": "building"
|
||||
},
|
||||
{
|
||||
"tag": "Clothing/Armor"
|
||||
},
|
||||
{
|
||||
"tag": "Farming"
|
||||
},
|
||||
{
|
||||
"tag": "Food"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Literature"
|
||||
},
|
||||
{
|
||||
"tag": "Map"
|
||||
},
|
||||
{
|
||||
"tag": "Military"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Models"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Pop Culture"
|
||||
},
|
||||
{
|
||||
"tag": "Skills"
|
||||
},
|
||||
{
|
||||
"tag": "Textures"
|
||||
},
|
||||
{
|
||||
"tag": "Vehicles"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
},
|
||||
{
|
||||
"tag": "Weapons"
|
||||
}
|
||||
],
|
||||
"time_updated": 1787862955
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3787424467",
|
||||
"result": 1,
|
||||
"title": "Shadowcopter",
|
||||
"description": "If you are unlucky enough to be out and about you may see the helicopter's shadow sweep across the ground.\n\n[h1]Cosmetic only. Helicopter behavior is unaffected.[/h1]\n[list]\n[*]Shadowcopter obeys game/sandbox settings.\n[*]Do you prefer constant harassment? Try this version: [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3786716864]Forevercopter[/url]\n[*][b]You do not need both[/b] - with both installed Shadowcopter stands aside and Forevercopter's settings are used.\n[/list]\n\n[h1]When you will see it[/h1]\n[list]\n[*]While a helicopter is overhead - within earshot.\n[*]Outdoors. Not inside a building.\n[*]In daylight, and not through a storm.\n[*]One or two passes per visit, seconds apart, about a second and a half each.\n[*]It is a glimpse on purpose.\n[/list]\n\n[h1]Options[/h1]\nOptions > Mods > Shadowcopter\n[list]\n[*][b]Helicopter volume[/b] - Quieter for you while still pulling zombies.\n[/list]\n\n[h1]Compatibility[/h1]\n[list]\n[*]Project Zomboid Build 42 only.\n[*]No dependencies.\n[*]Safe to add to an existing save, and safe to remove.\n[*]Client-side only - no world state, nothing written to your save.\n[*]Singleplayer and multiplayer.\n[/list]\n\n[h1]Steam Workshop Meta[/h1]\n[list]\n[*]Shadow enjoyers: [img]https://images.steamusercontent.com/ugc/13428789489692489116/B905C84F1605D4BCAD48FA5A77984A8573912D21/[/img]\n[*]Check out: [url=https://steamcommunity.com/id/qwerto/myworkshopfiles/?p=1&numperpage=30]my other mods[/url].\n[/list]\n\nWorkshop ID: 3787424467\nMod ID: Shadowcopter",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788327682
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3790407759",
|
||||
"result": 1,
|
||||
"title": "RCON Data Bridge",
|
||||
"description": "A Project Zomboid server mod enabling richer RCON tooling and automation.\n\nWorkshop ID: 3790407759\nMod ID: RconDataBridge",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "WIP"
|
||||
}
|
||||
],
|
||||
"time_updated": 1789734919
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3781944805",
|
||||
"result": 1,
|
||||
"title": "Immersive Solar Arrays - B42 Fork",
|
||||
"description": "[h1]Immersive Solar Arrays[/h1]\n\nHarvest solar power for the needs of your base. Wire car batteries into a battery bank, put panels on the roof, and run your fridges and freezers off the sun instead of a generator that has to be fed.\n\nThis is a fork of RadX5 and Poltergeist's Immersive Solar Arrays, rebuilt for build 42. Support for build 41 has been dropped.\n\n[b]Build 42.20 or newer. Singleplayer and multiplayer.[/b]\n\n[h1]What it does[/h1]\n\n[list]\n[*][b]Battery banks.[/b] Wire car batteries, build a bank, and it powers everything a generator would, in the same radius, without fuel.\n[*][b]Solar panels.[/b] Flat, wall mounted and floor mounted. Connect them to a bank and they charge it through the day. Cloud, fog, temperature and the length of the day all move the number.\n[*][b]Status window.[/b] Right click the bank. The summary tab says whether the panels are keeping up and how long the charge lasts at the current draw. The details tab lists what is actually pulling power.\n[*][b]Generator backup.[/b] A generator plugged in near a bank becomes its backup. Put a failsafe trigger on the generator's square and the bank starts it when the charge runs low, then stops it once the panels have caught up.\n[*][b]Loot and world spawns.[/b] Panels, batteries, inverters and the skill magazine spawn in the containers you would expect. Pre-placed crates and battery banks appear around the map, and five stash houses hide a solar cache behind an annotated map.\n[/list]\n\n[h1]Putting one up[/h1]\n\nPanels and battery banks are moveables rather than build menu entries, so nothing from this mod shows up under construction.\n\n[list]\n[*]Craft a panel in the crafting menu. The loose solar panel you find as loot is a part, not something you can install, so turn it into a roof tile, a wall panel or a floor panel first.\n[*]Put the crafted panel in your main inventory. Not in a bag, and not in your hands, or the next step will not appear.\n[*]Right click it, choose Place Object, and place it outdoors.\n[*]Right click the battery bank, pick Connect panels, and click the panel.\n[/list]\n\nYou need a screwdriver on you and Electrical 3 to place a panel or pick one back up, the same as the crafting recipes ask for.\n\n[h1]What this fork fixes[/h1]\n\nThe build 42 branch loaded and appeared to work, but most of it quietly did nothing. None of the below wrote anything to the log.\n\n[list]\n[*][b]Every string showed as its own key.[/b] Build 42 reads only JSON translations. The mod still shipped build 41 text tables, which are not loaded at all. All 27 languages converted.\n[*][b]Every item had no item type.[/b] The field that declares one was renamed, and the old name is not parsed any more.\n[*][b]Every recipe was impossible to perform.[/b] Item tags are matched literally and are namespaced now, so the tools the recipes asked for matched nothing.\n[*][b]Battery banks never became generators.[/b] Two property accessors removed in build 42 threw on every placement, so banks powered nothing, their window closed on open, and panels could not see them.\n[*][b]Base game loot tables were being corrupted.[/b] A misspelt field put a weight into vanilla item lists with no item in front of it, shifting every pair after it.\n[*][b]Stash houses errored on load[/b] and their caches were never placed.\n[*][b]Multiplayer did nothing.[/b] Plugging a generator, flipping the bank switch, connecting a panel and moving a battery all reached for a server object that does not exist on a client.\n[*][b]Tile fixes.[/b] Flat panels no longer draw over your feet, and the failsafe no longer hides under the generator it is wired to.\n[/list]\n\n[h1]Requirements[/h1]\n\n[b][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2969455858]Target Square: On Load Commands[/url][/b] is needed for the pre-placed crates that spawn around the map. Without it everything else still works, you just do not get those crates. It is safe to add or remove on an existing save.\n\n[h1]Options[/h1]\n\nSandbox options cover panel efficiency, how quickly batteries wear out, DIY battery capacity, how often the bank charges, how power draw is calculated, loot rarity for each item group, world spawns and stash houses.\n\nMaking a solar panel and making an inverter from scratch are off by default. Turn on expanded recipes in the sandbox options if you want them.\n\n[h1]Notes[/h1]\n\n[list]\n[*]Only run one version of this mod. The mod id is [b]ISA[/b].\n[*]Some options need a game reload, and stash houses want a new save to appear properly.\n[*]Mods that replace the default inventory transfer or generator interactions can cause problems.\n[*]Test on a save you are willing to lose before adding it to a long running one.\n[/list]\n\n[h1]Reporting a bug[/h1]\n\nReproduce it with only this mod enabled and write down the steps. If it only happens alongside other mods, narrow down which ones. Check the console log for errors and post those with evLine truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "building"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
}
|
||||
],
|
||||
"time_updated": 1790793602
|
||||
},
|
||||
{
|
||||
"publishedfileid": "2969455858",
|
||||
"result": 1,
|
||||
"title": "Target Square: On Load Commands",
|
||||
"description": "[h1] Description [/h1]\nSimple way to trigger functions when the square is loaded, without every mod performing same checks multiple times.\n\nTest API, meant to replace repetitive use of the LoadGridsquare Event, where not neccessary.\n\nWorkshop ID: 2969455858\nMod ID: TargetSquareOnLoad\n\nWorkshop ID: 2969455858\nMod ID: TargetSquareOnLoad",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 41"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Build 42"
|
||||
}
|
||||
],
|
||||
"time_updated": 1735404165
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3543229299",
|
||||
"result": 1,
|
||||
"title": "[B42]Project RV Interior",
|
||||
"description": "[h3][i] Inspired on the mod by Maxwelt, RobRendell, and AuD; credit to them. 📜✍[/i][/h3]\n\n\n Do you enjoy the nomadic lifestyle? Then this is the mod for you!\nThis mod adds interior environments to industrial vehicles. It lets you enter and exit whenever you want, store your items, and furnish the space however you like. Basically, you’ll be able to have the RV Interior you always dreamed of — now in Build 42.\n\n\n[h2] FEATURES 🚀 [/h2]\n[list]\n [*]Works in both singleplayer and multiplayer\n\n [*]Supports over 200 interior environments\n\n [*]Built-in electrical system (battery-dependent)\n\n [*]Rain collectors on the RV roof\n\n [*]Multiple access points (seats, trunk)\n\n [*]Customizable interiors\n\n [*]All trucks and vans (with two seats) are supported\n\n [*]Supports co-op/split screen\n[/list]\n\n\n[h2] HOW DO I GET IN AND OUT ❓ [/h2]\nFor some vehicles, you need to stand behind the trunk and press V. For others, you have to be in the seats and press V. Then the radial menu will open and give you the option to enter. To exit, right-click on the ground and at the very bottom you’ll find the option to exit.\n\n\n[h2] HOW CAN I ACTIVATE IT IN MULTIPLAYER ❓ [/h2]\n[code] Go to C:\\Users\\YourUser\\Zomboid\\Server\nOpen your server.ini file; search the following tags and configure it as follows:\n\nMods=PROJECTRVInterior42\n\nMap=map_distanciado;Muldraugh, KY\n\nDoLuaChecksum=false\n\nSaveWorldEveryMinutes=15\n\nWorkshopItems=3543229299\n\nSave the changes and restart your world with this settings\n[/code]\n\n[h2] IMPORTANT NOTES ⚠️ [/h2]\n-This mod must be placed first in the mod load order\n-This mod is not compatible with challenge modes\n-To add it mid-save, follow this [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3656042211]guide[/url]. If you add it without following the guides, you will be sent to the Howling Forest to cry eternally.\n-If your interior was reassigned (reset) due to an update error, here's a tool to reassign the one you had before [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3605452142][B42]Project RV Tools[/url].\n\n\n[h2] FOR MODDERS 🛠️ [/h2]\nIf you're a modder and would like to create add-ons to add custom interiors to certain vehicles, you'll find the necessary resources [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3604969476]here[/url].\n\n\n[h2] While this mod is compatible with the following listed mods, I cannot guarantee that all of them are functional in multiplayer; so test them and use them at your own risk ⚠️ [/h2]\n\n\n[h2] Compatible with the following mods ✔️ [/h2]\n[spoiler] (see patch notes for the full vehicle list)(WARNING: Some of those mods may have issues) [/spoiler]\n'86 Chevrolet CUCVs + M101A2 Trailer\n'87 Ford B700/F700 Trucks\n'63 Volkswagen Type 2 Van\n'90 Ford F350 Ambulance\n'90 Pierce Arrow Pumper\n'86 Ford Econoline E-150 + Pop Culture vans\n'86 Oshkosh P19A + Military Trailers\nTrailers!\nAutotsar Trailers B42\nAutotsar Bus B42\nW900 Semi-Truck [B42]\n'90 Mercedes-Benz Unimog U1550L\n[B41/B42]Special Emergency Vehicles & FBI for Filibuster Rhymes' Used Cars!\nJesters Franklin Va!uline 4x4\nFiat Fiorino 1992 [B42 & B41]\nRastrojero 1979 [B42 & B41]\nRenault Trafic 1990 [B42 & B41]\n'77 Hayosiko Pace [B41/B42]\n[B42] Refrigerated Ice Cream Trucks - Freezer Version\nAutotsar Tuning Atelier - DeRumba Van v.2.00 [B42]\n[B42]Azumanga Daioh Valuline\n[B42] Skizot's USPS Truck\nScooby-Doo Mystery Machine! (B42)\n[B41/B42]Furgonetas de España / Vans of Spain\naMOOzon Delivery Service\nUAZ 2206\nThe A-Team Van\nApocalyptic Bus\nThe Brakass Mobile\nFilibuster Rhymes' Used Cars! B42 Port\n[B42/1] '73 Winnebago Chieftain\nFilibuster Rhymes' Used Cars! - Animation Alpha\nContainers!\n[B41/B42]Company Liveries & loot for Filibuster Rhymes' Used Cars! F700 trucks\nPZK VLC (Vanilla look-like car pack)\nAutotsar Tuning Atelier - Petyarbuilt 379 [B42]\nMB Caio Foz\n[B42] DeRumba Van MyGO!!!!! Chihaya Anon Personal Use Verson\n[B42] Doomsday MotorHome\n'89 LAND ROVER Defender\nBlobs Wonderfully Weird cars!\n1993 American Vehicle Pack (BUILD .41/.42)\n[B42/B41] The Motorious Zone Vehicle Pack\nATA_VanDeRumbaEyeSky\n明石德伦巴 带语音 DeRumba Van MS with Voice [42]\n德伦巴面包车[小刘鸭]\n[B41/B42]Oldham (La Grange) & Henry county liveries for Filibuster's Used cars Emergency vehicles\nMB metalpar pucara\n'97 ADI Bushmaster\nUPZ Chevalier Step Van\nGAZ-3937 Vodnik [B41/B42]\n[B42] Tatrapan\nPeugeot Partner inspired Car v 0.7 - B42 B41\nPZK Vehicle Pack Community Expansion\nU.S. M113 APC by Papa_Chad\nU.S. M163 VADS by Papa_Chad\nJOKER86 MC B42\nU.S. M41 Walker Bulldog by Papa_Chad\n'85 Chevrolet Step-Van\nThe lost world pack 1997\nAutotsar Tuning Atelier - MolksAgen Luton Van [B42]\n[B42] UH-1B Helicopter\nFord T330 | 41/42+\nHATECLUB StepVan\nR.U. BMP-2 by Papa_Chad\nFord Transcontinental\nCampers!\n1990 Caio Victoria\nRolLine truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "building"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Map"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Pop Culture"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "Vehicles"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1787711085
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3738669352",
|
||||
"result": 1,
|
||||
"title": "Become Desensitized [B42.20 Stable Unofficial SP/MP]",
|
||||
"description": "[h2]Notes[/h2]\r\nThis mod was not created by me.\r\nThis is just updating it to version 42.19 because how traits / occupation are retrieved in the code has changed in version 42.19.\r\n\r\nThis has now been tested and working in Multiplayer and Singleplayer.\r\n\r\nThe original was created by Monkey:\r\nhttps://steamcommunity.com/id/tri2580\r\n\r\nThe original mod can be found here:\r\nhttps://steamcommunity.com/sharedfiles/filedetails/?id=3388017161\r\n\r\n[h2]Compatible Mods[/h2]\r\n[url=https://steamcommunity.com/sharedfiles/filedetails/?id=3738660077]Become Brave[/url]\r\n\r\n[h2]Exhausted from your character always panicking when they see a zombie even though they slaughtered countless zombies? Then this mod is for you.\r\n\r\nWhat It Does[/h2]\r\n[olist]\r\n[*]After you kill 500 (Modifiable through Sandbox Options) zombies through melee or gun combat (no fire burns), you get the chance to become desensitized. This chance increases as you get more zombie kills.\r\n[*]If you reach 2000 (Modifiable through Sandbox Options) zombie kills, you automatically become desensitized.\r\n[*]Some traits and professions also change the chance that you'll become desensitized.\r\n[*]When you become desensitized, mutually exclusive traits will be removed (Cowardly, Agoraphobic, Claustrophobic, Hemophobic).\r\n[*]You have a chance to gain this trait at midnight (00:00).\r\n[/olist]\r\n\r\nConsidered Traits that change the chance of gaining the trait\r\nPostive: Brave, Hunter\r\nNegative: Cowardly, Agoraphobic, Claustrophobic, Hemophobic, Pacifist\r\n\r\n[h2]Considered Occupations that change the chance of gaining the trait[/h2]\r\nPolice Officer, Fireman, Park Ranger, Security Guard, Doctor, Nurse\r\n\r\n[h2]Frequent Answers[/h2]\r\nThis mod works with existing saves.\r\n\r\nYes it is compatible with Become Brave.\r\n\r\nWorkshop ID: 3738669352\r\nMod ID: BecomeDesensitizedB42Unofficial",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Traits"
|
||||
}
|
||||
],
|
||||
"time_updated": 1780952656
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3596259242",
|
||||
"result": 1,
|
||||
"title": "[B42.12.3] Rip More Clothing",
|
||||
"description": "This mod enables tearing of additional clothing items, including boxers, underpants, socks, tights, stockings, and others.\r\nVersion: Build 42.12.3\r\n\r\n[h3]Notes[/h3]\r\n[list]\r\n [*]Denim or leather garments still require [b]sharp[/b] scissors or a knife to cut.\r\n [*]This mod introduces new crafting recipes without altering any vanilla recipes.\r\n [*]For bug reports, missing features, translation requests, leave a comment below.\r\n[/list]\r\n\r\n[h3]Don't forget to leave a like, favorite & share![/h3]\r\n[img width=400 height=60]https://images.steamusercontent.com/ugc/12989870446615262559/A6AAF7CD90F7A02D92298E9E7CC9CDCAA9FD3411/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false[/img]\r\n\r\nkeywords / tags\r\nrip more clothes, tear more clothes, rip all clothes, tear all clothes, rip any clothes, tear any clothes, rip clothes, tear clothes\r\n\r\nWorkshop ID: 3596259242\r\nMod ID: EVERipMoreClothing",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Clothing/Armor"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1761840973
|
||||
},
|
||||
{
|
||||
"publishedfileid": "2956146279",
|
||||
"result": 1,
|
||||
"title": "Rain Cleans Blood [B42.20 + MP]",
|
||||
"description": "Tired of zombies splattering their brains all over your pretty lawn? Well no more! Just wait for some rain or snow and watch it all fade away.\n\n[h1]What gets cleaned?[/h1]\n[list]\n[*]Blood on the ground, walls, and floors\n[*]Ash left behind by burned corpses\n[*]Animal droppings (dung) on the ground (B42+)\n[*]Blood and dirt on your worn clothing (B42+)\n[*]Blood on nearby vehicles (B42+)\n[/list]\n\nEverything fades gradually, only while it's raining or snowing (unless you turn that off), and every part of it is configurable.\n\n[h1]Does it work in multiplayer?[/h1]\nYes, fully server-authoritative.\n\n[h1]Can I add this to my current game?[/h1]\nYes, you can add or remove this mod at any time. It contains no save-breaking features.\n\n[h1]How does it work?[/h1]\nEvery game minute the mod checks the weather intensity against a configurable threshold. If it's raining or snowing hard enough, it randomly selects a number of nearby tiles and cleans them. Clothing and vehicles are cleaned incrementally on the same tick.\n\n[h1]Why not always?[/h1]\nImmersion — watching blood fade in the rain just feels right. The gradual approach also keeps the performance impact minimal. That said, there's a sandbox option to always clean regardless of weather if you prefer.\n\n[h1]Sandbox options[/h1]\nEverything is configurable: cleaning speed, weather threshold, tiles per minute, and toggles for ash, animal droppings, indoor cleaning, vehicles, and clothing.\n\n\n[url=https://ko-fi.com/G2G8TCZ05][img]https://storage.ko-fi.com/cdn/kofi3.png?v=3[/img][/url]\n\nWorkshop ID: 2956146279\nMod ID: RainCleansBlood",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 41"
|
||||
},
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1790349020
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3387957272",
|
||||
"result": 1,
|
||||
"title": "[B42.20] Detailed Descriptions for Occupations and Traits",
|
||||
"description": "This mod provides more detailed descriptions for Occupations and Traits with values obtained directly from the game files and wiki.\r\n\r\nOriginal base game descriptions have been kept on the first lines.\r\n\r\nAdded information/values, knowledge (innate/recipes/magazines) and foraging bonuses have been added after a line break.\r\n\r\nThe mod works in both character creation screen and character info.\r\n\r\n[h2]Translations[/h2]\r\n\r\nThe mod is available in the following languages:\r\n\r\n[h3]English [b42.20][/h3]\r\n\r\n[h3]Russian [b42.20][/h3]\r\n- Thanks to [b]@SonicGleb[/b]\r\n\r\n[h3]Brazilian Portuguese [b42.20][/h3]\r\n- Thanks to [b]@Serginho_Malandro[/b]\r\n\r\n[h3]French [b42.20][/h3]\r\n- Thanks to [b]@Juniv3rs[/b]\r\n\r\n[h3]Korean [b42.11][/h3]\r\n- Thanks to [b]@Hx[/b]\r\n\r\n[h3]Turkish [b42.11][/h3]\r\n- Thanks to [b]@borzoi_07[/b]\r\n\r\n[h3]Ukrainian [b42.11][/h3]\r\n- Thanks to [b]@rama2343[/b]\r\n\r\n[h3]Spanish [b42.0][/h3]\r\n- Thanks to [b]@Sombra[/b]\r\n\r\n[h3]Simplified Chinese [b42.0][/h3]\r\n- Thanks to [b]@绿色羽毛球123[/b]\r\n\r\n[h3]Polish [b42.1][/h3]\r\n- Thanks to [b]@karolcia[/b]\r\n\r\n[h3]Traditional Chinese [b42.0][/h3]\r\n- Thanks to [b]@Tank5168[/b]\r\n\r\n[h3]Italian [b42.0][/h3]\r\n[i]Deve essere verificato, per favore aiutateci a correggere gli errori! | Needs to be verified, please help fixing errors![/i]\r\n\r\nI tried my best to be as accurate as possible, though its likely that I missed something or made a mistake.\r\nPlease feel free to comment any errors, typos or suggestions.\r\n\r\nIf you wish to help adding your own language, the mod can be found in the following folder:\r\n\r\n[code]steamapps\\workshop\\content\\108600\\3387957272\\mods\\Detailed Descriptions for Occupations and Traits\\42\\media\\lua\\shared\\Translate\\EN\\UI.json[/code]\r\n\r\nPlease do not reupload this mod or modified versions without asking for permission.\r\n\r\nWorkshop ID: 3387957272\r\nMod ID: DetailedDescriptionsForOccupationsAndTraits",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Language/Translation"
|
||||
},
|
||||
{
|
||||
"tag": "Skills"
|
||||
},
|
||||
{
|
||||
"tag": "Traits"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1787971238
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3744455714",
|
||||
"result": 1,
|
||||
"title": "Functional Pager - Immersive Map-Wide Communication [B42]",
|
||||
"description": "Working, map-wide text messaging network for Project Zomboid, built for co-op. Find a pager, get your own number, and stay in touch with your group from anywhere on the map.\r\n\r\nDesigned around an immersive communication ladder: use proximity [b]voice chat[/b] up close, [b]walkie-talkies[/b] at medium range, and [b]pagers[/b] for everything beyond that. The pager is your long-range tier. Intended when global text chat is off and not in an external voice call.\r\n\r\nOther pager mods are depreciated, and the main issue with using in game voice chat among a group of friends is the long distance barrier where you simply cannot contact someone. This bridges that gap, while still being time period accurate. Additionally, this is a great option for in game Server Browser Discovery / PvPvE servers. If you are using this in a large scale server feel free to directly work with me for additional features, and please consider supporting my development, as well as anyone else that is able!\r\n\r\n[url=ko-fi.com/amazedturnip][img]https://raw.githubusercontent.com/ChuckTheSheep/chuckImages/main/kofi.png[/img][/url] [url=https://discord.gg/sBm3hzkRbH][img]https://i.imgur.com/JaLAooh.jpeg[/img][/url]\r\n\r\n[h2]Core[/h2]\r\n[list]\r\n[*]Every pager has a unique number (XXX-XXXX).\r\n[*]Send and receive short text pages to any number, anywhere on the map.\r\n[*]Offline delivery: pages queue on the server and arrive the moment the recipient reconnects.\r\n[*]Messages live on the physical pager, so they travel with the device.\r\n[/list]\r\n\r\n[h2]Talk to your group[/h2]\r\n[list]\r\n[*][b]Contacts[/b] - save names to numbers and reply with one click.\r\n[*][b]Channels / Groups[/b] - define a group of numbers and page the whole team at once.\r\n[*][b]Broadcast[/b] - page every pager on the network (toggleable).\r\n[*][b]SOS beacon[/b] - emergency broadcast that pages everyone and attaches your location.\r\n[*][b]Quick pages[/b] - fire preset phrases (\"On my way\", \"Need backup!\", \"All clear\"...) straight from the right-click menu, no typing.\r\n[/list]\r\n\r\n[h2]Location & awareness[/h2]\r\n[list]\r\n[*]Optionally attach your coordinates to a page; the recipient sees the position plus distance and a compass bearing (e.g. ~340t NE).\r\n[*]Sharing is your choice per server: Off, ask-per-page, or always on. An SOS still shares location unless it's fully off.\r\n[*][b]Share my number nearby[/b] adds you to nearby players' contacts automatically for first meet-ups. [b]Say my number[/b] makes your character read it out loud for voice chat.\r\n[/list]\r\n\r\n[h2]Batteries[/h2]\r\nPagers run on a battery that lasts about three in-game months (tunable in sandbox). When it dies the pager goes quiet until you [b]Replace battery[/b] from the right-click menu using an ordinary Battery. Remaining charge shows on the screen as BAT %.\r\n\r\n[h2]PvPvE[/h2]\r\n[list]\r\n[*][b]Faction scoping[/b] - optionally stop rival factions from paging (or eavesdropping on) each other. Factionless players are never cut off.\r\n[*][b]Block list[/b] - block a number and its pages never reach you. Block a griefer straight from your inbox.\r\n[*][b]Anti-spam[/b] - optional per-player send cooldown for busy servers.\r\n[/list]\r\n\r\n[h2]Quality of life[/h2]\r\n[list]\r\n[*]Holster the pager in the walkie-talkie belt slot.\r\n[*]Rebindable hotkey (default P) opens the pager you're carrying and auto-activates a fresh one in a single press.\r\n[*]Beep + on-screen message preview when a page arrives, an unread badge on the item, and a per-pager mute / Do-Not-Disturb.\r\n[*]Read receipts, so you know your page was actually seen.\r\n[*]Difficulty/Realism Presets: Custom, Convenient, Almost Realistic, and Ultra Realistic.\r\n[/list]\r\n\r\n [h2]Pager Tower System[/h2](Only enabled in Ultra Realistic)\r\n [list]\r\n [*]Craftable relay tower — requires [b]Electrical 5[/b] and is learned only from the Pager\r\n Tower Schematics magazine, which only appears in loot when a tower is actually needed(receive only pagers and/or required for signal).\r\n [*][b]Multiple towers[/b], each its own network node with an incrementing number (000-0001,\r\n 000-0002), its own coverage circle, inbox, and console.\r\n [*]Towers [b]auto-add as a contact[/b] to any pager that comes within range.\r\n [*][b]Rename a tower[/b] at the tower — the new name syncs everywhere.\r\n [*][b]Power source[/b] option: Grid or Generator / Generator only / None.\r\n [*][b]Tower comms[/b] option: send-and-receive or send-only.\r\n [*][b]Per-player tower limit[/b] (0 = unlimited; admins exempt).\r\n [/list]\r\n\r\n[h2]Sandbox options[/h2]\r\n[img]https://i.imgur.com/VwSNpHi.png[/img]\r\n\r\n[h2]Multiplayer[/h2]\r\nBuilt for co-op first: all routing is server-authoritative - number allocation, delivery, offline queueing, signal range and faction checks all live on the host.\r\n\r\n[h2]Notes[/h2]\r\n[list]\r\n[*]Built for Build 42; backported to Build 41.\r\nLine truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 41"
|
||||
},
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Audio"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Hardmode"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "Silly/Fun"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788835045
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3749026793",
|
||||
"result": 1,
|
||||
"title": "[B42.20] Carry Visible Items In Hands [WIP]",
|
||||
"description": "Expanded version of \"Carry Visible Log Stacks\". \r\n\r\n[h1]Works on B42 Stable[/h1]\r\n\r\n[h1]Currently does NOT support Generators, so mod that makes them visible will work alongside[/h1]\r\nThe goal is to make the game even more immersive. If you ever felt like its strange that you have buckets of water in hands and they show during animations, but then vanish into pocket dimension?\r\nThis mod's goal is to fix that issue with alot of items. Its an ongoing Project, so things will definently change and more models for items will be added.\r\nThe list is expanded and currently covers over 250 items like:\r\n- Bottles / Canteens,\r\n- Radios, CD Players, \r\n- Some Car parts like Wheels / Hoods,\r\n- Buckets / Watering Cans / Dispenser Bottles / Propane Tanks\r\n- And much more!\r\n\r\nWhats Planned:[list]\r\n[*] Even more items, the suggested ones will receive priority.\r\n[*] Adjusting some of models, to achieve even greater immersion,\r\n[/list]\r\n\r\n\r\nAdditional Informations:[list]\r\n[*] Mod only affects items that can be \"Equip as primary/secondary\",\r\n[*] Already includes \"Carriable Log Stacks\"\r\n[*] Safe to add and remove in mid-save game,\r\n[*] Some items use modified Models,\r\n[*] Some models are just enabled by this mod to show, so its possible the models will be offset\r\n[*] Does not change any stats of said items, its just visual modification for more immersion.\r\n[/list]\r\n\r\n[h3][b]Discord Server[/b][/h3]\r\nI've created a Discord server, if you're interested on stuff i am working on, report bug/give feedback and have more direct way to contact me.\r\n[url=https://discord.gg/8huc4PKSbw] [u]Link Here[/u] [/url]\r\n\r\n[h2][b]Enjoying my mods? Leave a rate or/and comment, i do appreciate it.\r\nWould you like to request one for yourself? Reach out, my Discord DM's are open.\r\nYou don't have to, but if you'd like to support me even more, link below:[/b][/h2]\r\n[url=https://ko-fi.com/realnik][img]https://raw.githubusercontent.com/Realnik10/Pictures/refs/heads/main/.github/workflows/KoFi.png[/img][/url]\r\n\r\n\r\n\r\nWorkshop ID: 3749026793\r\nMod ID: CVI",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Models"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "WIP"
|
||||
}
|
||||
],
|
||||
"time_updated": 1786994277
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3682045254",
|
||||
"result": 1,
|
||||
"title": "Unified Carry Weight Framework (UCWF)",
|
||||
"description": "[h1]If you're a user[/h1]\r\nThis doesn't do anything on it's own, the modders are supposed to use this to adjust players carry weight without conflicting with each other.\r\n\r\n[h1]Mods using this framework[/h1]\r\nAnd therefore, their weight-related functionalities should not clash.\r\n[list]\r\n[*][url=https://steamcommunity.com/sharedfiles/filedetails?id=2914075159]Evolving Traits World (ETW)[/url]\r\n[*][url=https://steamcommunity.com/sharedfiles/filedetails?id=1299328280]More Traits[/url]\r\n[/list]\r\nIf you have a mod that adjusts carry weight in any way and it conflicts with this framework (it will), just convince them into using the framework, it's the only way to have weight changes from different mods play well with each other. If you know a mod that uses this framework you can mention it so I can add it to the list.\r\n\r\n[h1]If you're a modder[/h1]\r\nYou are probably aware that majority of mods that modify carry weight conflict with each other and usually it's just \"whichever mod applied their override last\" sets the weight.\r\n\r\nSo I made this little thing.\r\n\r\n- This allows multiple mods to modify carry weight without overwriting each other changes.\r\n- Supports flat bonuses and multiplications for both base weight (before str applied) and total max weight (after str bonuses are applied)\r\n\r\nSo something like this is possible and very easy to do now: \r\n\r\n- Mod A has sandbox setting that sets base carry weight to 10 (from 8)\r\n- Mod B has a trait that gives player 0.25 bonus to base carry weight per point of strength\r\n- Mod C has a exoskeleton that when worn increases total carry weight by 50%.\r\n\r\nThere's a client and a server file with example on how to use the framework, in their respective folders. If you need additional help, ping me in my discord.\r\n\r\n[h1]GitHub and Discord[/h1]\r\nIf you want to submit translation files, make suggestions or report bugs, the easiest way to do it would be on Discord.\r\n[url=https://discord.gg/8pBN5Ccm7z][img]https://cdn.iconscout.com/icon/free/png-256/discord-3691244-3073764.png[/img][/url][url=https://github.com/MusicManiac/UnifiedCarryWeightFramework][img]https://cdn.iconscout.com/icon/free/png-256/github-163-761603.png[/img][/url]\r\n\r\n[h1]Credits and Translations[/h1]\r\nHuge thanks to [url=https://steamcommunity.com/profiles/76561198042464272]Albion[/url] for assist.\r\nCurrently mod supports following languages:\r\n[list]\r\n[*]English\r\n[/list]\r\n\r\n[h1]Afterword and Permission[/h1]\r\nIf you like this mod, check out collection on top of page for other mods I made or collaborated on! Rate ups are appreciated, and if you wanna send me a coffee, that's a real homie move, and you can do it here:\r\n[url=https://ko-fi.com/musicmaniac][img]https://uploads-ssl.webflow.com/5c14e387dab576fe667689cf/61e11d5cf697cee7ca5b65d9_Button-p-500.png[/img][/url]\r\n\r\n[quote]⛔ Permissions\r\nRedistribution of this mod without explicit permission from the creator is prohibited under any circumstances. This includes, but not limited to, uploading this mod to the Steam Workshop or any other site, distribution as part of another mod or modpack, distribution of modified versions.\r\n© 2026 [url=https://steamcommunity.com/profiles/76561198152820942]MusicManiac[/url] (SteamID64: 76561198152820942)[/quote]\r\n\r\nWorkshop ID: 3682045254\r\nMod ID: UnifiedCarryWeightFramework",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1788192310
|
||||
},
|
||||
{
|
||||
"publishedfileid": "2553809727",
|
||||
"result": 1,
|
||||
"title": "KillCount",
|
||||
"description": "Details kills by weapon category and by weapon in a new dedicated tab of character window.\r\n[Solo]Adds to the genuine character panel the number of Z that died of other things than player weapon.\r\n\r\n[h1]B42.12 Limitations[/h1]\r\n[list]\r\n[*]Car kills are now partially counted by vanilla. This can create counters discrepencies.\r\n[*]Ask your questions on [url=https://discord.gg/theindiestone]Discord mod_support channel[/url].\r\n[/list]\r\n\r\n[h1]Technical details[/h1]\r\n[list]\r\n[*]Total number of kills can be exported (if selected in sandbox options) to %username%/Zomboid/lua/killcount.txt (windows path)\r\n[*][Solo only] Counts fire kills in addition to vanilla weapon kills on the genuine character sheet.\r\n[*][Solo & Multiplayer] Details kills by weapon category and by weapon in a new dedicated tab of character window.\r\n[*][Multiplayer] You can visualise the kills of other players, with a delay (configurable in sandbox options).\r\n[*][Multiplayer] You can visualise the total number of kills on the server (same delay).\r\n[*][Multiplayer] You can deactivate the sharing of dead characters from sandbox options (to reduce GlobalModData size on never-wiping servers).\r\n[*][Multiplayer] You can deactivate the sharing of kill count from sandbox options (to remove GlobalModData use).\r\n[*]Visible at death time in the PostDeathUI text (can be removed in sandbox options).\r\n[*]Handles character specific counters (saved with mod data, so server must be stopped properly for the values to be saved).\r\n[*]Works only for one local player. i.e. not for multiscreen.\r\n[*]Ask your questions on [url=https://discord.gg/theindiestone]Discord mod_support channel[/url].\r\n[/list]\r\n\r\nCredits where it is due: this is inspired from [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2451245497]Additional Kill Counter[/url]\r\n\r\nWorkshop ID: 2553809727\r\nMod ID: KillCount",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 41"
|
||||
},
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Framework"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
}
|
||||
],
|
||||
"time_updated": 1789036314
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3428369137",
|
||||
"result": 1,
|
||||
"title": "Dismantle Any Car",
|
||||
"description": "Are you sick and tired or looking at all the vehicles around you and thinking \"I wish I could use this welding torch to convert those cars to scrap metal but alas! The creators have decreed that only wrecked or burnt cars may be dismantled, and no matter how many parts I break off or how many molotovs I throw at this car it shall never be considered a wreck, for to be a wreck is a condition a car must be born with.\"\n\nThis mod has you covered! It extends the \"Dismantle Wrecked Car\" context menu to include \"Dismantle Car\" when you right click on a non-wrecked, non-burnt vehicle.\n\nAdditional sandbox options on the [b]Vehicle[/b] page allow you to adjust the amount of fuel needed for disassembly, change the amount of material generated and replace use of a welding mask with good ol' Kentucky safety squints.\n\n\n[h2]FAQ[/h2]\n\n[b]Is it safe to add/remove this mod on an existing save?[/b]\n\nYes. If you change the sandbox settings you will need to quit and restart the game before the new setting take effect.\n\n[b]Is it safe to squint tightly while welding instead of using a welding mask?[/b]\n\nThe Australian prime minister has [url=https://i.imgur.com/7qDwU0J.png]personally certified the use of safety squints when welding.[/url]\n\n\n[b]Does dismantling a functional car produce more raw materials than a wreck/burnt out car?[/b]\n\nAdditional materials are generated based on the condition of the vehicle's parts. A car with all parts at 100% will generate approximately 80% more raw materials. The type of materials generated is unchanged.\n\n\n[b]What if I want to keep some of the car parts?[/b]\n\nRemove them before dismantling.\n\n\n[b]What happens to items inside a car when I dismantle it?[/b]\n\nThey get dropped on the ground with the rest of the scrap metal.\n\n\n[b]What happens to animals inside an animal trailer when I dismantle it?[/b]\n\nThey get teleported to a farm upstate to happily live out the rest of their lives in a place of peace and contentment with a friendly farmer who takes care of all of their needs.\n\n\n[b]Really?[/b]\n\nThere is no evidence that this is not true.\n\nWorkshop ID: 3428369137\nMod ID: NepWreckWorkingCars",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Vehicles"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1786532863
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3426448380",
|
||||
"result": 1,
|
||||
"title": "Immersive Suicide [B42/B41]",
|
||||
"description": "[url=https://ko-fi.com/N4N61AUUX0][img]https://i.imgur.com/JCnfTPw.png[/img][/url][url=https://github.com/KyleStank/ImmersiveSuicide][img]https://i.imgur.com/BXLu71n.png[/img][/url]\r\n\r\n[h1]Works on B41 and B42[/h1]\r\nAdds the option to immersively end the suffering early. Actively maintained and supported.\r\n\r\n[h2]Features[/h2]\r\n[list]\r\n[*]Gun suicide (both one handed and two handed) via right-click context menu\r\n[*]Supported in multiplayer\r\n[*]Firearm Radial Menu Support\r\n[*]Optionally aim, walk, or run to cancel suicide\r\n[*]Requires ammo and functional weapon for immersion\r\n[*]Restores built-in but unused suicide animations\r\n[*]Prevents becoming a zombie since the head is destroyed\r\n[*](Optional) Enable custom sandbox option to always become a zombie upon suicide\r\n[*]Can be safely added or removed mid-save\r\n[*]Full translation support powered by the community, Google Translate, and DeepL\r\n[*]Integration with a couple mods so far (see below: Compatibility). I am open and willing to integrate with any conflicting mod.\r\n[/list]\r\n\r\n[h2]IMPORTANT, READ THIS[/h2]\r\nFor the B42 version of the mod, only the latest version of B42 is supported. I am not maintaining every single version of B42 until it reaches stable. There are simply too many changes to keep track of until that happens and in my opinion, it isn't worth the effort.\r\n\r\n[h2]Compatibility[/h2]\r\n[list]\r\n[*]Works with Brita's Weapon Pack. Should work with any other weapon mod as long as the mod correctly marks items as one-handed or two-handed firearms.\r\n[*]B42 Rain's Firearms & Gun Parts\r\n[*]Official integration with the Efficiency Skill mod\r\n[/list]\r\n\r\n[h2]Languages Supported[/h2]\r\nThis mod has native translations for English (EN), Turkish (TR), and Russian (RU). The rest of the languages have been translated by Google Translate, DeepL, or a mix of both. [b]If any issues with translations are noticed, please post them on the bug board.[/b]\r\n\r\n[h2]Thank Yous[/h2]\r\n[list]\r\n[*][url=https://steamcommunity.com/id/xeotn]xeotN[/url] for providing the Turkish translation\r\n[*][url=https://steamcommunity.com/id/jeblanoid]Ксерокопия члена[/url] for providing the Russian translation\r\n[*][url=https://steamcommunity.com/id/zendachi/myworkshopfiles/]Burryaga[/url] for providing Joypad Lua code\r\n[/list]\r\n\r\n[h2]Disclaimer[/h2]\r\nThis mod contains potentially sensitive images and content for some players. The goal is [b]NOT[/b] to make suicide look cool but rather to offer another immersive way to die in a game that is [b]about[/b] dying.\r\n\r\nWorkshop ID: 3426448380\r\nMod ID: stanks_suicide",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 41"
|
||||
},
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "Silly/Fun"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1774718350
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3580276809",
|
||||
"result": 1,
|
||||
"title": "[B42.20] The Only Cure",
|
||||
"description": "[img]https://raw.githubusercontent.com/ZioPao/The-Only-Cure/551125bb50cb65608ad89ca81ef0daccb3b02c4c/dev_stuff/logos/title.png[/img]\r\n\r\n\r\n[h1]You're bitten. You have two choices.[/h1]\r\nWait until you succumb to the virus or take matters into your hands. Cut off that infected part and live to die another day.\r\n\r\nThis version of [b]The Only Cure[/b] has been rebuilt from scratch to support future additions and to feel as close as possible as a vanilla mechanic.\r\n\r\n[b]If you're using an older version of The Only Cure and want to switch with this, you're gonna need to create a new character\\save to prevent issues.[/b]\r\n[b]The older version will be delisted shortly and it will not be supported anymore.[/b]\r\n[h1]Supports [b]Single Player[/b] and [b]Multiplayer[/b]. Host Mode is currently [b]UNSUPPORTED![/b][/h1]\r\n\r\n[h1]Setup[/h1]\r\n[strike]Use it with the following mods for the intended experience:\r\n[list]\r\n[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2904920097]Fancy Handwork[/url]\r\n[*] [url=https://steamcommunity.com/sharedfiles/filedetails/?id=2934621024]Brutal Handwork[/url]\r\n[/list]\r\n\r\nPlace them [b]BEFORE[/b] The Only Cure in your mod list![/strike]\r\n\r\n[b]At the moment, the mods listed here aren't compatible with B42.[/b]. Compatibility patches are on the workshop but haven't been tested.\r\n\r\n[hr][/hr]\r\n\r\n[h1]Quick guide[/h1]\r\n[h2]Amputation[/h2]\r\nGet a [i]Saw[/i] or a [i]Garden Saw[/i], right click on it, and choose which limb to amputate. You can also drag n' drop your Saw item directly into the afflicted area to start cutting it off.\r\n\r\nIf you have some [i]bandages[/i] and\\or [i]stitches[/i] in your inventory you will automatically use them, multiplying the chances of your survival.\r\nIf you have a [i]tourniquet[/i], place it on the correct side to dampen the amount of damage you will take after you're done amputating the limb.\r\n\r\nKeep in mind that if you amputate your [b]upper arm[/b], you won't be able to equip any prosthesis.\r\n\r\nAfter you've amputated a limb, you will gain [b]skill points[/b] for the amputated side, making timed actions faster in due time.\r\n\r\n[h2]Cicatrization[/h2]\r\nYou can check the cicatrization status of an amputated limb from your [b]Health Panel[/b]\r\nFrom time to time, you should clean your wounds with a bandage to help the cicatrization process.\r\nIf your limb isn't completely cicatrized, you can still equip prosthetic limbs, but that can trigger random bleedings from that area.\r\n\r\n[h2]Prosthetics[/h2]\r\nIf you're missing a hand, you won't be able to do a lot of things, such as equipping two-handed weapons. With prosthetics limbs, you can fix that.\r\nThere are two prosthesis type that can be crafted\\found in medical areas:\r\n[list]\r\n[*] Hook Prosthesis\r\n[*] Arm Prosthesis\r\n[/list]\r\n\r\nThe main difference between the twos is that your actions will take longer with the Hook Prosthesis.\r\nWhen you equip a prosthetic limb, you will slowly gain skill points in the [b]Prosthesis Familiarity[/b] perk, making actions more speedy in due time.\r\n\r\n[h2]Admin tools[/h2]\r\nIf something strange happened, an admin can reset TOC mechanics on any player by right clicking on them and select [i]\"Reset Amputations\"[/i]. They could also do the opposite by clicking on [i]\"Force Amputation\"[/i] for each amputable limb.\r\n\r\n[hr][/hr]\r\n\r\n[h1]Issues and bugs?[/h1]\r\nGot any issues or found some pesky bugs? Report them on GitHub!\r\n\r\n[url=https://github.com/ZioPao/The-Only-Cure][img]https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white[/img][/url]\r\n\r\n[h1]Credits[/h1]\r\n[table]\r\n [tr]\r\n [th]Pao[/th]\r\n [th]Developer[/th]\r\n [/tr]\r\n [tr]\r\n [th]Mr. Bounty[/th]\r\n [th]Original Developer[/th]\r\n [/tr]\r\n [tr]\r\n [th]Chuckleberry Finn[/th]\r\n [th]Logo and Icon[/th]\r\n [/tr]\r\n [tr]\r\n [th]dhert[/th]\r\n [th]Compatibility API[/th]\r\n [/tr]\r\n [tr]\r\n [th]JCloudJalix, Rinary1, pllq, ttaeo, pgmbru[/th]\r\n [th]Translations[/th]\r\n [/tr]\r\n[/table]\r\n\r\n[hr][/hr]\r\n\r\n[h1]Want to support me?[/h1]\r\n[url=https://ko-fi.com/M4M7IERNW][img]https://storage.ko-fi.com/cdn/kofi3.png[/img][/url]\r\n\r\n[hr][/hr]\r\n\nWorkshop ID: 3580276809\nMod ID: TheOnlyCure",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "Interface"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "Textures"
|
||||
}
|
||||
],
|
||||
"time_updated": 1789315810
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3659195975",
|
||||
"result": 1,
|
||||
"title": "[42.13] Science, Bitch!",
|
||||
"description": "Are you tired of finding all these specimens, microscopes, and science magazines but having nothing useful to do with them? Same.\n\nIntroducing the Science skill - finally a reason to hoard all that nerdy stuff!\n\n[h1]What does Science do?[/h1]\n\n[b]Research Specimens[/b]\nFound a jar with a brain in it? A dead rat? Some weird mushrooms? Now you can actually study them! Just find a microscope, plop your specimen nearby, and get that sweet, sweet Science XP.\n\nWhere to find microscopes: schools, medical clinics, hospitals, police stations (forensics), and the occasional fancy house.\n\n[b]Unlockable traits[/b]\nSome specimens are tagged for [i]trait research[/i]: each [b]unique[/b] item type you study at a microscope counts toward that trait. By default you need [b]10 different[/b] tagged specimens per trait (see mod data — [i]vanilla.lua[/i] — if you want the full lists). You still get Science XP every time. If your character already has the trait, you keep the XP but no longer progress that unlock.\n\n[list]\n[*][b]Herbalist[/b] — berries, mushrooms, medicinal plants, and many wild forage plants. Reaching the threshold unlocks Herbalist (including the usual recipe/knowledge you’d expect).\n[*][b]Blacksmith[/b] — metal specimens: ingots, ore, scrap, and related items (the mod often merges variants of the same metal into one research “slot”).\n[*][b]Gardener[/b] — crop and herb [b]seeds[/b] (research the seed items as specimens).\n[/list]\n\nLook for the small gray \"R\" on item icons - that means you haven't read/researched it yet and it can give you Science XP!\n\n[b]Faster Learning[/b]\nHigher Science = faster skill book reading.\n- Up to 50% faster at Science 10\n- Also speeds up recipe research from items\n\n[b]XP Boost[/b]\nScience makes you smarter at everything (except punching zombies):\n- +2% bonus to all non-combat XP per Science level\n- That's +20% at max level.\n\n[b]Electrical Synergy[/b]\n- Gain Science XP when gaining Electrical XP (half amount)\n\n[b]Medical Knowledge[/b]\n- Bandages last longer (+5% per Science level)\n- Faster medical treatments (bandaging, disinfecting, splinting)\n\n[h1]How to level Science?[/h1]\n- Read Science books and magazines (duh)\n- Read SciFi books (small amount - it's fiction, but it inspires curiosity!)\n- Read ANY skill book (tiny amount)\n- Research specimens at a microscope\n- Research recipes from items\n- Do electrical stuff\n\n[h1]Researchable Items[/h1]\nPretty much anything that looks sciency:\n- Specimen jars (brain, insects, fetal animals, etc.)\n- Dead critters (rats, mice, birds, squirrels)\n- Insects, berries, mushrooms\n- Medicinal plants\n- Gems, crystals, minerals\n- Medical equipment (first time studying it)\n- And more!\n\n[h1]Requirements[/h1]\n- Game version: 42.13 / 42.14 / 42.15 SP/MP\n- No other mods required\n\n[h1]Integrations[/h1]\n[list]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=2999183635]Better Electronics[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3665315101]Energy Routing System[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3399263137]Factory Pieces[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3387934550]Functional Computer[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3671173479]Glass Cutter[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3539339798]Hacking Skill[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3693550188]Jeeve's Personal Computer[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3668197831]Phobos' Industrial Pathways: Biomass[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3686101131]Phobos' Industrial Pathways: Pathology[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3628922658]Printer3D[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3564950449]Project Summer Car[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3555588616]Sewing Workbranch[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3508513470]Support Goods - MyComputer![/url] (printable Science Skillbooks!)\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3434920270]Support Goods [B42] My Photo[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3512993822]Support Goods Mega Mod[/url] (printable Science Skillbooks!)\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3652517636]Tank Water[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3171167894]that DAMN Library[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3611718925]Vanilla Firearms Expansion[/url]\n [*][url=https://steamcommunity.com/sharedfiles/filedetails/?id=3577903007]Vanilla Foods Expanded[/url]\n [*][url=https://Line truncated
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Multiplayer"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "Skills"
|
||||
},
|
||||
{
|
||||
"tag": "Traits"
|
||||
}
|
||||
],
|
||||
"time_updated": 1776344010
|
||||
},
|
||||
{
|
||||
"publishedfileid": "3811212929",
|
||||
"result": 1,
|
||||
"title": "Entomophagy - [Bug Meat Substitute]",
|
||||
"description": "Entomophagy is the practice of eating insects.\nwikipedia.org/wiki/Entomophagy\n\nThis mod adds in 4 new food items.\n3 Pates - Insects, Gastropods, and Worms can be mushed up into a workable meat.\n1 Patty - Insect Pate can be molded into an Insect Patty\nAll of which are usable in existing cooking recipes.\n\nAlso makes Insects, Gastropods, and Worms usable in some evolved recipes IF they are cooked beforehand.\n\nGastropods are a vast and diverse group of invertebrates within the phylum Mollusca, comprising the animals commonly known as snails and slugs.\nwikipedia.org/wiki/Gastropod\n\nWorkshop ID: 3811212929\nMod ID: Entomophagy",
|
||||
"tags": [
|
||||
{
|
||||
"tag": "Build 42"
|
||||
},
|
||||
{
|
||||
"tag": "Balance"
|
||||
},
|
||||
{
|
||||
"tag": "Food"
|
||||
},
|
||||
{
|
||||
"tag": "Items"
|
||||
},
|
||||
{
|
||||
"tag": "Misc"
|
||||
},
|
||||
{
|
||||
"tag": "Realistic"
|
||||
},
|
||||
{
|
||||
"tag": "QOL"
|
||||
}
|
||||
],
|
||||
"time_updated": 1790844758
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
# Mod list
|
||||
# 1. [B42]Project RV Interior 3543229299 PROJECTRVInterior42
|
||||
# 2. Ping Items! Friends! 42.20 MP Official 3776262249 PingItemsFriends, PingItemsFriendsDefaultWheel, PingItemsFriendsLoLWheel
|
||||
# 3. 42.21 | Every Texture Optimized 3119788162 ETO_B, ETO_P
|
||||
# 4. RCON Data Bridge 3790407759 RconDataBridge
|
||||
# 5. Target Square: On Load Commands 2969455858 TargetSquareOnLoad
|
||||
# 6. Functional Pager - Immersive Map-Wide Communication [B42] 3744455714 PagerMod
|
||||
# 7. Unified Carry Weight Framework (UCWF) 3682045254 UnifiedCarryWeightFramework
|
||||
# 8. KillCount 2553809727 KillCount
|
||||
# 9. MRE Mod [B42.20.3] 3765409550 bdtmre
|
||||
# 10. Nick's Turn Off Fridges 3778868211 NicksTurnOffFridges
|
||||
# 11. Nick's Sledgehammer Fix 3780532913 NicksSledgehammerFix
|
||||
# 12. Nick's Inventory Selection Fix 3782920935 NicksInventorySelectionFix
|
||||
# 13. Nick's Moveable Workstations 3782735637 NicksMoveableWorkstations
|
||||
# 14. Nick's Rideable Elevators 3790452346 NicksRideableElevators
|
||||
# 15. Better Corpse Burning 3790089095 BetterCorpseBurning
|
||||
# 16. Darker Map & Satellite View 3571222611 twistdarkermap
|
||||
# 17. Fitted Barricades 3795414660 FittedBarricades
|
||||
# 18. Fitted Sheets 3794207681 FittedSheets
|
||||
# 19. AEBS Misc 3792194626 AEBSMisc
|
||||
# 20. Shadowcopter 3787424467 Shadowcopter
|
||||
# 21. Immersive Solar Arrays - B42 Fork 3781944805 ISA
|
||||
# 22. Become Desensitized [B42.20 Stable Unofficial SP/MP] 3738669352 BecomeDesensitizedB42Unofficial
|
||||
# 23. [B42.12.3] Rip More Clothing 3596259242 EVERipMoreClothing
|
||||
# 24. Rain Cleans Blood [B42.20 + MP] 2956146279 RainCleansBlood
|
||||
# 25. [B42.20] Detailed Descriptions for Occupations and Traits 3387957272 DetailedDescriptionsForOccupationsAndTraits
|
||||
# 26. [B42.20] Carry Visible Items In Hands [WIP] 3749026793 CVI
|
||||
# 27. Dismantle Any Car 3428369137 NepWreckWorkingCars
|
||||
# 28. Immersive Suicide [B42/B41] 3426448380 stanks_suicide
|
||||
# 29. [B42.20] The Only Cure 3580276809 TheOnlyCure
|
||||
# 30. [42.13] Science, Bitch! 3659195975 ZScienceSkill
|
||||
# 31. Entomophagy - [Bug Meat Substitute] 3811212929 Entomophagy
|
||||
Mods=\PROJECTRVInterior42;\PingItemsFriends;\PingItemsFriendsDefaultWheel;\PingItemsFriendsLoLWheel;\ETO_B;\ETO_P;\RconDataBridge;\TargetSquareOnLoad;\PagerMod;\UnifiedCarryWeightFramework;\KillCount;\bdtmre;\NicksTurnOffFridges;\NicksSledgehammerFix;\NicksInventorySelectionFix;\NicksMoveableWorkstations;\NicksRideableElevators;\BetterCorpseBurning;\twistdarkermap;\FittedBarricades;\FittedSheets;\AEBSMisc;\Shadowcopter;\ISA;\BecomeDesensitizedB42Unofficial;\EVERipMoreClothing;\RainCleansBlood;\DetailedDescriptionsForOccupationsAndTraits;\CVI;\NepWreckWorkingCars;\stanks_suicide;\TheOnlyCure;\ZScienceSkill;\Entomophagy
|
||||
WorkshopItems=3543229299;3776262249;3119788162;3790407759;2969455858;3744455714;3682045254;2553809727;3765409550;3778868211;3780532913;3782920935;3782735637;3790452346;3790089095;3571222611;3795414660;3794207681;3792194626;3787424467;3781944805;3738669352;3596259242;2956146279;3387957272;3749026793;3428369137;3426448380;3580276809;3659195975;3811212929
|
||||
Reference in new issue
Block a user