Skip to content

Instantly share code, notes, and snippets.

@Saturate
Created October 4, 2022 16:56
Show Gist options
  • Save Saturate/1519244dee074f3b6afdea349580f0e0 to your computer and use it in GitHub Desktop.
Save Saturate/1519244dee074f3b6afdea349580f0e0 to your computer and use it in GitHub Desktop.
Project Zomboid - Generate WorkshopItems from Steam Workshop Collection

Project Zomboid - Generate WorkshopItems from Steam Workshop Collection

This snippet will generate a list suited for the Project Zomboid config from a Steam Workshop Collection.

How to use:

  1. Navigate to your collection (eg. https://steamcommunity.com/sharedfiles/filedetails/?id=2871262277)
  2. Copy the code in console.js
  3. Open the devtools for your browser (F12)
  4. Paste and run the code
  5. Copy the output
  6. Paste the config line into your config.

The output will look like this:

WorkshopItems=2625625421;2619072426;2423906082;2618213077;2522173579;2870394916;2846036306;2811383142;2805630347;2772575623;2642541073;2566953935;2516123638;2489148104;2441990998;2169435993;2478768005;2392709985;2490220997
var modIds = Array.from(document.querySelectorAll('[id^="sharedfile_"]')).map(mod => {
return mod.id.replace('sharedfile_','');
})
console.log(`This list contains ${modIds.length} mods, copy it to your PZ config.`)
console.log(`WorkshopItems=${modIds.join(';')}`)
@GamingDaveUk
Copy link

Thanks guys, I was looking at amp and trying to work out what i need to put in these sections:
image
The site is going to help with 2 and 3, the code further up, I think I can use to know what to put into 1.

Going to look at it all when more awake, but I just wanted to say you have turned a task I was dreading, and was making me wonder if i wanted to set up a server into something that should be quite simple. Your time on these projects is GREATLY appreciated! Thank you

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