---
description: >-
  The new weapon wizard creates weapon items and special weapon handle prefabs
  that ensure a weapon is in the correct orientation when equipped.
---

# New Weapon Wizard

{% embed url="https://youtu.be/xnlPVCeMfnE" %}

## Accessing the Wizard

The new weapon wizard requires that one of your game scenes with either a GameManager or SceneConfig object is open in the editor so that it can determine which game to install the content into.

The New Weapon Wizard can be opened by clicking _Tools_ in the menu bar, and selecting _AnyRPG > Wizard > New Weapon Wizard_.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FihkHwPCs2sOKvQ2qFM8g%2Fimage.png?alt=media\&token=ce3ac2fc-3bd7-47d3-a79d-420c78e9716b)

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FsV9TPMdTkLCrmd3TDmnd%2Fimage.png?alt=media\&token=f596c4c9-0247-4480-8f5a-2388724bb7cd)

## Settings

| Name                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Game Name                    | The name of the game in your Unity project to install the template content in.  This will be automatically filled in if you have any scene with the GameManager or SceneConfig prefabs open.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| Weapon Prefab                | Drag an FBX or prefab into this slot, and that model will be used as the weapon model.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Weapon Name                  | The weapon name that will appear in tooltips, vendor lists, loot windows, etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Icon                         | The image to be used to represent the weapon in the inventory, character screen, vendor lists, loot windows, etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Weapon Slot Type             | <p><strong>Main Hand Only</strong><br>This weapon can only be equipped in the main hand slot.  Any other valid weapon can still be equipped in the off hand slot.<br><strong>Off Hand Only</strong><br>This weapon can only be equipped in the off hand slot.  Any other valid weapon can still be equipped in the main hand slot.<br><strong>Any Hand</strong><br>This weapon can be equipped in the main hand or off hand slot.  Any other weapon can be equipped in the other slot.<br><strong>Two Hand</strong><br>This weapon takes up both hands.  It will appear in the main hand slot, and remove any other weapon that is equipped in the off hand slot.</p> |
| Weapon Type                  | The weapon type setting controls which animations and effects will be played when the weapon is used in combat.   It will also determine which attachment point the weapon is attached to when it is sheathed on the character.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Asymmetrical Weapon          | Most weapons are symmetrical and will look the same if held in the main hand or off hand.  For asymmetrical weapons such as claws, this should be set to true and separate handle prefabs will be created for the left and right hands.                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Projectile Name              | The base name that will be assigned for the projectile prefabs and prefab profiles. Leave this blank if the weapon is not ranged.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Projectile Prefab            | A Prefab to use for the projectile if this is a ranged weapon.  Leave this blank if the weapon is not ranged.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Use Projectile In Animations | For ranged weapons only.  Should the projectile be shown during attack animations such as pulling an arrow from the quiver and drawing the bow string.  This should not be checked if the ranged weapon does not have a special projectile prefab.  In that case, the default projectile settings from the weapon type will apply.                                                                                                                                                                                                                                                                                                                                    |
| Use Projectile In Abilities  | For ranged weapons only.  Should the projectile be shown during flight to the target after the attack animation is finished. This should not be checked if the ranged weapon does not have a special projectile prefab.  In that case, the default projectile settings from the weapon type will apply.                                                                                                                                                                                                                                                                                                                                                               |

## Content Created

After choosing all the settings, click Create to run the wizard.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2F3LUacZHE64eDjz1G2Dls%2Fimage.png?alt=media\&token=36c4bb0d-fd4c-4b9c-89c2-f197a7a6e819)

The following content will be created.

### Weapon Handle Prefab

Weapon handle, projectile handle, and projectile prefabs can be found in the _GameName/Prefab/Handle/Weapon_ folder.  The weapon handle is a convenient prefab that contains the weapon model along with a handle that is a visual indicator to help set the correct scale (size) and rotation so that the weapon will look good when held or sheathed.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FwqAYMvY9HHFudXOZ6o07%2Fimage.png?alt=media\&token=2e48ff80-ad23-4189-8054-83246bc89049)

### Prefab Profiles

Prefab profiles, a type of scriptable object that contains the link to the prefab, can be found in the _Gamename/Resources/GameName/PrefabProfile/Weapon_ folder.

### Weapon Item

The weapon item Scriptable Object can be found in the _GameName/Resources/GameName/Item/Equipment/Weapon_ folder.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FhsDDEwoStPK3lD7a78Cu%2Fimage.png?alt=media\&token=26e7e354-84e1-4388-b451-990fe0555558)

## Adjusting the Weapon Handle

### Weapons

The handle object in the weapon handle prefab is a visual indicator that shows what the size and orientation of the weapon should be when gripped in a character's hand. The blue (z) axis is the forward direction of the hand, the yellow (y) axis is the top of the hand, and the red (x) axis is the right side of the hand.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FErFdeJTw5XhioFsbAS4y%2Fimage.png?alt=media\&token=0fa91b9d-e6e1-4add-bea0-0336d172abdf)

Set the scale of the weapon model larger or smaller if necessary until the handle looks about the right size in relation to it.  You can imagine that if gripped, the handle would fit perfectly in a fist.

Set the rotation and position of the weapon model so that it would look correct if the handle was gripped in a hand with the character's arm straight in front of them.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FjacM8O1AoK5qpXjmvLJ5%2Fimage.png?alt=media\&token=90372dc3-97f3-4377-b457-a0208ab1ebf9)

Disable the Handle object so that it is not visible, and save the changes to the weapon handle prefab.

### Projectiles

The steps for projectiles are similar to the steps for weapons.  When you open the prefab, you will see a sample projectile that represents the correct position and rotation.

![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FA09zl077TMcsC0bhKTXi%2Fimage.png?alt=media\&token=f6f11b4e-64cc-4684-aad0-d2881d83eb35)

Align the projectile so it matches the position and rotation of the sample projectile, then disable all other objects in the prefab so only the projectile is visible, and save the changes.\
![](https://2976860065-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx7Nd93HqSNPpv2JhrViE%2Fuploads%2FEQ9LMXC0408qIUazEtJt%2Fimage.png?alt=media\&token=e7d622fc-cdd6-47ed-bd36-34b82ae6ffa3)

## Next Steps

To make the weapon available in game you may want to take any of the following actions.

* Configure the weapon by adding an item quality, setting a purchase price, or requiring a specific weapon skill to equip the weapon.
* Add the weapon to the default equipment for a character class or specialization.
* Add the weapon to a vendor collection and make it available on a vendor to purchase.
* Add the weapon to a loot table so it can be obtained by defeating an enemy.
