Imagine the following situation: your brave heroes sneak into the enemy base and because they’re The Good Guys they will just charge blindly on in a Ranger/Hamster team fashion. It doesn’t matter if they kill all the poor mooks blocking their path – Mook Chivalry is in action, and all those henchmen will wait for you to come within 1 tile radius of them before attacking you (or if you are using random encounters, they will simply wait for the designated number of steps).
Well, screw the rules I have the Chain Battles script. With this, your mook will call reinforcements if you don’t do your carnage quickly and an endless wave of battles will overwhelm the heroes. If you – the developer – so desires.
However this is just one use of the script. You can very well setup special battles which will always result in a chain, or a strange life form spewing seeds during battle, seeds which develop enough to attack you when you think you’ve won. I don’t know, you certainly can think of something, can you?
Something to note, the battle results are delayed until the chain is over. Which means, if you flee during the second battle for instance, you won’t gain the experience and gold from the first either. Life is harsh, my friend, life is harsh. However, for each chain completed, the total (for both exp and gold) gained in the end – the sum of the rewards for all battles composing the chain – is raised by 25% per battle.
You will need to reserve two variables for the Chain Battles use. Then allocate them within the script body.
CHAIN_TROOP = 3
CHAIN_CHANCE = 4
CHAIN_TROOP represents the troop which will be fought in the chain and CHAIN_CHANCE the chance for the chain to happen at all.
Now, you need to find a situation where you want to alter those variables value. In a skill? In a battle event? Your call.
Let’s use a simple example with automatic chains (chains that always happen, no matter what).
You will notice that the variable CHAIN_CHANCE hasn’t been touched again. It’s because it is never reseted until you do it manually. CHAIN_TROOP on the other hand, is automatically set to 0 if you lose or escape a chain battle. But not if you win, which means you actually need to set it yourself to 0 in order to end the chain. There is actually an advantage to this: in case you want a chain to be endless unless certain circumstances are met, you won’t have to set it again and again.
Compatible with Ace Battle Engine and with my Skill Fusion script. Put it below Yanfly’s script of course. Other than that, there are a lot of aliases of the BattleManager methods.