Plugin to save common events

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Hello!

Is there a plugin that can save common events when transfering on a different map?

I have the following situation:

Common Event:
- code
- code
- code
- player transfer to shop
- code
- player transfer back to map

- code
- code
- code
- etc.

Instead of continuing the red parts above, the map will completely reset and the common events will restart from the beginning.
Sure, I could use a bunch of variables inside the common events to disable all parts that would come before the "red parts", after the player was transferred. Thus would basicly lead the common event to continue where it was. But that would overly complicate eventing by a huge degree.



Does anyone know a plugin that will save common event execution?

Thanks in advance! :smile:
 

Dreadshadow

Lv 38 Tech Magician
Moderator
Joined
Mar 2, 2014
Messages
3,852
Reaction score
2,511
First Language
Greek
Primarily Uses
RMMV
How about that:
Let's say this code is consisted by
Code 1
Code 2
Code 3
Code 4

What if I told you that you can put each code part on a different Common Event?
Then you can create a Common Event, that can call only the Common Events you want.
Yes of course it will be more common events involved that way, but it will be super flexible, modular and simple in the long run.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,054
Reaction score
6,696
First Language
German
Primarily Uses
RMMV
what exactly does your common event do?

There are ways to write the logic of a common event in a way that the interruption doesn't matter.
Because usually this only happens if you place too much waits into it or if you place a transfer command at the wrong logic place (the map change always resets all events, and commands after it are almost never executed even on map events)

but we can't tell you how to rewrite your event without seeing what it does.
 

mathmaster74

just...John
Veteran
Joined
Jun 12, 2016
Messages
285
Reaction score
192
First Language
English
Primarily Uses
RMMV
@XZINED Okay. You have a common event here, which usually means it's code that's always on or a repeatedly called code routine. In it, you "player transfer to shop". I'm not sure if that's a shop map or not, but...I'm guessing it is because you still have to "player transfer back to map". I struggle to comprehend how these things go together unless you're trying to do something like a "Tonberry Shop". Yanfly has a Tips & Tricks video about how to go about this:


If that's not what you're after, then let's take your idea about:

a bunch of variables inside the common events to disable all parts that would come before the "red parts", after the player was transferred. Thus would basicly lead the common event to continue where it was. But that would overly complicate eventing by a huge degree.
Actually, you need just one conditional statement and one switch to turn the green code on or off. Hence, just before the code line for player transfer back to map, you could throw a switch, we'll call it GreenCode to OFF. By placing the green code inside an If switch GreenCode condition, it will only run when switch GreenCode is ON. (You should also initialize switch GreenCode to ON before this common event ever runs, NOT inside this common event.) To finish the act, somewhere in the lines of red code, flip the switch GreenCode back to ON. Code flow problem solved without overly complicating anything. :smile:
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,342
Reaction score
11,939
First Language
English
Primarily Uses
RMMV
- player transfer to shop
this is not a transfer to a different map, unless you have replaced the Shop Processing command with an actual shop map.
 

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Thanks for all your replies. Sorry that I didn't explain well enough what I'm trying to do.

What if I told you that you can put each code part on a different Common Event?
Then you can create a Common Event, that can call only the Common Events you want.
Yes of course it will be more common events involved that way, but it will be super flexible, modular and simple in the long run.
Actually, that's exactly what I do. I broke and sorted the code into different sections that I call phases. Some of them have own events that they call, as needed. This way I have a much better overview, can recycle portions of code and it is easier to modify code sections.




@XZINED In it, you "player transfer to shop". I'm not sure if that's a shop map or not, but...I'm guessing it is because you still have to "player transfer back to map".
Yes it is a shop map. Just for better looks. :D



@XZINEDActually, you need just one conditional statement and one switch to turn the green code on or off. Hence, just before the code line for player transfer back to map, you could throw a switch, we'll call it GreenCode to OFF. By placing the green code inside an If switch GreenCode condition, it will only run when switch GreenCode is ON. (You should also initialize switch GreenCode to ON before this common event ever runs, NOT inside this common event.) To finish the act, somewhere in the lines of red code, flip the switch GreenCode back to ON. Code flow problem solved without overly complicating anything. :smile:
Yeah I was thinking of something similar like this too. When the player is transferred back, the setup phase will start again (where the board, variables and game will set themselves up). So I would need an If statement inside the setup phase, disabling all the usual code and redirecting to the movement phase instead (from which the shop is called). Inside the movement phase I would need to disable the first block of code (before shop code) and have the after shop code enable the first block again.

...But there could be other issues with the player transfer. I would need a plugin to safe all the event locations. I know there is a good plugin for this.
But perhaps I should just simulate the shop map and perhaps other enterable buildings and just keep everything on the same map?


I could have the shop on the top left of each map, just far enough that it will never be seen inside the player view. The downside is that I would need to merge some tilesets, so that I have one small and efficient "all kind of shop" tileset that I can use for every map. And that it would make the maps bigger. I guess there will be about 3-10 little buildings on each map, that will be enterable.
What is the maximum tile size of maps? 100x100, 1000x1000? Are bigger maps more performance heavy, even if they have about the same amount of events, or does RPG Maker MV handle "offscreen" well enough?

What do you think about this solution instead of a real player transfer? :LZSsmile:
 

Dreadshadow

Lv 38 Tech Magician
Moderator
Joined
Mar 2, 2014
Messages
3,852
Reaction score
2,511
First Language
Greek
Primarily Uses
RMMV
Wow. SO many things going on here.
 

mathmaster74

just...John
Veteran
Joined
Jun 12, 2016
Messages
285
Reaction score
192
First Language
English
Primarily Uses
RMMV
@XZINED Max. map size is 256 x 256 grid squares. It won't be much more performance heavy to add that little shop (Little Shop of Horrors...uh oh...stuck in head...darnit...) off to the side of the same map as you have pictured here. That would certainly help to preserve event locations although any active events that remain active and in autonomous motion won't stay still, either...hence they may appear to have lost their location when they have not, they just kept running. Note: Being away from the events may take care of this, so it may be a non-issue. IDK. You will have to try/test it to be sure it works as you desire. It seems a lot easier than any alternatives. Best! :smile:
 

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Thank you. 256 x 256... I think that should be enough. If my maps get too big I could use Shaz' tile copy plugin and try to copy whole houses on the same spot, as needed. That way I would only need a little space for the fake transfer.
@Shaz Is there a limit in the amount of tiles being copied at once by your plugin? (At once to have the autotiles right)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,342
Reaction score
11,939
First Language
English
Primarily Uses
RMMV
No limit. There is no "having the autotiles right" - they will be copied from one map to another exactly as they appear. They do not reformat based on what's around them. If you have a pool of water and you copy half of it from one map to another, you will have half a pool of water with a straight line along one of the edges.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Trauma, drama, llamas--sadly the only one of those things I'm not experiencing RN is the camelids.
Do you ever just write or say nonsense? String together words to make a sentence that sounds pretty but is meaningless?
Writing down my ideas for my next game during break times at work XD I need to finish my current one very soon.
I survived Baudelaire and Bukowski, but I can't face C. Lispector. :kaoswt:

Forum statistics

Threads
93,658
Messages
914,363
Members
123,245
Latest member
putdhikrit
Top