1a) Use a Use Battle Action node and set the Add Action setting to Sub Action. This will use whatever action you want to use outside of the system's action chain as an action within the current action. You can also wait for the action to finish before continuing the current action (event).2. Let's say you are in a special battle where both the attacker and the target get a shot in. The best way to describe this is a 100% chance of counter, but i don't want it dictated by the combatant or the weapon. I want it dictated by the type of battle
Check for the bonus if the action should be used before that, e.g. with a Check Status node.
You'd need to set this up in a battle event and add it to every action (e.g. ability) where it should be possible to perform such a pre-counter.
2a) Easiest way to do this is by setting a variable to mark these special battle types (e.g. set in the battle start event) and use a counter chance formula that results in 100 % (i.e. result is 100) if that variable condition is valid.3) When a battle event takes place (like attack), I'd like to lock targets together. Say Player 1 attacks Enemy 2. I'd like to be able to store, and access the stored target (for both the player, which is Enemy 2, and the Enemy, which is player 1) from a node, after the first attack takes place. Is that possible?
Another way would be to use a system similar in (1) at the end of every action.
3a) Hmmm ... I don't think that's really doable. While you can store combatants (e.g. using selected data), these are stored globally and not bound to a specific combatant.I will update this thread as i think of other things. Thanks in advance.
You probably could use object variables and create some kind of custom system with e.g. float variables marking each individual combatant.
It looks like you're new here. If you want to get involved, click one of these buttons!
1) Use a Use Battle Action node and set the Add Action setting to Sub Action. This will use whatever action you want to use outside of the system's action chain as an action within the current action. You can also wait for the action to finish before continuing the current action (event).
Check for the bonus if the action should be used before that, e.g. with a Check Status node.
You'd need to set this up in a battle event and add it to every action (e.g. ability) where it should be possible to perform such a pre-counter.
2) Easiest way to do this is by setting a variable to mark these special battle types (e.g. set in the battle start event) and use a counter chance formula that results in 100 % (i.e. result is 100) if that variable condition is valid.
Another way would be to use a system similar in (1) at the end of every action.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
3) When a battle event takes place (like attack), I'd like to lock targets together. Say Player 1 attacks Enemy 2. I'd like to be able to store, and access the stored target (for both the player, which is Enemy 2, and the Enemy, which is player 1) from a node, after the first attack takes place. Is that possible?
You probably could use object variables and create some kind of custom system with e.g. float variables marking each individual combatant.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
- creating a script that has a SelectedDataHandler variable, and adding it to the combatant
- creating a custom battle event that has a to be stored combatant, and storer combatant. That calls the script and stores the selected data.
1. an 'Engage' or 'Lock' or 'Save Target' node, that saves the list of targets from the previous attack. This shouldn't be difficult, as you already have this information stored in
user.Battle.LastTargets
Sadly, for some reason the CombatantBattle script isn't available in the source so I don't know it's data type, but wouldn't need it anyways.
2. An addition to the Status->Ability->Auto Target under Use Auto Target that is a checkbox called 'Auto Accept Target', so that the user does not have the ability to confirm the auto-target.
I would write this myself - but as you know we don't have access to any of the framework's gui code. But we're talking what - 10-15 lines of code here?
Thanks in advance!
Also, auto targeting doesn't need any accepting - as it automatically uses the action on targets, if possible. Needs auto targets set up in the ability/item :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
- Auto Target is enabled in the combatant's AI Settings
- the used ability/item has Use Auto Target enabled
- the control map key has Use Auto Target enabled
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
So I want to click something like "continue attack" which would be an ability I create, use the last used target, and automatically attack the last target without needing to confirm the selection.
Is that doable?
If in the battle menu, I create a button of type Auto, and in the Combatant's AI, I set him to Attack Last Target, and select this button during combat, I get the exact effect I'm looking for. The Combatant will attack the last target it acquired (perfect!).
But - I want to create a condition for showing this button (I want the player to lock onto or engage his target first, before showing such a button) - and while Abilities have conditional settings, Battle Menu buttons do not :-(
Is this something you'd be willing to implement for me?
So to follow up with the previous post - I added a SimpleCombatantRequirement to the AutoBattleMenuItem script, rebuilt the .dll, and now I've got what I want.
However - this definitely has me worried about working with updates. Perhaps I should make my own custom battle menu item instead? But even if i did, I'd still have overwrite BattleMenu.cs (for this particular feature) so the problem still exists. Perhaps I should just merge the code where necessary when you update.
The gameplay code was always added to the full version - the editor code isn't included (and I just checked, it's not in there), so which one are you talking about?
If you make changes to the code, you'll have to manage merging this with updates yourself. Using GIT or a similar solution is usually the best option here :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Let's say I want to add a certain order to the way battles play out. We still have a turn order, and everything is done in "classic" mode, but after everyone has selected their actions, we execute in the following order:
1. Ranged attacks go first
2. Movements (and special calculations to stop movements)
3. Melee Attacks
You think there's a way to do that on the fly using nodes? Or would I need to write my own combat type (Classic+)?
The only code not included is the core serialization functionality and the Unity editor.
Hm, I'd say you'll have to do some custom coding there - not so much as writing your own battle system, just sorting the battle actions as you need it. Check out the BattleActionHandler class (found in Gameplay/BattleSystem/Actions/), all the actions that are registered by the system are stored in the actionList, i.e. you can simply sort that list with a custom sorter.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!