export_godot_spriteframes
Make a Godot 4 SpriteFrames resource (.tres) and the sheet PNG it references, the same files as the Godot Exporter on voidless.dev/tools: one AtlasTexture per frame, named animations with fps and loop. Give frames (packed into a grid sheet) or a sheet (kept as is, grid auto-detected unless given). Each animation picks frames by index (frames or first/last) or brings its own images; with no animations every frame plays as "default". Save the PNG as .png in the folder the .tres names. For a Voidless character give asset_id: alone it exports every clip of the asset (named as in get_asset); or give each animation's frame_id (from get_asset; -1 = the base image, image_index picks one rotation view), or just a name matching one of its frames, or frames/images that are its image keys. Their images, sprite_scale and feet come from the asset, and the export puts every animation at ONE pixel scale with the feet on ONE point (video clips are drawn ~0.57x the base, so mixing them with rotations or the base otherwise changes the size). It returns the world height, px per world unit and the node scale/offset to use (_scale.json, also in the .tres metadata): set the AnimatedSprite2D's scale to node_scale (unit_px / px_per_unit) and offset as given, the same unit_px for every character, instead of guessing sizes. Images up to 2048x2048, 256 frames, 32 MB of input per call. Free: no credits.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "export_godot_spriteframes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Base file name: <name>.png and <name>_frames.tres | sheet |
| sheet | No | Instead of frames: one sprite sheet image, cut into frames row by row. | |
| folder | No | Godot folder the PNG will live in, e.g. res://sprites/hero/ | res:// |
| frames | No | Frames in order, each an image (https URL, library image key, data: URI or base64). An animated GIF counts as all its frames. | |
| columns | No | Sheet columns when frames are packed (default 8; a roughly square sheet for over 64 frames) | |
| unit_px | No | Screen px of one world unit in the game (the hero's height): the node scale is computed for it | |
| asset_id | No | A Voidless image asset. Alone: every clip of it, evened out to one scale. With animations: those with frame_id (or a name matching one of its frames) take their images, scale and feet from it; frames that are its image keys take their scale from it | |
| even_out | No | With scale data: resample each animation to one px per unit and one feet point (default). false keeps the frames and returns a GDScript helper that sets scale/offset per animation | |
| max_sheet | No | Largest sheet side in px for an asset export (4096 loads on every phone GPU); the frames are shrunk to fit | |
| animations | No | ||
| sheet_rows | No | Rows of the sheet (with sheet). | |
| px_per_unit | No | px per world unit in the base image (default: asset_id's) | |
| supersample | No | With display_height: frame px per screen px (2 keeps HD art crisp when drawn smaller) | |
| world_height | No | World height in units (default: asset_id's) | |
| sheet_columns | No | Columns of the sheet (with sheet). Omit columns and rows to auto-detect the grid. | |
| display_height | No | With asset_id: how many screen px tall the character is drawn in the game. The frames are made supersample x that (instead of the art's full size), so a whole character fits one small sheet and one reply. Omit to keep the art's size (within max_sheet) |