Method Create
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
templatestringThe item template (.uti) to use.
locationLocationThe world location for the created item.
useAppearAnimboolIf true, whether an appear animation should play for the item.
stackSizeintThe stack size of the created item.
newTagstringA 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
templatestringThe item template (.uti) to use.
targetNwGameObjectThe target inventory for the created item.
stackSizeintThe stack size of the created item.
newTagstringA new tag for the item, otherwise the value set in the blueprint.