The RPG Maker Resource Kit

Other Game Creation => Game Creation General Chat => Topic started by: DarkMessiah on July 04, 2010, 11:46:04 PM

Title: Ideal steps between random encounters?
Post by: DarkMessiah on July 04, 2010, 11:46:04 PM
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
Title: Re: Ideal steps between random encounters?
Post by: cozziekuns on July 05, 2010, 01:16:06 AM
20.

20 for any map.
Title: Re: Ideal steps between random encounters?
Post by: Jonesy on July 05, 2010, 01:30:13 AM
Or none, I hate random encounters. Especially frequent ones.
Title: Re: Ideal steps between random encounters?
Post by: Mr_Wiggles on July 05, 2010, 04:42:50 AM
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.
Title: Re: Ideal steps between random encounters?
Post by: blueXx on July 05, 2010, 07:24:24 AM
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.
Title: Re: Ideal steps between random encounters?
Post by: Taylor on July 09, 2010, 01:54:14 AM
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.
Title: Re: Ideal steps between random encounters?
Post by: DarkMessiah on July 10, 2010, 01:58:57 AM
@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
Title: Re: Ideal steps between random encounters?
Post by: Mr_Wiggles on July 10, 2010, 08:30:48 AM
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
Title: Re: Ideal steps between random encounters?
Post by: Taylor on July 14, 2010, 01:22:00 AM
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.
Title: Re: Ideal steps between random encounters?
Post by: Mr_Wiggles on July 14, 2010, 01:51:32 AM
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]
Title: Re: Ideal steps between random encounters?
Post by: Jonesy on July 14, 2010, 03:13:20 AM
Couldn't you just do Rand(20) + 20 for any numbers between 20 and 40?
Title: Re: Ideal steps between random encounters?
Post by: Mr_Wiggles on July 14, 2010, 03:15:35 AM
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)
Title: Re: Ideal steps between random encounters?
Post by: DarkMessiah on July 14, 2010, 04:19:58 AM
Man you guys are gettin complex im no good at scripting
Title: Re: Ideal steps between random encounters?
Post by: DarkGamer on July 20, 2010, 11:29:43 PM
Quote from: Jonesy on July 05, 2010, 01:30:13 AM
Or none, I hate random encounters. Especially frequent ones.

imo. 30+