> For the complete documentation index, see [llms.txt](https://fehdead.gitbook.io/npc-kit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fehdead.gitbook.io/npc-kit/api/script-calls.md).

# Script Calls

**`npc.<name>(...)` is one call of the game's script VM, by the same name as in an EBP.**

```lua
init = function()
    npc.setpos2(29.36, -9.0, 68.65);
    npc.show();
end,
```

The kit knows 1915 calls. The names and what each one does are those of the game's VM call targets:

{% content-ref url="<https://fehdead.gitbook.io/ffxii-modding-guide/modding/resources/vm-call-targets>" %}
<https://fehdead.gitbook.io/ffxii-modding-guide/modding/resources/vm-call-targets>
{% endcontent-ref %}

The models, text tags and item ids the calls take are in [References](https://fehdead.gitbook.io/npc-kit/references.md).

***

### Arguments

Arguments are integers and floats:

* `0` / `1` for a bool
* hex is an integer: `0x006E0019`
* another NPC of the script, where an EBP writes an actor's name: `npc.actor("id")` ([Other NPCs](https://fehdead.gitbook.io/npc-kit/api/other-npcs.md))

### A call's result

A call's result goes to the very next call, as its first argument:

```lua
npc.setwalkspeed(npc.getdefaultwalkspeed())
```

Anything else fails at `npc.add`. To use a result in Lua, pass it to [`npc.lua`](https://fehdead.gitbook.io/npc-kit/api/lua-during-the-game.md).

***

### Errors

These fail at `npc.add`, with a message:

* a name the kit doesn't know
* a wrong argument count
* a call outside a function of `npc.add`

{% hint style="warning" %}
**Some calls are left out.** 44 calls freeze the game, take a script variable, or touch the player's saves, and the kit doesn't have them. See [Limits](https://fehdead.gitbook.io/npc-kit/api/limits.md).
{% endhint %}
