Does anyone know exactly how they are calculated, or how to change them?
Encounter Rates in mv
RPG Maker MV SupportI don't have RPG maker on this computer, but i think it's in the edit menu of the map. You can set the average number of steps between each encounter, and also the % of chance for each enemy to appear.
I've moved this thread to MV Support. Please be sure to post your threads in the correct forum next time. Thank you.
Yes. It does a calculation so that the number you enter as the steps is the average number of steps before an encounter on that map.
How does it work it out?
If you enter 30 as the number of steps, it takes TWO random numbers between 0 and 29, adds them together, then adds 1 to the result. This means you will get a random number between 1 and 60.
Yes. It does a calculation so that the number you enter as the steps is the average number of steps before an encounter on that map.
How does it work it out?
If you enter 30 as the number of steps, it takes TWO random numbers between 0 and 29, adds them together, then adds 1 to the result. This means you will get a random number between 1 and 60.
Hi Shaz,
Abit confused here, so the 30 steps does not mean anything from 1 to 30 steps taken that we will encounter monsters?? but = 1 to 60 steps if we input 30?
Yep. I was testing something and set it to 30, and counting each step until a battle occurred, and it went to 50+. So I checked it out.
The thing is, it does 30 steps on average which means it could be less than 30 or it could be more than 30. That is what they do to make it "on average". This means that there is a VERY small chance that you could get a new encounter just a couple of steps after the last one, or that you might not have an encounter until nearly 60 steps after the last one.
Personally, I'd prefer it to count 30 + or - 10 steps, or something like that.
The thing is, it does 30 steps on average which means it could be less than 30 or it could be more than 30. That is what they do to make it "on average". This means that there is a VERY small chance that you could get a new encounter just a couple of steps after the last one, or that you might not have an encounter until nearly 60 steps after the last one.
Personally, I'd prefer it to count 30 + or - 10 steps, or something like that.
For this reason, I'd heavily suggest not using the default system. It's definitely better to use a system that has a minimum number of possible steps before an encounter happens, as well as a maximum. There is nothing more frustrating than trying to explore a dungeon and unluckily getting several encounters within a small number of steps!
If you want to overwrite how many steps until an encounter, the function you want to look at is in rpg_objects.js and it's called Game_Player.prototype.makeEncounterCount
Now that I know it works this way by default, I'll probably write a small plugin for myself tonight that does it the way that Sated suggests.
You could also use events to trigger battles if you want greater control and flexibility over how you encounter enemies.
That's what I do.
That's what I do.
Another popular option that allows a bit more control is creating events for encounters.
You create and place wandering monster events around you map that players can see.
You can do all sorts of nifty things like additional random events that happen during the encounter. Add some flavor text for monsters that speak.
In this one, this event is triggered only after you complete the beginning intro quest and talk to a small boy inside one of the houses.
The spider that spawns is a tough one. However I set this encounter to only trigger if the player interacts with it. If they are defeated, they escape with their lives and try again later once they become more powerful.
Once the player defeats the encounter it disappears and speaking to the small boy completes the quest line.
Most of the other events respawn if defeated. Some move towards the player for example

You create and place wandering monster events around you map that players can see.
You can do all sorts of nifty things like additional random events that happen during the encounter. Add some flavor text for monsters that speak.
In this one, this event is triggered only after you complete the beginning intro quest and talk to a small boy inside one of the houses.
The spider that spawns is a tough one. However I set this encounter to only trigger if the player interacts with it. If they are defeated, they escape with their lives and try again later once they become more powerful.
Once the player defeats the encounter it disappears and speaking to the small boy completes the quest line.
Most of the other events respawn if defeated. Some move towards the player for example

Everyone else has done a marvellous job covering the non-random encounter methods but in case you're still interested in a random encounter formula but don't like the default implementation, and because I said I was going to do it earlier, here's my plugin for overwriting the encounter formula with a custom one. It basically just eval's the formula parameter, so it's pretty barebones but should be flexible enough for anything you need.
EncounterFormula.js
I'm using the namespace WiggleLib since that's what I've been using for my other plugin. I'll try to get a post in the JS plugin forum later once I've finished my other plugin. If there's something I can add, please let me know.
Edit:
The above plugin has been released and you can find more info in this thread: http://forums.rpgmakerweb.com/index.php?/topic/49773-wigglelib-variable-encounters-random-encounter-formula/
EncounterFormula.js
//=============================================================================// WiggleLib - Encounter Formula// EncounterFormula.js// Version: 1.00//=============================================================================//============================================================================= /*: * @plugindesc This plugin allows you to write a custom random encounter formula. * @author JumbocactuarX27/Wiggle * * @param Formula * @desc Formula for deciding when random encounters will happen. * For map's encounter step use "encounterStep". * @default Math.randomInt(encounterStep) + Math.randomInt(encounterStep) + 1 */ //=============================================================================WiggleLib.EncounterFormulaParams = PluginManager.parameters('EncounterFormula');Game_Player.prototype.makeEncounterCount = function() { var encounterStep = $gameMap.encounterStep(); this._encounterCount = eval(String(WiggleLib.EncounterFormulaParams['Formula']));};
I'm using the namespace WiggleLib since that's what I've been using for my other plugin. I'll try to get a post in the JS plugin forum later once I've finished my other plugin. If there's something I can add, please let me know.
Edit:
The above plugin has been released and you can find more info in this thread: http://forums.rpgmakerweb.com/index.php?/topic/49773-wigglelib-variable-encounters-random-encounter-formula/
@JumbocactuarX27
My understanding is that most JS plug ins have to be saved with the correct file name or they do not work.
However, having two periods in that file name means that it will only save as WiggleLab.js
Would you please clarify the file save name for users.
Thanks.
My understanding is that most JS plug ins have to be saved with the correct file name or they do not work.
However, having two periods in that file name means that it will only save as WiggleLab.js
Would you please clarify the file save name for users.
Thanks.
You can also do random encounters with events. It just requires a parallel process event that uses two variables - one for the current number of steps, and one for the number of steps at the time of the last encounter. If the difference is >= a set number, call up a battle.
Even as someone who has written guides on how to do that in RM2K/3, I wouldn't recommend it for people who have scripting at their disposal. It's unnecessarily long-winded to implement.
Sorry.
I saved and tested it with the file name "EncounterFormula.js".
In the future I'll host the file somewhere and offer it for download as well as prepend my filenames with "WiggleLib_" to avoid confusion. My bad.
sorry to resurrect this thread, i hope its ok, Shaz. But thanks to jumbo mentioning where the encounter rate code was in rpg_objects, i slightly changed it to where the Encounter Steps set in map settings = the minimum steps needed to start an encounter, and there is a random integer, taken from 10 in this case. (but u can change the number) that is added to the minimum steps for a sense of random.
Game_Player.prototype.makeEncounterCount = function() {
var n = $gameMap.encounterStep();
this._encounterCount = (n) + Math.randomInt(10); <--- random number added to n
n= Enc. Steps in map settings.
Thought some people might find it useful as opposed to trying to find a plugin for it.
Game_Player.prototype.makeEncounterCount = function() {
var n = $gameMap.encounterStep();
this._encounterCount = (n) + Math.randomInt(10); <--- random number added to n
n= Enc. Steps in map settings.
Thought some people might find it useful as opposed to trying to find a plugin for it.
Original thread: https://forums.rpgmakerweb.com/threads/encounter-rates-in-mv.49284/