ORK Framework Logo - RPG Editor for Unity
  • ORK 4 BETA
  • Features
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK

ORK 4 Documentation

  • Getting Started
    • Welcome
    • First Steps (Unity)
  • Features
    • The Status System
    • Schematics
    • Schematic Nodes
    • Dialogue Importer
    • Variables
    • Selected Data
  • Components
    • Battle Components
    • Combatant Components
    • Control Components
    • Cursor Prefab Components
    • Game Starters
    • Interactable Components
    • Move AI Components
    • Scene Setup Components
  • Editor
    • The ORK 4 Editor
    • Sections & Sub-Sections
    • Node Editor
    • Schematic Editor
    • Asset Sources
    • Unity Overlay Toolbar
  • Section: System
    • System Settings
    • Languages
    • Organizer Types
    • Game States & Conditions
    • General Condition Templates
    • Object Pools
    • Prefab Savers
    • Scene Connections
  • Section: Controls
    • Game Controls
    • Interaction Settings
    • Player Controls
    • Camera Controls
    • Input Keys
    • Control Maps
    • Camera Positions
    • Battle Camera
  • Section: Gameplay
    • Game Settings
    • Formulas
    • Difficulties
    • Shortcut Slots & Settings
    • Custom Settings & Global Custom Settings
    • Global Machines
    • Machine Templates
  • Section: Status
    • Status Values
    • Status Effects
    • Attack Modifiers
    • Defence Modifiers
    • Abilities & Ability Developments
    • Status Developments
    • Research Trees
    • Damage Types
    • Status Bonuses & Templates
    • Status Condition Templates
  • Section: Inventory
    • Inventory Settings
    • Inventory Containers
    • Currencies
    • Items
    • AI Rulesets
    • Crafting Recipes
    • Equipment Slots & Slot Set Templates
    • Equipment & Available Equipment Templates
    • Shops
    • Loot
  • Section: Combatants
    • Combatants
    • Combatant Groups
    • Class Slots
    • Classes
    • Factions & Faction Benefits
    • Animations
    • Move AIs
    • Formations
    • Action Combos
  • Section: Battles
    • Battle Systems
    • Turn Based Battles
    • Active Time Battles
    • Real Time Battles
    • Phase Battles
    • Battle Spots
    • Battle AIs
    • Battle Actions Settings
    • Special Commands Settings
    • Target Settings
    • Target Selection Templates
    • Battle Range Templates
    • Battle Grid Settings
    • Battle Grid Highlights
    • Battle Grid Cell Types
    • Battle Grid Formations
  • Section: Content
    • Content Types
    • Music
    • Sound Templates
    • Areas
    • Teleports
    • Quests & Quest Tasks
    • Logs & Log Texts
    • Object Contents
  • Section: UI
    • UI Settings
    • UI Layers
    • UI Layouts
    • UI Boxes
    • HUDs
    • Notifications
    • Cursor Settings
  • Section: Menus
    • Start Menu
    • Save Game Settings
    • Option Categories
    • Menu Screens
    • Menu Requirements
    • Battle Menus
    • Loot Dialogues
    • Item Collection
    • Combatant Selections
    • Quantity Selections
    • Shop Layouts
  • Section: Texts
    • Text Settings
    • Formatting Settings
    • Flying Texts
    • Use Cost Display
    • Status Preview Display
    • Bonus Display
    • Status Change Display
    • Console Settings & Console Types
    • Text Codes
  • Sections: Editor
    • Editor Settings
    • Backups
    • Variables
    • Plugins
  • Scripting
    • Access Handler
    • Custom Nodes
    • Custom Save Data
    • Custom Component Save Data

