Problem when changing map

I was mapping a village, and since i needed a hole in a wooden roof, I decided to put the Inside_A2 tileset in the Outside tileset type. While I was there I decided to use some


transparent tiles in the Inside_A2 tileset to make unpassable tiles passable and vice versa without using plugins.


It worked, but when I was playtesting I saw that, entering in a Outside map from an Inside one resulted in seeing the previously "transparent" tiles (from Inside_A2) substituted with tiles from the Inside tileset (specifically, those that were in the exact place of the transparent tiles). It seems to work only with transparent tiles.


To replicate the bug


- Open Database --> Tilesets


- Put two tilesets with different tiles (one of which has to be transparent) in the same position in two different tileset types, but with the same letter (Example: Put Inside_B in Inside-B and Inside_A2 in Outside-😎


-Put a "transparent" tile from the added tileset in a map


-Playtest


-Enter the map with the "transparent" tile from another with another tileset type


-Instead of the transparent tile you should see the corresponding tile from the other tileset type


Demo:


Here

Spoiler
The house with the blue roof leads to a map with the Inside tileset, while that with the green roof leads to one with the Outside tileset


Go from the initial map to the blue house and return to see the "transparent" tile in the center of the square made of tall grass turn into a chair

P.S. The database is in Italian, but it shouldn't be a problem
You're using the wrong tilesheet for your B in the Esterno (outside?) tileset. This is important because the B tilesheet for the inside map is 768x768 pixels, whereas the B you're using (which is actually Inside_A2) is only 768x576. Since MV 1.3.0, games running in WebGL mode (the preferred default, as it is more efficient) use the video card to store the tileset textures, and to draw the tilemap itself. This is more efficient than the old way, or by running in canvas mode to use the old way, because the graphics card has all the information and can draw the tiles that it needs very quickly.


So what is this an issue? The graphics card is given the tilesets to store in its own memory, because GPUs have memory on the card itself specifically for storing textures to make drawing them faster. When the tileset is changed, the new tileset is uploaded to the GPU to overwrite the old ones. However, you're using sheets that aren't the right size, so part of the inside tileset is staying in graphic memory, and when the graphics card goes to draw that tile, instead of the transparent box you see in the editor, the graphics card has the table from the old tileset.


To fix this issue just use a properly sized tile sheet for your tilesets. The size standards exist for a reason, but they're even more important now. Please make sure to adhere to the resource standards. The standards for each resource can be found in the manual under Documentation -> Asset Standards
Thanks for the quick answer!


I resized the tilesheet and it worked.


Well, I guess I'll read the guide more often from now on.


BTW yes, Esterno means Outside
just as an added info because you might have missed that in the explanation above:


There is not one, but six different formats for tilesheets - and each tilesheet needs to be in the slot for its format. That's why the tilesheet pictures end on those letters.


Inside_A2 has to go into the A2 slot, it won't work correctly anywhere else.

Original thread: https://forums.rpgmakerweb.com/threads/problem-when-changing-map.67138/