OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
Hello everybody! :kaohi:

This is the BIGGEST update that I've done so far to any of my plugins.

I recommend re-install of this plugin if any previous versions was in use (remove layers plugin >> OK >> Add new layers plugin >> Check parameters >> OK) - I have tried to keep this update as much backward compatible as I could.

Also a tutorial video for OcRam_Layers v2.00 -plugin is coming in near future (in few weeks)!

Latest version - v2.00 (released 2019/11/20) - WALL OF CHANGES!
  • New feature: Layer templates
    Templates allow you to save most used layers! (example: *Plugin command* layer my_template)
    And together with "set_layer" plugin command you may fine tune parameters afterwards (without actually changing the whole layer!)


  • New plugin parameters: Custom Z-index for each layer!
    Possible values: Behind parallax, Behind tileset, Behind characters, Above characters, Behind weather or Top most

  • Sprites and layers will persist through save and load!

  • New feature: Animated layers AND sprites! (Credits to: @Liandra Aura , @Brellelasouls )
    Example: layer 1 fog 1 1 1 true 1 loop:0,0 anim:3,500
    anim:3,500 = rotates fog01, fog02 and fog03 images between 500 ms (17ms = gives ~60fps animation)
    All images are loaded to layer when layer is initialized - this will make even 160fps animations possible!


  • New feature: Scroll every x frame(s) (Credits to: @Nekohime1989 )
    Use decimals in scroll x/y values
    • example 0.5 updates every second frame
    • and 0.1 updates every 10th frame
    • and 0.06 updates every 60th frame
  • Obsoleted layer param: "repeat"
    (Credits to: @Elsa , @RitualTeeth for pointing out issues with repeat parameter messing up "fix to map" parameter)
    use screen sized image and set loop and scroll x/y to 0 to prevent tiling

  • New layer parameter loop x/y
    Give x and y number in pixels to shift layer when player is moving on x/y directions

  • Smart battle layers!
    Detects if scroll and loop x/y is 0 and layer size is at least screen size + is fixed to map. If layer is detected as parallax map its automatically hidden in battle even if all "Battle layers" are True/On

  • Dynamic layer image names (Credits to: @Peter_Snayde for the idea!)
    Based on variable, map id or tileset id. Example: layer map[mapId] 0 0 1 true 256 loop:0,0 anim:0,0
    Map/tileset ids will be always 3 digits - Example: map[mapId] = map001


  • Totally new way to add sprites (compatibility++)
    (Credits to: Leon Artman for reporting compatibility issues)

  • New plugin command: clear_sprites
    To clear all sprites with id 1 use: clear_sprites 1

  • New plugin command: set_layer (to modify existing layer)
    Example to modify scroll and loop values: set_layer 1 scrollX=4 scrollY=0 loopX=0 loopY=0
    Note: If you modify imgName parameter animation parameter is also reseted!


  • Layer fade parameter 0 == Your default fade time

  • + several bugs are found and fixed
  • + even more performance optimizations
    Got rid of 3 if clauses in scroll event with a nice 'hack'! and few other optimizations

  • And thank you to all who has messaged me or this thread! :kaothx:
Happy RPG Making!
:MV1:
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
I have now added tutorial video to the 1st page of this thread!

But here is a shortcut if you don't want to navigate to 1st page
 

harvvvvv

Villager
Member
Joined
Aug 17, 2018
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
Firstly - Amazing plugin. Thank you so much for putting this together for the community!

Could you explain a bit more about the loop function please? I'm having trouble getting it to do anything, but perhaps I'm just using it wrong or misunderstanding it's intended use. I have a parallax background set in the map editor of an office. The window of the office is transparent. I have a plugin command of - layer 0 office-window 0 0 1 false 255 loop:1,0 - with 'office-window' being a cityscape that sits behind the parallax background. I figured the loop function would mean the cityscape would scroll as the player walked left and right, but it doesn't move at all. Is this effect possible with the loop function?
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,144
Reaction score
699
First Language
Dutch
Primarily Uses
RMMV
@harvvvvv I think (while I dont have my system atm or this plugin) that is the plugin command is aournd like this:
Layer [z] [file] [x] [y] [?] [true/false] [opacity?] loop:?,?

