In your opinion, how many steps should there be between random encounters in a game? Id say around 70 for a large area and 30-50 for a small area
20.
20 for any map.
Or none, I hate random encounters. Especially frequent ones.
Yea when playing RPG games that is on thing that would always get on my nerves. Nothing like finishing a battle then walking 5 steps to enter another.
Early game say random(50,150)
Mid game I'd go random(30,70)
Late game powerful-creatures-maps-only random(20,100), remove random encounters from weaklings maps and set mid-creatures maps to random (200,300)
Torment otherwise.
I'd also allow repel potions, can never have enough of those.
You might want to know that RM2k and possibly RM2k3's step system is broken. As I recall, it works by a random number between 0 and the value in the map properties, as opposed to around that number like you'd expect. So no matter how high you set it, there's still a chance you'll run into an enemy in the next 5 steps instead.
@Taylor i use RMXP so yeah it doesnt affect me thought even if i set the step count to say 50 theres still a chance ill get an encounter in 20
This is prob why that happens.
[spoiler=some code]
#--------------------------------------------------------------------------
# * Make Encounter Count
#--------------------------------------------------------------------------
def make_encounter_count
# Image of two dice rolling
if $game_map.map_id != 0
n = $game_map.encounter_step
@encounter_count = rand(n) + rand(n) + 1
end
end
# If encounter list isn't empty, and encounter count is 0
if $game_player.encounter_count == 0 and $game_map.encounter_list != []
then start the battle
end
[/spoiler]
the rand(n) is taking the steps to encounter and suing it as its max, (so if steps are say 50, it will be a number between 0 - 50)
so rand(50) + rand(50) + 1 say numbers are 20, 10 so 31 is the required steps.
you can edit it to be more specific with what you want. that and if you where just Wondering how it made the random encounters.
or you can use this little code, it will make sure that when the player takes the encounter steps then it will encounter an enemy.
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Make Encounter Count
#--------------------------------------------------------------------------
def make_encounter_count
if $game_map.map_id != 0
@encounter_count = $game_map.encounter_step
end
end
end
just paste it above main bellow the defaults
rand can use ranges right?
Would something like @encounter_count = $game_map.encounter_step + rand(-10..10) work? To add a variable between -10 and 10. By adding a negative it will instead subtract it, but it works the way one would expect: a random variable that works "around" the specified encounter rate.
no they do not, whats in the rand is just the max, but you can do something like this to make it a range, and you can't get negative numbers from the rand..
rand(1) == 0 ? val = (-1) : val = 1
@encounter_count = $game_map.encounter_step + (rand(10) * val)
this will create your range that your looking for,
[edit the way i had it before didn't work but i fixed it]
Couldn't you just do Rand(20) + 20 for any numbers between 20 and 40?
yea you could, but if that's constant this takes the encounter steps set for the map and uses them, and just makes the range of -10 + 10 so there is a minor change through he steps instead of a constant, your way i see that you would have that for each map. (20 - 40 steps)
(im sure there are plenty of ways as well other then the one i showed)
Man you guys are gettin complex im no good at scripting
Quote from: Jonesy on July 05, 2010, 01:30:13 AM
Or none, I hate random encounters. Especially frequent ones.
imo. 30+