ChasarooniZ / More-Dynamic-Token-Rings

Adds more dynamic tokens for FVTT.
MIT License
0 stars 1 forks source link

[Bug] Weird behavior with custom rings #40

Open picollo-24 opened 2 months ago

picollo-24 commented 2 months ago

This is going to be not very productive bug report, because I don't know how to reliably replicate this starting on new fresh system.

I have set up new world, enabled modules for it, and then I wanted to change token ring. And it kinda worked. But not really. I was able to change ring, but then when I change scene, or refresh game, ring gets corrupted like in attached screens- it's like it's using map of custom ring, instead of properly adjusting ring size.

Originally I've been trying to use Glided Black Marble Ring, but at first it hasn't noticed that I selected it, so I chosen something else instead- and then it shows two checkboxes next to name- Marble one, and Runes Ring Black- that I've made scrrnshot with.

In next step, I've tried to make custom ring with my own graphics- and behavior is similar (image gets corrupted on scene change/refresh- but no submitted ring is marked as used.

I don't know what caused this, I have no idea what could have originally corrupted this.

For the environment- game hosted on Forge, Foundry 12.331 DnD 3.3.1 SETT 0.4.11

List of all active modules: PackageList.json To Reproduce

Steps to reproduce the behavior: Described above- can't fully replicate from scratch on fresh system.

Expected behavior I just expected that custom Dynamic Ring will work correctly.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here. image image image

ChasarooniZ commented 2 months ago

That's soo weird wth XD

It looks like as you said its just grabbing the spritesheet directly and not using the size mapping.

Only thing I can think is that either:

  1. Somehow your download of the module got corrupted (this has happened to me on rare occasions)
  2. Somehow the files transferred weirdly when you went to reload.

    Followup questions

    • Is this still happening even after an attempted reinstall of the module?
    • What browser + version do you have (this one is grasping at straws a bit)
picollo-24 commented 2 months ago

It seems that module indeed got corrupted in some way- I removed it and installed again, and everything works correctly.

And for the browser, if you want to look at it more, I'm using up to date version of Chrome.

Since it seems like module got currupted, and reinstal fixed everything, I'd say it's very low priority to "can be closed now, not an issue" problem :)

ChasarooniZ commented 2 months ago

Cool I'll close it and mark it as like "May Come up again", thanks for the bug report!

picollo-24 commented 2 months ago

I lied. I can replicate it again. After previous response, I've checked one more thing that I didn't think it mattered. Together with reinstalling module, I also updated DnD to 4.0.2. And correct behavior was on 4.0.2. In the meantime I reverted system to 3.3.1, and bug still persists.

Steps I performed, because it can be confusing from the description above.

Yesterday I reported error. Today I updated DnD to 4.0.2, and reinstalled SETT. Everything worked. Then I reverted to 3.3.1 Bug returned. I reinstalled SETT again, stopped and started server, and launched world again- bug still persists. Since I realised that some modules I want aren't compatible with 4.X now, I'll be probably staying on 3.3.1 for some time, so I can do some additional checks if something is needed.

picollo-24 commented 2 months ago

I've run the find the Culprit check, and it doesn't seem like it's caused by anything else that's active

image

All other modules are libraries, and don't do anything on their own

ChasarooniZ commented 2 months ago

Hmmm that's weird. Maybe DND 4.x.x messes with it. Not too familiar with the system after I jumped ship, but AFAIK they made drastic changes between versions

picollo-24 commented 2 months ago

The thing is, 3.3.1 is causing problems, after change to 4.0.2 it worked okay.

Stonedtroll commented 2 months ago

I get a similar bug. It works until you return to setup. Then I get a distorted ring. Almost as if it's picking up the wrong area of the sprite sheet. Only creating a new token ring will fish the issue until you return to setup then the issue starts again.

NB. Splitting the large and huge into two entries in the JSON and resizing the grid start fixes the issue for large tokens.

ChasarooniZ commented 2 months ago

Oh it might be a 5e specific issue due to how the rings are labelled?

ChasarooniZ commented 2 months ago

not really familiar with the system anymore, @Stonedtroll could you send a copy of the modified JSON and i can see if i can fix the underlying json data to work with 5e?

Stonedtroll commented 2 months ago

Here it is. Please note that not all the sizes are working.

custom-ring-mod.json

Stonedtroll commented 2 months ago

Just an update. Your instinct was right. When I match the labels in the custom JSON to what the system provided JSON uses, it works.

picollo-24 commented 1 month ago

Since this issue apparently is replicable, and it seems that we've got solution, would it be possible to get this bug fixed?

ChasarooniZ commented 1 month ago

