generate_character
Build an LPC character spritesheet as a PNG and export it for Godot, Unity, or web, with split animations and credits.
Instructions
Builds the character spritesheet and saves it as PNG.
Every result has animation_check: whether every item has every animation and, if not,
what is missing plus complete alternatives. TELL the user when complete=false.
prefer_complete=True swaps incomplete items for the closest item with every animation
(keeping the color when possible) and lists the swaps in replaced. Only use it with the
user's consent: it changes the look (e.g. apron becomes overalls).
output_dir: folder to save into (e.g. the game project's sprites folder). Inside a Godot
project the .tres gets the right res:// path; for Unity, save inside Assets/.
Default: LPC_OUTPUT_DIR or ~/lpc-characters.
items: list of {"id": "", "color": "" | ["<color 1>", "<color 2>"], "variant": ""}.
Include a body (body/body) and a head (e.g. head/heads/human/heads_human_male).
Skin items (head, ears, nose...) without a color inherit the body color.
Multi-part items (see color_parts in get_item) accept a list of colors.
body_type: male | female | muscular | pregnant | teen | child
animations: subset of walk, idle, slash, thrust, spellcast, shoot, hurt, run, jump... (default: all).
Oversized weapon/tool animations (e.g. slash_128, tool_hammer) are added automatically
when their base animation (slash, thrust...) is requested.
layout: "standard" = same layout as the site (832px wide, each animation always on the same
row; oversized animations below y=3456). It is what Godot/Unity/RPG Maker importers expect.
"compact" = only the requested animations, stacked.
split: also save pieces. True or "animation" = one PNG per animation (_anims/);
"frame" = one PNG per frame (_frames//_NN.png);
"item" = one sheet per item (_items/), for swapping outfits in-game.
Can be a list: ["animation", "frame"].
export: engine-ready files: "godot" (SpriteFrames .tres), "unity" (sliced sprites .meta,
.anim clips and an AnimatorController), "web" (JSON atlas for Phaser/PixiJS + demo page),
"site" (JSON for the generator site's "Import from Clipboard" button).
licenses: license families you accept (e.g. ["CC0", "OGA-BY"] for Steam). Items outside
them are listed in warnings. Every result has license_check (drm_safe,
share_alike_required) computed from the art actually used.
zip: also pack everything generated for this character into .zip.
Always writes _credits.txt and _credits.csv with authors and licenses of the art
used, including a ready-to-paste credits-screen statement (credits.statement).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | ||
| items | Yes | ||
| split | No | ||
| export | No | ||
| layout | No | standard | |
| filename | No | character.png | |
| licenses | No | ||
| body_type | No | male | |
| animations | No | ||
| output_dir | No | ||
| prefer_complete | No |