ORK 4 Tutorials

  • ORK 4 Unity Quickstart Tutorials (3D)
    • ORK 4 Unity Quickstart 3D
    • 01 Initial ORK Setup
    • 02 Player Setup
    • 03 Music & Scenes
    • 04 UI System Setup
    • 05 UI Boxes
    • 06 Flying Texts
    • 07 Status Values
    • 08 Status Effects
    • 09 First Abilities
    • 10 Fighter Setup
    • 11 First Enemies & Battle AI
    • 12 Battle System Setup
    • 13 Animating Battle Start and End
    • 14 Random Battles
    • 15 Animating Actions
    • 16 Player Battle HUD
    • 17 Elemental Attacks
    • 18 Animating More Actions
    • 19 Inventory & Loot
    • 20 Equipment
    • 21 Loot, Start Equipment & Viewers
    • 22 Magic Abilities
    • 23 Caster Setup
    • 24 More Enemies
    • 25 Start Menu & Save Games
    • 26 Menu Screens
    • 27 Interactions
    • 28 Item Collectors
    • Quickstart Extended
  • Battle Tutorials
    • Adding Active Time Battles
    • Adding Phase Battles
    • Hit & Miss
    • Critical Hits
    • Cast Time
    • Grid 01: Battle Grid Setup
    • Grid 02: Highlights
    • Grid 03: Cell Types
    • Grid 04: Move Command
    • Grid 05: Scene Grid Setup
    • Grid 06: Battle Ready
    • Grid 07 Use & Affect Ranges
    • Grid 08: Better Camera Control
  • Gameplay Tutorials
    • Multiple Interaction Controllers
    • Player Group Spawn & Follow
    • Spawn Hunting Enemies
    • Gamepad Controls (Unity Input System)
    • Combined Inputs
    • Quests 01: Menu Screen
    • Quests 02: Hunting
    • Quests 03: Collect Potion Materials
    • Quests 04: Collect Equipment Materials
    • Quests 05: Quest Mark HUDs
    • Crafting 01: Menu Screen
    • Crafting 02: Materials & Recipes
    • Crafting 03: Getting Materials
    • Crafting 04: Proficiency & Critical Outcome
    • Shop
    • Inventory Containers
  • Schematics Tutorials
    • UI Animation Schematics
    • Flying Text Animation Schematics
    • HUD Conditional Schematics
  • UI Tutorials
    • Unity UI: Initial Setup
    • Unity UI: Status Value UI Setup
    • Unity UI: Status Effect UI Setup
    • Unity UI: Shortcut UI Setup
    • Unity UI: Dragging Notification
    • Unity UI: Interaction HUD
    • Unity UI: Shortcut HUD
    • Unity UI: Turn Order HUD
    • Unity UI: Cast Time HUD
    • Unity UI: Quest HUD
    • Unity UI: Tooltip HUD
    • Unity UI: Move Range HUD

ORK 4 Extensions

  • Plugins
    • Save Game Compression Plugin
  • Schematic Nodes
    • Footstepper Nodes (Unity)
  • Scripts
    • A* Pathfinding Movement Component (Unity)
    • PolyNav 2D Movement Component (Unity)
    • Cinemachine Camera Control Type (Unity)
    • Rewired Input Key (Unity)
    • Unity Legacy Input Key (Unity)
    • Core GameKit Wrapper (Unity)
    • Pool Boss Wrapper (Unity)
View Categories
  • Guide
  • ORK 4
  • ORK 4 Tutorials
  • ORK 4 Unity Quickstart Tutorials (3D)

21 Loot, Start Equipment & Viewers

In this tutorial we’ll continue our equipment setup.

With all equipment for this game set up, we’ll now add a loot table to get it dropped by enemies, set up the player’s start equipment and add an Equipment Viewer to the player’s prefab.

We’ll set up:

  • loot
  • available and start equipment for the player
  • equipment viewer on the two player combatant prefabs

Let’s get to it!

Loot #

We’ll add more loot to get random equipment from harder enemies (we’ll add them later).

We’ve already set up loot before, so let’s jump right into it.

Open the ORK editor, navigate to Inventory > Loot and add a new loot setup.

Random Weapon #

We’ll give a random weapon, but this time we’ll use a different setup.

  • Name
    Set to: Random Weapon

Loot Table 0 #

Click on Add Loot Table.

  • Draw Type
    Select: Random
  • Use Chance Selection
    Enable
    Instead of selecting an item randomly and using it’s chance check, this’ll calculate a chance and check the added items one after the other, adding their chance.
    E.g. random chance is 30:
    First item has 5% chance and fails.
    2nd item has 15% chance – 5+15=20, still fails.
    3rd item has 20% chance – 20+20=40, success!

Click on Add Item.

  • Type
    Select: Equipment
  • Equipment
    Select: Sword
  • Quantity
    Select: Value > Value
    Set the value to: 1
  • Chance
    Select: Value > Value
    Set the value to: 15

Copy the Sword item.

  • Equipment
    Select: Axe
  • Chance
    Set the value to: 10

Copy the Axe item.

  • Equipment
    Select: Staff
  • Chance
    Set the value to: 5

Random Armor #

We’ll give a random armor.

Add a new loot setup.

  • Name
    Set to: Random Armor

Loot Table 0 #

Click on Add Loot Table.

  • Draw Type
    Select: Random
  • Use Chance Selection
    Enable

Click on Add Item.

  • Type
    Select: Equipment
  • Equipment
    Select: Leather Armor
  • Quantity
    Select: Value > Value
    Set the value to: 1
  • Chance
    Select: Value > Value
    Set the value to: 15

Copy the Leather Armor item.

  • Equipment
    Select: Cloth Vest
  • Chance
    Set the value to: 10

Random Accessory #

We’ll give a random accessory.

Add a new loot setup.

  • Name
    Set to: Random Accessory

Loot Table 0 #

Click on Add Loot Table.

  • Draw Type
    Select: Random
  • Use Chance Selection
    Enable

Click on Add Item.

  • Type
    Select: Equipment
  • Equipment
    Select: Poison Charm
  • Quantity
    Select: Value > Value
    Set the value to: 1
  • Chance
    Select: Value > Value
    Set the value to: 5

