@Ebonfix @araraf: Did you 2 even try your proposed fix before suggesting them to him? Seriously.
Anyways back to the topic, here's one way you can do it.
This method requires Tsukihime's Enemy Reinforcement script, which can be found here:
http://himeworks.com/2013/03/enemy-reinforcements/
This solution works on turn base or hp % base battle. Change the condition to fit your needs:
The important bit is on page 2. After re-adding the enemies to the battle, notice how I only modify the HP of enemy ID 2 and 3 instead of the original 1 and 2?
This is because the boss that was added becomes enemy number 1 in the field. The ID of the 2 mobs that were removed earlier becomes mob 2 and 3.
Ignore this part:
Text: -, -, Normal, Bottom Hydra 1: \v[21] Hydra 2: \v[22] I used that part to make sure that the values are stored correctly.
This solution is tested and is working as intended. Except when you have more than 8 battler in the field.
If you are confused, let me know and I will walk you through the script usage and the logic.
Edit: On second thought. I guess it is better that I explain now
Before we start, I want to mention 2 points:
- I know that my example is a bit different from what you are trying to do. The purpose is to demonstrate how the enemy reinforcement script can be used and you can have a bit of practice implementing it for your game.
- If you have to kill the 2nd group of enemies before the first group is restored, you may require an additional script, Tsukihime's End Phase Trigger, which can be found here (http://himeworks.com/2013/03/end-phase-triggers/). Otherwise the game may treat it as you have already won the battle after the 2nd group dies.
Page 1
Spoiler
For the example I am using, I am fighting mobs from troop number 13 (Hydras), and the boss that will appear is the Ancient Dragon (troop ID = 12)
The switch will happened during turn number 3
What I did was I designate 2 variables to store the HP of the Hydras before they disappear completely from the battlefield.
Then I used the script call remove_troop(13) to remove the Hydras from the battlefield. This step requires you to have installed Tsukihime's Enemy Reinforcement script.
To summon the boss, I used the script call add_troop(12). Troop 12 is my designated boss, the Ancient Dragon (refer to the screenshots above)
Page 2
Spoiler
This example assumes that I want to make the Hydras re-appear to join the boss at turn 5.
Use the script call add_troop(13) to add the Hydras back to the battlefield.
IMPORTANT POINT #1: Each enemy has an ID assigned to them in the order they are added to the battle, previously Hydra A's ID is 1 and Hydra B's ID is 2. But since you remove the 2 Hydras and added the Ancient Dragon, the Ancient Dragon gets ID number 1 in the battlefield instead!
IMPORTANT POINT #2: At this point, the newly added Hydras are at full HP!
To set the HP to the proper value, we use the command "Change Enemy HP" on page 3 and set it to decrease by 99999999 (or a value larger than the Hydra's maximum HP). DO NOT TOUCH the "Allow knockout" checkbox.
Then we use a second "Change Enemy HP" command and set it to increase by the value stored in the variable you set in the previous page
In order to set the correct HP to the correct mob, we have to know the ID all the monsters in the battlefield at this point.
In my example, theres 2 Hydras and 1 Ancient Dragon. The Hydras are removed and the Ancient Dragon is added, so the Ancient Dragon's ID is 1. Then we re-add the 2 Hydras we removed earlier, Hydra A's ID is now 2, and Hydra B's ID is now 3. So please make sure you decrease the HP of the correct mob in your project.