MV Layer Graphics

FEATURES
This plugin allows you to use graphics as layers on the map. The layers can appear at different height levels (below the map, below characters, above everything, etc.) and can move in different ways. This was designed to be used for layer mapping (aka parallax mapping) as well as fogs and other effects.

In addition to map layers, layers can also be created in battles, allowing fogs and other effects.

VERSION 2.0 – RPG Maker MV
Download Plugin file
Download Demo

Advertisements

125 thoughts on “MV Layer Graphics

  1. L.C. says:

    Alright! Thanks, Galv.

  2. Yin says:

    YES! :D But you changed the format -_- Sadness lol.
    Now I have to figure out how to make a plugin that loads all the maps on startup again.

    • Galv says:

      Haha, yeah people seem to want to use the plugin command. I might write a plugin that executes plugin commands from txt file for that very purpose to go with it. Remind me in a few weeks if I haven’t made it :D

      • Yin says:

        I certainly will! By that time, I’ll most likely be able to completely dive into MV… or at least more than I can right now

  3. L.C. says:

    I have doubts about the performance.
    Say i have 60 parallaxed maps, with numerous images here and a few maps with animated rivers like in a demo. All of that i called with this pluging from the start, (say from “Initialize Map” like in the demo).
    Does it mean that loading will be unussaly slow? Will my game require more RAM?

    (sorry for my bad english)

    • Galv says:

      All the layers created in the initialize demo map are only layer settings. The actual layer images are only created and updated when the player enters the map.

      eg. Player enters map, map looks at settings and makes layers. Player leaves map, those images disappear and it looks at settings for the next map, creating those new layers.

      That said, too many layers on the one map might cause lag. And images that are too large in file size will definitely have an effect for people playing on slower devices, mobiles or from a server. I have not tested on those things.

  4. Whygee says:

    Good stuff. I was just about to make a map with fog, and there’s no such built-in weather effect. Rock on. And please make that Map Position script a plugin! :)

    p.s. should have mentioned the need to create a /layer folder under /img, would have saved me a solid 10 mins ;)

  5. Vaeri says:

    Galv, i’m having issues with downloading both the demo and the plugin file. The webpage says the download is unavailable.

  6. mikepjr says:

    I must be doing something wrong, i see nothing

    • mikepjr says:

      Never mind, i figured it out, you have to set it up on a different map then TP to the map you set it up for.

      • mikepjr says:

        Blending 1 and 3 look the same, and blending 2 makes things black Blending 0 looks like it should to though.

      • Galv says:

        The blending numbers are from the default plugins, I havent tested them all but they appear to be different methods of blending the image to whatever is under it. 0 should be no blending.

      • mikepjr says:

        It is. 0 is no blending.. 1 and 3 is positive and 2 makes everything black.

      • Galv says:

        2 is apparently “Blend Multiply”, so it might depend what your layer looks like to why it makes everything black

      • mikepjr says:

        Turns out 2 is not supported in the current pixi under webgl. That’s why it goes black. Unless it’s not going black for you, if it’s not for you… i don’t know what it is.. i just now i started to use an updated pixi that someone is working on over at RMW, and even though it lags some, 2 actually showed up properly in it.

      • Galv says:

        Ah I see, thanks for letting me know – I’ll do more tests to find out more about it when I can

      • mikepjr says:

        I found out that the current version of Pixi is the culprit.. even though it SAYS in the script it does multiply, multiply does not work as it should and the creator of the version of pixi the MV uses says he has no plans to correct the issue.

      • Galv says:

        Thanks for looking that up – much appreciated. I guess for now that feature will not work

      • mikepjr says:

        Yeah only the first 2 actually work. The other 2 don’t sadly.

      • Galv says:

        Or use the “LAYER REFRESH” plugin command if you want to make a layer on the same map

      • mikepjr says:

        Ah okay! Thanks.. man. i must have missed that somewhere.

  7. Sneakaboo says:

    Thank you for the plug in.
    I’m having fun toying around with it.

    I run into one issue though, every file in layer(or regular parallax mapped file’ has a blur.
    Even though the same objects added through the editor are crisp.
    How do you solve that?

    There was some plugin on the RPG maker forum but it is just applied to characters.
    Not parallax maps.

    • Galv says:

      I’ve had a few people mention blurry images. I don’t know how to solve this, it appears to be an MV issue or another script. I have yet to replicate the issue myself

  8. Galv says:

    I have read a post in the forums that the blurry images are an issue with MV. If your layer graphic (or parallax) is a non-power of 2 pixel size. I think that means if your image’s width or length are not an even number, it will be blurry

  9. Galv says:

    Also – added functionality to use map NOTEs to create layers as well – making it easier for layer mapping.

  10. basicleader says:

    Just got RPGMMV installed, and I’m glad to find your layer graphics plugin already! It is my favorite overlay mapping plugin, just like it was for ACE!

    A quick test to understand its working got this result:

  11. Astarotte says:

    Hey Galv, I really like this plugin. But for some reason, it doesn’t work for me consistently. I had tree shade layers and fog layers. Moved some plugins around and made a new map to add a fog layer to it, and then the layers on all the other maps just stopped working.

  12. Astarotte says:

    Is there any specific reason when I put the notetag on the map it doesn’t work? It worked before..

    • Galv says:

      You’ll need to check if another plugin isn’t conflicting. Disable other plugins and test. Also make sure to test starting a new game and not continuing from a saved game.

      • Astarotte says:

        Sorry about the double post about the same question! I fixed the issue again. I believe it was the order of the plugins I had,

  13. Galv says:

    Order of plugins can be important, especially if another plugin isn’t written to be very compatible. Sometimes that’s not possible, but all “core” plugins should go at the top :)

  14. Ushi says:

    Hey there, Galv. Can I put pictures under animations with your script? Have a nice year. o/

    • Galv says:

      Animations should appear above the layers created by this plugin already. This plugin doesn’t have anything to do with event ‘pictures’

      • Ushi says:

        T_T *sob* Well, do you know how to put animations above pictures? I’m reading all project/js/rpg_core.js trying to find it out… But i not really a scripter… I found that:
        /* * Z coordinate: *
        * 0 : Lower tiles
        * 1 : Lower characters
        * 3 : Normal characters
        * 4 : Upper tiles
        * 5 : Upper characters
        * 6 : Airship shadow
        * 7 : Balloon
        * 8 : Animation
        * 9 : Destination */

        But don’t know if this changes anything…
        Still, I can’t make my picture a panorama cause the pic interacts with the player.

      • Galv says:

        Making animations appear over pictures would require a separate plugin to work. Unfortunately the pictures are not part of the z co-ordinates of the tilemap so I don’t think it’s a quick fix to do

  15. Is it possible to add an option to not repeat the layer? It happens when the size of the map is minor to the size of the screen.
    Example: http://i.imgur.com/fvBuwwT.png

  16. Galv says:

    I’ve updated this to 1.6 and added layers that don’t repeat now
    Also added battle layers

  17. Brian says:

    Galv, I’m using this because its seems easier, and the images are in place when the map loads, unlike some of the other similar plugins out there. I have however noticed that the images have a slight blur to them in this plugin, which is absent (sharp) in the other similar plugins. Any idea how to remove the slight blur and keep the images crisp?

    • Galv says:

      This sounds like an issue Rpgmaker MV has. I recommend googling it to find more info as it has something to do with the image sizes itself not being a power of 2 or something like that.

  18. Michael says:

    Probably obvious, but this is incompatible with TerraxLighting.

    • Galv says:

      Not really obvious, the two do different things. “Incompatible” can have a lot of meanings… does it not work at all? Does it crash with an error? Does it work but not display as you expect?

  19. Johnny says:

    Hey Galv!

    Thanks for your awesome plugins! They’re all great!!

    In addition, I know that the “multiply” blend mode doesn’t work for this plugin atm, but I REALLY hope you could find a way around it.

    Could you help?
    -Trying to darken a map with multiply (aka reduce lighting)
    -Are there other options to reduce lighting/increase lighting of the map?
    -Just an idea, do you know how to induce flickering of lights on the map?

    Thanks again man!

    Johnny

  20. Nomi says:

    Hey Galv! Great plugin – sadly it doesn’t work anymore when I export the Game. Do you expect me to add the /layers folder in the export? Or did something went wrong? :/

    • Galv says:

      If you selected the “exclude unused files” unfortunately at the moment, yes you’ll have to copy the folder into the correct location in the exported files as it doesn’t detect the layer graphics that were made when excluding images

  21. Chris Dougherty says:

    great script but i am having some issues, I get the Type error – Undefined is not a function when i try to transfer to another map .

    TypeError: undefined is not a function
    at Spriteset_Map.destroyLayers (GALV_LayerGraphics.js:281)
    at Scene_Map.terminate (GALV_LayerGraphics.js:276)
    at Function.SceneManager.changeScene (rpg_managers.js:1805)
    at Function.SceneManager.updateMain (rpg_managers.js:1789)
    at Function.SceneManager.update (rpg_managers.js:1714)

    Am i doing something wrong ?

  22. Anang says:

    Hi galv, i have little problem here,im typing in map notes LAYER_S 1 001Ground 0 0 255 0 0, when my camera scrolling down the parallax is gone, but if i back the parallax appear, if i typing LAYER 1 001Ground 0 0 255 0 0 0 0 it fix but duplicating/loops its make weird, im using RMMV 1.3.3 and your latest MV Layer Graphics.

  23. Mike2 says:

    I get Type Error Cannot read property 3 of undefined when I try to use this plugin.

  24. Mike2 says:

    Is Michael’s comment above about Terrax Lighting not working with Layers correct?

  25. hzamorac says:

    I wonder if there is a way to make it work on RPGBoss, I can’t use RPGMaker and this is exactly what I’m looking for :/ thanks!

    • Galv says:

      I don’t know what RPGBoss is but my code here id for RPG Maker, sorry :)

      • hzamorac says:

        I understand, don’t worry. RPGBoss is an editor similar to RPGMaker, it’s good, just don’t have the exact option that I need jaja. By the way, you have made a good job expanding the capabilities of RPGMaker with your plugins and scripts.

  26. aston00rick says:

    Hey Galv, Just wanted to say you are very appreciated. Thanks for all you do :} I am having an issue, I want to put an image of a house on my map. But I cant seem to move it to the location I want and also, it appears above the player. I am using the layer s and here is the map note-LAYER_S 1 Building_1 130 0 255 20 0. I have tried different numbers but the image does not move. And the image stays above characters. I am sorry but cant figure it out. Thanks again friend, you are appreciated.

    • Galv says:

      The image stays above characters because it’s set to z value 20.
      As for moving it to the location you want, the xy values are in pixels, not tiles. If you are wanting tiles multiply that by your tile size (* 48 if using default).

      I am unsure what is happening in your project exactly as I cannot see it but hope that helps.

  27. aston00rick says:

    Galv, thank you. your advice has fixed my problems. Thank you

  28. Meph says:

    Is there any way to create a compatibility patch with your Visibility Range Plugin? (I’m having problems when trying to use both),.

    Thanks!

    • Galv says:

      Please specify what problems you are having as I have just spent time creating a test project with both of these plugins but found none.

      • Meph says:

        I don’t know why, but with the last update of RpgmakerMV, both of plugins doesn’t work together. (One or another by separate works fine).
        I even tried to change the order in the list of plugins but nothing happened, they simply don’t work.

      • Galv says:

        I don’t know what “simply don’t work” means and unfortunately I cannot replicate any issues with the two plugins working together using latest version of the MV files. Make sure your project has MV files updated (just updating RPG Maker MV doesn’t update projects).

        Here’s a list of things to try and error trap the problem in your project:
        https://galvs-scripts.com/errors-using-plugins/

  29. Aureus says:

    Hi Galv!
    I just tested it with Terrax Lighting and it didn’t work at first, but I fixed it. I wanted to add a fog at one map and I succedded. Maybe someone with this problem will notice this comment in the future:
    – I changed my layer from “1” to a higher number (like “2”);
    – on the map with the fog I wanted to add i refreshed layers.
    Works perfectly fine.

  30. Roni says:

    I’m really having trouble to understand it, after a lot of time still I never got the parallax working. Just a black picture appear. I correctly used call plugin with LAYER_S 2 1 MoraviaGate_Lower 0 0 255 0 0, and simple no image ever showed. I have no idea how to use it.

    • Roni says:

      Actually I understood what went wrong. I before this plugin, I was using some other parallax plugin that was necessary to load directly on the map when you entered it. This is different, I actually need to load it before entering the map. Indeed its better than my last plugin. Well problem solved.

  31. Roni says:

    First thanks for this great plugin, it worked wonders on my project. I just have a small question, it’s possible to create a layer under the layer 0? Like for sample, an moving fog or clouds you can see in outside window? Or like moving clouds bellow floating land where you stand and move?
    Thanks again.

  32. Creators Way says:

    Hey galv your plugin is g.o.a.t. however…..i have my resolution set at 1366 x768 using yanfly core and using your plugin for battle layering it seems like u have a default resolution on the way the layer is placed. when i use yanflys action sequence and zoom the camera out you can see where the layer image breaks on all sides. can you change your plugin to where you can set the resolution for battle layers so i wont see the borders of the layers using my custom resolution for my game?

    • Galv says:

      Layers are placed at 100% size. If you need a bigger layer, you’ll need to edit the graphic to be big enough.

      • Creators Way says:

        i did but everytime i change the picture size it just changes the size of the actual picture but the picture placement is still the games basic resolution do u see what i mean? yes the picutre size gets bigger or smaller but the actual placement for all around the borders is 816x 624. the picture size works on maps OUTSIDE of battle but in battle when i change the picture size the actual picture gets bigger or smaller but the borders is in the same place so if you can can u make it to where when u change the size of picture it also changes the ingame resolution to whatever the custom res is for that persons game. i never recorded a video before do you want me to post one so u can see what i mean?

      • Galv says:

        It might help, sure – but I am currently away for a week or so and will also have a look when I get back.

      • Creators Way says:

        this is for you plugin IN BATTLE. it works like a charm outside of battle but in battle even if you change picture size it still has the borders of 816X 624 when my resolution for my game is 1366x 768. when i use yanflys zoom out for action sequences i can seen the borders where the pictures end no matter what i change the size of the picture to. REMEMBER im talking about IN BATTLE LAYERS.

  33. Creators Way says:

    hey how do you post pictures on this site?

  34. SythianBard says:

    Thank you, Galv, for this awesomeness. I am experiencing a small issue. When the map loops and your player character crosses over that border the Layers reset and it causes a jump.
    Is this something I’m doing wrong?

    My plugin commands
    LAYER 1 1 Land 0 0 255 -2 5 5 0
    LAYER 1 2 Clouds -.25 -.25 255 -1 3 3 0

    • Galv says:

      Unfortunately this plugin wasn’t designed to be used for looping maps. I think static layers work okay but the sliding/moving ones will have that jump effect if you do

      • SythianBard says:

        Is this a limitation of the RMMV engine or do you think this is could be accomplished with a plugin. I don’t want to go asking around for something that’s impossible to do. If it’s not possible then I can just find a way to deal with this limitation. Thanks.

      • Galv says:

        It’s not a limitation, more how I coded the positioning to be based on the map position and this position shifts when the map loops.

      • SythianBard says:

        Ok, thanks for taking the time. I appreciate it.

  35. Mike says:

    When I download this file MV does not recognize it as a plugin? Have something changed from earlier version? I have a previous build of this plugin working just fine. Can it have something to do with the filename?

    • Galv says:

      Put the file directly into your /js/plugins/ folder exactly as it is without changing the filename.

      MV should recognise it as a plugin if it’s a ,js file. Make sure you’re putting just a .js file in that folder and not extracting the demo there or something.

  36. Ronivan says:

    If I may send another question, how can I make the water animation bellow all the parallaxes? I tried but always the standard water animation shows above everything.

    • Galv says:

      The water animation as in the ground tiles? You cannot separate that from the normal ground tiles. Layers with z value 0 or greater should display over ground tiles.

      • Ronivan says:

        So you mean that technically the water animation could never be displayed bellow the parallax layers?

      • Ronivan says:

        Oh forgive my last comment, I wasn’t paying attention. My Z value was 0, but as soon as I changed it to 1 the water animation showed bellow my parallaxes. Thanks a lot for you patience with me, I should pay more attention to the plugin description.

  37. hc phoenix says:

    With this plugin, is it possible to make a layer scroll slower than MV’s normal minimum for parallaxes? I’ve been struggling to find a plugin that allows for this; the default is really limiting.

  38. FenrilCoFH says:

    Hi Galv,Thank you for this amazing plugin!I wonder if you can make static sprite layers movable too.that’ll be very useful for random clouds or any other effect.
    Nice Plugin anyway!

  39. Galv says:

    Updated to version 2.0
    Added ability to make static layers follow characters (events or player). Also added the ability to rotate the static sprite depending on character facing direction

    • FenrilCoFH says:

      Finally I had time to test this new ability in my project just now.It worked perfect!
      Thank you for this awesome update!

  40. Galv says:

    Updated to version 2.1 – fixed a bug when trying to remove layers in battle

  41. CittyF says:

    Hello Galv,I found that if this plugin is used along with YEP Battle Engine Core ,after any skill is used,enemys are forced to be hidden by the background which z position is 2.Can you fix this?
    and a question,can I change battlebackground layer during battle?
    Waitting for your answer.:)

    • Galv says:

      Before I look at this, please do some more tests to confirm those plugins are the issue. Try also to use a different z value remembering you can use decimal places.

      Make sure you have the latest MV update, have updated your project with those MV files properly (updating MV doesn’t update your project) and also have all the latest Yanfly plugins.

      • CittyF says:

        With latest yanfly plugins and update in my project,
        I’ve tested several cases and they are like:

        When use Galv Layer Graphic only:

        Z0 BG1 Z1 BG2 Z2 Enemy&Character Z3
        (and this is exactly how the plugin should work I think)

        When use Galv Layer Graphic and Yep Core Engine:

        Z0 Z1 Z2 BG1 BG2 Enemy&Character Z3

        When use Galv Layer Graphic and Yep Battle Engine Core:

        Before using skill:BG1 BG2 Z0 Z1 Z2 Enemy&Character Z3

        After using skill:BG1 BG2 Z0 Z1 Enemy&Character Z2 Z3

        When use Galv Layer Graphic ,Yep Core Engine and Yep Battle Engine Core:

        Same with above

        And I also tried change Z2 to Z1.5,this fixed the error when using skill.
        but it seems still not work correctly with Yep Core Engine and Yep Battle Engine Core.

        hope these testings can be useful.

      • Galv says:

        Perhaps if you can upload a demo project somewhere with only the plugins that are conflicting and battle set up to replicate the issue, I may be able to investigate.

      • CittyF says:

        Hello Galv.
        I’ve made several demo project to show how they work together.
        You can use the 3rd to see all versions
        but for convenience I made projects for all three cases.
        Thank you in advance for your work and looking forward to your answer!

        https://mega.nz/#!ca5UTDSR!c3hI9ARt2DyhodyVS8qk3iTJ80DWK2XfeIGkDer7Mtw

  42. TwilightFaze says:

    Heads up. This particular plugin (and it’s demo) has a Trojan attached. I tried downloading it from two different computers and it gave me the same alert. I’m guessing this is a new thing, looking at the comments. If you need more info, let me know!

    • Galv says:

      Thanks for the report – I have gone back to v.2.0 of this plugin now due to this issue. I have just scanned these files again and I am finding only 3 out of 60 different virus scanners detect it as suspicious.

      I honestly do not think it contains a virus, it is likely a false positive but I believe latest windows/chrome/other software updates report it as such and therefore won’t let people download them so I have rolled back to earlier version while I find time to investigate.

  43. Troquicho says:

    Is it possible to change the opacity of the layers during an action sequence?

    This should be enough in several moments:

    eval: $gameScreen.startFadeOut(fade_speed);

    eval: $gameScreen.startFadeIn(fade_speed);

    but imagine If I want to simulate a summon similar to a Final Fantasy Game.

    PS: probably this is the last comment I write on your website, so thanks for helping me with the questions I’ve had

    • Galv says:

      Unless action sequences let you do a plugin command, you’ll have to eval code for the plugin command. I am super busy, I recommend asking in a forum how to do that.

  44. Ian Hull says:

    LAYER 003 1 SunRaysCorner1 0 0 255 5 0 0 0 I don’t get it, Ive looked over this so many times and it seems to me this should work, all i want it to do is move with the map but it stays where it is and if you travel up the map a bit you can see another print of it and so on equally spaced, could anyone tell me what I’m doing wrong here?

  45. Raen Andaleio says:

    I’ve noticed a weird bug. I have a ground layer added using
    LAYER_S ground-img 0 0 255 0 0
    Then I added a river with the normal RPG Maker tiles, so the water is animated. As expected, the image layer is below the tiles, so the animated water covers part of the image. Good. Now, whenever I approach the top area of the map imgame, so the camera catches the map edge, the image layer seems increase its z value, so it suddenly covers the tiles. When I move back down, it jumps below the tiles again.

    • Galv says:

      Decrease the z level. You can use decimals if needed

      • Raen Andaleio says:

        Ok, if anyone else has this problem, setting the z value to -1 works (I didn’t know it could go lower than 0). I did some additional testing and also tried an alternate plugin with similar functionality. It happens there, too, so this appears to actually be a bug in the engine which they introduced with 1.6.0.

  46. TheAkrib says:

    Hey Galv,

    First, thanks alot for this awesome plugin!

    I have one question though: I am currently trying to make a rather large map with parallaxes. To make this possible, I am going to split one big parallax image into several small ones, which will be loaded when the player gets to certain areas of the map.
    For example: The Player starts at position x y and parallax image 1 is loaded as layer 1. When the player moves to position a b, image 2 is loaded as layer 1, replacing image 1.

    My question now is: Will the replaced layer image be removed from the cache?, because otherwise i fear heavy lag after a certain amount of time and switching from image to image.
    And if not, will the ‘remove layer’ command instead fully delete the images from the cache?

    Thanks a lot in advance!

    • Galv says:

      I believe images only get removed from the image cache if they are not used for a certain time and the automatic garbage collection does it.
      I don’t recommend using this for huge maps, though. Slower computers may visibly lag when the layers are created

      • TheAkrib says:

        First, thanks alot for the fast answer. I would face the problem of big layers by cutting them into smaller ones to reduce the impact on the performance. My only problem would be to somehow clear specific images out of the cache, which should be possible somehow, I just didn’t find any script calls or something similar yet.

      • TheAkrib says:

        Sorry for the double posting! One more (probably dumb) question: Does the automatic garbage collection even remove the layer graphics used with this script? (given that they aren’t used for a while)

      • Galv says:

        It should – but I RPG Maker MV has always had memory problems for me even after their updates.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s