Custom assets

From Heroes of Hammerwatch wiki
Revision as of 18:54, 16 November 2018 by Muffinatorz (talk | contribs) (Tilemaps)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating assets

The basics

To start creating assets, there are a few rules that need to be followed. Whether the file is for a tileset, doodad, item, or actor, the image's height and width need to be by the power of 2 (^2). Both width and height don't need to match. It is also recommended that the file format supports an alpha channel for transparency. Files like JPEG don't have transparency channels but files like PNG do. ( Untested but I'm pretty sure the game won't accept a file without a transparency channel.)

Examples: Height:512px Width:256px OR Height:16px Width:1024px

More information on the wiki on power of 2


Tilesets

Tilesets require 2 files, the PNG and the .tileset file. Tilesets are usually used in the back layers as flooring but tilesets can be used at higher layers. Tilesets WILL NOT be spawned through a prefab. If you absolutely want flooring to be spawned through a prefab then you must make it a doodad. There's a example to a start of a tileset file.


   <tileset texture="tilesets/my_tileset.png" layer="-150" size="16" material="system/default.mats:floor">
       <code here ... />
   </tileset>

The Texture attribute is a link to your png. Links can be relative so instead of using "tilesets/my_tileset.png", you can also use "./my_tileset.png". The layer attribute is the default layer of the tile. Unlike other objects, you can NOT change the layer of the tileset in the editor. The default setting chosen here will be used.

( This is a work in progress )

Doodads

Actors

Items