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

# npc.setlod

```lua
npc.setlod(level)
```

|                         |                                   |
| ----------------------- | --------------------------------- |
| id                      | `0x0160`                          |
| arguments               | 1: Int                            |
| in NPC Kit              | yes                               |
| measured from a kit NPC | returns                           |
| vanilla scripts         | 2266 calls in 226 of 1114 scripts |

## What it does

Fixes the NPC's model level of detail, or (`-1`) lets it follow the camera's distance again.

## Arguments

### `level` (Int)

`-1` follows the distance; `0` or more fixes it from that level. Vanilla: `1` (1,297 calls), `-1` (937), `7`, `2`, `5`.

## Timing

Returns at once.

## In NPC Kit

The kit examples leave it alone. Which level gives which detail on a given model is not confirmed here.

## Used with

* [camerastart\_7e](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/camerastart_7e.md): close shots.

## Example

Full detail fixed for a close shot, back to following the distance after.

```lua
local whisper = [[
Closer, come closer. I'll whisper it to you now,
because the walls of this city have many ears.
]]

talk = function()
    talkOpen();
    npc.setlod(0);
    npc.camerastart_7e(0, npc.camera("npckit_0020"));
    npc.lua(function(handle) say(handle, whisper) end);
    npc.cameraclear();
    npc.setlod(-1);
    talkClose();
end,
```

## Pitfalls

* Which level is the most detailed on a model is not confirmed: compare `0` and `1` in the game.
