Orange Custom Events

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
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....
I'm also saving on the $gameSystem... Well, I can just assign a different ID to the event when loading it from there. I'll make some tests with that.
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
Are you sure this made a difference? I made some tests and noticed that even though the ID is, let's say, 1014, the event is added at position 14 of the array, so it couldn't possibly cause any lag. There's no iteration like that.
Edit: Can you guys check if the same lag occurs with Orange Move Character To? I believe it now includes all the features from Shaz's plugin too.
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,077
Reaction score
360
First Language
indonesian
i tested using Orange Move Character To? (i disabled shaz Pathfinder to make sure nothing conflicting).

i create a small map (17x13). add 7 event. then add new event using script call:

$gameMap.copyEventFrom(8, 1, 1, 1, false)or plugin command (i try both to make sure not the plugin command interpreter code make it wrong)

copy event 3 from map 8 to position 15 4 savethen i call the moveto command:

move event 7 to player and followthe result... fps loss when that event move. (not as noticeable as shaz... but still stutter the graphic a little bit)

Pathfinder lowest fps 14

Orange Moveto lowest fps 27

and then i try changing your +1000 to +50...

Pathfinder lowest fps 46 (it rarely... usually it's above 48)

Orange Moveto lowest fps 49 (it rarely... usually it's above 50)

hope this test help :D .

edit: first of all... hope you don't misunderstand this is as bragging...  >.< just want to give more input to the test.

using my plugin. with same event number. (add one event)

Pathfinder lowest fps 53

Orange Moveto lowest fps 58

even when i add 40 more new added event using my plugin (not from editor)

Pathfinder lowest fps 43 (rarely 43 though... it usually higer. it's the lowest)

Orange Moveto lowest fps 46 (rarely 46 though... it usually higer. it's the lowest)

so... the conclusion... event id is somehow affecting both pathfinding somehow.

my 7+40 event will have the event id of around 48. and your plugin with one event but changed to +50 will have event id around 51

the fps range is almost the same (40 fps range). the 7 +40 event having lower fps because it actually have more events. so lower fps is expected.

btw maybe i will switch to your Orange Moveto from shaz. since the test result is less fps loss. :D .

also... it support inside move route !!!

hope this test help finding the culprit :D .
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
I finally managed to see the lag here. Will fix it soon :)


Edit: fixed.


Thanks for all the input. I changed the copied events to get a new ID everytime they are loaded on the map. This way we shouldn't have issues when loading the game.
 
Last edited by a moderator:

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,077
Reaction score
360
First Language
indonesian
nice... the fps drop is gone. :D . i guess the culprit is really event id... i'm a bit curious about this :D .

edit:

hahahahahaha.... found the culprit...

i try adding event with id 1000

and when i print to console.

$gameMap._events

it have length of 1001   !!!!!!!!

.length will become the highest id + 1... omg...
 
Last edited by a moderator:

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
nice... the fps drop is gone. :D . i guess the culprit is really event id... i'm a bit curious about this :D .
It's like you said... When I create an event with ID 1014, it adds 1000 empty items on the array, just so that the event has it's own ID as it's index.
I hadn't noticed earlier because I was calling map.events() instead of map._events and the first one is already filtered.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,077
Reaction score
360
First Language
indonesian
It's like you said... When I create an event with ID 1014, it adds 1000 empty items on the array, just so that the event has it's own ID as it's index.

I hadn't noticed earlier because I was calling map.events() instead of map._events and the first one is already filtered.
i will have to remember this... i'm new in JS. so this kind of things can wreck what i imagine in my head :D .
 

Tester13

Villager
Member
Joined
Jun 30, 2015
Messages
10
Reaction score
8
First Language
English
Primarily Uses
I wish I had been here to partake in this conversation >~<

Anyways, the lag with PathFinder is indeed gone, and events are correctly copied and erased. I played with it a bit and couldn't find anything that wasn't working. So I guess the bugs are squished now.

Thanks again you two! I really appreciate your work and scripts, as without them, what I wanted to do would have been impossible. (Making a system which heavily relies on being able to copy/delete events)
 

Ste

Veteran
Veteran
Joined
Jun 30, 2014
Messages
38
Reaction score
17
First Language
Italian
Primarily Uses
RMMV
I created a parallel event (EV001) in Map 2 (Start time - Erase event).

The player is in the map 1 and a parallel event (EV001) in Map 1 is:



but show me the error message:



I can't solve.
Can you help me?
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
I created a parallel event (EV001) in Map 2 (Start time - Erase event).

The player is in the map 1 and a parallel event (EV001) in Map 1 is:



but show me the error message:



I can't solve.

Can you help me?
Can you check if there's any extra information on the console?

You can check the console by pressing F8.
 

Ste

Veteran
Veteran
Joined
Jun 30, 2014
Messages
38
Reaction score
17
First Language
Italian
Primarily Uses
RMMV

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
Apparently your MVCommons download got corrupted. Download it from this link.
 

Ste

Veteran
Veteran
Joined
Jun 30, 2014
Messages
38
Reaction score
17
First Language
Italian
Primarily Uses
RMMV
Oh, thank you! Now works!
This script is super useful! ^ ^
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
I also noticed you renamed the SuperOrangeMovementEx.js to OrangePixelMovement.js

Plugins with renamed files won't load their params properly. Other scripters have created a way to load the params regardless of the filename, but I haven't changed my plugins to use that yet.
 
  • Like
Reactions: Ste

Fox536

Veteran
Veteran
Joined
Nov 5, 2015
Messages
173
Reaction score
60
Primarily Uses
Hey can I suggest a small change, this doesn't currently return the new event after it's been made, in the functions such as Game_Map.prototype.addEventAt or Game_Map.prototype.copyEventFrom and you add a return to it so we can have the event after its been made :)
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,490
Reaction score
3,596
First Language
Java's Crypt
Primarily Uses
RMMZ
Hey can I suggest a small change, this doesn't currently return the new event after it's been made, in the functions such as Game_Map.prototype.addEventAt or Game_Map.prototype.copyEventFrom and you add a return to it so we can have the event after its been made :)
Yup, I added the return to addEventAt, but the copyEventFrom is async, so I can't add it there.
 

Fox536

Veteran
Veteran
Joined
Nov 5, 2015
Messages
173
Reaction score
60
Primarily Uses
Ok i didn't see that it was async, thats why there was a delay before i could get the event from $gameMap.events, that makes sense. Thanks though I'll be sure to use addEventAt :)
 

