This article serves as an extension to Hime’s Choice Options script and deals solely with $game_troop conditions
$game_troop supported conditional statements
There are 2 methods that might come in handy:
- “$game_troop.members.size == x”, or you can write this as “t.members.size == x”. Replace x with the number of enemies you wish to check for.“$game_troop.member == 2” will return true if there are 2 enemies in the troop.
- “$game_troop.members[x]”, or you can write this as “t.members[x]”. Replace x with the enemy ID number. “$game_troop.members” will return the reference to the first enemy in the troop in the order they are added. “$game_troop.members” will return the reference to the second enemy in the troop, etc.
The first method can be used in troops event page (press F9 and click on the troops tab). Maybe you want to create a complex battle system that displays some choices to players in the middle of battle, and some of those choices are not available as long as there are more than x number of enemies in the field? You can easily do that using $game_troop.members.size == 3″ or “t.members.size == 3”
For example, you want to display a list of option to players at the start of battle, but some options are disabled if there are more than 2 enemies in battle.
Keep in mind that the use of $game_party(…), $game_switches(…), $game_variables(…), and $game_actor(…) are not restricted to non combat situation. We can also use them to disable choices in a combat.
Consider the following scenario:
You want to create a boss fight with 3 different levels of difficulties. You can totally pair up this script with Hime’s Enemy Reinforcement script to create the ultimate boss fight with hellish difficulties. We will not get into the details about how to use that script for now as the enemy reinforcement script is not within the scope of this tutorial. Troops event is done through the Troops page (Press F9, and click on the Troops tab)
For the scenario where you want the player to select the difficulty in the middle of a fight, you can do it like this.
This is what you will get during the battle:
Voila… mission impossible: