How do random battles work?

Makatak

Ex-Soldier
Joined
Jul 24, 2009
Messages
63
Gil
0
I mean, how does the programming behind random battles work?

Does each map/load-section have a bunch of cells on the ground that have a small percentile chance of being marked (as in: causing a random battle if you walk into it) from the time the section loads?

Is it predetermined in some way by a complex series of number crunching in the background that determine how many steps your character will take before another battle occurs, or is it constant (example: there is a 7% chance of entering a battle every step or two, with new probability generation occurring constantly)

I always wanted to know.
 
it probly varries by game, i think in most tho its like a percent chance, in some it may even be a time or number of steps, cuz some almost seem periodicle to me, thats my theory
 
I'd be willing to bed they do some of random "number checking".

That is to say, every step you take, the game produces a random number in a certain range, let's say between 1-100. Then, the game checks to see if that number matches a certain number, and if so, a battle is generated. You notice that this corresponds to a 1% chance of entering a battle...so they can change the range of the random number, or add extra number to check against.

I don't really know though, I'd wager that it's different from game to game.
 
Someone told me that each step you take it would be +1, making the percentages of a random battle go up, and that somehow walking against a wall would only make the percentage go up by a tiny bit
I'm not sure its right though
 
Umm... I don't really know, but I can geuss.
I take RPG Maker as an exapmle. When creating random ecounters there, you choose "a battle once in X steps". I assume that each step has a certain percent of making a random ecounter.

For example, if you write "once in 20 steps", then for each step you'll have a chance of 1/20 to ecounter enemies. It will make things look "random" while in average it is really a battle per 20 steps.
 
its actually much more complex than that, having developed basic RPG type games myself in my space time. Each map is split into areas, each area has a list of possible monster groups attached to it. Every time the character makes a step, the computer randomly picks a number, if the result of that is between 0 and the set encounter rate for that area, the computer randomly decides which of the possible groups of battle it will use (the groups can also have different probabilities associated with them), it then launches said battle
 
I'm agree with the number of steps. Lets say you get a monster every 6 steps. You walk 6 steps, a monster appears. After that you walk another 6 steps, another monster appears, and so on.

My (and some other people's) theory.
 
What I said is how it works, I write RPGs from time to time (and properly not in RPG maker) :P
 
Don't diss RPG Maker! Anyway, I'm gonna guess they set a frequency of battles. Like if it's set to 10 then every step you have a 10% chance of entering a battle until you eventually get a number between 1 and 10.
 
What I said is how it works, I write RPGs from time to time (and properly not in RPG maker) :P
I actually agree with your method mentioned. I know it's not "per steps", because they don't always take the same number of steps. The time between encounters varies greatly at times. And I know it can't be based merely on which thing you step on, because I've gotten battle encounters simply by stepping one over back and forth.
 
Back
Top