Copy the Poison Charm item.

  • Equipment
    Select: Stun Charm

Copy the Stun Charm item.

  • Equipment
    Select: Elemental Brooch

Player Equipment #

We’ll set up which equipment the player can equip and the start equipment.

Navigate to Combatants > Combatants and select the Fighter combatant.

Inventory & Equipment > Available Equipment #

By default, combatants will have all equipment slots and can equip all equipment – we’ll change that for our player.

  • Available Equipment
    Select: Custom

Available Equipment Slots #

Defines the equipment slots that are available to the combatant (at the start – they can be added and removed during the game, e.g. by bonuses from other equipment, status effects or via schematics).

  • All Equipment Slots
    Enable
    The combatant will have all slots.

Available Equipment #

We’ll allow all equipment except the Staff.

  • Exclude Equipment
    Enable
    The equipment defined here will be excluded from the combatant, i.e. it can’t be equipped.

Click on Add Equipment.

  • Equipment
    Select: Staff

Available Content Types #

You can also allow/exclude equipment by it’s content type.

In larger projects with many different equipment, it’s recommended to use this method for an easier setup. E.g. using different sub content types to organize your equipment, using different types for swords, axes, staves or light and heavy armor.

Inventory & Equipment > Start Equipment #

We’ll now set up the start equipment of the player – we’ll just have a sword equipped.

Start equipment can be set up for different level ranges via the Start Level and Maximum Level settings. E.g. when enemy combatants with status development can spawn with different levels in your game, you might want them to give different equipment based on that.

Click on Add Start Equipment.

  • Start Level
    Set to: 1
  • Maximum Level
    Set to: 10

Click on Add Equipment Slot.

  • Equipment Slot
    Select: Weapon
  • Equipment
    Select: Sword

Save Changes #

That’s it for the editor setup.

Save the changes using the Save Settings button at the bottom of the editor.

Equipment Viewer #

We’ll now add an Equipment Viewer component to the prefabs of our two player combatants (we’ll add the 2nd one later) to show the equipped weapon during battles.

You can find the player prefabs in Assets/Tutorial Assets/Prefabs/Combatants/Player/ – we’ll change the Warrior and Wizard prefabs, but feel free to also change the rest of the player prefabs in this folder (e.g. if you want to add more player combatants later).

Open the Warrior prefab for editing.

The weapon’s Equipment Viewer component is added to the Weapon child object, you can find it under:

CharacterArmature > Root > Body > Hips > Abdomen > Torso > Shoulder.R > UpperArm.R > LowerArm.R > Fist.R > Fist1.R > Weapon.R > Weapon

The placement is the same on all player prefabs.

Add an Equipment Viewer component to the Weapon object using the component menu. Change the following settings in the inspector.

Equipment Viewer Settings #

  • Equipment Slot
    Select: Weapon

Display Conditions #

The weapon will only be displayed in battles.

  • Only In Battle
    Enable

The weapon will already be shown during the battle start schematic, i.e. when zooming in on the player he’ll already hold the weapon in hand.

Using a game state instead would allow us more control over when to show the weapon in and out of battle (e.g. only after loading the battle scene), but this setup is good enough for us.

Equipment Preview #

You can use these settings to preview how equipment will be placed.

And that’s it for the prefab – save the changes and close editing the prefab.

Repeat the same setup for the Wizard prefab (and other player prefabs if you want).

Tip!

You can copy/paste whole components and their setup!

Right/context-click on the header of the component and select Copy Component in the context menu.

Select another object (e.g. the Weapon on the Wizard prefab) and right/context-click on one of the available component headers (e.g. Transform) and select Paste Component as New in the context menu.

The copied component will be added with the same setup.

Testing #

Hit play and start a battle.

The weapon is displayed in battles – and we’re doing more damage due to the ATK bonus of the sword.

If an equipment’s positioning isn’t to your liking, you an adjust that in the equipment’s prefab settings (there are Position Offset and Rotation Offset settings for that).

 

Next, we’ll add magic and support abilities that’ll be used by our 2nd player and harder enemies.

Table of Contents
  • Loot
    • Random Weapon
      • Loot Table 0
    • Random Armor
      • Loot Table 0
    • Random Accessory
      • Loot Table 0
  • Player Equipment
    • Inventory & Equipment > Available Equipment
      • Available Equipment Slots
      • Available Equipment
      • Available Content Types
    • Inventory & Equipment > Start Equipment
  • Save Changes
  • Equipment Viewer
    • Equipment Viewer Settings
    • Display Conditions
    • Equipment Preview
  • Testing
Sitemap
  • ORK 4 BETA
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • API
  • ORK 2 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get ORK
  • Contact
  • Blog
  • Makinom
  • gamingislove.com
Categories
  • News (73)
  • ORK 2 (137)
    • Tutorial (137)
      • Game tutorial (50)
      • Gameplay (32)
      • How-to (55)
  • Release (156)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!