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

Map icons don't match content #42

Closed luxzg closed 1 year ago

luxzg commented 1 year ago

Is there an existing issue for this?

Mod version

1.4.0

Is this a bug caused by this mod alone?

The bug was reproduced with this mod alone

List of mods to reproduce bug

No response

What happened?

I've used auto map pinning with default Custom Map Icons example 2.0.0. That worked fine for test, and I had several raspberry fields marked on map with raspberry icon.

Then I've set to add more custom icons, added icons for a few other plants and animals, and when I've gone back into game old raspberrry locations changed icons, but - it started using "lox.png". I've played for a while like that and noticed that eg. new icons were all being pinned and displayed correctly, including lox.

I've now started new icon pack, changed all icons, and lox icon changed name from lox.png to cow.png yet - again in game those few old locations have lox icons (well, new "cow" ones).

I couldn't find any explanation how are icons tied to locations. All cloudberry fields turned to new icons, all bluberries, jotunnpuffs, magecaps and all, everything converted to new icons (all images AND PNG names are different) but those few raspberries... cow icons ;D

My low is defined like this:

"target": {
      "name": "lox"
    },
    "sprite": {
      "file": "cow.png",
      "width": 32,
      "height": 32
    },

Now I know that if raspberries contained "lox" it would interfere, but according to Jotunn Docs, name is "RaspberryBush" so .. no "lox" inside the string.

Any idea what could've happened?

And would this doc ( https://valheim-modding.github.io/Jotunn/data/zones/vegetation-list.html ) be good place for internal names used by map pinning functionality?

Only thing that comes to mind is that in example json pin sections are, in order:

  1. boar
  2. deer
  3. raspberry

And I modified it so it's:

  1. boar
  2. deer
  3. lox
  4. raspberry
  5. blueberry

Could it be that mod somehow internally indexes JSON array, so BOAR=0 DEER=1 RASPBERRY=2 and so on, and when I made changes it became BOAR=0 DEER=1 LOX=2 RASPBERRY=3 ... and so old locations that maybe "remember" being [2] are now pulling icons for current [2] which is lox?

Also (did not test) what happens to the map and icons if mod is removed at some point? Do icons default to something like default "dot" marker? or will it corrupt the map? Save game? or would it just erase all existing pins from map? I wasn't brave enough to test yet...

Steps to reproduce the bug

  1. use example 2.0.0 map icon pack
  2. let it pin few raspberry bushes
  3. change example's json and add "lox" pinning section with any custom png and put it BETWEEN deer and raspberries sections:
    "target": {
      "name": "lox"
    },
    "sprite": {
      "file": "cow.png",
      "width": 32,
      "height": 32
    },
  4. go back in game, and existing pins will become the new lox icons

Logs and screenshots

No response

luxzg commented 1 year ago

Gave up, and started using another mod for this functionality.