Have you ever wanted to give your spells a bit of a cooldown after being used? Well with this tutorial, you can finally add cooldowns to your spells without having to script one bit of the game in the process! Here is all that will be used to create a cooldown for 1 spell:
- 1 Spell
- 1 Common Event (specifically for that spell)
- 1 Variable (represents how many turns will pass before the spell is usable again)
NOTE: You can create cooldowns for other spells too, but the common event and the variable must be linked to one spell. If you want like 5 spells that have cooldowns, for example, you would create 5 Spells, 5 Common Events, and 5 different variables.
Step 1 - Create a spell. For an easier understanding, we'll name this spell, 'Spell X'. Edit it however way you would like, but leave the common event blank. We will go back to this later.
Step 2 - Create your common event. You can call this one 'Common Event X' and for the event commands, add an event command that forces the actor to forget 'Spell X'. Afterwards, create a new variable called 'Cooldown X' and create a variable command that will set 'Cooldown X' to any number greater than 0 (this will represent about how many turns you will have to wait before the spell is usable again).
Step 3 - Now, go to the 'Troops' tab on the top of the window and, (if the current battle event page is new or empty,) edit the condition and checkmark the 'When the end of the turn' option. Now press 'OK'. Set the Span to 'Turn' and then create a Conditional Branch event command.
Step 4 - The conditional branch needs to check for the variable 'Cooldown X' to be greater than 1. Click the checkbox that says 'Set handling when conditions do not apply' when you're done and press 'OK'. On the event command line right above 'Else', create a new event command that reduces the variable 'Cooldown X' by 1.
Step 5 - Now select the event command line right underneath 'Else' and create a new event command that will force your actor to relearn 'Spell X'. You might want to add a 'Show Text...' event command that will remind you that Spell X is usable again. Click 'OK' for all of the changes, and make a new event command right above the 'Branch End' line. This new event will set the value of the variable 'Cooldown X' to be equal to 0.
Step 6 - Now save all of your changes and return to the page where you created Spell X. Set its common event to 'Common Event X', and now you're pretty much done!
Additional Steps - If you want this spell cooldown procedure to apply to all battles, you would have to copy/paste the battle event page to all the troops of your game.You can make as many cooldown spells as you want. Also, the names 'Spell X', 'Cooldown X', and 'Common Event X' were all just placeholder names. You are free to change their names into whatever you desire.
Known Issue #1 - Your character will not be able to see this spell while outside of battle. If the spell you used is a healing spell or anything else of importance, you would need to create parallel processing events on your maps that will make your character relearn Spell X. Parallel processing events might be covered in another tutorial, but send me a reply if you want me to go over it with you.
Known Issue #2 - (If you managed to succeed on with Known Issue #1, skip this Known Issue #2.) Because your spell's cooldowns are based on turns, it will only resume its cooldown when you're back in battle. If you want the spell to be learned at the beginning of every battle, you would use the steps directed by Known Issue #1 or create a new battle event page on each troop. If you chose to create a new battle event page, just edit the Condition and press the checkmark box that says 'Turn No.' and press 'OK'. Now, in the battle event page, simply create an event command that will set the variable 'Cooldown X' to 1 and then you're done for the day.