Difference between revisions of "Palettes"

From wiki
Jump to: navigation, search
(Initial commit.)
(No difference)

Revision as of 04:46, 31 May 2017

In Staxel, *.palette files are used to specify two things;

  • An image which specifies what colour is replaced with another colour
  • The image which represents the palette in the Character Creator

These palette files are then used to colour different things including Accessories and Species.


Creating a Palette for Player Models

A palette is basically an optional colour scheme for a given accessory model. Models do not necessarily need to support palettes (you can have a completely unpalettable model designed to only have one colour scheme), but models which are designed to support palettes can essentially have any number of colour schemes limited only by the number of palettes defined.


In essence, a palette is an image with two rows of different colours. The top row of colours are the colours you want to replace, and the bottom row are the colours you want to replace the colour above with.


To create a palette you must first have a model to base the palette off. Without a model, a palette is basically useless. Once you have acquired a model to work with;

  1. You will first need to create an image in your favourite image software. (Photoshop, Gimp, even Paint is fine for this.) The size of the image will be 16 pixels per colour you want to change in the width(For Example if you want to change 4 colours, you will need to make your image 64 pixels wide) while being exactly 32 pixels high.
  2. Start by setting the top left most 16x16 grid to the first colour that you want to change. Once that 16x16 is filled, fill the 16x16 to the right of it with the second colour. Keep doing this until all colours are filled. This gives the basis on which your Palette is set.
  3. When that is done, you can now choose which colours you want to replace the originals with, and fill the space underneath that colour. Continue until you are done.
  4. Save it as a "*.png" file. You can now move that to a mod folder but we aren't done yet.

Example of a palette that replaces 4 colours.


With that, you have now created the image that is required for a palette. You will then need to create an icon for your palette. This icon gets displayed in the menu representing the palette.

  1. Go back to the image editor, and create another image, this time exactly 12x12 in size.
  2. Fill this with anything you like, such as having a "S" for "Suzy's Hair Colour". A recommendation would be to have a solid colour representing the main colour of your hairstyle.
  3. Save this image as a *.png file. (If you want, name this as the same as the file containing the palette but append " icon" to it.)

Example of a non-standard Icon to represent a palette.


With those two images made, we are now ready to actually tell the game "Hey this is a palette!" So we need to create a *.palette file with the following inside of it;

{
  "code" : "mods.modname.uniquenamehere",
  "icon" : "mods/Modname/NameOfIcon.png",
  "palette" : "mods/Modname/NameOfPalette.png"
}

What these properties do is described below.

With this the palette is now ready to be added to models. You may now add/edit the following line in any *.accessory file to include the code name from your palette.

"palettes" : [ "mods.modname.palette1", "mods.modname.palette2"] 

And if everything went according to plan, you can now select your custom palette from your model.


Config Options

"code"

Valid options (String): Any valid string that leads to an item.

Default Value: No default value is specified. Always need to provide your own.


A string containing the code of the item the blob will be referring to.


"icon"

Valid options (String): A string that contains a path which points to an image.

Default Value: No default value is specified. Always need to provide your own.


A string containing the path to the image that will be displayed in character creator. This has no affect on the actual palette.


"palette"

Valid options (String): A string that contains a path which points to an image.

Default Value: No default value is specified. Always need to provide your own.

A string containing the path to the image that will be used to define the palette. For more information on how to create the palette, go to #Creating a Palette for Player Models