MV RPG MV Galv's Layer Graphics - How to Change or Remove layer in scene via script "plugin command"?

Hey,

I am new to all these plugins and even after reading document Help trying to follow guides something is not working out.
There is setup in notes for map as follows:

<cm:col_room>

LAYER 11 !layer_room_fridge_closed 0 0 255 5 0 0 0
LAYER 12 !layer_room_fridge_open 0 0 0 5 0 0 0

Is there a way to change the layer to another mid scene when interacted with the fridge? Like switching between door open and not? these scenes are hand drawn so a layer system is a must.

I tried typing in pluging command in script like this, and I got an error:

LAYER 11 !layer_room_fridge_closed 0 0 0 5 0 0 0
LAYER 12 !layer_room_fridge_open 0 0 255 5 0 0 0
if layer are static, use LAYER_S and I don't know if ! is needed as it
might break it.

also, you show it on MAP 11 than MAP 12, which your still on map 11.
make sure you do it correctly, and use refresh method on the event.

probably switch back when you interact to call the closed one.
Näyttökuva 2025-03-19 153754.png

I don't understand what I am missing? What is the difference between mapID and ID and from where to look at it? In scene that I have named like for example "myroom"?
ID is your layer id. MAPID is the id of your map (shown in the editor, I think at the bottom). One map can have multiple layers, they have the same MAPID but different IDs.

In the map notes you don't need to specify the MAPID, because it's obvious since they're in the map notes. But when you use plugin commands, you need to specify the MAPID. Also, in that pic you posted there isn't the name of the layer graphic file?
1742397407653.png

something is not working here and I tried without ! marks too but in each case I always get this error message:
1742397470663.png


I am trying to understand how to use these commands and what each element means:


----------------------------------------------------------------------------
Plugin Commands (Quick)
----------------------------------------------------------------------------

LAYER MAPID ID GRAPHIC XSPEED YSPEED OPACITY Z XSHIFT YSHIFT BLEND

LAYER_S MAPID ID GRAPHIC X Y OPACITY Z BLEND

LAYER REMOVE MAPID ID

LAYER REFRESH
Did you read what I wrote? Did you try putting the MAPID in the command?

LAYER MAPID ID GRAPHIC XSPEED YSPEED OPACITY Z XSHIFT YSHIFT BLEND
Did you read what I wrote? Did you try putting the MAPID in the command?

LAYER MAPID ID GRAPHIC XSPEED YSPEED OPACITY Z XSHIFT YSHIFT BLEND
Yea, I did, got the error away itself, but the layer didn't change in any way. The "fridge closed" is supposed to disappear and the one with the "fridge open" is supposed to replace it.. But for now it doesn't change or even remove the layer.

Is there any kind of tutorial or an example for opening and closing layers in the same scene "map" when player interacts with something?(in this case the fridge) 😩
In your pics above you seemed to be trying to add both 'fridge open' and 'fridge closed'.

If you want to change a layer, you can use the plugin command to add a layer with the same layer id that an existing layer has.

If you want to remove a layer, it's: LAYER REMOVE MAPID ID

Search youtube for tutorials, don't know of any.

Original thread: https://forums.rpgmakerweb.com/threads/rpg-mv-galvs-layer-graphics-how-to-change-or-remove-layer-in-scene-via-script-plugin-command.176035/