Orange Custom Events

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
Orange Custom Events 1.1
Hudell
Introduction
This plugin Will let you add or copy events from any map to the current map

How to Use

To copy an event from the same map:
Script Call:

Code:
$gameMap.copyEvent(1, 15, 20, true);
Plugin Command:
Code:
copy event 1 to position 15 20
This will copy event 1 to position 15, 20. The "true" at the end indicates that the event should not be re-added automatically when the player leaves the map and comes back.
To make the plugin save the event, change it to false on the script call or add "SAVE" at the end of the plugin command.

To copy an event from another map:

Script Call:
Code:
$gameMap.copyEventFrom(5, 1, 15, 20, true)
Plugin Command:
Code:
copy event 1 from map 5 to position 15 20
This will copy event 1 from map 5 to position 15, 20 on the current map.

To copy an event from the same map to a random tile of a specific region:
Script Call:
Code:
$gameMap.copyEventToRegion(1, 2, true);
Plugin Command:
Code:
copy event 1 to region 2
where:
1 = Event ID;
2 = Region Number;
true = temporary event.

To copy an event from another map to a random tile of a specific region:
Script Call:
Code:
$gameMap.copyEventFromMapToRegion(5, 1, 2, true);
Plugin Command:
Code:
copy event 1 from map 5 to region 2
This will copy event 1 from map 5 to a random tile with region 2 on the current map.

To fill a region with an event from the same map:
Script Call:
Code:
$gameMap.spawnMapEvent(1, 2, true);
Plugin Command:
Code:
spawn event 1 on region 2
This will copy event 1 from the current map and add it to every tile with the region 2.

To fill a region with an event from another map:
Script Call:
Code:
$gameMap.spawnMapEventFrom(5, 1, 2, true);
Plugin Command:
Code:
spawn event 1 from map 5 on region 2
This will copy event 1 from map 5 and add it to every tile with the region 2 on the current map.
 
To permanently delete a copied event, use the following plugin command:
 
Code:
delete this event
Plugin
Get it from here

Dependencies
None.

FAQ
I'll keep a small FAQ here for easy reference.

Credit and Thanks
- Hudell
 
Last edited by a moderator:

Barreytor

Villager
Member
Joined
Apr 19, 2015
Messages
9
Reaction score
12
It looks pretty useful and exactly what I was looking for, but I've tried it and it keeps throwing an "undefined is not a function" when I try to load an event from a different map.

Works flawlessly when copying from the same map, though. Here's hoping that issue can be fixed.
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
will you make it possible to spawn events with regions but also to make sure the events dont stack unto each other
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
It looks pretty useful and exactly what I was looking for, but I've tried it and it keeps throwing an "undefined is not a function" when I try to load an event from a different map.

Works flawlessly when copying from the same map, though. Here's hoping that issue can be fixed.
Hmmm, can you pick the updated version and try again?

If it still don't work, can you paste your script call here?

will you make it possible to spawn events with regions but also to make sure the events dont stack unto each other
I'm not sure I understand: You want to copy an event but instead of setting the position, you want to set a region and I should pick a random position with that region, is that it?
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
that's correct
 
Last edited by a moderator:

Barreytor

Villager
Member
Joined
Apr 19, 2015
Messages
9
Reaction score
12
Thanks, now it works as intended.

And that idea of choosing a random position within a region sounds pretty interesting, although an option to just fill in an entire region with copies of an event would be handy, too. (For region-common-evented floors of spikes, for example)

EDIT: Further testing (by adding more than one event that tries to run the script call to load an event from another map) made me find out that I can't have more than one event trying to create another at the same time. It crashed saying it "Cannot read property 'events' of null".

I assume that's because the second time it's called is smashing the first one.

I guess that could limit somewhat the functionality of the plugin. But then again, I tried to have two dozen copies of an event that replace themselves with an event from another map...

Unsurprisingly, it worked without problems if I tried to do the same thing by copying an event from the same map.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
Updated the script with the new feature and explained it on the main thread.

EDIT: Further testing (by adding more than one event that tries to run the script call to load an event from another map) made me find out that I can't have more than one event trying to create another at the same time. It crashed saying it "Cannot read property 'events' of null".
I assume that's because the second time it's called is smashing the first one.

I guess that could limit somewhat the functionality of the plugin. But then again, I tried to have two dozen copies of an event that replace themselves with an event from another map...

