Modding:Tiles: Difference between revisions

Jump to navigation Jump to search
1,635 bytes added ,  04:45, 2 June 2020
Added some changes and explanations for creating your own PC Sprite.
m (Teamtoto moved page Modding/Tiles to Modding:Tiles)
(Added some changes and explanations for creating your own PC Sprite.)
Line 1: Line 1:
[[Category:Modding]]{{Modding Info}}
[[Category:Modding]]{{Modding Info}}
== Tile modding toolkit ==
== "Caves of Qud" Texture Files Download for Tile-set Modifications. ==
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.
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/g8coebnzoqfema9/CavesofQudTileModdingToolkit.zip?dl=0
https://www.dropbox.com/s/g8coebnzoqfema9/CavesofQudTileModdingToolkit.zip?dl=0


== Tile modification example ==
== Modifying Existing Tiles ==
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.
In order to modify an existing tile, move the .png file in a Textures subdirectory of your mod. Additional subdirectories can be included.  


<u>%appdata%\Caves of Qud\Mods\[<strong>your mod name]</strong>\Textures\creatures\new_mehmet.png</u>
'''Example:'''


Then update the ObjectBlueprints to replace Mehmet's tile with the path to your new tile. (as described in [[Modding/Objects|Object Modding]])
<u>%appdata%\Caves of Qud\Mods\[<strong>your mod name]</strong>\Textures\creatures\new_tile.png</u>


'''Sample ObjectBlueprints.xml updating Mehmet's tile to creatures/new_mehmet.png'''
'''Sample ObjectBlueprints.xml updating Mehmet's tile to creatures/new_mehmet.png'''
Line 21: Line 21:
     </object>
     </object>
</objects>
</objects>
</syntaxhighlight><br />
== Creating a Player-Tile ==
At the moment, the player's sprite does not have a direct/in-game method of directly changing the tile, but there is a method through using the downloadable looklike wish commands that allows you to do so.
<br />
# Firstly, create the item you wish to use as a player tile, the name can have any format, but the image must be saved as PNG format, most sprites work between 16pp x 24pp.
# Navigate to : <u>%appdata%\Caves of Qud\Mods</u>
# Create a new folder named "PC Sprite," then create another folder inside PC Sprite named "Texture" you may also add sub-directories based on the  items I.E creatures, buildings, etc.
# Your file Path Should look like :  <u>%appdata%\Caves of Qud\Mods\PC Sprite\Textures</u>
# Place your custom sprite into the Textures folder.
# Got to: <u>%appdata%\Caves of Qud\Mods\PC Sprite</u>
# Right-Click, and create a new text-document, rename the text document, "MyPlayerTileWish.cs."
# Open the document.
# Paste the Following:<syntaxhighlight lang="csharp">
using XRL.World;
using XRL.Wish;
using XRL.Messages;
public class MyPlayerTileWish
{
    [WishCommand(Command = "usemytile")]
    static public bool UseMyTile()
    {
        IPart.ThePlayer.pRender.Tile = "yourtilesname.png";
        return true;
    }
}
</syntaxhighlight>
</syntaxhighlight>
# Where it says <u>"yourtilesname.png"</u> paste the name of the tile in your textures that you wish to use for your player tile, if it is in a sub-directory write it as so: <u>"subfolder/yourtilesname.png."</u>
# Close and Save.
# Launch Caves of Qud.
# Activate and Approve the mod in the script.
# After creating your character, use the wish command, "usemytile" and you should be assigned the you customized.


<br />
== Supported File Types ==
== Supported File Types ==
Only .png files are supported.
Only .png files are supported.
Anonymous user

Navigation menu