Table of Contents

Method Create

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

Create(string, Location, bool, int, string?)

Creates a new item from a template ResRef.

public static NwItem? Create(string template, Location location, bool useAppearAnim = false, int stackSize = 1, string? newTag = null)

Parameters

template string

The item template (.uti) to use.

location Location

The world location for the created item.

useAppearAnim bool

If true, whether an appear animation should play for the item.

stackSize int

The stack size of the created item.

newTag string

A new tag for the item, otherwise the value set in the blueprint.

Returns

NwItem

The created item.

Create(string, NwGameObject?, int, string)

Creates a new item from a template ResRef.

public static Task<NwItem?> Create(string template, NwGameObject? target = null, int stackSize = 1, string newTag = "")

Parameters

template string

The item template (.uti) to use.

target NwGameObject

The target inventory for the created item.

stackSize int

The stack size of the created item.

newTag string

A new tag for the item, otherwise the value set in the blueprint.

Returns

Task<NwItem>

The created item.