Nilom

Regular
Regular
Joined
Sep 9, 2013
Messages
178
Reaction score
40
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:
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,088
Reaction score
2,690
First Language
Greek
Primarily Uses
RMMZ
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

Regular
Regular
Joined
Mar 5, 2013
Messages
39,889
Reaction score
11,850
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
Regular
Joined
Jun 12, 2016
Messages
285
Reaction score
195
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

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,970
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

Regular
Regular
Joined
Sep 9, 2013
Messages
178
Reaction score
40
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.

2db00zq.jpg



@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

903cx0.jpg


@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?
2co1mk0.jpg


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:
 

_Shadow_

Tech Magician Level:
Moderator
Joined
Mar 2, 2014
Messages
4,088
Reaction score
2,690
First Language
Greek
Primarily Uses
RMMZ
Wow. SO many things going on here.
tumblr_lltzgnHi5F1qzib3wo1_400.jpg
 

mathmaster74

just...John
Regular
Joined
Jun 12, 2016
Messages
285
Reaction score
195
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

Regular
Regular
Joined
Sep 9, 2013
Messages
178
Reaction score
40
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

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,970
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.
 

Latest Posts

Latest Profile Posts

So i was looking at Lufia The Legend Returns Mapping Style in GBC. the Players view is a 9x9 square. MV has a more modern pixel art. As long as the environment is comprehensible, this mapping style is still good.
1701251621214.png
Kes
You have no idea how much time I spent last night trying to get a Santa hat to fit on my avatar's head. Failure. Head's too small.
I realized recently since my game is still a turn based game, that something like the card game Yomi is a lot closer to what I should try to aim for combat wise. Should also help for those who don't really play fighting games to make things a bit easier to understand. ugh the struggles of trying to show love for my 2 favorite genres in 1 go lol.
Did a bit of work on the chemistry tiles I want.

Hey There!


QPcure.png

My next plugin will be: "Dynamic Temperature Stats"

Now you might be wondering... What does it do?

Well, it's a fascinating plugin that adds a body temperature mechanic to characters.

(MORE INFO ⬇️)

Forum statistics

Threads
136,562
Messages
1,267,597
Members
180,246
Latest member
fsossh
Top