Encounter Update VX

Encounter Update VX

-Tsukihime

Overview

This script provides functionality for changing map and area encounters using script calls. Currently you can only add new encounters and remove the custom encounters.

Example

Perhaps when a certain switch has been activated, a certain monster is supposed to be roaming a certain map. You can use this script to add a new encounter using events that activate when the switch is ON

No need to create an extra map just for that new encounter

Usage

To add an encounter to a map, use the script call



Code:
add_encounter(troop_id, map_id)

add_encounter(2)
add_encounter(3, 4)
To remove custom encounters, use the script call



Code:
remove_encounters(map_id)
This will revert the map's encounters back to their original settings.

For areas, it is very similar



Code:
add_area_encounter(troop_id, area_ids)

add_area_encounter(3, 7)
add_area_encounter(3, [1,2,3])



Code:
remove_area_encounters(area_ids)
The default map ID is the current map's ID and may be omitted

The default area IDs are the current player's area IDs.

You can change the encounter rate as well using the following calls



Code:
change_encounter_rate(rate, map_id) # increase/decrease encounter rate
set_encounter_rate(rate, map_id)    # set it to a specific value
restore_encounter_rate(map_id)      # set the modifier rate back to 0
Download

Script: http://db.tt/3oKwyk1S

Original thread: https://forums.rpgmakerweb.com/threads/encounter-update-vx.4247/