Jester 16 Posted February 6, 2013 (edited) Map Edge Transfer (VX-Ace) v2.3 by Jester special thanks: diamondandplatinum3 for being an awesome guy. CHECK OUT HIS SCRIPTING VIDEOS! helpful feedback: PVGames, Chigoo, Tammsyn Version History: 06.FEB.2013 -> 1.0 -> Initial Release 08.FEB.2013 -> 1.1 -> Bugfixes, Syntax Overhaul, 8-dir compatibility 18.FEB.2013 -> 2.0 -> More Customization and compatibility with Slide-Effect 05.MAR.2013 -> 2.1 -> Compatibility improvement 15.MAR.2013 -> 2.2 -> A Script call to manually choose the transfer coordinates (Take a look at line 72 and below) 15.MAR.2013 -> 2.2a -> Hotfix 21.SEP.2013 -> 2.3 -> Added "Offset" Script call (Take a look at line ~100 and below) Features: Automatic Map-Edge-Transfer system More realistic looking transfer This Script allows the player to automatically transfer to the next map when hitting the edge of the current map, using in-game variables. It also adds a small feature to make it look like the player actually WALKS out of the current map into the new map instead of teleporting. This Script is NOT PLUG'N'PLAY, but relatively easy to use. Take a look at the Customization section. If you still have problems, try out the recent Demo before asking for help! Bugs: (no known issues) Conflicts: Place this Script below any movement scripts, like 8-dir-movement I am fine with Compatibility fix requests if you say "PLEEAASEEEE!!!" Screenshot(s): Script: Most recent version (Pastebin) Demo: Map Edge Transfer v2.1a + Slide-Effect v1.3 (link to the Slide-Effect Script in my signature) Terms of Use: -Free to use in uncommercial projects -Credit me if you feel like it -Have a nice day Edited September 21, 2013 by Jester 1 oriceles reacted to this Share this post Link to post Share on other sites
Sievnn 14 Posted February 6, 2013 Uhh Congratulations on your first script but I still don't understand what is the point of that or maybe I don't understand the idea its self. Share this post Link to post Share on other sites
+ DarthVollis 59 Posted February 6, 2013 Okay I was hoping that this was going to be like The Legend of Zelda when you walk out of a map it slides the picture over and the character moves. Good job on your first script!!!! Share this post Link to post Share on other sites
Sievnn 14 Posted February 6, 2013 I just tested it, seems cool. Now I understand how it works Share this post Link to post Share on other sites
Jester 16 Posted February 7, 2013 Thanks guys Okay I was hoping that this was going to be like The Legend of Zelda when you walk out of a map it slides the picture over and the character moves. Good job on your first script!!!! Yes, I actually plan to add a slide feature! But don't expect it too fast, since it is way harder than it actually sounds to do it for a Ruby-Newb like me. :wacko: Share this post Link to post Share on other sites
Ocedic 249 Posted February 7, 2013 Congrats on your first script. I too have been watching DP3's tutorials and plan on trying my hand at a script at some point, though I don't really have any ideas for a script of my level. On the topic of the script, I'm actually surprised no one has made this idea yet. The sliding functions sounds extremely hard though, since I assume you'd have to change the way maps load and scenes transition. That would also be a potential compatibility nightmare. But good luck in that endeavor. Share this post Link to post Share on other sites
Jester 16 Posted February 7, 2013 (edited) Congrats on your first script. I too have been watching DP3's tutorials and plan on trying my hand at a script at some point, though I don't really have any ideas for a script of my level. On the topic of the script, I'm actually surprised no one has made this idea yet. The sliding functions sounds extremely hard though, since I assume you'd have to change the way maps load and scenes transition. That would also be a potential compatibility nightmare. But good luck in that endeavor. Thanks. Yeah, basically the biggest problem is to include the map the player transfers to into the slide effect, since I don't think that there is a easy way to make a picture of it before transfering, so the screen position needs to be altered and I currently don't see a way around accepting the graphical glitches it will cause when using together with HUDs, Fog/Parralaxes and any Shadow systems that are not build around the same idea. There actually is a Slide Effect Script for VX, which I plan to observe soon. Maybe I missed a little fact in my thoughts, that will make things easier. Anyways, I will keep thinking about a way to include a Slide-Effect in the future. Maybe I will create a seperated Script which adds new fade types other than fade-white, fade-black and none. But one way or the other, I am pretty proud about the way this Script works already. Edited February 7, 2013 by Jester Share this post Link to post Share on other sites
PVGames 1 Posted February 7, 2013 (edited) Just to confirm for ya, this is not compatible with 8-direction movement. I mean, it doesn't crash or anything, but if you try to get to the edge of the map while moving diagonal, you won't be able to touch it. Can still touch it though if you use one of the four cardinal directions. Any change you will be fixing this? Edit: An easy way to fix the 8-dir issue would be to automatically force the player into the direction required. So if the player is moving towards the bottom of the map at a diagonal, once he touches the transfer area, he is forced downward so that the transfer triggers. Edited February 7, 2013 by PVGames 1 Jester reacted to this Share this post Link to post Share on other sites
Jester 16 Posted February 8, 2013 Just to confirm for ya, this is not compatible with 8-direction movement. I mean, it doesn't crash or anything, but if you try to get to the edge of the map while moving diagonal, you won't be able to touch it. Can still touch it though if you use one of the four cardinal directions. Any change you will be fixing this? Edit: An easy way to fix the 8-dir issue would be to automatically force the player into the direction required. So if the player is moving towards the bottom of the map at a diagonal, once he touches the transfer area, he is forced downward so that the transfer triggers. Thanks for the Feedback. v1.1.0 should be more compatible with most of the 8-dir-movement Scripts. Let me know if you encounter further problems. Share this post Link to post Share on other sites
PVGames 1 Posted February 12, 2013 Heya Jester, I tried out the latest version. I am using Victor Sant's 8-dir script, and I have noticed that the same issue persists in regards to trying to transfer maps while moving at a diagonal. If I move at a diagonal and hit the edge of the screen, I just get sort of 'stuck' there until I move towards the edge in a cardinal direction. Share this post Link to post Share on other sites
Jester 16 Posted February 12, 2013 (edited) Hey PVGames, thanks for the report. Have you tried to place my Script below Victor's Scripts? I have tested it on a new project and I have the same problem, when Map Edge Transfer is placed above Victor's Diagonal Movement. When placing it below, it works as intended though. This is because 8-dir-movement scripts usually overwrite a Method that I am adressing in my Script and I can't really change that. Please let me know, if placing my Script below the 8-dir-Script doesn't help and I will try my best to fix it. Edited February 12, 2013 by Jester Share this post Link to post Share on other sites
PVGames 1 Posted February 12, 2013 Ah, you are quite right Jester. That seems to have done the trick indeed :-) Thanks! Share this post Link to post Share on other sites
Kayzee 3,815 Posted February 13, 2013 (edited) Out of curiosity if you ever intend to add a slide effect, do you have any idea how it would be done? I was thinking the tilemap could be copied but the way tilemaps wrap could be trouble some unless you split the screen into two viewports for a while. I am not sure if you could get a clean bitmap. Another possibility I thought of if the two maps have the same tileset is to make a mega-table class and set the tilemap's map_data to it, and have the mega-table class reference table blocks inside it (this is actually more or less how zelda did it). Not too sure of the details. Hehe... it might even be possible to make a script that dynamically loads chunks into a 3x3 grid of maps, but they would have to be the same size. Edited February 13, 2013 by KilloZapit 1 Jester reacted to this Share this post Link to post Share on other sites
Tsukihime 1,487 Posted February 13, 2013 The wrapping effect may be addressed using stuff from this script: http://www.rpgmakervxace.net/topic/100-any-chance-of-higher-resolution-or-larger-sprite-support/page-2#entry7997 (the dll is irrelevant) 1 Jester reacted to this Share this post Link to post Share on other sites
Kayzee 3,815 Posted February 13, 2013 (edited) Yeah, I saw stuff like that before. It's actually easier to do then I thought, because you can just use the viewport's ox and oy to slide them around. Just basically keep the tilemap, possibly the character sprites and other stuff, and make the old viewport a background viewport, then make the tilemap/sprites for the new map and put it in a new foreground viewport off screen and adjust the ox or oy coords for both viewports. there will be some tricky details I guess like not disposing the spriteset for the old map until later. I donno. edit: I would use Graphics.snap_to_bitmap but too many sprites would have to be changed or fiddled with I think. Edited February 13, 2013 by KilloZapit 1 Jester reacted to this Share this post Link to post Share on other sites
Jester 16 Posted February 13, 2013 (edited) I knew it would be hard to do, but it seems to be even harder than I thought, since class bitmap is hidden. I wanted to save the first screen into a bitmap, alter the screen position so the screen is outside of the map after transferring and than move the bitmap and screen to create a slide effect, after that get rid of the bitmap and release the screen. So Graphics.snap_to_bitmap is what I also think would be a good idea, also because OriginalWij made use of it in his Map Slide script for VX and it worked perfectly there. That's basically as far as I've been in my thinking process about it, yet and I'm really gonna look deeper into it today. One of the potentially problems further down the line will ofcourse be the screen position thing and I'm not sure yet, if it is a good solution. Thanks for the feedback Edited February 13, 2013 by Jester Share this post Link to post Share on other sites
estriole 326 Posted February 13, 2013 (edited) i think map image we see in scene_map is Spriteset_map. maybe we could 'trick' it like this. when transferring save the old spriteset_map (before changing map so it contain image from old map). then save that to bitmap. show it on the screen in higher viewport or z value than spriteset_map. so when we already in another map the other map is covered by 'old' map. maybe create some method in Game_Map update method to freeze the game map temporary until the sliding effect done (if necessary. so the slided map didn't suddenly changed because the Game_Map updating). then save the new map spriteset_map to bitmap. now we have two bitmap that can be 'slided' together. after sliding. dispose both bitmap. of course when sliding the map will be static image and no event move. viable? edit: i smell trouble . spritesetmap is the whole map. . so need a way to save certain part of it only. Edited February 13, 2013 by estriole 1 Jester reacted to this Share this post Link to post Share on other sites
Tsukihime 1,487 Posted February 13, 2013 (edited) So there's no way to just create a second spriteset_map containing the new map and then just sliding both over? (afterwards just dispose of the old one) Edited February 13, 2013 by Tsukihime 1 Jester reacted to this Share this post Link to post Share on other sites
Kayzee 3,815 Posted February 13, 2013 Well, spriteset_map also contains effects and other stuff. Also, I figured out something handy! Graphics.snap_to_bitmap snaps whatever would be displayed at that moment, meaning you can set up what you want to be snapped, snap a bitmap, then set up what the screen should actually display. 1 Jester reacted to this Share this post Link to post Share on other sites
Jester 16 Posted February 13, 2013 Exactly. I have observed OriginalWij's Map Slide Script and managed to get a Slide Effect to work on the base of some of his code. But it has still a big bunch of incompatibility issues which I am trying to adress tomorrow. Whoever is interested in the "beta" version: v2.0 BETA: Pastebin and it is important to credit OriginalWij for this, since it includes some of his code in some shape or form. I am not happy with the compatibility issues though, so this is not a supported version yet. Those issues occur when using it together with Light Effect or Fog scripts and such. In worst case it could crash, like it does with Victor's Ligh Effects and you have to disable the Slide Effect. Thanks for your input so far btw Share this post Link to post Share on other sites
Kayzee 3,815 Posted February 13, 2013 (edited) I think you should change @veiwport1's ox and oy or x and y rather then moving all the sprites inside around personally. Also, you shouldn't need to dispose the spritemap like that, I think... doing that may be the reason for some crashes. Edited February 13, 2013 by KilloZapit 1 Jester reacted to this Share this post Link to post Share on other sites
Jester 16 Posted February 13, 2013 (edited) Hm, I am not very familiar with viewport to be honest. How do you manipulate the viewport to like be outside of the map? I am able to set a viewport up and change ox, oy etc., but it doesn't really do what i want. :/ Thanks for the tip with dispose. I have also been not sure with the first spriteset.dispose, since it doesn't seem to have any effect. But it sadly doesn't fix the crashes and glitches. edit: oh and also ignore the formatting problems. I always forget to activate Ruby-mode in Notepad++ Edited February 13, 2013 by Jester Share this post Link to post Share on other sites
Kayzee 3,815 Posted February 13, 2013 As far as I know, and I may be wrong, messing with the viewport ox/oy/x/y/ will basically move every sprite inside it, so you can just treat it like a big sprite. 1 Jester reacted to this Share this post Link to post Share on other sites
Tsukihime 1,487 Posted February 13, 2013 The sprites' positions are relative to the origin of the viewport, not the window (ie: absolute coords) 1 Jester reacted to this Share this post Link to post Share on other sites
Jester 16 Posted February 13, 2013 (edited) Update: While testing the Slide-Effect I have stumbled upon a major bug of my Script, that teleported the player to the wrong coordinates, if - for example - map 1 had a different width than map 2 and you travelled from map 1 through the west-edge into map 2. This was due to a noob mistake :wacko: and I have fixed it with v1.1b. (also uploaded a fixed v2.0 beta) I'm gonna try to improve the Slide-Effect compatibility tomorrow. Enaugh for me today xD (edit: Pastebin is trolling me today. I've uploaded the wrong v2.0 for a second. Fixed it, though. ._. ) Edited February 13, 2013 by Jester Share this post Link to post Share on other sites