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 Documentation
  • Scripting

Access Handler

The Access Handler is used to funnel some of ORK’s functionality through overridable functions.

This allows you to inject custom functionality, like creating a combatant, adding an item to an inventory or using a battle action. A custom access handler can e.g. be used to collect analytics data, use client/server communication or redirect ORK’s functionality to custom systems.

You can create custom handlers by extending the AccessHandler classes and overriding the functions you want to replace. The available functions are divided into different sub-handlers for actions, battles, combatants, groups and inventories. Each sub-handler contains the overridable functions for their thematic topic, e.g. the inventory access handler manages inventory changes like adding or removing an item.

The access handler mainly handles functionality that is caused by the player and will be extended in future updates. If there’s a functionality you need to be funneled through the access handler, be sure to let me know, e.g. in the support forum.

 

You can download a custom access handler for you to build upon, details about the different classes and their use below:

Download Custom Access Handler

Access Handler #

The AccessHandler class holds the sub-handlers for actions, combatants, groups and inventories. To add a custom access handler, create a new class extending the AccessHandler class.

The constructor needs to create instances of the sub-handlers, either using the default handlers or your custom handlers. The sub-handlers contain the overridable functions.

The EditorSettingInfo attribute added to the class is used to have the access handler available in the Access Type setting in the system settings and allows you to change to this access handler. Define the (unique) name and (optional) help text of your custom access handler.

namespace GamingIsLove.ORKFramework
{
    // Defines the name and help text of this access handler.
    [EditorSettingInfo("Custom", "This is a custom access handler.")]
    // The access handler holds the sub-handlers with their overridable functions.
    public class CustomAccessHandler : AccessHandler
    {
        // The constructor needs to create the instances of the sub-handlers for actions, combatants, groups and inventory.
        public CustomAccessHandler()
        {
            this.actionAccess = new CustomActionAccessHandler();
            this.battleAccess = new CustomBattleAccessHandler();
            this.combatantAccess = new CustomCombatantAccessHandler();
            this.groupAccess = new CustomGroupAccessHandler();
            this.inventoryAccess = new CustomInventoryAccessHandler();
        }
    }
}

This example is included in the download above.

Action Access Handler #

The ActionAccessHandler class is responsible for using actions and shortcuts, as well as spending experience (e.g. on abilities). To add a custom action access handler, create a new class extending the ActionAccessHandler class.

Check the API to see all functions that can be overridden and what they’re used for.

namespace GamingIsLove.ORKFramework
{
    // The action access handler is responsible for using actions and shortcuts, as well as spending experience (e.g. on abilities).
    public class CustomActionAccessHandler : ActionAccessHandler
    {
        public CustomActionAccessHandler()
        {

        }

        public override void AddActionToCombatant(Combatant user, BaseAction action, bool newTurn)
        {
            base.AddActionToCombatant(user, action, newTurn);
        }
    }
}

This example is included in the download above.

Battle Access Handler #

The BattleAccessHandler class is responsible for battle loot and flying texts. To add a custom battle access handler, create a new class extending the BattleAccessHandler class.

Check the API to see all functions that can be overridden and what they’re used for.

namespace GamingIsLove.ORKFramework
{
    // The battle access handler is responsible for battle loot and flying texts.
    public class CustomBattleAccessHandler : BattleAccessHandler
    {
        public CustomBattleAccessHandler()
        {

        }

        public override void AddLoot(IShortcut item)
        {
            base.AddLoot(item);
        }
    }
}

This example is included in the download above.

Combatant Access Handler #

The CombatantAccessHandler class is responsible for everything combatant related, e.g. changing status values, adding status effects, learning abilities or changing equipment. To add a combatant access handler, create a new class extending the CombatantAccessHandler class.

Check the API to see all functions that can be overridden and what they’re used for.

namespace GamingIsLove.ORKFramework
{
    // The combatant access handler is responsible for everything combatant related, from status changes to learning abilities or changing equipment.
    public class CustomCombatantAccessHandler : CombatantAccessHandler
    {
        public CustomCombatantAccessHandler()
        {

        }

        public override Combatant CreateInstance(CombatantSetting setting, Group group, bool showNotification, bool showConsole)
        {
            return base.CreateInstance(setting, group, showNotification, showConsole);
        }
    }
}

This example is included in the download above.

Group Access Handler #

The GroupAccessHandler class is responsible for changes in combatant groups, e.g. joining or leaving a group. To add a custom group access handler, create a new class extending the GroupAccessHandler class.

Check the API to see all functions that can be overridden and what they’re used for.

namespace GamingIsLove.ORKFramework
{
    // The group access handler is responsible for changes in combatant groups, e.g. joining or leaving a group.
    public class CustomGroupAccessHandler : GroupAccessHandler
    {
        public CustomGroupAccessHandler()
        {

        }

        public override void Join(Group group, Combatant combatant, bool showNotification, bool showConsole)
        {
            base.Join(group, combatant, showNotification, showConsole);
        }
    }
}

This example is included in the download above.

Inventory Access Handler #

The InventoryAccessHandler class is responsible for inventory changes, e.g. adding or removing an item. To add a custom inventory access handler, create a new class extending the InventoryAccessHandler class.

Check the API to see all functions that can be overridden and what they’re used for.

namespace GamingIsLove.ORKFramework
{
    // The inventory access handler is responsible for inventory changes, e.g. adding or removing an item.
    public class CustomInventoryAccessHandler : InventoryAccessHandler
    {
        public CustomInventoryAccessHandler()
        {

        }

        public override void UseCraftingRecipe(Combatant combatant, CraftingRecipe recipe, NotifyBool notify)
        {
            base.UseCraftingRecipe(combatant, recipe, notify);
        }
    }
}

This example is included in the download above.

Table of Contents
  • Access Handler
  • Action Access Handler
  • Battle Access Handler
  • Combatant Access Handler
  • Group Access Handler
  • Inventory Access Handler
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!