# Weapon

## Creation

To create a weapon, find (or create) the *GameName/Resources/GameName/Item/Equipment* folder (or any subfolder) in the project tab and right click.  Choose *Create > AnyRPG > Inventory > Equipment > Weapon*.

## Properties

In addition to the properties shared by all [Equipment](/scriptable-objects/items/equipment.md), weapons have the following unique properties.

| Name                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Require Weapon Skill          | If true, the character must have a skill that matches the name in the *Weapon Type* field to use or equip this weapon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Weapon Type                   | The name of a [Weapon Skill](/scriptable-objects/weapon-skill.md).  This filled in, the weapon can get some default properties from the skill.  If *Require Weapon Skill* is true, the character will need to know this skill to equip and use the weapon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Default Hit Effects           | A list of [Ability Effects](/architecture/ability-system/ability-effects.md) that will be cast on the target when the weapon does damage from a standard (auto) attack.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| On Hit Effects                | A list of [Ability Effects](/architecture/ability-system/ability-effects.md) that will be cast on the target when the weapon does damage from any attack, including a standard (auto) attack.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| Animation Profile Name        | An [Animation Profile](/scriptable-objects/animation-profile.md) that can overwrite default animations to match the weapon.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Default Hit Audio Profile     | An [Audio Profile](/scriptable-objects/audio-profile.md) that contains a link to an audio clip that can be played whenever any physical [Ability](/scriptable-objects/abilities.md) is cast while this weapon is equipped.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Use Weapon Type Objects       | If true, any objects in the *Ability Animation Object List* and *Ability Object List* from the *Weapon Type* will be shown (held) when using this weapon to perform an attack.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Ability Animation Object List | <p>A list of physical prefabs to attach to the character unit when this weapon is being animated during an attack. This could be arrows, special spell or glow effects, etc.<br><strong>Holdable Object Name</strong><br>The name of a <a href="/pages/eLtR6SVz1RG8X6hAuWNm">PrefabProfile</a> that contains a link to a GameObject.<br><strong>Use Universal Attachment</strong><br>If true, attachment points from the <a href="/pages/eLtR6SVz1RG8X6hAuWNm">PrefabProfile</a> will be ignored, and the universal attachment in the <em>Attachment Name</em> field will be used.<br><strong>Attachment Name</strong><br>The <em>Node Name</em> field from one of the <em>Attachment Point Nodes</em> in an <a href="/pages/gl9O9NAYYwGSxo7t70iu">Attachment Profile</a>.</p> |
| Ability Object List           | <p>A list of physical prefabs to use when this weapon is being used after the animation phase of an attack. This could be arrows, special spell or glow effects, etc.<br><strong>Holdable Object Name</strong><br>The name of a <a href="/pages/eLtR6SVz1RG8X6hAuWNm">PrefabProfile</a> that contains a link to a GameObject.<br><strong>Use Universal Attachment</strong><br>If true, attachment points from the <a href="/pages/eLtR6SVz1RG8X6hAuWNm">PrefabProfile</a> will be ignored, and the universal attachment in the <em>Attachment Name</em> field will be used.<br><strong>Attachment Name</strong><br>The <em>Node Name</em> field from one of the <em>Attachment Point Nodes</em> in an <a href="/pages/gl9O9NAYYwGSxo7t70iu">Attachment Profile</a>.</p>        |
| Add Scaled Damage Per Second  | If true, automatic damage per second is added to any attack, based on the item level, item quality, and Weapon DPS Per Second setting in the Game Manager.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Base Damage Per Second        | Base weapon damage per second, unscaled.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

## Next Steps

* Configure a [Unit Profile](/scriptable-objects/unit-profile.md)'s *Equipment Name List* to provide this weapon to newly created characters.
* Configure a [Character Class](/scriptable-objects/character-class.md)' *Equipment Names* list to provide this weapon to newly created characters of that class.
* Configure a [Character Race](/scriptable-objects/character-race.md)'s *Equipment Names* list to provide this weapon to newly created characters of that race.
* Configure a [Class Specialization](/scriptable-objects/class-specialization.md)'s *Equipment Names* list to provide this weapon to a newly created characters of that specialization.
* Add a weapon to a [Loot Table](/scriptable-objects/loot-table.md) so that it can drop when an enemy is defeated.
* Add a weapon to a [Vendor Collection](/scriptable-objects/vendor-collection.md) and make it available on a vendor.
* Add a weapon to an [Equipment Set](/scriptable-objects/equipment-set.md) to give it unique set bonuses when one or more pieces of a set are equipped.
* Add a weapon as an output to a [Recipe](/scriptable-objects/recipe.md) so that it can be crafted.


---

# 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.anyrpg.org/scriptable-objects/items/weapon.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.
