Files

3.7 KiB

Project Zomboid Build 42 Mod Handoff

Current State

  • Desktop Git project: C:\Users\Ben Fisher\Desktop\MyRandomMusicMod (the folder name is historical).
  • Install/upload copy: %UserProfile%\Zomboid\Workshop\WorldAtmospherePack.
  • Git main tracks origin/main. The initial mod commit was 4a2c215 (Add Build 42 World Atmosphere Pack mod), verified pushed on 2026-10-20; check git log -1 for the current HEAD.
  • Remote: https://git.sup760.us/steav310/Project_Zomboid_Random_Music_Mod.git.
  • Workshop listing name and in-game mod name: World Atmosphere Pack; mod ID: WorldAtmospherePack. The neutral name is intentional for a friends-only prank.
  • workshop.txt has visibility=1 (friends-only template). There is no known Steam Workshop item ID or confirmed upload yet.

What It Does

  • Contents/mods/WorldAtmospherePack/42/media/lua/client/WorldAtmospherePack.lua schedules one random song per client 30-60 real-time minutes after joining and again 30-60 minutes after the previous song finishes. It does not synchronize playback among players or emit world sound.
  • Contents/mods/WorldAtmospherePack/42/media/scripts/WorldAtmosphereSounds.txt defines WorldAtmosphereCue with 15 random clips under media/sound/WorldAtmospherePack/track1.ogg through track15.ogg.
  • Playback uses the UI emitter, explicitly sets each instance to 2D, and updates its volume from getCore():getOptionMusicVolume() / 10 once per second. While a custom song plays, it temporarily mutes the native music mixer with getSoundManager():setMusicVolume(0) and restores it to the current slider value when the song finishes or the player returns to the menu/disconnects.
  • The bundled tracks are Ogg Vorbis, 44.1 kHz stereo, 192 kbps nominal (about 193 kbps actual average). preview.png is 256x256. The user confirmed permission to redistribute both audio and artwork.

Tested And Caveats

  • The user play-tested random playback, spacing without back-to-back starts, responsive Music-slider control, 2D sound, and native music muting on their Build 42 installation. The renamed mod identity was not separately play-tested after the rename; it should be enabled as WorldAtmospherePack in the game or save's mod settings.
  • SoundManager:StopMusic() does not silence Build 42's MusicCombined FMOD event. The working approach mutes its music VCA while custom audio plays. Do not restore the earlier soundManager.allowMusic = false experiment: assigning a Java field in this Lua context threw attempted index of non-table and skipped the 2D call.
  • The Desktop source and local Workshop install are separate copies; editing one does not update the other. Keep them in sync before uploading or committing. Both currently use the production 30-60 minute interval; prior quick tests used 1-2 minutes only in the installed copy.
  • The Git repository's URL explicitly mentions random music. If friends can browse the Git server, that URL could reveal the prank despite the neutral Workshop title.

Remaining Steps

  1. Confirm the renamed mod loads in-game and still plays normally. The 30-60 minute interval is configured in both copies; temporarily shorten only the installed copy for quick tests and restore it afterward.
  2. Upload %UserProfile%\Zomboid\Workshop\WorldAtmospherePack through Project Zomboid's Workshop UI, retain the numeric Workshop ID, and choose the desired listing visibility. See SETUP.txt for details.
  3. Add WorkshopItems=<numeric ID> and Mods=WorldAtmospherePack to the private server's Zomboid/Server/<servername>.ini (semicolon-separate existing values), restart the server, and verify a friend receives the Workshop download.

This handoff was written after the initial mod commit. Check Git status and log for any changes made since this snapshot.