Migrating from Java
Some mods have a jar with one job: it copies a shader pack into Zomboid/viewpoint-shaderpacks. These mods load their
Java through ZombieBuddy. Viewpoint shows them as Unmanaged. A Shaderpack does the same job with no Java. The player
can then switch it off, see its label, and update it with the mod.
What changes
Section titled “What changes”| Installer jar | Shaderpack | |
|---|---|---|
| Where the pack is | Copied into the player’s folder | In the mod, in media/viewpoint/shaderpacks/<id>/ |
| Java | A jar that ZombieBuddy loads | None |
| Player control | None | Activate from the list, no restart |
| Label | Unmanaged | Shaderpack: GLSL only. It contains no Java. |
| Updates | The mod copies the files again | The player sees a dot and the Changelog tab |
The procedure
Section titled “The procedure”- Make the folder
media/viewpoint/shaderpacks/<id>/in your mod. Put it incommon/, or in the version folder. - Move your
pack.propertiesand yourshaders/folder into it. Addtextures/if the pack has images. - Add the package keys to
pack.properties:format,id,versionandgame.min. Addicon,licenseandchangelogif you can. See Format. - Make the folder name the same as the
id. - Remove the installer jar. Remove
javaJarFilefrommod.info. Keeprequire=Viewpoint. - Remove the code that copied files. Nothing copies the pack now.
- Switch the mod on. Open Graphics, Shaderpacks. Find the card of your pack.
- Put the pointer on the card and click the green tick, or double-click the card. Accept the dialog. Look at the picture.
The id
Section titled “The id”A package id uses lower-case letters, digits, . and -. The name of an old folder pack can use capital letters and _.
If your old name is not a correct id, choose a new id.
The options of the pack are saved as pack.<encoded id>.<option>. If the encoded id of the new package is the same as the
old name of the folder pack, the saved options of the player stay. If it is not the same, the player sets the options
again. See Package kinds.
If the player still has the old copy
Section titled “If the player still has the old copy”An old copy in Zomboid/viewpoint-shaderpacks/ stays in the player’s folder. When its name and author are the same as
those of your package, the card of the old copy says “a packaged version is installed”. Tell the player in your
changelog to delete the old folder.
If the pack builds on another pack
Section titled “If the pack builds on another pack”Put base= in pack.properties. If the base is a Shaderpack of another mod, add it to requires. See
Format.
If your jar also changed library GLSL
Section titled “If your jar also changed library GLSL”Some jars also patched Shaders.read to change library GLSL as the game starts. A Shaderpack does this with files in
shaders/. A small change that must apply under any pack is a shader snippet. See
Migrating from ZombieBuddy.