eideehi / valheim-automatics

[Valheim] Mods that automate a variety of tasks
https://www.nexusmods.com/valheim/mods/1700
MIT License
8 stars 4 forks source link

Portal Pins not removing when destroyed with being set in config too #57

Closed draco1122 closed 1 year ago

draco1122 commented 1 year ago

Is there an existing issue for this bug?

Mod version

1.4.6

What happened?

Portal Pins not removing when destroyed with being set in config too. I had moved my portals but shows old and new locations. Double checked setting and I enabled to remove destroyed objects. Tried disabling and re-enabling. Was unable to manually remove as well. Right clicking icons does nothing. Using automatics 1.4.6. Is their a way to clear all static map pins with console? To start fresh.

List of Mods required to reproduce the bug

Automatic 1.4.6

Steps to reproduce the bug

Place portal let save. Move portal. Try to remove pin.

File attachments

No response

eideehi commented 1 year ago

Before version 1.4.6 of Automatics, there was a bug where pins would duplicate upon registration. I have confirmed that portal pins removed in newly created worlds, so I believe the pins are in a duplicated state due to the bug. Although it is possible to remove the icon by continuously right-clicking, I think that would be troublesome, so I will add a console command.

eideehi commented 1 year ago

I added a console command to remove map pins in version 1.4.7. Please read the description of the "removemappins" command in the README before using it.

draco1122 commented 1 year ago

Worked in a way. Command removed most of pins like 95 percent. Some of portal pins were left behind. But, was able to remove them with a right click. Thank you for update and fix. For now will leave portal pins off. Also, I disabled automatic pins as your readme said. I did not restart game was that required for settings to update? Could be the difference in why some remained.

eideehi commented 1 year ago

I have fixed the description of the allow_non_duplicate_pins option in the README, which was not displaying correctly.

As for why some portal pins remained, it is likely because the allow_non_duplicate_pins option was not enabled. When allow_non_duplicate_pins is not enabled, removemappins only removes duplicate pins. This does not completely delete pins that have been identified as duplicates, but rather resolves the duplicates and displays only one. If you want to completely remove a pin from the map, you need to enable allow_non_duplicate_pins. At that time, do not forget to limit the pins by name or distance. If you are not careful, all pins may be deleted.

The reason for disabling Automatic Mapping when executing the command is because the removemappins command and Automatic Mapping function are independent of each other. If the pins that Automatic Mapping has cached are deleted by the command, it will cause problems. It is only necessary to disable Automatic Mapping when executing the command, so there is no need to restart, and it is fine to enable it immediately after executing the command.

I think the behavior of removemappins is a bit unfriendly, so I plan to improve it soon.