Galv's Layer Graphics (fogs, parallaxes, mapping)

Galv

Veteran
Veteran
Joined
Oct 1, 2012
Messages
1,240
Reaction score
1,446
First Language
English
Primarily Uses
RMMZ
The layer x,y position is based on pixels.
The player x,y is based on the movement grid. I believe by default the grid is 48 pixels per square.
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
119
Reaction score
16
First Language
English
Primarily Uses
RMMV
<<<SOLVED>>>

I'm highly confused on how to make a scrolling effect for my fog graphic in battles

I created a test event that leads to a battle with this script call as it's first part of the event following the example,
Galv.LG.bLayer(id,'graphic',xspeed,yspeed,opacity,z,blend);

Galv.LG.bLayer 1 BattleFogB 1 0 255 3

But it doesn't do anything when used in an event... ?

The map itself has this as it's note-tag

LAYER 1 cloud -1 2 205 5 0.5 0.5 0

and works exactly as desired.

But are they clashing because of the 'layers' used maybe or did I just misread the instructions?
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
I'm highly confused on how to make a scrolling effect for my fog graphic in battles

I created a test event that leads to a battle with this script call as it's first part of the event

Galv.LG.bLayer 1 BattleFogB 1 0 255 3

But it doesn't do anything when used in an event?

The map itself has this as it's note-tag following your example,
Galv.LG.bLayer(id,'graphic',xspeed,yspeed,opacity,z,blend);

LAYER 1 cloud -1 2 205 5 0.5 0.5 0

and works exactl as desired.

But are they clashing because of the 'layers' used maybe or did I just misread the instructions?
What is exaclty in the map note tag?
This:
Galv.LG.bLayer(id,'graphic',xspeed,yspeed,opacity,z,blend);

Or this:
LAYER 1 cloud -1 2 205 5 0.5 0.5 0

?

Show to us a picture of your note tags or script/plugin commands. I will take a look :)
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
119
Reaction score
16
First Language
English
Primarily Uses
RMMV
What is exaclty in the map note tag?
This:
Galv.LG.bLayer(id,'graphic',xspeed,yspeed,opacity,z,blend);

Or this:
LAYER 1 cloud -1 2 205 5 0.5 0.5 0

?

Show to us a picture of your note tags or script/plugin commands. I will take a look :)
I updated it, I had it written backwards!!

LAYER 1 cloud -1 2 205 5 0.5 0.5 0 is the map notetag

Galv.LG.bLayer 1 BattleFogB 1 0 255 3 is what i put as the script for the event
 

Attachments

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
I updated it, I had it written backwards!!

LAYER 1 cloud -1 2 205 5 0.5 0.5 0 is the map notetag

Galv.LG.bLayer 1 BattleFogB 1 0 255 3 is what i put as the script for the event
I think that can be related to the Id os the layers.
Try to change it. It is the first number after the command. Both are "1"
 

Tohisu

Veteran
Veteran
Joined
Oct 25, 2015
Messages
56
Reaction score
2
First Language
French
Primarily Uses
RMMV
I don't know if this your problem source, but have you also, in the event, done the plugin command "layer refresh"?

I might be totally wrong tho.
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
119
Reaction score
16
First Language
English
Primarily Uses
RMMV
I think that can be related to the Id os the layers.
Try to change it. It is the first number after the command. Both are "1"
I tried making the ID '2', so;

Galv.LG.bLayer 2 BattleFogB 1 0 255 3

instead of

Galv.LG.bLayer 1 BattleFogB 1 0 255 3


but still nothing
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
119
Reaction score
16
First Language
English
Primarily Uses
RMMV
I don't know if this your problem source, but have you also, in the event, done the plugin command "layer refresh"?

I might be totally wrong tho.
tried that right after the 'script' and still nothing :/
 

Zakarijah

I love making maps!
Veteran
Joined
Aug 18, 2019
Messages
119
Reaction score
16
First Language
English
Primarily Uses
RMMV
I think that can be related to the Id os the layers.
Try to change it. It is the first number after the command. Both are "1"
So the script is VERY specific, per GALV's example.

But I managed to make it work with this!

Galv.LG.bLayer(1,'BattleFogB',2,0,255,3,0);

I didn't think the parentheses and commas were necessary, as most people just use them flippantly and they're not required but IN FACT, they are! :D lol
 

Tohisu

Veteran
Veteran
Joined
Oct 25, 2015
Messages
56
Reaction score
2
First Language
French
Primarily Uses
RMMV
Good for you. I was about to screenshot my script for the layer set up, but apparently you figured it out.
 

