MZ Event Spawner

FEATURES
Spawn events from a specified map onto other maps at the location you choose or to a random region tile on the map.
Specify if you need the spawned events to be temporary (disappear when the player leaves the map) or saved (stay on the map forever like a normal event).

VERSION 1.2 – RPG Maker MZ
Download Plugin file


Download my master demo to view examples of this plugin from:
Galv’s MZ Plugins Home


34 thoughts on “MZ Event Spawner

  1. Mike's avatar Mike says:

    One of the most useful script ever.

  2. Mike's avatar Mike says:

    Can we have option to activate event only on “real 1×1 event” or for all event, for example 2×3 (like now)?

  3. Mike's avatar Mike says:

    Also, can we spawn event on X and Y by variables?

  4. Galv's avatar Galv says:

    Updated to 1.1 – fixed a crash when an animation was playing on an event while it is unspawned.

  5. Galv's avatar Galv says:

    Updated to 1.2 – for compatibility with an upcoming plugin

  6. mike's avatar mike says:

    Galv, can you implement despawn functionality?

    I want an event that spawns a mining node for example, and the player can mine it. But I want the node to despawn after X amount of time. Right now, I think I have to use a parallel to calculate the timer for despawn, but an action to check for player mining activity :(

  7. Xana43's avatar Xana43 says:

    I’m having issues with this plugin. Whenever I try to spawn an event it keeps saying “cannot read property of ‘note’ undefined”

    • Galv's avatar Galv says:

      Here’s some things to try and error trap: https://galvs-scripts.com/errors-using-plugins/

      First thing I would check for is plugin conflict.

      • Xana43's avatar Xana43 says:

        Ok, so it appears to be an incompatibility with the plugin “Eli’s book” from Hakuen Studio. I’ll try and get into contact with that developer, because I really want to use this plugin and the plugins that Hakuen Studio made (like very useful extra escape codes etc) because I’m trying to make a game that has lots of fancy escapecodes, triggers, etc etc. I just wish incompatibilities didn’t exist

      • Galv's avatar Galv says:

        Incompatibilities exist because we build for the default system and depends what we change. But by the sound of this, it could be how that plugin accesses the event notes.

  8. Oddgasm's avatar Oddgasm says:

    Hi Galv, sweet work.
    However, spawning events on specified terrain tag will sometimes stack them up between each others (I got the confirmation on this from the shadows)
    Is there any way to check if the cell is empty before spawning an entity in ?

    Thanks and good day :)

    • Galv's avatar Galv says:

      Assuming you’re using the MZ version because you are posting here – when you spawn an event using the plugin command, one of the options is ‘Overlap Type’. That’s where you specify if the event can spawn overlapping other objects or not.

  9. Mike's avatar Mike says:

    Galv, will there be an option to despawn single event, let’s say “this event” option, something like “Erase event” but permanently.

    • Galv's avatar Galv says:

      If it’s not in the instructions, I don’t plan on adding anything new.

    • prock's avatar prock says:

      +1 to this… it would make this plugin a lot more useful. I have a similar use case. I want to use this plugin to allow a player to collect something from a randomly created event in a specific region and then delete the event. However if I use “save event” option it will always come back whenever the player returns to the map even if I delete it using “erase event”.

      I’d also like to use it to spawn enemies in random locations that will go away once the player has encountered them (by clicking on them).

  10. Galvinnot's avatar Galvinnot says:

    Hi Galv
    Really cool plugin.
    Although I have gotten it to half work. I am using your spawn event plugin with your puzzle plugin to make Zelda bomb-able walls.
    Although when ever I spawn the bomb they don’t work.

    I have tested the bombs without spawning them and just being in front of the wall I want to bomb and that works.

    I have the overlap set to ‘all’ and the bomb spawns underneath the feet of the player.

    Love to here back.

    • Galv's avatar Galv says:

      Unfortunately without seeing what you’ve done and testing, I don’t know what’s up. I don’t have a lot of time for individual error trapping – I recommend asking in a forum to see if others can collectively assist! :)

  11. kipatiki's avatar kipatiki says:

    Why do characters don’t do anything when spawned ? T-T

    • Galv's avatar Galv says:

      I don’t know what you are trying to make them do or how you are trying to make them do it. Test what you are trying to do in the demo and see if your issue still happens.

  12. Odd Arne Nygård's avatar Odd Arne Nygård says:

    It seems that OcRam’s Core needs to be prio above this plugin. Had me stumped for a good hour

  13. Joey D's avatar Joey D says:

    // Despawning Events in Galv’s Event Spawner MZ

    // Plugin Commands:
    // 1. Clear Events (All Spawned Events):
    PluginManager.callCommand(this, “GALV_EventSpawnerMZ”, “clearEvents”, {
    mapId: 0, // Use 0 for the current map
    clearType: “all” // Use “normal” for non-saved events only, “all” for all spawned events
    });

    // Script Calls:
    // 1. Clear Non-Saved Events on Current Map:
    Galv.SPAWN.clear(0); // 0 indicates the current map

    // 2. Clear All Spawned Events on Current Map (including saved ones):
    Galv.SPAWN.clear(0, true); // true indicates clearing all events, including saved ones

    // 3. Unspawn a Specific Event:
    // Place this script call in the event’s code where you want to trigger its despawning:
    Galv.SPAWN.unspawn(this);

  14. Dr. Driscoll's avatar Dr. Driscoll says:

    Is there a way to spawn events on all of a region?

    I.G. Spawn coins on all of region 3

    Please excuse me if you answered this all ready.

    • Galv's avatar Galv says:

      That is possible, but not written into the plugin and I don’t have any free time to update or get the code you need. I recommend asking in a forum as someone can tell you the code to iterate through all tiles, check for region etc.

  15. Moonwood Games's avatar Moonwood Games says:

    Absolutely love this plugin, it’s great! You nailed it again, Galv 🙌🙌

    I have noticed it seems to be incompatible with the VisuMZ_EventsMoveCore plugin unfortunately. I’m sure there’s no plan to add compatibility which is totally understandable, but I figured I’d post here for anyone having the same issues I was having. If you copy events to a map and you have both this and the VisuMZ_EventsMoveCore plugin enabled, the events seem to just be copied over as blank events with no functionality at all.

    Again though, love the plugin, it’s so useful!

    • Galv's avatar Galv says:

      Thanks for the kind words. I am sure Visustella have made a spawner plugin as well, that one should be compatible with their other plugins.

      • MoonwoodGames's avatar optimisticf23db0f4c2 says:

        That’s true, I believe they have. I just really like your plugins 😅 Lol!

        Thanks for the reply! I hope you have a great day! 🙌

Leave a comment