Documentación del formato AVS del editor de personajes

AVS files used by the old 16-bit Comic Chat character editor are just plain PNG files with some metadata at the end. I figured out the file format and wrote a proof of concept bash script, avs.sh, that can create well formed AVS files compatible with the editor. Read the source code of avs.sh to learn how to use it then test it with the sample project. The structure of an AVS file is detailed below.

PNG part

The PNG image has no alpha channel or color index, although it won't complain if you do use indexed images (16 or 256 colors only). Comic Chat admits high density color images just fine, but it was common back in the day to use only 256 colors to reduce the file size of compiled characters.

A Comic Chat character has fixed width, height and number of poses. The image is a sprite sheet with the following structure:

Metadata

Metadata begins immediately after the end of PNG data. All strings are right aligned by default and all numbers are padded with zeroes.

Metadata, part 1 (640 bytes)

Poses (62 bytes per pose)

Poses must be defined in the exact same order that their graphics are defined in the PNG sprite sheet.

Metadata, part 2 (544 bytes)