Modding:Tutorial - Custom Player Tiles

Revision as of 14:43, 26 September 2023 by Sol (talk | contribs) (off to a good start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a step-by-step guide on how to use your own choice of tile for your character. It's intended to be followable by anyone who plays Caves of Qud, regardless of modding knowledge. We will be adding the tile by using a preset, which is selectable during character creation.

Besides a copy of the game itself, you will need:

  • A tile. This is an image in a specific format that we'll go over in a moment.
  • A build code. It will be the default when selecting your preset, but you can still choose a different build during character creation.
  • A text editor. You don't need to know how to program, but you'll need to edit a text file. Notepad is fine, Microsoft Word isn't.

Tile Format

 
The gunslinger tile as seen in an image viewer.
 
The gunslinger tile as rendered in-game, using y as the foreground color, K as detail, and k as background.

Your tile should be a .png file with pixel dimensions 16×24. For colors, it should use:

  • black (hex code #000000) – The game will replace this with the foreground color. This is generally the main color of your tile, the one there is the most of.
  • white (hex code #ffffff) – This will be replaced with the detail color. This is used as an additional color to contrast with the foreground color.
  • transparent (any color with an opacity/alpha of 0) – This will be the background color. This is almost always k (see below).

(It's possible to use other colors as well, but it's out of the scope of this guide. See here for more details.)

For reference, here are the colors the game can render your tile with:

Code Name Hex
r dark red / crimson #a64a2e
R red / scarlet #d74200
o dark orange #f15f22
O orange #e99f10
w brown #98875f
W gold / yellow #cfc041
g dark green #009403
G green #00c420
b dark blue #0048bd
B blue / azure #0096ff
c dark cyan / teal #40a4b9
C cyan #77bfcf
m dark magenta / purple #b154cf
M magenta #da5bd6
k #0f3b3a
K dark grey / black #155352
y grey #b1c9c3
Y white #ffffff

Build Code

To get a build code for your character:

  1. Launch the game and select “New Game”.
  2. Go through character creation, selecting your genotype, calling/caste, attributes, and mutations/cybernetics. (Optionally, you can enter a name as well.)
  3. While on the build summary step, select “Export Code to Clipboard”.

TODO

Instructions

  1. Locate your Mods folder, listed as “‘offline’ mods” on the file locations page.
  2. Create a directory inside that folder that will contain your mod data. Name it something distinctive, such as My Custom Preset. This name will appear in the in-game mod manager.

TODO