Encounter Conditions

encounterConditions0

This script allows you to set conditions on whether a troop can be encountered,
or whether specific members in a troop will appear.

If a troop encounter condition is not met, then the troop will not appear.
Similarly, if a troop member encounter condition is not met, then the member will not appear in battle when you encounter the troop.

Download

Script: download here

Installation

Place this script below Materials and above Main

Usage

Encounter conditions are simply conditional branch commands, with a comment before them specifying that it is an encounter condition. They can be created anywhere in a troop event page, in any page.

encounterConditions2

To specify a troop encounter condition, first create a comment:

<encounter condition>

Then create a conditional branch command. That will be treated as the troop encounter condition.

Troop member encounter conditions apply to the specific members in the troop.
The comment is similar to the troop condition, except you specify an index

<encounter condition: index>

Where index is the 1-based position of the enemy in the troop, so 1 would
be the first enemy, 2 would be the second, and so on. Then you create a conditional branch as usual.

Multiple conditions

encounterConditions2encounterConditions3

If you would like to use multiple conditional branches, you would create your first conditional branch as usual, and then create additional conditional branches nested inside.

Negated Conditional Branches

To use a negated conditional branch for your encounter condition, simply add the tag into the comment:

<encounter condition> <negate condition>

You may also like...

2 Responses

  1. Moltres Rider says:

    This DOES NOT work with negative conditions. I have a monster set to check if the player has a certain key and I put in but the encounter does NOT happen because it is STILL checking for the key, NOT the lack of a key. This is a problem because I want that enemy to spawn until it drops the key.

  2. Arsist says:

    This is good because it allows you to dynamically change the encounter rates.
    Like you could do ‘chance = 33; if $game_switches[1] == true then chance *= 1.25; rand(100)+1 <= chance.round’ and the like

Leave a Reply

Your email address will not be published. Required fields are marked *