Caves of Qud Guide

modding: creating & adding sprites for Caves of Qud

modding: creating & adding sprites

Overview

second part of a Qud modding series, all about sprites!

setup

though not necessary viewing, this guide will be continuing off of my making an object guide

pastebin of initial ObjectBlueprint.xml:
[link]

I’m editing sprites in Photoshop, but anything works!

(note: Qud’s post-processing effects (scanlines, vignette) are disabled in my game since I’m not a fan)

sprite anatomy

Qud is a great game to try out your art skills! The low-fi nature makes it easy to whip up something reasonable, even if you’re less artistically inclined.

the basic sprites are 16x24 pixels, and use 2 colors + transparency. The game can load bmp files, but transparent bmps are a bit of an anomaly, so we’ll be using the png format.

check out the technical guide[freehold.atlassian.net] for more indepth information on true-color tiles, changing the dimensions of tiles, etc. Those options are intended to facilitate whole new tilesets however, rather then expanding on the base game, so this guide won’t be covering them.

what you do want to grab is the dropbox file of sprites linked there. It contains hundreds of sprites from the game, which is a great resource to study & build off of.

there are a limited number of colors available, listed below. Adding new colors is, as far as I’m aware, not possible, so this is the palette we’re working with!

drawing

to make drawing easier, I set up a little canvas in photoshop:

after a bit of doodling, I had a tile for the siftrat, a creature from the last tutorial:

finished, we can now set it up for dynamic recoloring by the game:
– convert the main color to pure black
– the secondary color to pure white
– transparent background
– save as a 16×24 pixel .png

now we just need to put the tile where our mod can find it! Inside the mod folder, next to your ObjectBlueprints.xml, create a new folder call Textures. And, to keep things organized, create a second new folder inside that one called Creatures.

…AppDataLocalLowFreehold GamesCavesOfQudModstutorial_modTexturesCreaturessiftrat.png

implementing

with the sprite finished & in our mod’s texture folder, we can now just set it in the Tile variable of our creatures Render part:

(case sensitiviy doesn’t matter)

the black pixels will be the color set by ColorString, white pixels by DetailColor. You can also choose to override the transparent background by adding a ^ inside ColorString:
ColorString=”&R” – red foreground, transparent background
ColorString=”&R^Y” – red foreground, white background

and that’s it! using the wish command (see the previous guide if you don’t know how to use that) we can spawn a couple in town to see how they look:

you can get fancier with sprites by diving into the programming side of modding, but I’ll cover that in a later guide. Till then, good luck!

SteamSolo.com