Argentdragon

Veteran
Veteran
Joined
Dec 2, 2018
Messages
39
Reaction score
15
First Language
English
Primarily Uses
RMMV
I'm having some difficulty with this plugin and I've read the help section multiple times, but am unable to resolve the problem. I've just gotten back into RMMV after a few months hiatus. Last I remembered, everything was working fine with this plugin, however, when I go back into the maps I previously set up, they are no longer showing properly.

I have an image attached to show what I mean. The picture shows the top left corner of my map, even though the player starts out at the bottom right corner of the map. It remains static (player moves but map stays in once place even though I see my events pop up when I move my player to that direction). I thought you could set up the images in the NOTE section, but I have also tried initialising the map using plugin commands as well and neither work. This is the code I'm using for the bottom layer of the map:
Code:
LAYER_S 29 2 Libbottom 0 0 225 1 0 0 0
The name matches the PNG exactly and I've checked the MAP ID as well. I figured you didn't need the 0s for CHAR and ROTATE which are at the end, but I've tried putting them and it still hasn't worked. The image won't show at all if I remove it from the Parallax Background section. I even tried switching the command to LAYER even though I'm pretty sure it's LAYER_S for parallax mapping.

I thought I knew what I was doing when using this plugin, and I've tried messing with the numbers to what I thought may have been correct, but no luck so far. Any help would be appreciated!
 

Attachments

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
Hi there! :)

I've taken your code and applied it into the quick and detailed plugin commands, also to map notes too:

Quick plugin command:
Here, your code has an additional of two zero's in the end. Don't know if it can cause an error, or if the engine/plugin can simply ignore them.
Code:
LAYER_S MAPID ID GRAPHIC X Y OPACITY Z BLEND

LAYER_S 29 2 Libbottom 0 0 225 1 0 0 0

MAP ID = 29
LAYER ID = 2
GRAPHIC = Libbottom
X = 0
Y = 0
OPACITY = 255
Z = 1
BLEND = 0
Detailed plugin command:
Here, your code will be missing two attributes(CHAR and ROTATE).
Code:
LAYER_S MAPID ID GRAPHIC X Y OPACITY Z BLEND XANCHOR YANCHOR CHAR ROTATE

LAYER_S 29 2 Libbottom 0 0 225 1 0 0 0

MAP ID = 29
LAYER ID = 2
GRAPHIC = Libbottom
X = 0
Y = 0
OPACITY = 255
Z = 1
BLEND = 0
XANCHOR = 0
YANCHOR = 0
CHAR = ?
ROTATE = ?
Map notes
In Map notes, your code will be messy. I think you can see it below very clearly.
Code:
LAYER_S ID GRAPHIC X Y OPACITY Z BLEND XANCHOR YANCHOR CHAR ROTATE

LAYER_S 29 2 Libbottom 0 0 225 1 0 0 0

LAYER ID = 29
GRAPHIC = 2
X = Libbottom
Y = 0
OPACITY = 0
Z = 255
BLEND = 1
XANCHOR = 0
YANCHOR = 0
CHAR = 0
ROTATE = ?
So my point is:
- Send a picture of your event(if you make with plugin command) or map note with the code you used, this will be more helpful to help you.
- Also, pay attention that in MAP NOTE you can't use map id. So assuming your map id is 29...
- Another thing that you want to pay attention to is to see if you do not have another layer with the same id.
- Or another layer with a Z index higher than the one you are trying to use and is above.
- Or set this layer to another map.

You can also press F8 or F12 to open the console and access the layer properties. This will be helpful for you to see if the properties are set correctly with the plugin commands or map notes:
Code:
$gameMap.layerSettings[mapId][layerId].property
replace the mapId, layerId for the respective numbers.
And replace property for one of that(I think it is in lower case):
ID GRAPHIC X Y OPACITY Z BLEND XANCHOR YANCHOR CHAR ROTATE

I hope it helps to track the error! ^^
 

Argentdragon

Veteran
Veteran
Joined
Dec 2, 2018
Messages
39
Reaction score
15
First Language
English
Primarily Uses
RMMV
Thank you very much for the reply! Ideally I prefer to use the MAP NOTE method and here's a picture of what I have for that. I have checked and disabled both mogtimesystem and terrax lighting, but the issue still remains so I don't believe it's a compatibility issue, and I remember getting it to work previously. I know the Z number refers to where a layer will show up but the Libtop is a mostly transparent layer which holds the overlay images so I didn't think it would affect how Libbottom shows up.
 

Attachments

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
That's what I said, your map notes are missing properties. You have to put a value for all of them.
First copy that into your map notes, then replace each property with a value.