harvard1932

Veteran
Veteran
Joined
Nov 29, 2012
Messages
40
Reaction score
10
Primarily Uses
you should write this script without the use of mvcommon xD 

Installed mvcommon, installed it correctly top the very top. still gives: Uncaught Error: This library needs MVCommons to work properly!.

and mvcommon gives no parameter errors for all other scripts, I think you should move away from it until they fix it
 

DBDragoner

Veteran
Veteran
Joined
Apr 2, 2012
Messages
123
Reaction score
89
I love your plugin. I didn't see a plugin command to copy an event from one map to here, but I tried it anyways and it worked. SO happy. Your plugin just made my farming system doable. Thank you.

Would it be possible to add a plugin command that copies one event from another map to the location of the event your using and have the event your using be deleted? Kinda like a override feature? Or is there a simple delete event feature I'm not seeing. I have crops that will take several days to grow so I don't want the event to be temporary, but I will need it to be deleted later down the line.

edit: I found the command. I'm sorry. I had to reread this thread several times to find it. It was "Delete this event".
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

10/24 done :3 Maybe I can finish 11 and 12 this weekend^^
Been updating my game's control scheme to optionally use a mouse. Now the player pixel moves towards the mouse destination, which looks super sweet with the sparkles. Also turns out I made a Mouse Common Event plugin at some point... Thanks past me. :LZSexcite: Now the mouse wheel cycles different forms, and the right mouse button activates that form's special. :LZScool:
Oh man the controls in Mario Sunshine are pretty awful and I haven't even witnessed the controls without FLUDD

Forum statistics

Threads
102,957
Messages
996,253
Members
134,420
Latest member
MxMachine
Top