In this tutorial we’ll set up using cast times for actions in the active time battle system.
Battle actions can optionally use a cast time to prepare them for use. Casting an action can optionally be cancelable, e.g. casting a magic spell could be canceled by getting attacked.
We’ll add cast times for abilities and items – and we’ll use different cast times for certain abilities:
- items will take 0.5 seconds
- abilities will generall take 1 second
- attack, shoot, steal and provoking (look at me) will be used immediately
- meditate (monk) will take 3 seconds, but can’t be cancelled
We also have to set up which abilities will be able to cancel the target’s casting – we’ll limit this to physical attacks.
Cast Time Formula #
We’ll use a formula to let the user’s dexterity and agility influence the cast time, which will be passed to the formula as the Initial Value.
Navigate to Game > Formulas and add a new formula.
Formula Settings #
- Name
Set to Cast Time.
Status Value #
Add Node > Combatant > Status Value
- Operator
Select Multiply. - Status Value
Select Dexterity. - Value Origin
Select To Maximum.
Value #
Add Node > Value > Value
- Operator
Select Divide. - Value
Select Value > Value.
Set the value to 255.
Status Value #
Copy the previous Status Value node and change the following setting.
- Status Value
Select Agility.
Value #
Copy the previous Value node.
The formula is now ready to be used. Remember, it requires the cast time you want to use (e.g. 2 seconds) to be passed on as Initial Value.
Default Cast Times #
We’ll now set up the default cast times for abilities and items.
Navigate to Battles > Battle System > General Settings.
Time Settings > Cast Time Settings #
You can also set up cast times for other actions, e.g. escaping.
Default Ability Cast Time #
Click on Add Cast Time.
- Cast Time
Select Value > Formula.
Select the Cast Time formula. - Initial Value
Set to 1. - Cancelable
Enable this setting.
We’ll use the Use In settings to only use cast times in the Active Time battle system we set up – in case you also set up Turn Based (or other) battle systems, the cast time will not interfere with it. You can add multiple cast time setups for different battle systems.
- Field
Disable this setting.
No casting out of battle needed. - All Battle Systems
Disable this setting.
Click on Add Battle System.
- Battle System
Select Active Time.
Default Item Cast Time #
Click on Add Cast Time.
- Cast Time
Select Value > Formula.
Select the Cast Time formula. - Initial Value
Set to 0.5. - Cancelable
Enable this setting. - Field
Disable this setting. - All Battle Systems
Disable this setting.
Click on Add Battle System.
- Battle System
Select Active Time.
Ability Adjustments #
We’ll now add some custom cast times to some abilities and also set up our physical attacks to cancel casting.
Navigate to Status > Abilities and change the following abilities.
0: Attack #
The basic attack will not have any cast time, but cancel the target’s casting.
Since our critical hits use the regular target changes (with a higher damage factor), we only need to set this up in the regular Target Changes.
Use Settings > Battle Settings > Cast Time Settings #
- Own Cast Time
Enable this setting.
We don’t add a cast time to use the attack immediately.
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
1: Shoot #
The bow’s basic attack uses the same setup, i.e. no cast time and cancels casting.
Use Settings > Battle Settings > Cast Time Settings #
- Own Cast Time
Enable this setting.
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
2: Poison Attack #
The poison attack uses the default cast time, but cancels the target’s casting
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
3: Slow Attack #
The slow attack also uses the default cast time and cancels the target’s casting
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
4: Blind Attack #
The blind attack also uses the default cast time and cancels the target’s casting
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
5: Double Shot #
Once again, default cast time but cancel casting if the target.
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
5: Round Shot #
Once again, default cast time but cancel casting if the target.
Target Settings > Target Changes > Target Change 0 #
- Cancel Casting
Enable this setting.
8: Steal #
Stealing will be used immediately, but doesn’t cancel the target’s casting.
Use Settings > Battle Settings > Cast Time Settings #
- Own Cast Time
Enable this setting.
16: Meditate #
Meditating will take 3 seconds but can’t be canceled.
Use Settings > Battle Settings > Cast Time Settings #
- Own Cast Time
Enable this setting.
Click on Add Cast Time.
- Cast Time
Select Value > Formula.
Select the Cast Time formula. - Initial Value
Set to 3. - Cancelable
Disable this setting. - Field
Disable this setting. - All Battle Systems
Disable this setting.
Click on Add Battle System.
- Battle System
Select Active Time.
17: Look At Me! #
Provoking will be used immediately.
Use Settings > Battle Settings > Cast Time Settings #
- Own Cast Time
Enable this setting.
Save Changes #
And that’s it for the cast time setup!
Don’t forget to save your changes by clicking on Save Settings at the bottom of the editor.
Next, we’ll set up a timebar HUD.