Orange Custom Events

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
Ok, I can't test this on MV right now, so I'll put the code here instead of GitHub:


I added the plugin command "delete this event" that will call the erase command and stop the event from re-appearing on map changes.


Edit: Removed old code.
 
Last edited by a moderator:

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
It didn't work in my tests. Would either result in a crash or event would re-spawn upon re-entering map.

I appreciate it, though, and will try to work it out with Estriole's script. So far it's worked quite well alongside yours. Causes some issues like lag with Pathfinder and door interaction, but I only need this much eventing for this one map. Thanks again!
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
Well, I'll fix this first thing when I get home tonight.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,202
Reaction score
425
First Language
indonesian
It didn't work in my tests. Would either result in a crash or event would re-spawn upon re-entering map.

I appreciate it, though, and will try to work it out with Estriole's script. So far it's worked quite well alongside yours. Causes some issues like lag with Pathfinder and door interaction, but I only need this much eventing for this one map. Thanks again!
for the door cannot work... it's indeed my plugin conflicting with the AUTO DOOR event... try this in a project without any plugin. create a door event. and for teleport target place it at the same map. then you'll see in the same map the door CANNOT be used again... will fix this as soon as possible.

but the Pathfinder is not... i tested and it appear that the Pathfinder plugin in conflicting with your plugin Hudell... i disable all other plugin... then when

adding even just one custom event on the map. then do one plugin command to pathfinding. it will reduce the fps to 30-40.
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
Here are my findings thus far:

So far your script works perfectly to copy an event onto a different map multiple times. The lag this causes might be because of how Rpg Maker handles this. Or so I'm told anyways. Either way, I can fill a 27x18 map with events before the lag starts to get really bad.

And Estriole is correct, I did some more testing after my last post, and your script will indeed cause lag with PathFinder. Copying events and then using Pathfinder in that same map stutters the game.

PS: Thanks, Estriole, Hudell, you two are quite friendly. I'm new to this community so I was nervous xD
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
Here are my findings thus far:


So far your script works perfectly to copy an event onto a different map multiple times. The lag this causes might be because of how Rpg Maker handles this. Or so I'm told anyways. Either way, I can fill a 27x18 map with events before the lag starts to get really bad.


And Estriole is correct, I did some more testing after my last post, and your script will indeed cause lag with PathFinder. Copying events and then using Pathfinder in that same map stutters the game.


PS: Thanks, Estriole, Hudell, you two are quite friendly. I'm new to this community so I was nervous xD
Hmm, I just tested the script I had released on the other post and it is working properly.
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
Hmm, I just tested the script I had released on the other post and it is working properly.
Just tested it again and made multiple copies and multiple projects with only your script just in case. I might be doing something wrong? I'm only using MvCommons and Orange Custom Events. I then made a new event, and set it to activate with the Action Button. I then added Plugin Command: "delete this event" in it's content. Upon testing, it was successfully removed from the map. However, taking a door to a different map and then coming back to this map, would cause it to re-spawn.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
Just tested it again and made multiple copies and multiple projects with only your script just in case. I might be doing something wrong? I'm only using MvCommons and Orange Custom Events. I then made a new event, and set it to activate with the Action Button. I then added Plugin Command: "delete this event" in it's content. Upon testing, it was successfully removed from the map. However, taking a door to a different map and then coming back to this map, would cause it to re-spawn.
Ok, did some proper testing and found an issue this time. I've updated the script on GitHub with the new "delete this event" command because I believe everything is working properly now.
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
Thanks, unfortunately I don't have time to do it right now but I'll test this out as soon as possible!
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
All right, so I tested the Script multiple times, and trying multiple things. And it worked perfectly across all tests.

*Deleted Events will be removed, and reloading the map won't re-spawn them.

*Doors will also function correctly, even after reloading the map.

*Events set to Pathfind will also properly be reset upon reloading the map now. However, your script still causes lag with PathFinder. Other than that, it's exactly everything I needed! Thank you very much!
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
All right, so I tested the Script multiple times, and trying multiple things. And it worked perfectly across all tests.

*Deleted Events will be removed, and reloading the map won't re-spawn them.

*Doors will also function correctly, even after reloading the map.

*Events set to Pathfind will also properly be reset upon reloading the map now. However, your script still causes lag with PathFinder. Other than that, it's exactly everything I needed! Thank you very much!
If you copy the event on RM and paste on the same places, do you get the same lag?
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
If you copy the event on RM and paste on the same places, do you get the same lag?
I have no idea what RM stands for >~<

 

Do you mean deleting an event and then copying on the same tile? Because that so far hasn't caused any lag. The Plugin Command: "SmartPath event=0 event=-1" is what causes lag in a map where your script has been used.
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
I have no idea what RM stands for >~<


Do you mean deleting an event and then copying on the same tile? Because that so far hasn't caused any lag. The Plugin Command: "SmartPath event=0 event=-1" is what causes lag in a map where your script has been used.
RM is Rpg Maker.


I'll check that SmartPath plugin to see if there's anything I can do.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,202
Reaction score
425
First Language
indonesian
the fps drop happen only when this two condition met:

1) adding new event using your plugin even just one event. and NOT leaving the map

2) executing Pathfinder.

it will loss fps until we move to new map.

when we leave the map... reenter... it won't be fps loss...

