Creating a Random Encounter System

Hi guys,

I had the idea of having a Random Encounter System for one of my upcoming games, but one that is actually good. It should pretty much look like what I mocked up in the screen below. As I have no ability of coding it myself entirely, I end up here just describing what I am looking for. I find this idea totally interesting and it could help to drastically improve random battles by making them more accessible to players, however, as stated before, this would only be possible if I could code it. Thus, I'm hoping to inspire some scripter to like this idea and help this vision come true. :LZSgrin:

Spoiler: Mock Up Screen
Unbenannt.png

  • There's a HUD in the corner showing some information to the player.
  • Random Encounters should only be possible on certain Regio IDs, not the entire map. Thus, the HUD should only show up as soon as the player steps onto a field having a Regio ID that is for battles. When moving on "normal" terrain, the HUD should disappear.
  • I had the idea of a HUD image showing to the player how many steps he has already taken vs. how much steps are needed to trigger the next encounter. Steps only count up while walking on "battle" terrain and each step there will increase the variable. In the example above, player had already taken 24 steps out of 50, while reaching the 50 will inevitable lead to a guaranteed random encounter.
  • There's also a picture displaying the main character which will change depending on how much steps are left until the next battle will start. Example:
    • Juggler has 3 balloons if steps are between 0 - 17
    • Juggler has 2 balloons left if steps are between 18 and 35
    • Juggler has 1 balloons left if steps are between 35 and 49
    • If steps reach the 50, the last balloon will explode and the random battle will start
    • After winning or fleeing the battle, step counter will reset to 0

This should actually go to RGSS3 Script Requests. I posted this in the wrong section by accident. If a moderator comes across this thread, pls move it there. Ty
You can get some/most of that with one script
(obviously paint the regions on the map for encounters)
Racheal Encounter indicator
You can get some/most of that with one script
(obviously paint the regions on the map for encounters)
Racheal Encounter indicator
Found this script as well but it only covers some points. So it's not what I'm actually looking for, like
  • Defined steps until the next encounter (no percentage, no variance)
  • Doesn't show steps taken vs. steps to next encounter
However, I think it can be modified to meet those requirements. I just don't know how.
Well, the basic features without GUI can be found here:

Ruby:
# * KSteps2Doom ACE * #
#   Scripter : Kyonides Arkanthes
#   2024-03-19

# This script turns the map's encounter steps as a fixed number.

class Game_Player
  def make_encounter_count
    @encounter_count = 0
  end

  def encounter
    return false if $game_map.interpreter.running?
    return false if $game_system.encounter_disabled
    return false if $game_map.encounter_step != @encounter_count
    make_encounter_count
    troop_id = make_encounter_troop_id
    return false unless $data_troops[troop_id]
    BattleManager.setup(troop_id)
    BattleManager.on_encounter
    return true
  end

  def update_encounter
    return if $TEST && Input.press?(:CTRL)
    return if $game_party.encounter_none?
    return if in_airship?
    return if @move_route_forcing
    @encounter_count += 1
  end
end

What it will do is simple, it adds steps to the counter and when it reaches the map's encounter steps... boom! An enemy ambushes the team! 😮

That region ID stuff is done by the system already, you just need to tell the map settings window that it should make your monster appear on a specific region only and that's it.
@kyonides NICE, thank you. As far as you describe it, that is the base structure of what I am looking for.

As for the GUI, after thinking about it, I'm editing my request to go with a much simpler version, like seen below. I prefer this mock-up over my previous one, to be honest. Just gradient background, one icon and the steps taken vs. steps until that counter explodes and a battle starts, would be totally fine for me. :LZSgrin:

Unbenannt.png
Just wait till a moderator approves this script thread then.
Just wait till a moderator approves this script thread then.
Checked it and absolutely love it! :LZSjoy:

Thanks a lot, my friend, you saved my day again.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-random-encounter-system.166949/