while I cant confirm it fully, I think the 0 0 1 has the be a number like 2 2 1 so it shift 2 pixels left/right, up and down.

Ocram can confirm when I got it wrong or not :)
 

harvvvvv

Villager
Member
Joined
Aug 17, 2018
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hey ShadowDragon, thanks for the reply!

From what I've read the command is Layer [z] [file] [x] [y] [opacity] [true/false] [fade time] loop:x,y
From my experimenting, the first two numbers (x,y) in the command make the image scroll automatically, so if I input '1 0' it will automatically scroll the image to the right indefinitely. I only want the image to move when my player moves.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
@harvvvvv I think (while I dont have my system atm or this plugin) that is the plugin command is aournd like this:
Layer [z] [file] [x] [y] [?] [true/false] [opacity?] loop:?,?

while I cant confirm it fully, I think the 0 0 1 has the be a number like 2 2 1 so it shift 2 pixels left/right, up and down.

Ocram can confirm when I got it wrong or not :)
Hey ShadowDragon, thanks for the reply!

From what I've read the command is Layer [z] [file] [x] [y] [opacity] [true/false] [fade time] loop:x,y
From my experimenting, the first two numbers (x,y) in the command make the image scroll automatically, so if I input '1 0' it will automatically scroll the image to the right indefinitely. I only want the image to move when my player moves.
Hi and thank you for messages!

If I understand this correctly, right command would be: layer 0 office-window 0 0 1 true 255 loop:1,0

Original command was: layer 0 office-window 0 0 1 false 255 loop:1,0

And it was almost as it should have been, but instead of binding layer to screen you need to bind it to "map".
 

harvvvvv

Villager
Member
Joined
Aug 17, 2018
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hi and thank you for messages!

If I understand this correctly, right command would be: layer 0 office-window 0 0 1 true 255 loop:1,0

Original command was: layer 0 office-window 0 0 1 false 255 loop:1,0

And it was almost as it should have been, but instead of binding layer to screen you need to bind it to "map".
Thanks for getting back to me! I've set up a fresh project to test this and you are correct. Setting the binding to map using 'false' does work. However, in my original project it wasn't working as I had set my screen size to 1920x1080 via Yanfly's Core. If I revert the screen size to default, it does work as intended!

Is there anyway to get this working with a larger screen size?
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
Thanks for getting back to me! I've set up a fresh project to test this and you are correct. Setting the binding to map using 'false' does work. However, in my original project it wasn't working as I had set my screen size to 1920x1080 via Yanfly's Core. If I revert the screen size to default, it does work as intended!

Is there anyway to get this working with a larger screen size?
I actually ment that false was only parameter you got wrong in original post and it should be true to bind layer to map. And screen resolution doesn't matter. I'm also using Yanfly Core to set screen resolution larger.

So correct syntax should be: layer 0 office-window 0 0 1 true 255 loop:1,0

Edit: Of course map size must be larger than screen size for loop parameter to work. Other wise it's same as static.
 

harvvvvv

Villager
Member
Joined
Aug 17, 2018
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
I actually ment that false was only parameter you got wrong in original post and it should be true to bind layer to map. And screen resolution doesn't matter. I'm also using Yanfly Core to set screen resolution larger.

So correct syntax should be: layer 0 office-window 0 0 1 true 255 loop:1,0

