Version 0.2 - Palette changer


This update gives the ability to change the character and accessories color palettes, at runtime.

Currently, three palettes were added:

There's also a new palette (LPC-512). This is the default palette with the color number reduced to 512 (actually 509).


In order to explain the process to create/change palettes, we need to first understand how the application loads its resources.

The application loads it's resources from the following locations:

  1. {USER_FOLDER}/CharGen/data/
  2. {APP_FOLDER}/../share/CharGen/data/
  3. {APP_FOLDER}/data/
  4. {USER_FOLDER}/CharGen/data/chargen.pak
  5. {APP_FOLDER}/../share/CharGen/data/chargen.pak
  6. {APP_FOLDER}/data/chargen.pak

{USER_FOLDER} is where user specific data files are stored (e.g. ~/.local/share/)
{APP_FOLDER} is where the chargen executable is located (e.g. /usr/local/bin)

The numbers indicate each location priority.

That way, if, for instance, the file {USER_FOLDER}/CharGen/data/data/character/race/zombie.race exists, then
the one inside the {APP_FOLDER}/data/chargen.pak will not be used.

The priority order is arranged so that loose files take precedence over the packed ones.

This allows users to add new items to the generator (and change existing ones).


Back to creating palettes.

The tools to do so are provided by the application. Issue chargen --help to get an explanation of these tools and their parameters.

I tried to make their description very thorough, and I hope the examples contained there better show how to use them.

First, every new palette is always based on an existing one, so let's first extract an existing one from the chargen.pak file (it's a regular .zip file).

Let's, for instance extract data/colormaps/lpc_509.cm and place it in {USER_FOLDER}/CharGen/data/data/colormaps/new.cm

Edit the file to change it's id and it's name. This new palette should now be available in the application.



Now, there's two ways to change it.

    • Create an image file, with the colors in this palette.
      >> See the chargen export command.
    • In a image application of your choice, change the colors of the image.
    • Update the palette with the new colors previously painted in the image file.
      >> See the chargen match command.
    • Get a image file with the colors of the palette to import (e.g. palettes download from lowspec.com).
    • Replace each color of the palette with the best match color found in the image.
      >> See the chargen import command.

Either option gives a functional new palette that is immediately available in the application.

That's it for this update. Have fun.

Files

CharGen_v0.2.zip 7 MB
Feb 21, 2023
CharGen_v0.2.tar.gz 7 MB
Feb 22, 2023
CharGen-0.2-x86_64.AppImage 9 MB
Feb 23, 2023

Get LPC Character Generator

Comments

Log in with itch.io to leave a comment.

How do you install this on Linux?

The intent is to just extract the tar.gz, and run the binary chargen.

I built the binaries for Linux with most of the libraries statically linked, in an effort to not require users to install dependencies.

However, given the Linux ecosystem I don't know of a way to unsure it will work on all platforms.

That's why in this last update I also created an AppImage file. That format also packs all the dependencies and tries to be distribution independent. To use it, just download the AppImage file, make it executable and run it (no need to install anything):

$ chmod a+x CharGen-0.2-x86_64.AppImage

$ ./CharGen-0.2-x86_64.AppImage

  Hope this helps