I think i need some more details before i can address it @picollo-24 , @Stonedtroll what specific labels are wrong between the two? (i am asking as it seems to be an issue I haven't personally been able to replicate)

Stonedtroll commented 1 month ago

I'm afraid my memory is a bit vague on this. I know you have less sizes than the standard. You also named them differently. The ring size entry did not change even when the ring was bigger as well. Those were the three things that I can remember I had changed.

picollo-24 commented 3 weeks ago

Sorry that I'm responding after such long time, but I kinda hoped that @Stonedtroll knows topic better. I have downloaded both ring jsons- yours and the one from dnd system. I can see that there are some differences in the formats, but it's hard to say what is impactful and what's not. THe attached file is from 4.1.0 version, but I can see that it hasn't changed for 10 months, so it was like that in 3.3.1 that I've been using while originally bringing the issue. Hopefully these files are going to help you to at least some degree.

rings-chasarooni;-abomination-vaults-ring.json token-rings.json

ChasarooniZ commented 3 weeks ago

All good, cool this should be enough to work with hopefully. I'll look into fixing it when I can

ChasarooniZ commented 2 weeks ago

Looked at both rings @picollo-24 not sure this is an issue on my end but more on how 5e handles the ring data. Currently the only substantial difference besides formatting is "gridTarget" variable for each ring and the "ringThickness" both if which are features of the JSON language as far as I've been told by foundry people.

Maybe worth bring this up as an issue to them? @picollo-24 as I can't replicate it on my end in another system, and as far as I can see on my end the only way I could possibly fix something is by breaking it for other systems removing those properties.

picollo-24 commented 2 weeks ago

I checked one more thing ( sorry for being PITA)

I looked at stonedtroll's json, and it looks differently than the one I've provided. Haven't verified it previously, I assumed that these were the same things, but apparently they're not. If you compare the custom-ring-mod.json with both I've pasted, there are some differences. troll's one starts at grid size 4, other start at 3, and they have separate large and huge size, while yours has large-huge setting clumped together. Maybe that's the issue?

Stonedtroll commented 2 weeks ago

@picollo-24, this is the json I ended up building and it has worked flawlessly. Thank you @ChasarooniZ, for investigating this issue.

{ "config": { "defaultColorBand": {"startRadius": 0.669, "endRadius": 0.727}, "defaultRingColor": "#a7301f" }, "frames": { "tny-ring-bkg": { "frame": {"x": 5641, "y": 1, "w": 256, "h": 256}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 256, "h": 256}, "sourceSize": {"w": 256, "h": 256}, "anchor": {"x": 0.5, "y": 0.5} }, "tny-ring": { "frame": {"x": 2565, "y": 1, "w": 256, "h": 256}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 256, "h": 256}, "sourceSize": {"w": 256, "h": 256}, "anchor": {"x": 0.5, "y": 0.5}, "gridTarget": 0.5, "colorBand": {"startRadius": 0.669, "endRadius": 0.727}, "ringThickness": 0.112 }, "med-ring-bkg": { "frame": {"x": 3589, "y": 2051, "w": 512, "h": 512}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 512, "h": 512}, "sourceSize": {"w": 512, "h": 512}, "anchor": {"x": 0.5, "y": 0.5} } }, "med-ring": { "frame": {"x": 2823, "y": 1, "w": 512, "h": 512}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 512, "h": 512}, "sourceSize": {"w": 512, "h": 512}, "anchor": {"x": 0.5, "y": 0.5}, "gridTarget": 1, "colorBand": {"startRadius": 0.669, "endRadius": 0.727}, "ringThickness": 0.112 }, "lrg-ring-bkg": { "frame": {"x": 2565, "y": 515, "w": 1024, "h": 1024}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 1024, "h": 1024}, "sourceSize": {"w": 1024, "h": 1024}, "anchor": {"x": 0.5, "y": 0.5} }, "lrg-ring": { "frame": {"x": 1, "y": 1, "w": 1024, "h": 1024}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 1024, "h": 1024}, "sourceSize": {"w": 1024, "h": 1024}, "anchor": {"x": 0.5, "y": 0.5}, "gridTarget": 2, "colorBand": {"startRadius": 0.669, "endRadius": 0.727}, "ringThickness": 0.112 }, "hge-ring-bkg": { "frame": {"x": 2051, "y": 1541, "w": 1536, "h": 1536}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 1536, "h": 1536}, "sourceSize": {"w": 1536, "h": 1536}, "anchor": {"x": 0.5, "y": 0.5} }, "hge-ring": { "frame": {"x": 1027, "y": 1, "w": 1536, "h": 1536}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 1536, "h": 1536}, "sourceSize": {"w": 1536, "h": 1536}, "anchor": {"x": 0.5, "y": 0.5}, "gridTarget": 2, "colorBand": {"startRadius": 0.669, "endRadius": 0.727}, "ringThickness": 0.112 }, "gnt-ring-bkg": { "frame": {"x": 3591, "y": 1, "w": 2048, "h": 2048}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 2048, "h": 2048}, "sourceSize": {"w": 2048, "h": 2048}, "anchor": {"x": 0.5, "y": 0.5} }, "gnt-ring": { "frame": {"x": 1, "y": 1539, "w": 2048, "h": 2048}, "rotated": false, "trimmed": false, "spriteSourceSize": {"x": 0, "y": 0, "w": 2048, "h": 2048}, "sourceSize": {"w": 2048, "h": 2048}, "anchor": {"x": 0.5, "y": 0.5}, "gridTarget": 3, "colorBand": {"startRadius": 0.669, "endRadius": 0.727}, "ringThickness": 0.112 }, "meta": { "app": "http://www.codeandweb.com/texturepacker", "version": "1.0", "image": "mordor.webp", "format": "RGBA8888", "size": {"w": 5898, "h": 3588}, "scale": "1" } }