Edit: Of course map size must be larger than screen size for loop parameter to work. Other wise it's same as static.
Sorry, that was on a typo on my part - I meant 'true'!
Map size is my issue then, as my map size is the same as my screen size. Is there no way for this effect to work when the map size is the same as screen size? Is there any way to link a layered image to player movement (the player being a parent object of sorts)? Even through events. Though I'm not sure how to call the image that is drawn (aka, 'office-window').
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
Sorry, that was on a typo on my part - I meant 'true'!
Map size is my issue then, as my map size is the same as my screen size. Is there no way for this effect to work when the map size is the same as screen size? Is there any way to link a layered image to player movement (the player being a parent object of sorts)? Even through events. Though I'm not sure how to call the image that is drawn (aka, 'office-window').
It's now working same kind as RMMV core parallax does so looping will stop when player hits edge of the map. It kind of looks weird if background keeps scrolling even if camera isn't.

I could add plugin parameter "Loop always" or something to change this default behavior, but I can't promise anything since I got too much going on ATM.
 

harvvvvv

Villager
Member
Joined
Aug 17, 2018
Messages
17
Reaction score
2
First Language
English
Primarily Uses
RMMV
It's now working same kind as RMMV core parallax does so looping will stop when player hits edge of the map. It kind of looks weird if background keeps scrolling even if camera isn't.

I could add plugin parameter "Loop always" or something to change this default behavior, but I can't promise anything since I got too much going on ATM.
If you could do that at some point, it would be amazing. No pressure though, it is almost the holiday season after all! Don't put yourself out, but I would be forever thankful.
 

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
137
Reaction score
14
First Language
Australian
Primarily Uses
RMMV
Just to be clear. Do you need to use
clear_layer [layer index] [fade]
when you transfer the map or when you change layer index 1 to the different pictures?
I had a bad experience with TDDP parallax map plugin which had a memory leak and each time you added a layer it would add 200-500mb to the memory of ram without cleaning it resulting in RPGM maker using 3-8gb of ram until the game crashes when it runs out of memory.
 

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
Just to be clear. Do you need to use
clear_layer [layer index] [fade]
when you transfer the map or when you change layer index 1 to the different pictures?
I had a bad experience with TDDP parallax map plugin which had a memory leak and each time you added a layer it would add 200-500mb to the memory of ram without cleaning it resulting in RPGM maker using 3-8gb of ram until the game crashes when it runs out of memory.
Thank you for the message,

In this plugin you got fixed amount of layers... so memory usage is quite minimal. If you change layer image it will over write any existing images and other parameters - so no need to call clear_layer in this case.

If you simply want to clear layer then clear_layer must be called.
 

kako05

Veteran
Veteran
Joined
Sep 11, 2017
Messages
137
Reaction score
14
First Language
Australian
Primarily Uses
RMMV
Thank you for the message,

In this plugin you got fixed amount of layers... so memory usage is quite minimal. If you change layer image it will over write any existing images and other parameters - so no need to call clear_layer in this case.

If you simply want to clear layer then clear_layer must be called.
Ok, thank you.
 

Akone

Warper
Member
Joined
Nov 28, 2018
Messages
4
Reaction score
1
First Language
French
Primarily Uses
RMMV
So, first sorry for this post which is perhaps dumb, but I am a beginner with MV (not new in game development) and after some research, it seem that this is the plugin to use for parallax mapping in 2019+ !!
But it seem that I can manage to find how to use collision map ? So do there is a way to use collision map like with the QMovement's addon "QM+CollisionMap" ?
Thanks for help!

I am a bit confused about plugin for MV, I mean for now 2020 (which is still maintained).... Between QMovement, Orange Overlay, OcRam Layer, Region Restrictions, QMap, QScale... etc...

I post some youtube links to give an idea about what I would like to achieve with this engine !!
- David Browne - Guardia Forest
- Parallax mapping test
- Galveraxe - VX Ace Graphics Test

Thanks a lot for any help and advice about plugins !!
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
So, first sorry for this post which is perhaps dumb, but I am a beginner with MV (not new in game development) and after some research, it seem that this is the plugin to use for parallax mapping in 2019+ !!
But it seem that I can manage to find how to use collision map ? So do there is a way to use collision map like with the QMovement's addon "QM+CollisionMap" ?
Thanks for help!

