v20 Tilesets changing ingame

This thread pertains to v20 of Pokémon Essentials.

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
20
Age
35
Basically this. When I'm walking around, the tiles seem to change and I don't know why. For example, I was walking around in a town, and the tiles changed from the grass ones to the mountain ones. I didn't have this issue in v19, so I'm thinking it has to be an issue with v20
 

Nuri Yuri

.
Member
Joined
Sep 18, 2017
Posts
59
Is it glitching this way: Or just tileset change?

(The linked bug looks like computation glitch of the rendering coordinate, bit like the farlands in Minecraft)
 

Nuri Yuri

.
Member
Joined
Sep 18, 2017
Posts
59
After reading a bit the map renderer, I'm assuming the PokemonMapFactory is wrong and provides incorrect data to the map renderer.

There's several causes:
1. There's two maps overlapping in the map connections
2. The code for cleaning up maps from map factory is probably wrong because it does not take in account the actual display coordinates. And adding to that point, the faulty map is probably not being scrolled at all.

In any case, it looks like the faulty map don't have its position recomputed at all. I guess Essentials maintainer can probably find the root cause based on that, they know the code more ^^
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
20
Age
35
After reading a bit the map renderer, I'm assuming the PokemonMapFactory is wrong and provides incorrect data to the map renderer.

There's several causes:
1. There's two maps overlapping in the map connections
2. The code for cleaning up maps from map factory is probably wrong because it does not take in account the actual display coordinates. And adding to that point, the faulty map is probably not being scrolled at all.

In any case, it looks like the faulty map don't have its position recomputed at all. I guess Essentials maintainer can probably find the root cause based on that, they know the code more ^^
It's definitely the code. I checked all my maps and they all line up with each other perfectly
 

West

The Comeback Kid
Member
Joined
Jul 12, 2017
Posts
32
I have experienced somewhat similar issues in the past- the culprit was having a Snap Edges map connected to a normal map
 

DogzNDogz113

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
196
So, I've been experiencing a similar issue that I couldn't report due to the forum only allowing bug reporting for the newest versions.

In my case, it seemed that the PBS for map connections automatically changed, and connected random maps to each other. The workaround to that was to make the PBS text file read-only before it was compiled (but after having opened RMXP which asks to disable the read-only). It is a strenuous process and requires you to keep a backup of your "real", correct connections.txt. with which to replace the older one, before setting it to read-only.

Can you please check your connections.txt file? If there's extra map connections, that could very well be the culprit. The engine is attempting to load many interconnected maps at once.
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
20
Age
35
So, I've been experiencing a similar issue that I couldn't report due to the forum only allowing bug reporting for the newest versions.

In my case, it seemed that the PBS for map connections automatically changed, and connected random maps to each other. The workaround to that was to make the PBS text file read-only before it was compiled (but after having opened RMXP which asks to disable the read-only). It is a strenuous process and requires you to keep a backup of your "real", correct connections.txt. with which to replace the older one, before setting it to read-only.

Can you please check your connections.txt file? If there's extra map connections, that could very well be the culprit. The engine is attempting to load many interconnected maps at once.
There are no extra map connections, as I copied the contents of my connections.txt file to the map_connections.txt file in v20
 

DogzNDogz113

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
196
There are no extra map connections, as I copied the contents of my connections.txt file to the map_connections.txt file in v20

So, for me at least, it's happened all the way from 17.2 to 19.1. If you had a similar issue, your previous connections.txt file could already have been automatically modified. Can you check it just to be sure?
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
20
Age
35
So, for me at least, it's happened all the way from 17.2 to 19.1. If you had a similar issue, your previous connections.txt file could already have been automatically modified. Can you check it just to be sure?
I don't exactly know what I'm looking for
 

DogzNDogz113

Arbiter of Doggos
Member
Joined
Dec 12, 2017
Posts
196
I don't exactly know what I'm looking for
If you open the connections.txt, you will see a list.


Code:
# Cerulean City (7) - Route 24 (45)
7,North,0,45,South,0

It goes like: Map name, mapID, connection.

Sometimes, Cerulean City, for instance, would be connected to Cinnbar Island or some random route that it shouldn't be connected with. On top of it already being connected to its proper neighboring maps.
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
20
Age
35
If you open the connections.txt, you will see a list.


Code:
# Cerulean City (7) - Route 24 (45)
7,North,0,45,South,0

It goes like: Map name, mapID, connection.

Sometimes, Cerulean City, for instance, would be connected to Cinnbar Island or some random route that it shouldn't be connected with. On top of it already being connected to its proper neighboring maps.
Everything is connected as it should be
 

Maruno

Pokémon Essentials dev
Essentials Developer
Joined
Apr 5, 2017
Posts
507
The problem is caused by loading a connected map, and that map has an event at the edge of it with its back to another map connected to that one, but that other map isn't connected to the current map. Since there's no direct connection between that other map and the current map, the game can't figure out where to display it on-screen, so it defaults to (0,0).

That other map is loaded because of the event facing away from it. It's part of the bush depth check (of all things). The bug is that the map is permanently loaded, not temporarily. You can avoid this problem by moving the offending event(s) away from the map edges.
 

Semolous

Novice
Member
Joined
Jun 5, 2022
Posts
20
Age
35
The problem is caused by loading a connected map, and that map has an event at the edge of it with its back to another map connected to that one, but that other map isn't connected to the current map. Since there's no direct connection between that other map and the current map, the game can't figure out where to display it on-screen, so it defaults to (0,0).

That other map is loaded because of the event facing away from it. It's part of the bush depth check (of all things). The bug is that the map is permanently loaded, not temporarily. You can avoid this problem by moving the offending event(s) away from the map edges.
None of my maps have events on their edges though
 
Top