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.
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
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Yes, does the same as when you highlighted that choice in the battle menu.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
And the AbilityBMItem's Selected function is what gets called when the Battle Menu sort of previews ability right?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!