// ============================================================================
* Introduction
* ============================================================================
* No matter how much time you spend in an area killing monsters in an RPG
* Maker game's random encounters, the enemies just keep coming. What if you
* could alter the encounter list for maps though? What if your actions in a
* dungeon caused the creatures you could encounter in that dungeon, or even
* another dungeon, to change? What if you could hunt a monster to extinction?
* If these ideas excite you, then the Variable Encounter plugin is for you.
*
* With this plugin, you can use plugin commands to alter the weight or
* regionSet of a troop on a map, the available troops for a map, or even the
* encounter step, changing how often battles occur on a map!
*
* ============================================================================
* Important Information!
* ============================================================================
* If you try to perform an operation listed below on a map that your player
* has not visited yet, generally nothing will happen. You will not be able
* to modify their encounter list until the player has visited that map!
* However, there is a workaround for this. If you wish to modify a map's
* encounter list before it is visited by the player, you must use a script
* command to create empty map data for that map.
* The command for this is: WiggleLib.VariableEncounter._createMapEntry(mapId)
*
* For example, if you wanted to alter encounter data for map #8 and the
* player has not visited map #8 yet, you would have to create a script event
* and enter the following:
* WiggleLib.VariableEncounter._createMapEntry(8);
*
* Perhaps your player may have visited map #8 already or perhaps they have
* not. If they have, the command listed above will overwrite any encounter
* data that already exists for map #8. In this case please check if the map
* data exists first. The following code will only create map data if it
* does not already exist:
* if (WiggleLib.VariableEncounter._getMapData(8) === undefined) {
* WiggleLib.VariableEncounter._createMapEntry(8);
* }
* ============================================================================
* Parameters
* ============================================================================
* Storage ID (Default: 1)
* The Storage ID parameter is what lets the changes you make persist between
* play sessions. This plugin keeps its data in a game variable and references
* that data as the player travels through the game. Without being able to
* store the altered encounter data in a variable, the changes you make would
* be reset every time a player loads a game.
* Do not overwrite the specified variable in the game events, or this plugin
* will, at worst, crash or, at best, stop working.
*
* ============================================================================
* Plugin Commands
* ============================================================================
*
* All plugin commands begin with "VariableEncounter".
*
* Add <troopId> <weight> <mapId>
* Adds a troop to a map's encounter list. You must specify the ID of the enemy
* troop you want to add and you must specify a weight for that troop, just
* like if you were adding them to the encounter list in the editor via map
* properties. The mapId parameter is optional, and if omitted will add the
* encounter to the map that is currently loaded when the command is run. No
* regionSet data will be added with this command, meaning that the encounter
* will be available everywhere on the map. If you want to add regionSet data
* for an encounter, add it with this command and then run the Region
* command (see below).
* Example Use: VariableEncounter Add 1 5 8
* (Adds troop #1 to the encounter list of map #8 with a weight of 5)
*
* Remove <troopId> <mapId>
* Removes a troop from a map's encounter list. You must specify the ID of the
* enemy troop you want to remove. The mapId parameter is optional, and if
* omitted will remove the troop from the map that is currently loaded when the
* command is run. If the troop specified is not in the specified map's
* encounter list, nothing will happen.
* Example Use: VariableEncounter Remove 1 8
* (Removes troop #1 from the encounter list of map #8)
*
* Update <troopId> <weight> <mapId>
* Updates the weight of a troop on a map's encounter list. You must specify
* the ID of the enemy troop you want to update and you must specify a new
* weight for them. If your weight is not a valid number, it will be set to 0.
* The mapId parameter is optional, and if omitted will update the troop on
* the map that is currently loaded when the command is run. If the troop
* specified is not in the specified map's encounter list, nothing will
* be updated.
* Example Use: VariableEncounter Update 1 40 8
* (Updates the weight of troop #1 on map #8 to 40)
*
* Region <troopId> <regionSet> <mapId>
* Sets the regions that an enemy troop can appear in on a map. You must
* specify the ID of the enemy troop you want to set region data for. The
* regionSet parameter must also be set, and must be an array of region IDs
* seperated by commas without any spaces. The mapId parameter is optional,
* and if omitted will set the region for the specified troop on the map that
* is currently loaded when the command is run. If the troop specified is not
* in the specified map's encounter list, nothing will happen.
* Example Use: VariableEncounter Region 1 [1,2,3] 8
* (This command makes troop 1 appear only in regions 1, 2, and 3 on map 8)
* Another Example: VariableEncounter Region 1 [] 8
* (This command makes troop 1 appear anywhere on map 8)
* One More Example: VariableEncounter Region 1 [1, 2, 3] 8
* (This command will *not* work! You cannot have spaces in the array!)
*
* Clear <mapId>
* Clears the encounter list for the specified map. The mapId parameter is
* optional, and if omitted will set the region for the specified troop on the
* map that is currently loaded when the command is run.
* Example Use: VariableEncounter Clear 8
* (The encounter list for map #8 is empty and no random encounters will
* occur there until you use the Add command for that map (see above))
*
* Step <encounterStep> <mapId>
* Sets the average number of steps that it will take to trigger a random
* battle on the specified map. The mapId parameter is optional, and if
* omitted will set the region for the specified troop on the map that
* is currently loaded when the command is run.
* If you would like to change the default method of calculating when to
* trigger a random battle, please look for my Random Encounter Formula
* plugin.
* Example Use: VariableEncounter Step 60 8
* (Sets the encounter step parameter for map #8 to 60)
*
* ============================================================================
* Script Commands
* ============================================================================
* I won't provide too much information here, but if you want to use scripts
* commands instead of plugin commands, here is a quick table of equivalent
* commands. If you'd like more detail, please look at the functions below or
* feel free to ask me directly by PM-ing me at the rpgmakerweb forums. My
* username is: JumbocactuarX27
*
* Plugin | Script Function
* ======================================
* Add | WiggleLib.VariableEncounter.addEncounter(troopId, weight, mapId)
* Remove | WiggleLib.VariableEncounter.removeEncounter(troopId, mapId)
* Update | WiggleLib.VariableEncounter.updateEncounter(troopId, weight, mapId)
* Region | WiggleLib.VariableEncounter.updateRegionSet(troopId, regionSet, mapId)
* Clear | WiggleLib.VariableEncounter.clearEncounterList(mapId)
* Step | WiggleLib.VariableEncounter.changeEncounterStep(encounterStep, mapId)
*/
//=============================================================================