FelixReuthlinger / AutoMapPins

GNU Lesser General Public License v3.0
4 stars 3 forks source link

Placing multiple copies of pins -> causes low fps #35

Open nukeajs opened 2 weeks ago

nukeajs commented 2 weeks ago

I think this issue started when 2.0 was released but I'm not sure. Anyways, when you re-enter an area you've previously visited, the mod places a copy right on top of an existing pin. This obviously only affects permanent pins. This didn't used to happen.

The problem with this is that if you re-enter an area many, many times and the mod places pins every time, you'll end up with thousands of pins in a single area. An obvious example would be a portal hub. Grouping helps, but the issue will still happen.

When you have thousands of pins in an area, it really eats into your fps. My main base that had about ten portals was getting 4 fps. When I deleted all the pins with frantic right-clicking (auto-clicker didn't work), the fps went to its normal limit of 60.

Also, if you want to delete a pin because you've moved on -- you have to right-click potentially hundreds of times to finally get rid of the pin. Furthermore, this pin spam affects the cartography table by sending other players a massive number of new pins, even if nothing was actually revealed so it can potentially affect other player's fps.

nukeajs commented 2 weeks ago

I did some testing and it's definitely 2.0 that started this.

As I said, grouping definitely helps, but it would just be a matter of time before the pins pile up.

2.0's config is way better, but the duplicate pins make 2.0+ unplayable or at least more of an inconvenience than having the mod turned on because you'll regularly have to delete duplicate pins.

FelixReuthlinger commented 2 weeks ago

thanks for reporting, will have a look into this

FelixReuthlinger commented 2 weeks ago

yea, its a pitty that I didn't test well enough :D seems like the chosen approach of using Unity game object IDs does not work as expected, since IDs change instead of being persistent and / or there is something wrong in the logic I created. Will need to check this in detail and probably need some bigger rework (again).

FelixReuthlinger commented 2 weeks ago

ok, I have uploaded a 2.2.0 version right now. please give it a try, at least I didn't find any duplicates of permanent pins anymore

nukeajs commented 2 weeks ago

Cool

Unfortunately I'm quite busy for awhile but I'll test it and let you know in a week or so.

nukeajs commented 2 weeks ago

I actually did get a bit of time to test it quickly and it seems like it works as intended -- a single permanent pin is placed and duplicates don't happen.

Ashlands spawners (charred and voltures) don't auto-remove when you clear them and they also reappear after you destroy them and then return to the area, but that's a pretty minor bug imo.

EDIT: Flametal pins also don't disappear after they sink (and reappear after you manually remove it and then return to the area), but this might be because the game never actually removes them from the map. It might just lower them by a couple hundred meters but they're still technically there under the surface.

FelixReuthlinger commented 2 weeks ago

I actually did get a bit of time to test it quickly and it seems like it works as intended -- a single permanent pin is placed and duplicates don't happen.

Ashlands spawners (charred and voltures) don't auto-remove when you clear them and they also reappear after you destroy them and then return to the area, but that's a pretty minor bug imo.

EDIT: Flametal pins also don't disappear after they sink (and reappear after you manually remove it and then return to the area), but this might be because the game never actually removes them from the map. It might just lower them by a couple hundred meters but they're still technically there under the surface.

I especially added a comment on "permanent" pins, they cannot disappear automatically, because either you want them to be permanent or not. You can deactivate the permanent flag, but well, then they will also disappear when you leave the area.

Regarding the flametal: if this bigger spire remains, it will also always be remaning and marked. Since I never play myself in Ashlands, I don't know if there would be another prefab name instead that also disappears.