Status
Not open for further replies.

TheObermotz1

Veteran
Veteran
Joined
Mar 5, 2014
Messages
34
Reaction score
17
First Language
German
Primarily Uses
I wanted to know, if there is a way to make Events spawn randomly in a certain region ID. By that I mean, they can spawn on any tile, as long as the tile is within a certain region ID.

In my game, I want the monsters to spawn in the overworld where the player can see them and fight/avoid them. They're Events, wandering around randomly, waiting for the player to touch them and start a fight. Since they're events, the normal 'random encounters' tab doesn't work on them and I haven't found a way to make an event spawn inside a region ID.

But certain Monsters are only supposed to spawn in certain terrain, like crabs on the beach and snakes on the mountains. Same goes for certain villagers only spawning in certain areas of their village.
Regionspawn.png
Crabs spawn in the region-ID 60 and snakes spawn in 3 & 5


I've found a few scripts but none of them solve my problem. Some help from you guys would be much obliged.
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,353
Reaction score
1,380
First Language
Spanish
Primarily Uses
RMVXA
spawning events requires a full refresh of the map, so it's better to do it when transitioning.
but yes, it's totally doable.

a quick way of doing it, is just copying and reprogramming existing events.
set up one temporary event with a call to a common event, and that common event holding the logic for processing the battle encounter.
upon loading the map, you call the copy and reposition action.
 

Hyouryuu-Na

Very very lazy
Veteran
Joined
Jun 15, 2017
Messages
1,081
Reaction score
2,677
First Language
Not English
Primarily Uses
RMMV
https://yanflychannel.wordpress.com/rmvxa/utility-scripts/spawn-event/

Use this script to spawn events in required regions.
spawn_event_region(region_id, event_id)
spawn_event_region(region_id, event_id, map_id)
Use these script calls to make a new event from a premade event with the id 'event_id' in a map with the id 'map_id'. Be sure to fill up the region_id with the I'd of the region you want the events to spawn in.
 

bluebomber25

Veteran
Veteran
Joined
May 24, 2020
Messages
39
Reaction score
4
First Language
English
Primarily Uses
RMVXA
https://yanflychannel.wordpress.com/rmvxa/utility-scripts/spawn-event/

Use this script to spawn events in required regions.
spawn_event_region(region_id, event_id)
spawn_event_region(region_id, event_id, map_id)
Use these script calls to make a new event from a premade event with the id 'event_id' in a map with the id 'map_id'. Be sure to fill up the region_id with the I'd of the region you want the events to spawn in.

Very confused about this concept, but it's one I need to use. I've got a large overworld map, and have far more mobs than lines in the Encounter list. And I'm using some Yanfly scripts already =)
I know my World Map's ID#. There are Region ID's on the Map, so far just a few.
I want events(enemy encounters) to spawn randomly within each Region. Just like the OP.

I have no idea how to get this script to work.

How does it get Troop info?
Where do I put the "spawn_event_region(region_id, event_id, map_id)" information?
Where is it getting Event ID's from?
What should be in the Event itself?

Looked for a guide on how to use this script, can't find one. Any help is appreciated!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
3,005
Reaction score
2,272
First Language
English
Primarily Uses
RMMV
Is this a duplicate? I definitely gave an answer on a post identical to this one an hour or two ago.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,362
Reaction score
5,526
First Language
Dutch
Primarily Uses
RMXP

bluebomber25, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Took our dogs on a walk and someone asked if our smallest one was a gueanie pig ((however it's spelt))
I decided to create reboots of my games on RPG Maker MV. I'm happy. :biggrin:
So, as i finish setting up my items for part 1 of my game, I realized I forgot to finalize an ENTIRE category of items. Know which ones? The Fallen Feathers....BTW my game is called "Fallen Feather"
and_remember_tomorrow_exploding_puzzle_logo.jpg

Made some new friends, and blew up a puzzle... Happens. :LZSwink:
A new RPG Maker music pack is coming out soon! Below is a demo of one of the compositions in the pack, Heroic Battle. More details coming soon!

Forum statistics

Threads
111,148
Messages
1,058,705
Members
144,374
Latest member
strawbies
Top