draw_rows
Draws pixels from rows of characters and a color legend, using one character per pixel to place hand-chosen details like faces or small sprites in Aseprite.
Instructions
Draw pixels from rows of characters, like ASCII art: one character per pixel.
The compact way to place hand-chosen pixels (faces, hands, animals, handles, any detail under ~12 px), far smaller than a pixel list:
rows=["..KK..",
".KSSK.",
"KSSSSK"],
legend={"K": "#1A1C2C", "S": "#F4B41B"}Row 1 is drawn at y, its first character at x (sprite pixels). "." or a character missing from the legend leaves that pixel untouched; map a character to "#00000000" to erase. Read existing pixels back in the same format with read_rows, edit the strings, and draw them again.
Args: filename: Aseprite file to modify layer_name: Layer to draw on frame_index: Frame index starting at 1 x: Left edge of the rows (sprite pixels) y: Top edge of the rows (sprite pixels) rows: Equal-width strings, top to bottom legend: Single character -> hex colour (#RGB, #RRGGBB or #RRGGBBAA) outline: Optional hex colour for a 1 px outline around the outside of the drawn pixels (sides only, not diagonals), drawn over whatever is there, e.g. to separate an object from the scene behind it create_if_missing: Create the cel if it does not exist
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filename": "<filename>",
"layer_name": "<layer_name>",
"frame_index": "<frame_index>",
"x": "<x>",
"y": "<y>",
"rows": "<rows>",
"legend": "<legend>"
},
"name": "draw_rows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| rows | Yes | ||
| legend | Yes | ||
| outline | No | ||
| filename | Yes | ||
| layer_name | Yes | ||
| frame_index | Yes | ||
| create_if_missing | No |