# Inventory

{% hint style="info" %}
When referencing assets by path they should be under `Assets/Resources` folder (or part of a package under `Assets/AirshipPackages`). This ensures they will be included in your deploy.
{% endhint %}

```typescript
// Register a new item type
Airship.Inventory.RegisterItem("WoodSword", {
    displayName: "Wood Sword",
    accessoryPaths: ["Assets/Resources/WoodSword.prefab"],
    image: "Assets/Resources/WoodSword.png",
});
```

```typescript
// Give characters a wood sword on spawn
if (Game.IsServer()) {
    Airship.Characters.ObserveCharacters((character) => {
        character.inventory?.AddItem(new ItemStack("WoodSword"));
    });
}

```

```typescript
// Observe the local character's held item
Airship.Inventory.ObserveLocalHeldItem((itemStack) => {
    if (itemStack?.itemType === "WoodSword") {
        // start wood sword logic
    }
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.airship.gg/core-package/inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