but when we execute Pathfinder again... it will be fps loss again...

hope this test can help you point the problem...

edit: found the possible culprit... it's because when you create new event you add event_id with 1000

  Game_Map.prototype.getIndexForNewEvent = function() {    var index = this._events.length;    if (index < 1000) {      index += 1000;    }    return index;  };maybe there's some code that iterate 1 to event id and 1 to 1000++ is lots of iteration...

from what i see in pathfinder plugin... there's no such iteration... but maybe there's a function called by the plugin which have that iteration (would be harder to trace)

i tested by changing + 1000 with + 50 and the lag is gone.

in my plugin i detect the next event id instead.

event id currently exist on map: 1, 2, 3, 4, 5, 6, 9, 10,11

next id generated will be 7. then 8. then 12.

thus no fps loss
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
What's the size of the map you're testing it on and how many events does it have?
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,202
Reaction score
425
First Language
indonesian
small map (17x13) with only 5-8 events... and add only one new event using your plugin. so total final event max 9 event.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
maybe there's some code that iterate 1 to event id and 1 to 1000++ is lots of iteration...


from what i see in pathfinder plugin... there's no such iteration... but maybe there's a function called by the plugin which have that iteration (would be harder to trace)


i tested by changing + 1000 with + 50 and the lag is gone.


in my plugin i detect the next event id instead.


event id currently exist on map: 1, 2, 3, 4, 5, 6, 9, 10,11


next id generated will be 7. then 8. then 12.


thus no fps loss
Hmm, thanks for this info. Increasing it by 1000 is necessary, though.


If the player adds a new event on the map on Rpg Maker and loads a save file with an event with the same ID, their new event won't show up.


Fixing the pathfinding to not lag with 1000 events is easier.


Also: I found another issue on the smartpath plugin that may cause a lot of lag. I'll tell Shaz about it.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,202
Reaction score
425
First Language
indonesian
Hmm, thanks for this info. Increasing it by 1000 is necessary, though.

If the player adds a new event on the map on Rpg Maker and loads a save file with an event with the same ID, their new event won't show up.

Fixing the pathfinding to not lag with 1000 events is easier.

Also: I found another issue on the smartpath plugin that may cause a lot of lag. I'll tell Shaz about it.
in my plugin i search for the next event id.

first list all existing event id in the current map. then return the next id that can be used.

the logic works since ACE :D .

so there no way for duplicate id.

edit: sorry... i misunderstand your post... you mean... adding event in editor until reaching new event id. then loading existing savefile :D .

yes... that might caused problem... in my plugin it still won't happen though... since i save the map event.
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,529
Reaction score
3,680
First Language
Java's Crypt
Primarily Uses
RMMZ
in my plugin i search for the next event id.


first list all existing event id in the current map. then return the next id that can be used.


the logic works since ACE :D .


so there no way for duplicate id.


edit: sorry... i misunderstand your post... you mean... adding event in editor. then loading existing savefile :D .


yes... that might caused problem... in my plugin it won't happen though... since i save the map event.
Imagine a situation like this: You have a map with 20 events. Then you playtest and use the script to add event 21 and save your game.
Then you edit the game on rpg maker and add a new event. Rpg Maker will give it the id 21. If you playtest again and load that save file, the event 21 from rpg maker won't be there, only the one you added through script.


At least that's what used to happen on Ace with Hime's EventWrapper. I never really tested without the +1000 on MV.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,202
Reaction score
425
First Language
indonesian
Imagine a situation like this: You have a map with 20 events. Then you playtest and use the script to add event 21 and save your game.

Then you edit the game on rpg maker and add a new event. Rpg Maker will give it the id 21. If you playtest again and load that save file, the event 21 from rpg maker won't be there, only the one you added through script.

At least that's what used to happen on Ace with Hime's EventWrapper. I never really tested without the +1000 on MV.
ICIC... yes you're right... my plugin save the map event in $gameSystem. and use that event instead reloading the map. so when there's changes happen in editor.. it won't be loaded at all. and use saved event instead :D . so if you add new event in editor... you either need to start new game. or erase 'saved event' for that map so it will reload from map data (it reminds me... to create plugins command for that :D ). it would be bad if we want to release Patch / DLC for the game and requiring to restart from new game... :D ... i might need to find improved approach for this :D . maybe some variables again for marking which event is New Generated for that map and option to keep them when deleting 'saved event' while also reindexing the duplicate id....
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Ami
--- Spoiled Food ---

M.Knight: Oh,no! the Bread has been Mold!
Chef: It's not Mold,it's in Fermentation.
M.Knight: Are you sure?
Chef: Y'know Cheese? It's safe to eat
(Chef eat the Moldy Bread,after that he take into the Hospital with Green Face)
Suddenly I remember the days when I create something just by pure wild imagination. I wasn't thinking about concept, structure, or anything else. Just create (even if it's unfinished in the end). Somehow I kinda want to have that wild imagination again. :D
Google "The Great Stink"
Enjoy.
Woke up on an awful nightmare of being banned here because some mod didn't liked me in a super-heroes freeform round robin RP where I used throwing normal hammer as power and it was qualified being too OP. XD Nice to read you all guys. Will not wait next nightmares.

Forum statistics

Threads
104,332
Messages
1,005,596
Members
135,844
Latest member
andrewshetty123
Top