Unsurprisingly, it worked without problems if I tried to do the same thing by copying an event from the same map.
Fixed this too. It happened because the plugin tried to copy the second event while the map data was still being loaded for the first one.
 

Barreytor

Villager
Member
Joined
Apr 19, 2015
Messages
9
Reaction score
12
Working flawlessly and awesomely. As it is it feels as complete as it would ever need to be.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
Working flawlessly and awesomely. As it is it feels as complete as it would ever need to be.
Well, I still found something new to add to it and make it better, check the main thread :)
 

Indsh

Veteran
Veteran
Joined
Oct 11, 2015
Messages
225
Reaction score
65
First Language
English
Primarily Uses
N/A
Hey I made a requst for this so thanks for making it anyway :) I can't get it to work but i know i missing something basic. Do I cll with plugin or script caller?

V
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
Hey I made a requst for this so thanks for making it anyway :) I can't get it to work but i know i missing something basic. Do I cll with plugin or script caller?

V
I think plugin commands are easier to read :)

You need to add MVCommons first and this plugin under it.
 

Indsh

Veteran
Veteran
Joined
Oct 11, 2015
Messages
225
Reaction score
65
First Language
English
Primarily Uses
N/A
MVCommons was not above thank you :)
 

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
edited all my spawn events with your script, everything is working flawlessly so far

there's just one thing im missing, when l used Ace to get the event position, l was using get_character(0).x/y so the spawn would be right on the current event

now this script call is not working anymore, do you know what should l write instead?
 

Barreytor

Villager
Member
Joined
Apr 19, 2015
Messages
9
Reaction score
12
edited all my spawn events with your script, everything is working flawlessly so far

there's just one thing im missing, when l used Ace to get the event position, l was using get_character(0).x/y so the spawn would be right on the current event

now this script call is not working anymore, do you know what should l write instead?
Oh, I had that thing, too, but found a way. You just have to call it from a script call inside a move route, and you can use "this.x / this.y" to use the event's position if you do it that way.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
In Javascript, that script call is:

character(0).xinstead of

get_character(0).xEdit: Added two new options for plugin commands:

copy event 15 herecopy event 10 on player
"here" will copy the event to the same position as the event that is executing

"on player" will copy the event to the player's position.
 
Last edited by a moderator:

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
Hello! I'd like to ask a question about this script. It is possible to have it remove only certain events?

Doing the following Plugin Command: "copy event 1 from map 6 on player SAVE" will successfully work. And just as intended, if I leave the map and come back, the Event remains. However, I want to remove only selected events. Since you can't actually remove events, I opted to send the event to a dumpster of sorts, where it won't ever be seen again. However, after I remove the event, if I exit the map and come back, it re-spawns. Is there any way around this?

I know I could hide the event with a self switch, but this map constantly has many, many events at once. I want to be able to delete only certain events so that Rpg Maker won't start to lag due to all those events.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,517
Reaction score
3,653
First Language
Java's Crypt
Primarily Uses
RMMZ
Would it help you if I made the events be completely removed with the Erase command?
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
Yes, and if it stopped the events from re-spawning, that would be amazingly helpful! I'd be very grateful!
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,100
Reaction score
368
First Language
indonesian
Would it help you if I made the events be completely removed with the Erase command?
it would be better with a new plugin command instead using erase command. since people might want to erase the event temporary.
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
Oh, hello Estriole. I actually just came back from trying out your plugin xP

It's exactly what I was looking for, it deletes the events I called from Hudell's script and they won't re-spawn!. Except...it causes some weird side effects. After using your "delete_this_event" command, any doors in the map this was used on will either disappear completely or fail to play animations. And using the SmartPathfinder Plugin after using "delete_this_event" will cause a 40 FPS drop on occasions.

Thought I'd let you know in case it's a bug.

it would be better with a new plugin command instead using erase command. since people might want to erase the event temporary.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Was liking Genshin Impact ok.... then T.T .... *sniffle* then..... TWWWT MICRO-TRANSACTIONS!!!! BWAAAAAAAAAHAAAAHAAAAAAAA!


Would you be brave enough to explore an ancient dungeon filled with treasures?
Uh, and skulls; don't forget the skulls.
I can't believe that there are streamers playing my game! This is so amazing!


New starting map, hope it's better than the first.
new evolutions coming soon:ewink:
Oddball wrote on The_Sarah's profile.

Forum statistics

Threads
103,416
Messages
999,146
Members
134,947
Latest member
thecooked1
Top