Call Random Battle

Last Updated: 2011.12.06
Download Link
Github Link

For users who like to use touch encounters, I’m sure you’ve encountered the difficulty of randomizing what kinds of encounters can come with each touch encounter. This script call will randomize what battle will be held based on what random encounters would occur on the map.

Use a script call to have an event start up a random battle based on where the player is standing or region.

call_random_battle

This call will generate a random battle based on the tile (and region) that the player is currently standing on. Any battles outside of the tile’s marked region will not be added to the random pool.

call_region_battle(x)
call_region_battle(x, x, x)

This call will generate a random battle based on the tile (and region) that is marked by x. Any battles that can occur within those x regions will be added to the random pool.

And that’s all, folks!

13 comments on “Call Random Battle

  1. Forgive me if I’m wrong, but aside from the “region battle” functions (which might be useful for some games, and was perhaps your reason for writing this script at all), this script seems to do the same thing the Battle Processing event does. The last little option in said event (that I don’t think was in VX) is “Same as Random Encounter”. According to the tool tip: “Randomly selects an enemy group from among those set for random encounters from map settings.”

  2. I also found you can make “same as random encounter” work for a specific region. So if the monster touches you there, the random encounters in that region would be what you’d fight. So basically this script wouldn’t be necessary for either case, thanks to these built-in features. Thanks for all the other scripts, I’m using quite a few of them. =)

  3. This script would be clearer in its use and importance, if the random troop was set at the moment the event spawns/activates…elsewise the what-you-will-fight will be set by where it catches up with you, not by where it is ‘native’

    Example: a mob notices you in a swamp tile region (region tag 2) and chase you, thanks to the event chaser, across the continent and finally catches you in the foothills (region tag 6).
    Standart random encounter processing would have a battle generated by tag 6 (the region where you have been caught), but it should really be tag 2 (the region the event originates from).

    The specifying region tags in the notes will make it work like this, but it really would need to use the origin tag by standart.

  4. I wonder if there is anyway to change how running away is handled?

    a Battle Processing event has “If Party Wins” and “If Party Escapes” options… does mimicing that work for this script?

  5. Hello! Your script is great!
    But does its possible to random battle only for monster you have already fought?
    I need of it to do a similar system of arena like Golden Sun game…Thanks ^-^

    (Sorry for my bad english)

  6. Is there a way to can have monster listed for random battle on a map, but not have random battles actually occur? So that touch battles only happen?
    Or am I just supposed to set the Step Average to 999999?

      • I found that this works for me:

        class Game_Player < Game_Character
        def encounter
        return false
        end
        end

        However I am not sure how eloquent this is. (i.e. the system will still be trying to call encounters, counting steps to an encounter, and all that.) There probably isn't lag, but it still bothers me. Editing other definitions I discovered even broke event-based encounters.

      • … oh wait never mind, I’m completely stupid. Investigating more code lead me to notice there is in fact a “Change Encounter” event command on page 3. Just setting this to disabled at the start of a new game should work.

      • Woah! I had missed your reply XD
        Good thing I came back when I run into the same issue years later!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s