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

# npc.setshopname

```lua
npc.setshopname(shopId)
```

|                         |                                 |
| ----------------------- | ------------------------------- |
| id                      | `0x04A9`                        |
| arguments               | 1: Int                          |
| in NPC Kit              | yes                             |
| measured from a kit NPC | returns                         |
| vanilla scripts         | 127 calls in 84 of 1114 scripts |

## What it does

Names the NPC after a shop: its name tag shows that shop's name from the game's own table. It is the shopkeeper's form of [setnpcname](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setnpcname.md).

## Arguments

### `shopId` (Int)

The shop number, a row of the game's shop table; a number past the table's end gives name id `0`. Vanilla passes one number per shopkeeper (`21` to `35` and others), or a value read from its own table.

## Timing

Returns at once.

## In NPC Kit

**Use `name` in `npc.add` instead**, as for [setnpcname](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setnpcname.md): the kit writes the name tag from that text, and `setshopname` would put the shop's dictionary name in its place. Which shop each number names has no bundled table, and the call is not tested on a kit NPC.

## Used with

* [setoverheadicontype](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setoverheadicontype.md): vanilla pairs `setshopname` with `setoverheadicontype(1)`, the shop balloon, as it pairs `setnpcname` with `0`.
* `name` in `npc.add` (`references/api.md`, `npc.add`).

## Example

The vanilla pairing, for a shopkeeper whose tag should read as the shop:

```lua
init = function()
    npc.setshopname(30);
    npc.setoverheadicontype(1);   -- the shop balloon
end,
```

## Pitfalls

* It replaces the kit's name: an NPC with both `name` and `setshopname` shows the shop's name.
