Variable Encounter RatesLast Update: 2009.04.20By: Yanfly IntroductionI got tired of terrible encounter rates when you would set the average rate to roughly "30" steps and every 4 steps, the game would enter a battle so I made this to augment the rate battles would appear and to give me more control over them. The control that's given are the number of times the steps are rolled before making an average, the minimum number of steps that are free of battle, the percentage rate of the encounters that is free of battle, and if used, an event variable to modify the encounter rate. In addition to affecting the rolling system, I've modified the default reduction system from walking in a "bush” autotile. From the looks of things, anything that's at the center of an autotile is considered a bush, even if it doesn't look a bush. This means that the green plains you've been using on many many maps are considered bushes and reduce the steps remaining by 2 each time. Yeah, that's been changed, too (and modifiable if you wish to change it to something else).
In addition to that, I've recreated a system similar to the Pokemon Repel item which gets rid of encounters so long as the Repel item isn't spent. Note that this isn't anything too special, but it's something extra to stick into this script. Repel is bound to an event variable so that the player doesn't have to throw in extra coding to modify the Repel value. Just modify it through the event editor. Simple as that. Also, for the opposite of Repel, there is a lure variable. Although rather than initiating a battle every step, lure will cut down the encounter count by a certain amount, which can be controlled from within the game.
Screenshots
ScriptClick here. InstructionsUsing this script isn't too difficult. First off, I strongly suggest that you name your variables under the variable control menu. If you're using the default values, then the variables should be named as such:
- Variable 61: Encounter Addition
This adds steps to the encounter creation and adds a control to encounter randomization. If you set this to 10 for example, it'll add 10 bonus steps to the randomization process every time. - Variable 62: Steps Remaining
This determines the steps remaining before you fight a battle. Used only for debugging. - Variable 63: Repel Steps
Used like in Pokemon. Once this is set to anything above zero, it'll prevent Steps Remaining from dropping. This lowers by 1 point every step. - Variable 64: Lure Steps
Similar to the Repel Steps except this actually alters Steps Remaining. Every step, it'll lower the Steps remaining using the following variables. - Variable 65: Lure Division
Each step taken will have Steps Remaining divided by this variable's value. If you have it set to 2 and you have 20 steps remaining, the next step will drop it to 10, then 5, then 2, then 1, then 0. - Variable 66: Lure Subtraction
Like Lure Division except this is a subtraction modifier. If this is set to 3 and you have 30 steps remaining, it'll go down to 27, then 24, then 21, etc.
And that's it for variable renaming. To actually use this, you can do it anywhere that allows you to modify variables. Primarily in the event editor.

That's an example of how it'll be used in the event editor. It's not difficult at all.
Notes Some ideas that can expanded upon this script is an actual Repel Potion. Create an item in your item list that calls upon a specific common event. In that common event, you can create an event that'll raise Repel Steps to 100 or whatever you wish it to be. And with just that, you have an easy as pie Repel Potion made.
Compatibility Updates to Other YERD scripts - None so far.
Terms and ConditionsJust give credit where due.
Credits and Thanks-Pokemon. And when are they going to fix Nintendo Pokemon Wifi from trading hacked Pokemon?
Originally Found Here: Pockethouse
This post has been edited by Yanfly: Apr 20 2009, 06:36 AM