> 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/setmeswincaptionid.md).

# npc.setmeswincaptionid

```lua
npc.setmeswincaptionid(slot, caption)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0477`                          |
| arguments               | 2: Int, Int                       |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 4631 calls in 380 of 1114 scripts |

## What it does

Sets the caption (the name plate style) of window `slot`'s next window.

## Arguments

### `slot` (Int)

The window slot, 0 to 7.

### `caption` (Int)

`0` or below no caption; `1` to `3` a caption style; `-1` from the speaker. Vanilla: `2` and `3` most often.

## Timing

Returns at once.

## In NPC Kit

For the VM's own windows, which have no text of yours in the kit. A `dialog.amese` window shows its `speaker` as the name plate by itself.

## Used with

* [amese](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/amese.md), [aaske](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/aaske.md) in vanilla.

## Example

A kit window gets its name plate from `speaker`; leave it out for a window with none.

```lua
local overHere = [[
Over here! Yes, you, come over here for a moment.
I have something here that you will want to see.
]]

npc.lua(function(handle)
    if not dialog.amese.open {
            speaker = "NPCKit 0020",          -- the plate vanilla sets with setmeswincaptionid
            body = overHere,
            queue = true,
            onClose = function() handle.finish() end,
            onError = function() handle.finish() end
        } then
        handle.finish()
    end
end);
```
