validate_lua_power_draft
Validate a draft Lua script against the local Nightbreak Forge Lua validator. Use this before finalizing generated Lua files to catch unknown helpers, invalid fields, or malformed file structure. IMPORTANT: pass script_type matching the file you are generating. Use "lua-power" (default) for EliteMobs custom-boss Lua powers (files in powers/), "fmm-script" for FreeMinecraftModels prop scripts (files in scripts/), "npc-script" for EliteMobs NPC scripts (files in npc_scripts/), "mind-behavior" for Mind programs and modules (files in behaviors/), "fmm-pet-behavior" (FreeMinecraftModels pet behavior modules in pet_behaviors/, id fmm:pet/<file name>; loaded from FMM 2.13.0), or "em-enchantment-script" / "fmm-enchantment-script" for EliteMobs or FreeMinecraftModels enchantment scripts (files in enchantments/). They have different valid hook names and context namespaces — passing the wrong type produces false-positive errors (e.g. on_right_click is valid for fmm-script, on_npc_interact for npc-script, but both are rejected for lua-power).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional path such as "powers/example.lua" or "scripts/fireball_wand.lua" for reporting context. | |
| content | Yes | Full Lua script file content to validate. | |
| script_type | No | Which validator ruleset to apply. `"lua-power"` for EliteMobs boss powers, `"fmm-script"` for FMM prop scripts, `"npc-script"` for EliteMobs NPC scripts, `"mind-behavior"` for behaviors/ programs and modules, `"fmm-pet-behavior"` (FreeMinecraftModels pet behavior modules in `pet_behaviors/`, id `fmm:pet/<file name>`; loaded from FMM 2.13.0). Defaults to `"lua-power"`. |