> 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/vm-reference/calls/stdmotionread.md).

# npc.stdmotionread

```lua
npc.stdmotionread(package)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0118`                          |
| arguments               | 1: Int                            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 1998 calls in 282 of 1114 scripts |

## What it does

Loads one of the model's motion packages, the set of motions `stdmotionplay_2c2` plays from. It starts the load and returns; [stdmotionreadsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionreadsync.md) waits for it.

## Arguments

### `package` (Int)

The package, 0 to 23. Which ones a model ships is in its `data/model-*.csv` row: each `True` column is a package, in this order (full table in `references/staging.md`, Motion packages: what `stdmotionread(n)` loads):

| `package` | what                                                                    |
| --------- | ----------------------------------------------------------------------- |
| 0         | the base package (`Battle Area` column)                                 |
| 1–15      | unarmed and one per weapon stance                                       |
| 16–21     | the town packages; 16 is the standing NPC set, 18 holds seated postures |
| 22        | riding                                                                  |

Vanilla: `16` (1,043 calls), `1` (202), `18` (126), `21` (120), `17` (109), `0` (55), `19` (38).

## Timing

Returns at once; the package loads in the following frames.

## In NPC Kit

* A package the model doesn't ship loads nothing, and the NPC stands in a silent T-pose.
* Package 16 is not a given: of the game's 174 NPC model files, 76 ship it. A monster model that ships package 1 ships 1 to 15 (the Wolf example uses `1`). Check the CSV row.

## Used with

* [stdmotionreadsync](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionreadsync.md) right after, always.
* [stdmotionvariation](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionvariation.md): a posture of the package (sitting with 18).
* [stdmotionplay\_2c2](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/stdmotionplay_2c2.md)`(0x01000000, 0)`: the idle of the new package.
* [setautorelax](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setautorelax.md)`(1)`: the NPC stands as soon as the package is in.

## Example

```lua
-- change stance in a scene: another package, then its idle
npc.stdmotionread(3);                    -- the sword package, on a model that ships it
npc.stdmotionreadsync();
npc.stdmotionplay_2c2(0x01000000, 20);
```

## Pitfalls

* Check the model's CSV row before picking a package: a `False` column is a T-pose.
