Asset tools¶
GodotMaker generates and processes 2D art through small Python helper scripts.
/gm-asset calls the primary tools automatically. Manual calls are for
debugging one source, one action sheet, or one curation decision.
Primary pipeline tools:
asset_source_generate.pyasset_layout_guide.pyasset_action_process.pyasset_action_manifest_entry.pyasset_sheet_process.pyasset_curation_select.pyasset_curation_manifest_entry.py
asset_source_generate.py¶
asset_source_generate.py generates API-backed source images from a JSON spec.
It supports Gemini, OpenAI, and xAI Grok selectors. Runtime-native native and
codex image generation is selected by /gm-asset, not this script.
Provider-prefixed selectors require the matching key: GOOGLE_API_KEY /
GEMINI_API_KEY for Gemini, OPENAI_API_KEY for OpenAI, and XAI_API_KEY for
Grok. To choose which provider /gm-asset uses, set asset_image_model in
../06-configuration/project-config.md.
Manual entry point:
The spec contains the asset id, model selector, prompt, prompt path, source path, size, aspect ratio, reference images, and report path.
asset_layout_guide.py¶
asset_layout_guide.py creates layout-only guides for fixed-grid source
images. Use it for UI component sheets, icon packs, compact prop packs, and
action sheets.
Manual entry point:
python tools/asset_layout_guide.py \
--out <guide.png> \
--rows <rows> \
--cols <cols> \
--labels <labels>
The guide controls slot count, centering, and safe padding for image generation. It is not runtime art.
asset_sheet_process.py¶
asset_sheet_process.py splits non-character 2D source sheets into cropped
candidates and writes a curation report. It supports transparent sheets and
solid magenta #FF00FF sheets through --background magenta.
Use it for icon packs, compact prop packs, UI component sheets, and other non-character source sheets.
Required decisions:
--grid <COLSxROWS>--names <comma-separated names>--snap-mode autoslicefor separated objects--snap-mode gridfor strict cell grids--component-mode largestfor compact UI/icon/prop cells with stray fragments
Manual entry point:
python tools/asset_sheet_process.py \
--source <source.png> \
--out-dir <curation_dir> \
--grid <COLSxROWS> \
--names <names> \
--snap-mode <autoslice|grid> \
--report <report.json>
asset_action_process.py¶
asset_action_process.py processes character, enemy, NPC, summon, and animated
prop action sources. It writes normalized frame PNGs, sheet-transparent.png,
animation.gif, pipeline-meta.json, and an intermediate curation report.
Required decisions:
--kind bodyfor body-only character actions--kind fxfor detached effects--grid <COLSxROWS>--names <comma-separated frame names>--align feetor--align bottomfor grounded body actions--align centerfor floating actions and detached effects--scale-reference-metadata <pipeline-meta.json>for later body actions
The tool rejects action frames that touch source cell edges. Its --final-dir
and --final-prefix options only copy processed frames and the delivery grid
sheet into runtime paths; they do not assemble mixed atlases or row strips.
Manual entry point:
python tools/asset_action_process.py \
--source <action_source.png> \
--out-dir <processed_dir> \
--grid <COLSxROWS> \
--names <frame_names> \
--kind <body|fx> \
--final-dir <runtime_dir> \
--final-prefix <asset_id>
For later body actions, add:
asset_action_manifest_entry.py¶
asset_action_manifest_entry.py turns one processed action
pipeline-meta.json plus its character_action_source entry into a
character_frame_output manifest entry.
Manual entry point:
python tools/asset_action_manifest_entry.py \
--metadata <processed_dir>/pipeline-meta.json \
--source-entry <character_action_source_entry.json> \
--asset-id <frame_output_asset_id> \
--project-root . \
--out <frame_output_entry.json>
Upsert the generated entry with asset_generation_manifest_update.py.
asset_curation_select.py¶
asset_curation_select.py selects one candidate from a curation report and
finalizes it into a runtime asset path.
Manual entry point:
python tools/asset_curation_select.py \
--report <report.json> \
--candidate <candidate_id_or_name> \
--final-path <final_path> \
--asset-id <final_asset_id> \
--project-root .
The tool updates the report status to selected, stores the candidate's final
path, and prints the same finalize metadata as asset_image_finalize.py.
asset_curation_manifest_entry.py¶
asset_curation_manifest_entry.py turns one selected curation candidate plus
its source-sheet manifest entry into a validated runtime manifest entry.
Manual entry point:
python tools/asset_curation_manifest_entry.py \
--report <report.json> \
--source-entry <source_sheet_entry.json> \
--candidate <candidate_id_or_name> \
--asset-id <final_asset_id> \
--project-root . \
--out <final_asset_entry.json>
Upsert the generated entry with asset_generation_manifest_update.py.
Calling these by hand¶
You usually do not need to run these scripts directly. /gm-asset orchestrates
them based on ASSETS.md and the source-generation manifest.
Manual use cases:
- Generate one source image from a tweaked spec.
- Create one layout guide for a fixed-grid source.
- Process one character action sheet while debugging animation output.
- Build one character frame-output manifest entry from action metadata.
- Test a provider, size, or aspect ratio before a full
/gm-assetrun. - Process one source sheet while debugging extraction.
- Select one extracted candidate into a runtime asset path.
- Build one runtime manifest entry from a selected curation candidate.
If you want to update visual targets used by /gm-evaluate, re-run
/gm-asset rather than editing generated images directly.