Place a unit/item
wc3_place_unitPlace a unit or item on a Warcraft III map at specified coordinates using a 4-character raw code. Saves the edited map to a new file.
Instructions
Add a preplaced unit or item to the map at world coordinates (x, y). The type is a 4-char raw code, e.g. "ugho" (Ghoul), "hfoo" (Footman), or an item code. Saves to outPath, or ".edited." beside the source (pass the source path to overwrite in place).
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": {
"mapPath": "<mapPath>",
"type": "<type>",
"x": "<x>",
"y": "<y>"
},
"name": "wc3_place_unit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapPath | Yes | Absolute path to the source .w3x/.w3m map file | |
| type | Yes | 4-char unit/item type code, e.g. "ugho" | |
| x | Yes | World X coordinate | |
| y | Yes | World Y coordinate | |
| z | No | World Z (height); default 0 | |
| facing | No | Facing angle in degrees; default 270 | |
| player | No | Owner: 0-based player slot (0 = Player 1/Red). Default 0 | |
| scale | No | Uniform scale; default 1 | |
| variation | No | Model variation; default 0 | |
| hitpointsPercent | No | HP as a percent, or -1 for default | |
| manaPercent | No | Mana as a percent, or -1 for default | |
| skin | No | Reforged skin code; defaults to `type` | |
| outPath | No | Output map path. Defaults to "<map>.edited.<ext>". |