mapedit — map editor for AgainROM, with an MCP server for agents
starter # pick a game → Map editor
mapedit -assets DIR [-map FILE | -new]
mapedit -assets DIR -mcp stdio
mapedit -assets DIR -mcp http [-mcp-address 127.0.0.1:PORT] [-mcp-new-token]
mapedit ships beside the game in every package. It opens and
writes the game's own map files and checks a map against the rules the game
applies when it loads one.
A mod is one folder in mods/ beside the starter: a
mod.toml, a Starlark entry script and data files. Tick it in the
starter and press Play. A folder packs into one mod-<id>.res.
A save remembers which mods were on.
| missions | replace a campaign mission, add guest missions and chains |
| towns | towns, tavern talks, second-game inn talks |
| items | new and changed items and weapons |
| characters | characters and guest parties |
| graphics | body sheets, weapon bodies, replaced pictures, sounds and texts |
| spells | spell damage columns |
| settings | options the player sets in the starter |
A refused file stops the launch and names the mod, the file and the line. Format: docs/MODS.md.
With -mcp the editor is an MCP server. Each tool call runs
through the visible window: the person and the agent see the same map, and
every edit is one step of the same Undo history. Without -mcp
nothing listens.
| stdio | the client starts the editor; no network listener |
| http | attach to an open window at 127.0.0.1 only, bearer token; the token and port persist in mapedit-mcp.json in the player profile |
| -mcp-pace | pause between calls, up to one minute, to watch the agent work |
| window | key pointer text frame state open save save_as |
| edit | new_map paint add_record add_drop_zone write_trigger and more, one per editor command |
| read | map records brushes trigger_items check |
{
"mcpServers": {
"againrom-editor": {
"command": "C:\\Games\\Againrom\\mapedit.exe",
"args": ["-assets", "C:\\Games\\ROM", "-mcp", "stdio"]
}
}
}
new_map {"width":32,"height":32}
paint {"plane":"terrain","value":<sand>,"radius":4,"cells":[[16,16]]}
add_record {"kind":"Player","values":{"name":"Rivals"}}
add_record {"kind":"Unit","x":12,"y":12,"values":{"class":40,"owner":<first>}}
add_drop_zone {"x":13,"y":14}
write_trigger {"name":"Victory","conditions":[…],"actions":[{"item":"a.win"}]}
check {}
save_as {"path":"C:\\Maps\\small.alm"}
Full reference: docs/MAPEDIT-MCP.md.