Modding:Tiles: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
imported>CaptainTechnicality54384
(Created page with "Category:Modding == Tile modding toolkit == This file contains the raw tiles imported into the game, which will help you figure out the right name and folder for each tile...")
 
imported>CaptainTechnicality54384
No edit summary
Line 14: Line 14:
'''Sample ObjectBlueprints.xml updating Mehmet's tile to creatures/new_mehmet.png'''
'''Sample ObjectBlueprints.xml updating Mehmet's tile to creatures/new_mehmet.png'''


<?xml version="1.0" encoding="utf-8"?>
<syntaxhighlight lang="xml">
<objects>
<?xml version="1.0" encoding="utf-8"?>
    <object Name="Mehmet" Load="Merge">
<objects>
        <part Name="Render" Tile="creatures/new_mehmet.png"></part>
    <object Name="Mehmet" Load="Merge">
    </object>
        <part Name="Render" Tile="creatures/new_mehmet.png"></part>
</objects>
    </object>
</objects>
</syntaxhighlight>


== Supported File Types ==
== Supported File Types ==
Line 42: Line 44:
'''Sample <u>%appdata%\Caves of Qud\Mods[your mod name]\modconfig.json</u> enabling truecolor shader mode'''
'''Sample <u>%appdata%\Caves of Qud\Mods[your mod name]\modconfig.json</u> enabling truecolor shader mode'''


{
<syntaxhighlight lang="json">
  "shadermode":"1"
{
}
  "shadermode":"1"
}
</syntaxhighlight>


== Tile Size ==
== Tile Size ==
Line 51: Line 55:
'''sample display.txt'''
'''sample display.txt'''


{
<syntaxhighlight lang="json">
    "tiles":{
{
        "width":"24",
    "tiles":{
        "height":"24"
        "width":"24",
    }
        "height":"24"
}
    }
}
</syntaxhighlight>

Revision as of 16:10, 23 May 2019

Tile modding toolkit

This file contains the raw tiles imported into the game, which will help you figure out the right name and folder for each tile you would like to replace. You may only use these files to create modifications for Caves of Qud.

https://www.dropbox.com/s/0q1qtujn4i3r4zm/CavesofQudTileModdingToolkid.zip?dl=1

Tile modification example

In order to add a new tile to Mehmet, first create a .png file in a Textures subdirectory of your mod. Additional subdirectories can be included.

%appdata%\Caves of Qud\Mods\[your mod name]\Textures\creatures\new_mehmet.png

Then update the ObjectBlueprints to replace Mehmet's tile with the path to your new tile. (as described in Object Modding)

Sample ObjectBlueprints.xml updating Mehmet's tile to creatures/new_mehmet.png

<?xml version="1.0" encoding="utf-8"?>
<objects>
    <object Name="Mehmet" Load="Merge">
        <part Name="Render" Tile="creatures/new_mehmet.png"></part>
    </object>
</objects>

Supported File Types

Only .png files are supported.

Tile Format

The default tiles and shaders used in Caves of Qud use 3-color tiles. Black, non-transparent pixels are painted with the foreground color, white non-transparent pixels are painted with the detail color and transparent pixels are painted with the background color.

Example "3 color" Gunslinger Tile Example Gunslinger Dynamically Colored In-Game
Gunslinger-3Color.png
Gunslinger-InGame.png

If you'd like your mod to supply true color tiles instead of the default 3-color tiles (white, black, transparent), then include a modconfig.json in your mod's root with the Following contents.

Truecolor tiles will be shaded as their natural color, with the background color blended in at 1-alpha.

Sample %appdata%\Caves of Qud\Mods[your mod name]\modconfig.json enabling truecolor shader mode

{
  "shadermode":"1"
}

Tile Size

Include a display.txt in your mod's base directory with the following entries to override the game tile height and width

sample display.txt

{
    "tiles":{
        "width":"24",
        "height":"24"
    }
}