Another crucial part of most games – stuff to wear. ORK Framework gives you total control over your equipment system!

Equipment Parts

Equipment parts define where a weapon or armor can be equipped. You can define as many equipment parts as you need for your system. If the part is available to a combatant is decided by it’s class and optionally by the combatant itself – this means you can have different equipment systems for different classes/combatants. You can add additional equipment parts to a combatant, either permanently (through using items and the event system) or temporarily (known passive abilities, worn equipment or applied status effects). Equipment parts are created in the ORK Framework editor: Inventory > Equipment Parts

While similar to item types, they’re used in a different way. An equipment can be equipped on multiple parts – either being equipped on all selected parts at the same time (like a two-handed sword on left and right hand), or equipping it on different parts (like a dagger on left or right hand). Equipment can define multiple equipment part sets on which it can be equipped, e.g. a two-handed sword having 2 sets, one for left and right hand and one for a secondary equipment part (2nd left/right hand) to use equipment switching.

Equipment parts are also used in equipment menus to show and separate the equipment of a combatant.

Examples for equipment parts:

  • Head
  • Left Hand
  • Right Hand
  • Armor
  • Shoes
  • Accessory

You can also prevent weapons or armor equipped on an equipment part from contributing to the wearer’s status by disabling the part’s Contribute setting. This can e.g. be used to create a secondary set of equipment that can be switched with the main (contributing) equipment – the Switch Equipment node in the event system is a convenient way to exchange equipment between parts.

Equipment

Equipment is separated into item types – see the how-to about items for details. The item type is used in inventory menus to optionally separate the equipment in a combatant’s inventory. The equipment itself is divided into weapons and armors. They are created in the ORK Framework editor in Inventory > Weapons and Inventory > Armors.

Like abilities, equipment can can have multiple levels – leveling up can be done in different ways:

  • None
    The equipment can’t be leveled up.
  • Auto
    The equipment will automatically receive experience points when the combatant receives experience points (only if equipped).
  • Spend
    The player must spend experience points on the equipment to level it up.
  • Uses (only for seapons)
    The weapon must be used a defined number of times to level up.

Like passive abilities, equipment can give a constant bonus to various  statuses:

  • Status values
  • Attack/defence attributes
  • Status effects (auto effects, immunity to effects)
  • Chances (hit, counter, block, critical, escape, steal)
  • Movement speeds (walk, run, sprint)

Additionally to status bonuses, an equipment can change the current defence attributes of a combatant (learn more about attributes in this how-to). This way, you can create special equipment like an insect armor, that will change the player’s race to insect – and thus changing the damage he will receive from attacks.

If a combatant can equip a weapon or armor can depend on certain status conditions (like a minimum level or knowing a certain ability). Furthermore, equipment can also grant access to new abilities while equipped – like a fire sword that also allows the use of a fire spell while wearing it (learn more about abilities in this how-to). If the equipment ability is available to the wearer can also be bound to status conditions (e.g. the fire sword’s fire spell is only available if the wearer has at least 35 STR).

Weapons

Both weapons and armors share the same settings, but weapons can additionally override a combatant’s base attacks, counter attack and animations. This way you can have different attacks for each weapon, and also different animations (like a different attack and run animation for a sword and a spear). You can learn more on animations in this how-to.

Making equipment available to combatants

For a combatant to be able to equip a weapon or armor, you need to activate it in the combatant’s class, or if the combatant uses it’s own equipment system, in the combatant’s settings. The settings divide the equipment into available and unavailable equipment. Available equipment is available due to the combatant/class equipment part settings – you can also activate unavailable equipment, because they might be available later in the game due to additional equipment parts.

Whenever you add a new weapon or armor – or copy an existing one – you need to activate the new equipment in the class/combatant equipment settings!

Equipment Viewer

You can use the Equipment Viewer component to display the equipment of a combatant in the running game.

Use the ORK Scene Wizard to add an equipment viewer to the appropriate child object of your combatant’s prefab: Add Component > Equipment Viewer

howto_equipment1

The equipment viewer uses the weapon’s or armor’s Viewer Prefab to display it on the game object. To match more complex equipment (like trousers or sleeves of an armor) to the game object’s movement, you can use child linking to link child objects of the equipment to child objects of the combatant’s game object.

The viewer displays the current equipment of a selected equipment part. If the equipment will be displayed in a certain game state (e.g.  in the field, in battles, in events) can be set up by the equipment viewer’s game state conditions (you can learn more about them in this how-to). This way, you can only display the player’s weapon while he is fighting in a battle.

Tip!

Having trouble positioning your Equipment Viewers on your combatant’s prefab to look good? Here’s how to do this quick and easy!

  • Play your game.
  • Hit pause when your player (or whatever combatant you’re having trouble with) is displayed.
  • Change the equipment viewer(s) settings to always be displayed (i.e. set all Game States to Ignore).
  • Unpause the game.
  • Your equipment will now be displayed.
  • Pause the game again.

Now, you can move and rotate the equipment viewer(s) until it looks the way you want it to. Once you’re satisfied, write down the position and rotation of the equipment viewer(s).

You can now end the game and change the equipment viewers on your combatant’s prefab with the settings you just found out.

And remember – you can always change the combatant’s start equipment if you want to display some special equipment.