Code Extensions

Extend ORK Framework’s functionality and settings with custom code.

You can extend a lot more functionality than listed in this documentation. Learn more about extending Makinom’s functionality in the Makinom code extensions documentation.

Adding Custom Classes #

You can extend many of ORK’s type selections and settings with custom implementations by simply adding new scripts extending from a base type class and adding the EditorSettingInfo attribute to the class.

It’s best to look at ORK’s default implementation in the source code for these kind of classes to learn how to do your custom implementation (you can see the available base types below).

EditorSettingInfo Attribute #

The EditorSettingInfo attribute is required for adding custom selections in popup fields (e.g. for custom float value types). It needs to be added to your custom class (see the examples below for a custom battle system implementation).

The attribute is in the GamingIsLove.Makinom namespace.

It defines the name and description of the selection.

[EditorSettingInfo("Name", "Description")]
public class YourCustomBattleSystem : BaseBattleSystem
  • Name
    The 1st string parameter is the name of the setting.
  • Description
    The 2nd string parameter is the description of the setting (e.g. listed in help texts).

You can optionally also define a different name to be displayed in the popup list, e.g. for separating into sub-selections using a ‘/‘.

[EditorSettingInfo("Name", "Description", "Sub Selection/Name)]
public class YourCustomBattleSystem : BaseBattleSystem
  • List Name (optional)
    The optional 3rd string parameter uses a different name to display the selection in popup lists.
    Use ‘/‘ to separate it into a sub-selection.

IObjectSelection Interface #

Some classes are implemented as generic classes with the IObjectSelection interface as a requirement for the generic type, e.g. the bool value type.

public class BoolValue_YourCustomType<T> : BoolValue_BaseType<T> where T : IObjectSelection, new()

You don’t really need to worry about this for your custom implementations – the used object selection implementation is defined wherever your custom setting is used (e.g. in a schematic node).

The IObjectSelection interface is implemented in the following classes and is responsible for selecting context-based (game) objects.

FormulaObjectSelection #

Used in formulas to select an object (e.g. user).

BattleAIObjectSelection #

Used in battle AIs to select an object (e.g. user).

SchematicObjectSelection #

Used in schematics to select an object (e.g. machine object).

GameObjectSelection #

Used outside of formulas, battle AIs and schematics.

Conditions #

Extend condition settings with custom conditions.

Status Condition #

Status conditions are used all across the framework to check a combatant’s status.

You can add a custom status condition by extending from BaseStatusConditionType.

public class YourCustomConditionType : BaseStatusConditionType

Battles #

Extend battle system functionality, e.g. adding a new battle system type.

Battle System Type #

You can add a custom battle system type by extending from BaseBattleSystem.

public class YourCustomBattleSystem : BaseBattleSystem

Status Change Type #

Status change types are used by abilities and items to define changes that are done to user and targets of the battle action.

You can add a custom status change type by extending from BaseStatusChangeType.

public class YourCustomStatusChangeType : BaseStatusChangeType

Highlights #

Extend highlighting of game objects, e.g. during target selection.

Combatant Highlight #

Combatant highlights are e.g. used when highlighting a selected target or the user of a battle menu.

You can add a custom combatant highlight by extending from BaseCombatantHighlightType.

public class YourCustomCombatantHighlightType : BaseCombatantHighlightType

Grid Highlight #

Grid highlights are used in grid battles to highlight grid cells of a battle grid.

You can add a custom grid highlight by extending from BaseGridHighlightType.

public class YourCustomGridHighlightType : BaseGridHighlightType

Inventory & Combatants #

Extend inventory and combatant functionality.

Research Item #

You can add a custom research item type by extending from BaseResearchItem.

public class YourCustomResearchItem : BaseResearchItem

Item Selection #

Item selections are used across the framework, e.g. to define loot items or content of item collectors.

You can add a custom item selections by extending from BaseItemSelection.

public class YourCustomItemSelection : BaseItemSelection

UI #

Extend UI functionality.

Battle Menu Item #

Add custom items to battle menus.

You can add a custom battle menu item by extending from BaseBattleMenuItem.

public class YourCustomBattleMenuItem : BaseBattleMenuItem

Loot Dialogue #

Loot dialogues are used to display the battle gains (loot, exp, etc.).

You can add a custom loot dialogue by extending from BaseLootDialogueSettings.

public class YourCustomLootDialogueSettings : BaseLootDialogueSettings

Status Value Distribution Input Option #

Add custom input options to status value distribution menus. See the menu screens documentation for more information on this menu part.

You can add a custom input option by extending from BaseSVDInputOption<T>.

public class YourCustomSVDInputOption<T> : BaseSVDInputOption<T> where T : IObjectSelection, new()

Menu Part #

You can add a custom menu part for menu screens by extending from BaseMenuPart.

public class YourCustomMenuPart : BaseMenuPart

Since your menu part will most likely also handle control of the used UI box(es), it’ll also need to implement UI box interfaces, e.g. IUIBoxControl and IUIBoxInput. It’s best to check out and base your custom menu part on an existing menu part from the source code.

Button List Item (Menu Screen: Button List) #

You can add a custom button list items for Button List menu screen parts by extending from BaseButtonListItem.

public class YourCustomButtonListItem : BaseButtonListItem

Crafting List Item (Menu Screen: Crafting List) #

You can add a custom crafting list items for Crafting List menu screen parts by extending from BaseCraftingListItem.

public class YourCustomCraftingListItem : BaseCraftingListItem

Manager Item (Menu Screen: Manager) #

You can add a custom manager items for Manager menu screen parts by extending from BaseManagerMenuItem.

public class YourCustomManagerMenuItem : BaseManagerMenuItem

Menu Action (Menu Screen) #

You can add a custom menu actions for different menu screen parts by extending from BaseMenuAction. E.g. used in Ability or Inventory menu parts for default action or sub menus.

public class YourCustomMenuAction : BaseMenuAction

Start Menu Option #

You can add a custom start menu options to start menus by extending from BaseStartMenuOption.

public class YourCustomStartMenuOption : BaseStartMenuOption

HUD Status Text Type #

Add custom text selections for HUD status texts, displaying information about a combatant. E.g. used by the ORK HUD Status Text Content component.

You can add a custom HUD status text types by extending from BaseHUDStatusTextType.

public class YourCustomHUDStatusTextType : BaseHUDStatusTextType

HUD Value Bar Type #

Add custom value bar selections for HUD value bars. E.g. used by the ORK HUD Value Bar Content component.

You can add a custom HUD value bar types by extending from BaseHUDValueBarType.

public class YourCustomHUDValueBarType : BaseHUDValueBarType