LAYER_S ID GRAPHIC X Y OPACITY Z BLEND XANCHOR YANCHOR CHAR ROTATE

Also, you are using tilesets? If yes, try to put the layer with Z index of 1.1
Because the tilesets can be above the layer with Z value of 0.

I use that plugin with a lot of other ones and never have a issue with compatibility. But if everything goes wrong, I suggest you try it in a blank project or disable all other plugins before you make a test in your aa actual project.
 

Argentdragon

Veteran
Veteran
Joined
Dec 2, 2018
Messages
39
Reaction score
15
First Language
English
Primarily Uses
RMMV
So I tried that and initially it again did not work, but when I tested it out on a blank project, it worked just fine. So I tried reinstalling the plugin and placed it at the lowest spot on the list, and that helped and now it's working normally again. Thank you so much! I really appreciate it, I thought it wasn't going to work at all!
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
So I tried that and initially it again did not work, but when I tested it out on a blank project, it worked just fine. So I tried reinstalling the plugin and placed it at the lowest spot on the list, and that helped and now it's working normally again. Thank you so much! I really appreciate it, I thought it wasn't going to work at all!
Yes! Glad you made it!
Happy new year!!
 

hosercanadian

Veteran
Veteran
Joined
Jul 18, 2016
Messages
32
Reaction score
7
First Language
English
Primarily Uses
I am having a strange effect when I use two layers.

I have built my maps with both a ground layer (or parallax) and a top layer. The images show all the shadows properly, until I play the game.

During game play, the "shadows" on the base layer disappear and I have the jagged edges shown. My screen shot image shows a close up. This errors occurs when I use either a parallax for the ground or use both layers as layer images with the plug-in.

Is there a setting I am not aware of or that I can tweak in the code to have what I assume is soft blending (which drops the semi-transparent shadows)?

Thanks.
 

Attachments

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
I am having a strange effect when I use two layers.

I have built my maps with both a ground layer (or parallax) and a top layer. The images show all the shadows properly until I play the game.

During gameplay, the "shadows" on the base layer disappear and I have the jagged edges shown. My screenshot image shows a close-up. This error occurs when I use either a parallax for the ground or use both layers as layer images with the plug-in.

Is there a setting I am not aware of or that I can tweak in the code to have what I assume is soft blending (which drops the semi-transparent shadows)?

Thanks.
Hi!
We can't help you with only this information. Please put the screenshot of your event that is making the layers or your map notes if you are creating them by notes.
 

hosercanadian

Veteran
Veteran
Joined
Jul 18, 2016
Messages
32
Reaction score
7
First Language
English
Primarily Uses
Hi!
We can't help you with only this information. Please put the screenshot of your event that is making the layers or your map notes if you are creating them by notes.
The map note script I am using is this for two layers:

LAYER_S 1 Start 0 0 255 5 0 0 0
LAYER_S 2 StartGround 0 0 255 0 0 0 0

When I am using the parallax I only use the first line of the script.
 

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,569
Reaction score
915
First Language
Portuguese - Br
Primarily Uses
RMMV
The map note script I am using is this for two layers:

LAYER_S 1 Start 0 0 255 5 0 0 0
LAYER_S 2 StartGround 0 0 255 0 0 0 0

When I am using the parallax I only use the first line of the script.
Hi!
Well as I can see, it seems ok. Maybe your filename can be different from map notes to the file(it is case sensitive).
Also, you are using any plugins that mess with parallax too?

I also advise you to not use the default parallax with this plugin, for the sake of organizing it better.

In your map notes, try to put a value for all the properties:

LAYER_S ID GRAPHIC X Y OPACITY Z BLEND XANCHOR YANCHOR CHAR ROTATE

As you can see, are 11 properties. In your map notes, it seems to have only 9 properties.

If nothing helps you, try to send a screenshot of your map notes, your filenames, and your plugin manager.

Or even better, upload a project with these things and I will take a look.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

1 million messages is approaching. The end is near! M1M is like Y2K, but forum based. It's a bug that's gonna delete all attachments when we hit 1 mil messages. At least with Y2K we had warning....
If you manage to make a game that people play for hours, then reminding them to take a break gives that “This game cares about me” feeling and also lowers chance of burnout with your game.
Well... things are slow. I'm still waiting to get called back into my position, but I do have some time to design my games.
Suddenly wanna hear this ...
The best way to end your day? Cuddle your kitten! :LZSproud:

Forum statistics

Threads
103,428
Messages
999,224
Members
134,955
Latest member
popa182005
Top