I am a bit confused about plugin for MV, I mean for now 2020 (which is still maintained).... Between QMovement, Orange Overlay, OcRam Layer, Region Restrictions, QMap, QScale... etc...

I post some youtube links to give an idea about what I would like to achieve with this engine !!
- David Browne - Guardia Forest
- Parallax mapping test
- Galveraxe - VX Ace Graphics Test

Thanks a lot for any help and advice about plugins !!
Thank you for the message,

You can achieve above things, but it will require some work. This plugin will provide only animated sprites and layers at the moment.

Extra character animation frames/pixel movement/collision map/camera things etc... is not provided via this plugin.
 

Akone

Warper
Member
Joined
Nov 28, 2018
Messages
4
Reaction score
1
First Language
French
Primarily Uses
RMMV
Thank you for the message,

You can achieve above things, but it will require some work. This plugin will provide only animated sprites and layers at the moment.

Extra character animation frames/pixel movement/collision map/camera things etc... is not provided via this plugin.
Ok thanks for the answer dude !! I have so many question but to go deeper I will open my own post, I don't want "to pollute" yours ^^ !!
 

Akone

Warper
Member
Joined
Nov 28, 2018
Messages
4
Reaction score
1
First Language
French
Primarily Uses
RMMV
Hey bro I'm really sorry, but I don't get how to set a "bottom" and "top" layer as it was in the BindPicturesToMap plugin for parallax mapping ?? ...... Thanks a lot!
The tuto video is nice, but another tuto version text would be awesome...

EDIT:
Ok I think I manage to make it work, but I don't get it, perhaps I didn't understand correctly, but do there is a way to make the character walk behind a tree AND in front of it ??
Perhaps I make a mistake on how to "cut" the different layer !! Arf.... ****, I will find it !! ^^
test.jpg
 
Last edited:

OcRam

Servant of the Universe
Veteran
Joined
Aug 2, 2016
Messages
515
Reaction score
604
First Language
Finnish
Primarily Uses
RMMV
Hey bro I'm really sorry, but I don't get how to set a "bottom" and "top" layer as it was in the BindPicturesToMap plugin for parallax mapping ?? ...... Thanks a lot!
The tuto video is nice, but another tuto version text would be awesome...

EDIT:
Ok I think I manage to make it work, but I don't get it, perhaps I didn't understand correctly, but do there is a way to make the character walk behind a tree AND in front of it ??
Perhaps I make a mistake on how to "cut" the different layer !! Arf.... fudge, I will find it !! ^^
View attachment 130682
Thank you for the idea!

At the moment you can't assign layer z index at run time (only via plugin parameters). Layer Z-index (and number of layers) is fixed for optimized performance.

But I'll try to find a way to adjust layer/sprite Z index in game in a way it won't impact performance.
 

Akone

Warper
Member
Joined
Nov 28, 2018
Messages
4
Reaction score
1
First Language
French
Primarily Uses
RMMV
But I'll try to find a way to adjust layer/sprite Z index in game in a way it won't impact performance.
Yeah I hope you come with something, cause for me, not be able to walk in front and behind (the same) object is a huge turn off about using this engine !!

EDIT:
I tried many thing, but I thing for now the only thing I can do about it, is to rethink the level design so that we cannot walk in front of an object where we can already walk behind !!
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

Not going to lie, now that business is picking up again after the whole pandemic lockdown.... these 50+ hour work weeks are really slowing down game dev work. It's a good thing I have basically no life, else I'd never have time to do this. :kaopride:
Has anyone else thought of using money for more than just buying things in a game? It could serve as a wealth stat for various mechanics and skill checks.
Eli_CustomParameterCurve.js - Work in progress!
Basic base tiling for today. Too cold..?
If your life is lagging is because someone made this awfull parallel process... (This is why the wait command has a 999 limit...)

if : MZAnnounced is ON
* Wait : 88128000 frames
* Control Switches : #0003 ReleaseMZ = ON

Forum statistics

Threads
100,443
Messages
975,962
Members
132,082
Latest member
Lightningburrito
Top