Modding:Creating a Workshop Mod

From Caves of Qud Wiki
Jump to navigation Jump to search
This page is about modding. See the modding overview for an abstract on modding.
This page is about modding. See the modding overview for an abstract on modding.
This article may need cleanup to meet quality standards.
Please help improve this page by editing it.

Reason: "Is the bug mentioned in step 6 still relevant?"

This article may need cleanup to meet quality standards.
Please help improve this page by editing it.

Reason: "Is the bug mentioned in step 6 still relevant?"

This article has information that is missing or not up to par.
Reason: Lacks information on the structure of workshop.json
  1. Create your mod as normal as a subdirectory of the save directory \Mods folder (see file locations for exact paths for your operating system)
  2. Ensure you have enabled "Enable additional overlay user interface elements" in your Options.
  3. Open the Modding Utilities from the Caves of Qud overlay main menu (home screen)
  4. Select the steam workshop uploader
  5. Select your mod from the list
  6. Click the "Create Workshop Id for Mod..." button. Your mod will now be associated with a workshop entry via a workshop.json file in the mod directory. You can now browse your item on steam workshop, though it will be empty. (6/25 there's a bug after create, click your mod again in the list and you should get the details after the create, will be fixed 7/1)
  7. Optionally fill out the title, description and other fields. These can be edited in steam later, if you'd like.
  8. Click the Upload Content... button. The contents of your mod folder will be uploaded.
  9. Now users can Subscribe to your mod in Steam and restart Caves of Qud and get your mod content!

Structure of workshop.json

The workshop.json configuration file contains the Steam Workshop configuration for your mod. Here's an example of what such a file might look like:

{
  "WorkshopId": 2995934012,
  "Title": "Snapjaw Mages",
  "Description": "[h1]Snapjaw Mages[/h1]\n\nThis mod adds the new [b]Snapjaw Mage[/b] creature to Caves of Qud.",
  "Tags": "Creatures",
  "Visibility": "2",
  "ImagePath": "Preview.png"
}

Usually you don't need to modify this file manually, and you can just use the workshop uploader tool built into the game. Nonetheless, it can be helpful to know what each of these fields mean:

  • WorkshopId: an ID that uniquely identities your mod. When you first go to the workshop uploader in your game to upload your mod, you should get a screen like the one below which will automatically create a workshop ID for you.

Snapjaw Mages -- workshop uploader.webp

  • Title: the name of your mod as it appears in the Steam Workshop.
  • Description: your mod's description. You can format this text (e.g. bolden, italicize, add headers, etc.) by following the text formatting guidelines described here.

Snapjaw Mages -- workshop uploader description.webp

  • Tags: one or more categories that your mod falls under, separated by commas (for instance, "World,Settlement"). You can define your own tags but if at all possible, try to use some of the same tags used by items currently in the Caves of Qud workshop so that it's easier for people to find your mod.
  • Visibility: defines who's able to see your mod in the workshop. 0 means that the mod is private, 1 means that it's friends-only, and 2 means that it's public. You can change this by setting "Visibility" in the workshop uploader.

Snapjaw Mages -- workshop uploader visibility.webp

  • ImagePath: the path (relative to the mod directory) to the image that should be used as the preview image for the mod.

Notes

Inside workshop.json, if the Visibility variable is manually set to "2", the mod will always remain public. This prevents the game from making all updated mods private by default, forcing you to change visibility on the workshop page itself every time an update is pushed.