edited March 16 in ORK Scripting
Hi,
I have a turn based grid battle and I want to use custom UI menu (Custom Skillbar) to call attacks/abilities/items etc.

I want to simulate this behavior so it mirrors Battle Menu item clicks, so for example if I activate ability the target selection, the grid highlight methods etc also gets called.

Where in source code does this happen? Processing the battle menu button clicks?

I want to look at what happens for different action types (Ability/GridMove) to recreate this in custom code call, but I have a hard time finding where it happens.


Post edited by hellwalker on
  • edited March 16
    That's handled by the battle menu classes found in Gameplay/BattleSystem/Menu and sub-folders in the source code.

    Calling these functionalities mostly happens through the BMItem classes, e.g. you can call selecting an ability and triggering target selection (or use it, based on the ability's setup) like this:
    new AbilityBMItem(abilityShortcut, null).Accepted(combatant);
    abilityShortcut must be the AbilityShortcut class for the ability of the combatant, the combatant is the combatant using it.

    You can get ability shortcuts from the combatant's ability handler, e.g.:
    combatant.Abilities.Get(abilityID);
    abilityID is an int representing the ID/index of the ability.
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thank you!

    And the AbilityBMItem's Selected function is what gets called when the Battle Menu sort of previews ability right?
  • Yes, does the same as when you highlighted that choice in the battle menu.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Perfect ^_^
Sign In or Register to comment.