Modding Procedural Sprites

The Procedural Sprite System in The Bibites has been made to be easily modifiable and replaceable by users. It's part of the efforts to make the simulation customizable.

This pages is going to serve as a guide on how to do that.

In sum, users can replace the default sprites sheets of each parts as well as changing the sizes, resolution (sprites per sprite sheet) and base resolution (pixels per unit) of the sizes.

Basics
For now there are separate 5 parts that vary according to genes.

Each part vary depending on up to two (2) genes, and then with size. The genes influencing the different parts a predetermined and can't be changed for now. At the moment, which genes influence which part are detailed as follows:

Parts and influencing genes
In the future more genes and parts might be added.

Atlases
In order to communicate some metadata to the procedural sprite system, two atlases formatted as semicolon-separated .csv are needed. The first, sizes.csv, details the different size identifiers and their relative body pixel width. The second, parts.csv, details all the different sprite sheets dimensions (number of sprites per sprite sheets).

size.csv Format:
The size.csv file must follow a certain format. The first row is dedicated to the column headers. Their are needed, but the exact words are not important. It is however recommended to keep the defaults for consistency. You can have any arbitrary number of sizes, but they all need to have a unique name identifier and a spritesheets for each part will need to be included for each sizes. As a result the mod folder will need to contain a number of sprite sheets equal to the number of unique sizes (4 by default) times the number of unique parts (5 for now). As such, the default procedural sprites use 20 sprite sheets.

The first data row needs to be the default size (the size at a size gene of 1.0), and all others sizes spans will be automatically calculated relatively to that first size.

parts.csv Format:
The part.csv file is used to detail the amount of sprite for each sprite sheet. The first row is dedicated to the column headers. Their are needed, but the exact words are not important. It is however recommended to keep the defaults for consistency.

The sprite sheets name must follow the format [size identifier]_[part identifier].

Important Info:

 * The size identifiers in sizes.csv must be the same on the sprite sheets and in the parts.cvs file
 * The name identifiers in parts.csv must follow the exact spelling of the .png sprite sheets
 * the Altlas files must be saved in a semicolon-separated .csv format

Sprite Sheets
For every sizes and every parts, a sprite sheet must be provided for the mod to be functionnal. There are a few requirements when working with the sprite sheets:


 * Sprites should be drawn with the hue 0.55 (rgb #00b2ff) as refference. This is done so that it can be recolorized to other hues dynamically
 * There should be no padding between individual sprites in the sprite sheets
 * All the sprites in a sprite sheet should have the same size in pixels (width and length), but not necessarily fill them
 * All sprites must be drawn as if the bibites was oriented (looking) to the right

Now, on to specifics:

Body
For now the body only needs