Encounter Control, Version 0.41
bgillisp
Introduction
This is a script in progress to allow developers the ability to better control how random fights work in the game
Features
Currently, you can do the following in this script
-Set a switch that if the switch is ON, no battles will occur on that map. Set the switch with the notetag <Encounter Switch: x> on the note box for the map.
-Set a minimum number of steps to take before a battle can occur. If you have Yanfly's Encounter script installed, it will use that global minimum, but will overwrite it with a notetag on a map if desired. Use the notetag <Encounter Minimum: x> to set the minimum number of steps.
-Set a uniform distribution, where all encounter steps are within 3 standard deviations of the mean. Advanced, and work in progress, so directions not posted yet (as it is flaky still).
-Set a maximum number of encounters per map. If you played Ar Tonelico you know how this works. You can set a global maximum, and overwrite it per map with the notetag <Maximum Encounters: x>.
-Set a fear level. Once the party's average level is equal to or exceeds the fear level, the monsters fear you too much to attack. Set it per map with <Fear Level: x>. Default is 99 (max level in the game), but that can be adjusted.
-Added a variable that if you set the value in that variable to anything but 0, the game will always give you the troop id that this variable is set to for your random fights. Can be combined with Yanfly's swap monster for some interesting effects and ways to change random fights (in the same areas) as the game progresses (by default this is disabled, change in the editable region if you wish to use this feature). Warning: There is no safeguard check, so it is up to you to make sure this always has a valid troop id!
-Set a global switch that if it is off, no battles will occur. The script defaults to 120. Set to zero to disable this.
-Set a switch to make all random battles surprise or preemptive.
-Set a switch to make all fixed fights also check for surprise or preemptive strike. Combine with the previous feature to make fixed fights where you get the jump on the enemies (or vice versa).
How to Use
Paste the script code in the materials section but above main.
Script
On pastebin: http://pastebin.com/CDMuvkNM
FAQ
Q: After adding this fights occur more often than before! Why?
A: This is because I use the number in the database as the maximum, not as the middle number. Double your old database numbers and it will work as before, or, you can change the setting in the editable region to go back to the old method of calculation if you like that better.
Q: I keep getting the same fight over and over and over!
A: You set the variable for storing the troop id to something besides 0. If you set that to anything but 0, the system will always return the same fight over and over and over until you set it back to 0. See the editable region for how to set the variable the game uses for this, or how to turn it off (by setting it to 0).
Author's Notes
Still a slow work in progress as work and time allows.
bgillisp
Introduction
This is a script in progress to allow developers the ability to better control how random fights work in the game
Features
Currently, you can do the following in this script
-Set a switch that if the switch is ON, no battles will occur on that map. Set the switch with the notetag <Encounter Switch: x> on the note box for the map.
-Set a minimum number of steps to take before a battle can occur. If you have Yanfly's Encounter script installed, it will use that global minimum, but will overwrite it with a notetag on a map if desired. Use the notetag <Encounter Minimum: x> to set the minimum number of steps.
-Set a uniform distribution, where all encounter steps are within 3 standard deviations of the mean. Advanced, and work in progress, so directions not posted yet (as it is flaky still).
-Set a maximum number of encounters per map. If you played Ar Tonelico you know how this works. You can set a global maximum, and overwrite it per map with the notetag <Maximum Encounters: x>.
-Set a fear level. Once the party's average level is equal to or exceeds the fear level, the monsters fear you too much to attack. Set it per map with <Fear Level: x>. Default is 99 (max level in the game), but that can be adjusted.
-Added a variable that if you set the value in that variable to anything but 0, the game will always give you the troop id that this variable is set to for your random fights. Can be combined with Yanfly's swap monster for some interesting effects and ways to change random fights (in the same areas) as the game progresses (by default this is disabled, change in the editable region if you wish to use this feature). Warning: There is no safeguard check, so it is up to you to make sure this always has a valid troop id!
-Set a global switch that if it is off, no battles will occur. The script defaults to 120. Set to zero to disable this.
-Set a switch to make all random battles surprise or preemptive.
-Set a switch to make all fixed fights also check for surprise or preemptive strike. Combine with the previous feature to make fixed fights where you get the jump on the enemies (or vice versa).
How to Use
Paste the script code in the materials section but above main.
Script
On pastebin: http://pastebin.com/CDMuvkNM
FAQ
Q: After adding this fights occur more often than before! Why?
A: This is because I use the number in the database as the maximum, not as the middle number. Double your old database numbers and it will work as before, or, you can change the setting in the editable region to go back to the old method of calculation if you like that better.
Q: I keep getting the same fight over and over and over!
A: You set the variable for storing the troop id to something besides 0. If you set that to anything but 0, the system will always return the same fight over and over and over until you set it back to 0. See the editable region for how to set the variable the game uses for this, or how to turn it off (by setting it to 0).
Author's Notes
Still a slow work in progress as work and time allows.
Last edited by a moderator:

