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

# npc.getdefaultradiusd

```lua
npc.getdefaultradiusd()
```

|                         |                                                                                 |
| ----------------------- | ------------------------------------------------------------------------------- |
| id                      | `0x02B2`                                                                        |
| arguments               | 0                                                                               |
| result                  | float: goes to the very next call, or to `npc.lua(npc.getdefaultradiusd(), fn)` |
| in NPC Kit              | yes                                                                             |
| measured from a kit NPC | returns                                                                         |
| vanilla scripts         | 150 calls in 32 of 1114 scripts                                                 |

## What it does

Gives the radius of the NPC's body as its model authors it. Despite the name it is not a depth: it returns exactly what [getdefaultradiusw](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getdefaultradiusw.md) returns (the model holds one radius; inside a town, its town value). A result; `0.0` with no model.

## Result

The radius, a float, for the call right after, as its first argument.

## Timing

Returns at once.

## In NPC Kit

Use [getdefaultradiusw](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getdefaultradiusw.md): same value, and vanilla uses `getdefaultradiusd` only inside `setradius_221(getdefaultradiusw() * 0.8, getdefaultradiusd() * 0.8)`, a form a recorded script can't write (a result goes only to the next call's first argument). Not tested on a kit NPC.

## Used with

* [setradius\_221](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/setradius_221.md), [getdefaultradiusw](https://fehdead.gitbook.io/npc-kit/vm-reference/calls/getdefaultradiusw.md).

## Example

Vanilla's `setradius_221(getdefaultradiusw() * 0.8, getdefaultradiusd() * 0.8)` can't be recorded. What can: the model's radius straight into the first argument, a literal for the second.

```lua
init = function()
    -- ... bind and motions ...
    npc.setradius_221(npc.getdefaultradiusd(), 0.6);   -- width from the model, depth 0.6
    -- ...
end,
```

## Pitfalls

* In `npc.lua(npc.getdefaultradiusd(), fn)` the float arrives cut to an integer (`0.75` is `0`).
