Skip to content

Add DayZ workshop mod updates#280

Open
JustABiologist wants to merge 4 commits into
Osiris-Team:masterfrom
JustABiologist:bounty/dayz-mod-update-215
Open

Add DayZ workshop mod updates#280
JustABiologist wants to merge 4 commits into
Osiris-Team:masterfrom
JustABiologist:bounty/dayz-mod-update-215

Conversation

@JustABiologist
Copy link
Copy Markdown

Closes #215

Summary:

  • Detect DayZ Workshop mod folders by reading meta.cpp files under the configured mods-updater.path.
  • Parse each mod's publishedid and update it through SteamCMD using workshop_download_item.
  • Add mods-updater.dayz-workshop-app-id, defaulting to DayZ's Workshop app id 221100.
  • Keep profile behavior explicit: NOTIFY reports detected Workshop items, MANUAL downloads them into SteamCMD's Workshop cache, and AUTOMATIC copies the downloaded content back into the existing mod folder.
  • Add focused tests for meta.cpp parsing, DayZ mod discovery, and SteamCMD Workshop command formatting.

Verification:

  • git diff --check
  • java --add-modules jdk.compiler com.sun.tools.javac.Main -source 21 -target 21 -cp "$(cat /tmp/autoplug-classpath.txt)" -sourcepath src/main/java:src/test/java -d /tmp/autoplug-compile-215 src/main/java/com/osiris/autoplug/client/configs/UpdaterConfig.java src/main/java/com/osiris/autoplug/client/utils/SteamCMD.java src/main/java/com/osiris/autoplug/client/tasks/updater/mods/DayZWorkshopMod.java src/main/java/com/osiris/autoplug/client/tasks/updater/mods/TaskModsUpdater.java src/test/java/com/osiris/autoplug/client/tasks/updater/mods/DayZWorkshopModTest.java src/test/java/com/osiris/autoplug/client/utils/SteamCMDTest.java
  • java -jar /home/florian/.m2/repository/org/junit/platform/junit-platform-console-standalone/1.9.2/junit-platform-console-standalone-1.9.2.jar --class-path "/tmp/autoplug-compile-215:$(cat /tmp/autoplug-classpath.txt)" --select-class com.osiris.autoplug.client.tasks.updater.mods.DayZWorkshopModTest --select-method com.osiris.autoplug.client.utils.SteamCMDTest#buildsWorkshopItemCommand

Note: I also tried /tmp/apache-maven-3.9.9/bin/mvn -q -Dtest=DayZWorkshopModTest test, but this local Java image cannot compile the repository's configured --release 9 target and fails with release version 9 not supported.

@JustABiologist
Copy link
Copy Markdown
Author

If this PR is merged and the 50eur bounty is approved, same as #279 — PayPal preferred, Solana wallet available as backup. Thanks!

Comment thread src/main/java/com/osiris/autoplug/client/configs/UpdaterConfig.java
Comment thread src/main/java/com/osiris/autoplug/client/tasks/updater/mods/TaskModsUpdater.java Outdated
Comment thread src/main/java/com/osiris/autoplug/client/tasks/updater/mods/TaskModsUpdater.java Outdated
Comment thread src/main/java/com/osiris/autoplug/client/tasks/updater/mods/TaskModsUpdater.java Outdated
if (mod.customCheckURL != null) { // Custom Check
if (mod instanceof SteamWorkshopMod) {
sizeSteamWorkshopMods++;
activeFutures.add(executorService.submit(() -> findSteamWorkshopUpdate((SteamWorkshopMod) mod)));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extract findSteamWorkshopUpdate (and related functions) into another class and use it via ResourceFinder like the other existing code does.

please also do this for anything else and try to stay close to the file/class structure/organization of existing code.

return true;
if (latestVersion.equals(currentVersion))
return false;
if (currentVersion.equals(mod.getPublishedId()))
Copy link
Copy Markdown
Owner

@Osiris-Team Osiris-Team May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure how this (line 397) makes sense, can you explain?

}

public SteamWorkshopItemDetails getWorkshopItemDetails(String workshopItemId) throws IOException {
Request request = new Request.Builder()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use src/main/java/com/osiris/jlib/json/Json.java from the jlib dependency and do Json.get(url) to simplify this whole block of code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-Update DayZ mods

2 participants