|
|
Line 24: |
Line 24: |
| </objects> | | </objects> |
| </syntaxhighlight><br /> | | </syntaxhighlight><br /> |
|
| |
| == Creating a Player-Tile ==
| |
| {{Cleanup | This guide is incomplete and may also be best as its own article.}}
| |
| At the moment, the player's sprite does not have a direct/in-game method of changing the tile, but there is a method that will allow you to make custom sprites and assign them to the player.
| |
| <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 16px x 24px.
| |
| # Navigate to : <u>%appdata%\Caves of Qud\Mods</u>
| |
| # Create a new folder named "PC Sprite," then create another folder inside PC Sprite named "Textures" 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;
| |
|
| |
| [HasWishCommand]
| |
| public class MyPlayerTileWish
| |
| {
| |
| [WishCommand(Command = "usemytile")]
| |
| static public bool UseMyTile()
| |
| {
| |
| IPart.ThePlayer.pRender.Tile = "yourtilesname.png";
| |
| return true;
| |
| }
| |
|
| |
| }
| |
| </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>
| |
| # If you want to change other properties (such as colors; see [[Modding:Tiles#Tile_Format|below]]) you can add lines to the wish; for example, you could set the detail color to red with <syntaxhighlight lang="csharp">IPart.ThePlayer.pRender.DetailColor = "r";</syntaxhighlight>
| |
| # 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 tile you customized.
| |
|
| |
| <br />
| |
|
| |
|
| == Supported File Types == | | == Supported File Types == |
Line 155: |
Line 116: |
| ==See Also== | | ==See Also== |
| * [[Visual Style]] | | * [[Visual Style]] |
| | * [[Modding:Tutorial_-_Custom_Player_Tiles]] |
|
| |
|
| {{Modding Navbox}} | | {{Modding Navbox}} |