Write WC3 map script
wc3_write_scriptReplace the map script (war3map.j or war3map.lua) in a .w3x/.w3m file and save the edited map. Specify source path and script content.
Instructions
Replace the map script (war3map.j / war3map.lua) and save. Saves to outPath, or ".edited.w3x" beside the source if omitted.
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>",
"content": "<content>"
},
"name": "wc3_write_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapPath | Yes | Absolute path to the source .w3x/.w3m map file | |
| content | Yes | New script source text | |
| outPath | No | Output map path. Defaults to "<map>.edited.w3x". |