Map Edge Transfer

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
Map Edge Transfer

2015.10.27

by Shaz

Introduction

This plugin allows you to add automatic transfers to the edges of your map.

How to use

Add to your plugins folder (file name does not really matter, but I call mine MapEdgeTransfer.js).  There are no parameters to set or plugin commands to call.

In the map notebox, add tags as follows:

<key: mapid x y direction fadetype>

where:

key = tfrup (transfer up at top of map), tfrdown (transfer down at bottom of map), tfrleft (transfer left at left edge of map) or tfrright (transfer right at right edge of map)

mapid = map id to transfer to

x = x coordinate on new map

y = y coordinate on new map

direction = facing direction after transfer (2=down, 4=left, 6=right, 8=up)

fadetype = 0-black (default), 1-white, 2-none

direction is optional (if omitted, current direction will be retained)

fadetype is optional (if omitted, will default to black); if entered, direction must also be entered

mapid, x, y, direction and fadetype can be values or formulae (don't use any spaces).

Example:

<tfrup 8 this.x 12> - when character reaches top edge of current map, they will transfer to map 8, x coordinate will be the same, and y coordinate will be 12.  Current direction is retained, and fade type 0 (black) is used.

Note - in order to transfer at the map edge, the player has to be ON the map edge and facing the edge.  This means when you transfer, you can transfer them TO the edge tile of the new map, facing inwards, and they won't automatically transfer back again.  They can walk along the edge without transferring.  It's only when they turn to face the edge again that it will trigger.

Plugin

Download from pastebin

Credit

- Shaz

Terms

- free for use in commercial games

Revisions

2015.10.30 - Fixed issue with player being temporarily invisible after transfer
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Going to bed now but I can't wait to start using this tomorrow :)  

I kind of design my maps 100x100 open world style so this was quite important to transfer map to map making feel more open world and not having to place 1000 transfer events in large crossings :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
Yeah, it makes more sense if the connecting maps are the same height and/or width, but I wanted to make it flexible enough that you could go to the same x/y coordinate, or set a specific one to go to, or make it a relative one (if map A is 20 high and map B is 40 high, you could set the transfer-to y coordinate to self.y * 2).

Good luck with it :)
 
Last edited:

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
320
Reaction score
175
First Language
English
Primarily Uses
RMMV
I made something like this for my VX Ace project and was planning to do the same for MV, but now that yours exists, why reinvent the wheel?

EDIT: Er, those commas in your template are a little confusing, given it actually does not work with commas. Also, just after the transition, my characters are invisible until I move.
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,600
Reaction score
2,360
First Language
French
Primarily Uses
DAMN I said slow down! now I have to work even more faster for publish more plugins '3' you are a squirrel boosted to caffeine *confiscate caffeine*
 

RedAkerston

Veteran
Veteran
Joined
Oct 10, 2015
Messages
67
Reaction score
12
First Language
English
Seems to work great! Just a quick question or two about how to use it correctly...

I put in the note tag <tfrup: 6 37 28>

So transfer up edge of map to map 6, at x37 y28. That much is working fine.

When i put in <tfrup: 6 37 28 up> to have facing up, i got an error that up is undefined... so i guess i am using the wrong word?

Also, when i appear on map 6, my character is transparent until i move, and then he appears again. Not sure what is causing this.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
I made something like this for my VX Ace project and was planning to do the same for MV, but now that yours exists, why reinvent the wheel?

EDIT: Er, those commas in your template are a little confusing, given it actually does not work with commas. Also, just after the transition, my characters are invisible until I move.
Thanks for the note about the commas - I put them in accidentally.  Fixed.

And darn!  On one playthrough MY characters were invisible after the transfer until I moved, then I did something, and it went back to normal, so I thought I must have fixed it.  I'll see if I can figure that one out.

Seems to work great! Just a quick question or two about how to use it correctly...

I put in the note tag <tfrup: 6 37 28>

So transfer up edge of map to map 6, at x37 y28. That much is working fine.

When i put in <tfrup: 6 37 28 up> to have facing up, i got an error that up is undefined... so i guess i am using the wrong word?

Also, when i appear on map 6, my character is transparent until i move, and then he appears again. Not sure what is causing this.
direction needs to be a number, based on the arrow keys on your numeric keypad.

up = 8, down = 2, left = 4, right = 6

So <tfrup: 6 37 28 8> will have them facing up (but if it has trfup, they're going to be facing up anyway).
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thanks I gave it a try a little complex having to remember to switch the x and y around with this and make sure got the right direction but once done so worth it :)

Hopefully one day someone figures out how to do the old map scroll transfer effect. That way it feels more seamless :)

But even with transfer type to none it feels better. 

EDIT: Also I can confirm every transfer I'm invisible till movement :)
 
Last edited by a moderator:

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
320
Reaction score
175
First Language
English
Primarily Uses
RMMV
Anything on that invisibility bug?

And can I request a feature? I like having my music fade out when changing tracks instead of abruptly changing (unless the circumstances call for it, like a random encounter.) Could you include an option for a music fade while transferring?
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Anything on that invisibility bug?

And can I request a feature? I like having my music fade out when changing tracks instead of abruptly changing (unless the circumstances call for it, like a random encounter.) Could you include an option for a music fade while transferring?
That might be something recommended as a separate plugin since that would work well with just normal transferring. 
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
I'll try and find & fix the invisibility issue.
 

HeroicJay

Veteran
Veteran
Joined
Jun 23, 2014
Messages
320
Reaction score
175
First Language
English
Primarily Uses
RMMV
Kane (I have trouble quoting on this machine for some reason, even with copy/paste): I don't really see how. For normal transfers, not only can you can just plug the "Music Fadeout" event command right in front of it, but there really isn't any good place to put it if you do it with a plugin. I don't want the music to fade with every transfer.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
Hey guys, for the invisibility issue, I'm having a hard time reproducing it.  Is there any chance someone could zip up a project and send to me?  Even if it's a brand new project with just a couple of maps, where you can get it to happen consistently.

If you're just using all default assets, all I need is your Data folder, your js/plugins folder, and your js/plugins.js file.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,543
Reaction score
12,059
First Language
English
Primarily Uses
RMMV
Okay, folks, thanks to Kane's little project, I think I've located and fixed the issue.

The pastebin has been updated with the fix, so if any of you who had the error (which happened when you left out the facing direction or had an invalid value in there) could please grab the updated version and try it out, and let me know if you still have the issue, that'd be great.

Thanks Kane :)
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thanks Shaz. So the moral of the story is we all screwed up on our directions but she has now added something to prevent our screw ups effecting us in the future :)

I went ahead and just cut down all my notes now anyways like so:

<tfrup: 2 this.x 99>

<tfrright: 8 0 this.y>

<tfrleft: 6 99 this.y>

The coordinates start at 0 so a 100x100 map would be just 0 and 99 for your coordinates. 
 
Last edited by a moderator:

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

Latest Threads

Latest Profile Posts

40 card deck size, the plugin seems more sluggish.
Village theme I composed for a commission!
Stream will be live shortly with some Haunting Ground! Feel free to drop by!
welp, the stock market went down by 7% because of corona today. Time to buy stocks?

Forum statistics

Threads
94,563
Messages
921,921
Members
124,429
Latest member
sheepman
Top