Custom Palettes and Tiles

## Palettes

Palettes are very easy to change and modify, you can find them in Rain World\Assets\Futile\Resources\Palettes.
I recommend just copy and pasting one of the palette.pngs in there already, and
renaming it to the next available number (Ex: Palette37). There's a handy palette key of most of the colors linked below, but the big un-labeled space is the
main palette of the room itself. The best way to make a palette is modifying it
while in-game. To see any changes, just save the .png and re-enter the room with
the palette.

The following image shows how a palette is organized.

* The top palette is for a normal cycle. The bottom palette is before rain.

* Within a palette, the top half is for sun and the bottom is for shade.

* Within sun or shade, the 3 rows color surfaces facing up, neutral, or down.

* Within a row, colors from left to right correspond to near and far layers (from 1 to 30)

## Tiles

All of the tiles the editor uses are located in the Graphics
folder, and they look like this image here. The tiles are in layers, with
the bottom one being the image for the tile editor. The tiles follow a 20x20
pixel grid while the image for the tile editor follows a 16x16 grid. The blue
is the lit colour of the layer, the green is the normal colour of the layer,
while the red is the shaded colour of the layer. The top row of pixels HAS to
be pure white, except for black pixel in the top left.

All of the collision details and more are stored in the init.txt.

Things like this,
**-["Stone", color(210, 180, 180)]**

Are the categories. The name is in quotes while the colour
follows RGB values
And the rest, are the properties of the tile, which look like this.
**[#nm:"Small Stone", #sz:point(1,1), #specs:[1], #specs2:0,**
#tp:"voxelStructRockType", #bfTiles:1, #rnd:4, #ptPos:0,
#tags:["nonSolid"]]
#nm Is the name of the tile. #sz:point is the size of the tile in a
(x,y) format. #specs is what the collision is. The #specs are dependent on the
sz:point, so if it’s 4,6 you would have 6 groups of six numbers.  Say, you had a 8 long and 3 tall tile, it’s
specs would look something like this
**[1,1,1,-1,1,1,1,1, 1,-1,1,1,1,1,1,-1, 1,1,1,1,1,-1,1,1 ]**

It’s important to note that the collision is NOT horizontal,
but rather vertical. So in that, the first 3 numbers would change the first column
from top to bottom and so on.

#specs2 is used for tiles that occupy 2 layers (such as some of the VeryLargeBeam tiles) and should in most cases be set to 0, #tp: can either be “voxelStruct”
or “voxelStructRockType,” though I recommend leaving it as just “voxelStruct.” #bfTiles
and #rnd4 should be left as 1, and #ptPos should be left as 0. The tags can
just be left empty if you want, or you can use the tags in this list
"notTrashProp", "notProp",
"nonSolid", "ramp", and "drawLast"-
notTrashProp disallows it from the largetrash or trash materials from
using it in its trash spread, notProp disallows it from being placed with the
prop editor, I’m not too sure what ramp does, and drawLast is self-explanatory.
One thing not shown in the properties list is **#repeatL:[1,7,2]** Which is an very important property, it dictates how many times the
layer is repeated. If you have a tile with 3 layers, you’d want 3 numbers, with
each number saying how many times the layer is repeated, starting from the
first layer.

An incredibly useful tool when developing custom tile collision is the Specs Editor, a program designed to create tile dimensions and collisions, along with making the process more intuitive and easier.

If you need any help, don’t be afraid to ask Twelve Havens on the official rain
world discord