November
03
2019

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

This allows you to interject custom functionality, like creating a combatant, adding an item to an inventory or using an 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, 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 ORKEditorSettingInfo attribute added to the class is used to have the access handler available in the Access Type setting in Game > Game Settings and allows you to change to this access handler. Define the (unique) name and (optional) help text of your custom access handler.

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.

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 group 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.

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.

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.

This example is included in the download above.