Modding:Installing a mod: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (remove parentheses from sentence to make it clear it's important)
(Create stubby manifest page)
Line 1: Line 1:
There are multiple ways to obtain and install mods for ''Caves of Qud''.
{{Modding Info}}{{stub}}
[[File:ModManagerMock.png|thumb|right|Mod Manager mock]]
The manifest.json is a file containing metadata about your mod, located in the root of your mod folder.<br/>
The file is completely optional and primarily used for display in the game's Mod Manager.


'''Note:''' Not all mods will be available by all methods.
==Overview==
{{betamoddingcontent}}
{| class="wikitable"
|-
! Field
! Description
! Properties
|-
| '''id'''
| Internal ID of the mod, used primarily for generating files such as <code>modcheck-[id].json</code> when the mod is approved.<br/>Try to restrict your ID to alphanumeric characters, as different operating systems will refuse certain characters for their file names. ||
* Defaults to config.json's <code>config.id</code>.
|-
| '''loadorder'''
| Whole number indicating the mod's load priority in ascending order: smaller values load before larger ones.<br/>E.g. a mod with a loadorder of <code>-1</code> loads before one with <code>1</code>. ||
* Defaults to config.json's <code>config.loadorder</code>.
|-
| '''title'''
| Title of the mod, displayed in the mod manager. ||
* Accepts [[Modding:Text Color Codes & Object Rendering|color shaders]].
* Defaults to workshop.json's <code>Title</code>.
|-
| '''description'''
| Short description of the mod, displayed in the mod manager. ||
* Accepts [[Modding:Text Color Codes & Object Rendering|color shaders]].
|-
| '''tags'''
| Comma-delimited list of workshop tags, only for display in the mod manager and has no effect on your actual workshop tags. ||
* Defaults to workshop.json's <code>Tags</code>.
|-
| '''version'''
| Mod's version, displayed in the mod manager. ||
|-
| '''author'''
| Creator(s) of the mod. ||
* Accepts [[Modding:Text Color Codes & Object Rendering|color shaders]].
|-
| '''previewImage'''
| Relative path to an image used as an icon for your mod in the manager. ||
* Defaults to workshop.json's <code>ImagePath</code>.
|}
[[Category:Modding]]


=Steam Workshop=
==Example==
 
An example manifest.json for the [https://steamcommunity.com/sharedfiles/filedetails/?id=708258860 Blue Ctesiphus] tutorial mod.
'''Note:''' This section applies only to running the game through Steam. Even if you obtained the game through Steam, running it from outside of Steam will cause it not to load any Steam Workshop mods.
<syntaxhighlight lang="json">
 
{
# Go to [https://steamcommunity.com/app/333640/workshop/ ''Caves of Qud'''s Steam Workshop page].
"id": "BlueCtesiphus",
# If you aren't already logged in, log in to Steam with the account you'll be playing under.
"loadorder": 1,
# Locate the mod you'd like to install and go to its page.
"title": "{{blue|Blue Ctesiphus}}",
# Press "Subscribe".
"description": "Turns Ctesiphus blue!\n\nThis is a piece of Freehold Games' mod tutorial.",
 
"tags": "Ctesiphus,Tutorial",
Now, the next time you run the Steam desktop client, it will download the mod and install it where the game will load it.
"version": "1.0",
 
"author": "AlphaBeard",
=Manual Download=
"previewImage": "preview.png"
 
}
Mods can also be downloaded manually from a variety of other locations.
 
For example, the Nexus Mods site has a page for Caves of Qud. You can also download mods from github, bitbucket, or any other code hosting website where a mod is hosted. Sometimes, mod authors will post links to their code hosting site in the description of the mod on the [https://steamcommunity.com/app/333640/workshop/ Steam Workshop], which means it can still be a good idea to check the Steam Workshop even if you don't use Steam.
 
=== <u>Set Up Your Mods Folder</u> ===
To install manually downloaded mods, you must first create a <code>Mods</code> folder in the game directory:
 
# Go to the game's configuration directory on your system. The default paths for each operating system are:
#* Windows: <code>C:\Users\''[Username]''\AppData\LocalLow\Freehold Games\CavesOfQud\</code>
#* Linux: <code>/home/''[Username]''/.config/unity3d/Freehold Games/CavesOfQud/</code>
#* Mac: <code>Users/''[Username]''/Library/Application Support/com.FreeholdGames.CavesOfQud/</code>
# Create a <code>Mods</code> folder in that directory if one doesn't already exist.
 
=== <u>Download the Mod</u> ===
 
==== Nexus Mods ====
 
# Go to [https://www.nexusmods.com/cavesofqud the Nexus Mods page for ''Caves of Qud''].
# If you aren't already logged in, log in to Nexus Mods.
# Locate the mod you'd like to install and go to its page.
# Press "Manual Download" to download a <code>.zip</code> archive of the mod.
 
==== GitHub ====
 
# Press "Clone or download".
# Press "Download ZIP" to download a <code>.zip</code> archive of the mod.
 
==== Bitbucket ====
 
# Press "Downloads" on the left sidebar.
# Press "Download repository" to download a <code>.zip</code> archive of the mod.
 
==== SteamCMD ====
 
# Install & run [https://developer.valvesoftware.com/wiki/SteamCMD SteamCMD].
# Enter <code>login anonymous</code>.
# Enter <code>workshop_download_item 333640 MOD_ID</code> to download a <code>.zip</code> archive of the mod.
#* Replace <code>MOD_ID</code> with the id of the workshop mod you wish to download.
#* The workshop mod [https://steamcommunity.com/sharedfiles/filedetails/?id=708258860 Blue Ctesiphus] has the id <code>708258860</code> for example, visible in the URL.
#* <code>333640</code> is the app id of Caves of Qud, visible in the URL of the game's [https://store.steampowered.com/app/333640/Caves_of_Qud/ store page].
 
==== Other Sites ====
 
Other code repositories or mod hosting sites should have some option to download the mod's files. You can download the files and put them in your Mods directory, using the folder structure demonstrated below.
 
=== <u>Install the Mod</u> ===
 
Now that you have a <code>.zip</code> archive of the mod, you can install it in the <code>Mods</code> directory you created earlier.
 
# Unzip the file into the <code>Mods</code> directory.
# Verify that the <code>Mods</code> folder structure looks correct.
#* Each mod's files should be contained in a separate folder in the <code>Mods</code> directory.
#* The folder name for an individual mod doesn't matter - the game loads content from any folder in the <code>Mods</code> directory.
 
For example, your <code>Mods</code> directory might look like this if you have 3 mods installed:
 
<syntaxhighlight lang="yaml">
<Caves of Qud App Directory>
    Mods
        SampleMod1
            CodeFile.cs
            ObjectBlueprints.xml
            Textures
                character_tile.png
        SampleMod2
            CodeFile1.cs
            CodeFile2.cs
            ObjectBlueprints.xml
            Mutations.xml
        SampleMod3
            ObjectBlueprints.xml
</syntaxhighlight>
</syntaxhighlight>
{{Modding Navbox}}
[[Category:Guides]][[Category:Modding]]

Revision as of 02:15, 8 August 2020

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 is a stub. You can help Caves of Qud Wiki by expanding it.
This article is a stub. You can help Caves of Qud Wiki by expanding it.

Mod Manager mock

The manifest.json is a file containing metadata about your mod, located in the root of your mod folder.
The file is completely optional and primarily used for display in the game's Mod Manager.

Overview

This section contains modding information that is only applicable to the in-development beta branch of Caves of Qud on Steam.
Field Description Properties
id Internal ID of the mod, used primarily for generating files such as modcheck-[id].json when the mod is approved.
Try to restrict your ID to alphanumeric characters, as different operating systems will refuse certain characters for their file names.
  • Defaults to config.json's config.id.
loadorder Whole number indicating the mod's load priority in ascending order: smaller values load before larger ones.
E.g. a mod with a loadorder of -1 loads before one with 1.
  • Defaults to config.json's config.loadorder.
title Title of the mod, displayed in the mod manager.
description Short description of the mod, displayed in the mod manager.
tags Comma-delimited list of workshop tags, only for display in the mod manager and has no effect on your actual workshop tags.
  • Defaults to workshop.json's Tags.
version Mod's version, displayed in the mod manager.
author Creator(s) of the mod.
previewImage Relative path to an image used as an icon for your mod in the manager.
  • Defaults to workshop.json's ImagePath.

Example

An example manifest.json for the Blue Ctesiphus tutorial mod.

{
	"id": "BlueCtesiphus",
	"loadorder": 1,
	"title": "{{blue|Blue Ctesiphus}}",
	"description": "Turns Ctesiphus blue!\n\nThis is a piece of Freehold Games' mod tutorial.",
	"tags": "Ctesiphus,Tutorial",
	"version": "1.0",
	"author": "AlphaBeard",
	"previewImage": "preview.png"
}