A downloadable asset pack

Download NowName your own price

License: Free for personal or commercial use.

Context: The player enters the battle after moving a number of steps on the game map. Although quite functional, this is a static and uninteresting model of forcing the player to fight.

Description: This script allows you to add a little unpredictability to determine when the player will or will not enter a battle. At the same time, it gives the player the possibility to act strategically to enter or avoid the fight. it also allows the developer to temporarily turn off combat and reactivate it whenever he wishes.

Script configuration:


1) you will need to determine the number of database changes that will indicate whether battle encounters are enabled or disabled.


To activate or deactivate meetings, use the plugin command: ON / OFF encounters.

2) Set the time (in seconds) at which the step counter is incremented.

3) Configure the amount of time the counter is incremented.

Note)  By default the time increment is only activated when the player is stopped. To change this and make the increment happen even when the player is moving use the plugin command.


Steps to determine the encounters.

An encounter is the moment when the player is taken into battle against a creature on another screen (battle screen). The encounter takes place after the player moves around the map a predetermined number of steps. This number of steps is determined in the map settings:

In the example above, the encounter will take place from the moment the player moves 10 times on the map.

Modifying the moments of encounter

This script allows the encounter to have a chance to happen after the player takes the number of steps determined in the map settings. This means that after traveling 10 times (for example) the event will not necessarily happen, instead it may or may not occur according to a percentage value.

For example: There is an 80% chance that the player will engage in combat after moving 10 steps. After the player moves 10 times, a function generates a random value (as if it were a roll of a dice with 100 faces) and compares it with the player's chance to enter combat. If the randomly generated value is less than or equal to the player's chance of entering combat, the encounter takes place. However, if the randomly generated value is greater than the player's chance to enter combat, the encounter does not take place. When the encounter does not take place, the number of steps for a new encounters reset.

Chance of a character entering combat

Each character in the database has a chance to engage in combat or not. By default, this chance is 100%, that is, he will always go into combat according to the normal settings of the RPG MAKER MZ.

The developer can change the chance of a character entering combat with the tag:

<rateEncounter:percent>

percent is the percentage value (from 0 to 100) that expresses the character's chance to enter combat. Example:

Chance of player entering combat

The percentage value that determines the player's chance to enter combat or not is equivalent to the simple average of the chances of the characters that are part of the group. This means that all the characters that make up the group influence the chance of the encounter happening or not.

Modifying a character's chance to meet

(1) It is possible to modify a character's chance of encounter. To do this, use the Increase / Decrease Rate plugin commands.

(2) Another way to modify a character's chance of meeting is through a status. In this case, it is necessary to set the status to call a common event which in turn calls the plugin command:

(3) It is still possible to have an item consumed to increase or decrease a character's chance of encounter.

Outros comandos de plugin

% actor into battle :assigns a character's chance of finding a database variable.

% party into battle: assigns the chance of encounter the group of characters to a variable in the database.


Download

Download NowName your own price

Click download now to get access to the following files:

POG_ProhibitedEncounters.js 9 kB

Leave a comment

Log in with itch.io to leave a comment.