Aedif / TokenVariants

GNU General Public License v3.0
18 stars 12 forks source link

[Support] I can't for the life of me figure out how to make the elevation changing buttons that were shown in the 4.54.0 release #138

Closed Ackerfe closed 1 year ago

Ackerfe commented 1 year ago

I've been trying for a few hours to replicate the buttons that were shown in the 4.54.0 release as global mappings. I have no idea what should go in the expression field to make it so that the button press is registered and what the script should be to increase and decrease elevation by steps. I tried to put a trigger on click left and call a macro that does the elevation change (macro works if I try it manually) but that doesn't seem to work. I have looked both on the wiki and on youtube and google for clues on how they were made but I can't find anything. Please help hahahaha

Aedif commented 1 year ago

Make it yourself:

https://github.com/Aedif/TokenVariants/assets/7693704/a83ee0f4-b4a5-4baa-93d7-465a56734c44

Or jus timport this file using the Import header button on the mapping form:

elevation-controls.txt

Ackerfe commented 1 year ago

ah god thank you so much, I was using token.data.elevation and couldn't figure out why it wasn't working. It's so hard to find documentation on what the data paths are sometimes, thank you so much!

Ackerfe commented 1 year ago

okay, I have tried making them myself and also tried importing the one you sent, in both cases nothing happens when I click on the buttons, almost like it's not registering the button presses itself, doesn't show anything happening in the console either

Aedif commented 1 year ago

Btw if interested some peeps have made a thread and been messing with TVA mappings over at Posney's server. If you want help or share your own mappings you can check it out here: https://discord.com/channels/915186263609454632/1149317226655129600

Aedif commented 1 year ago

What version of the module, foundry, and game system are you on?

Ackerfe commented 1 year ago

foundry 11.308, dnd 5e 2.3.1 and TVA 4.55.1

Aedif commented 1 year ago

Looks like there have been some change to how tokens and overlays are sorted in 11.308 and looks like mouse clcick can get eaten up if the overlays sits directly over another token. Which I'll need to fix.

However that somewhat unrelated as what you've seen in the clip should work with those 3 versions. Could you check if the overlays remain un-interactive if TVA is the onyl module activated?

Ackerfe commented 1 year ago

I have disabled all modules except for TVA, then right clicked on the token to get the HUD to pop up, left clicked one of the arrows and all that happens is that my token action HUD disappears as if I had just clicked an empty space on the canvas Again, the console isn't saying anything even happened when I click on the arrows

Aedif commented 1 year ago

There must be something that you've done wrong with the importing of the overlays or the creation of your own.

Export them so I can take a look

Ackerfe commented 1 year ago

token-variants-Ismaele Barbadisale.txt here you go All I did to import them was change the file end to json and then click the import button from the mappings screen on one of my player's token

Ackerfe commented 1 year ago

omfg I know what it is I was on my landing page and I have an overhead tile there, for some reason even with me being in the token controls layer when I left clicked the overhead tile was blocking the click (I don't even know if that's supposed to happen). I put the token on another map and the arrows work fine there (weirdly enough the rest of the token HUD works fine even with the overhead tile blocking it)

Ackerfe commented 1 year ago

Landing Page • Foundry Virtual Tabletop — Mozilla Firefox 2023-09-16 20-01-20.webm

Aedif commented 1 year ago

Hmm, that shouldn't be happening. I also noticed some strange behaviour when I created a new world and started experimenting on there.

I'll look into this a bit more tomorrow. I think Foundry has made some seemingly innocuous changes that ended up affecting this feature which I'll now need to fix.

Ackerfe commented 1 year ago

yeaaah, thanks for all the help though. I'm wondering, is there an "elevation" setting for the buttons that might bring them to always be on top of the canvas and not be blocked by tiles ? Cause I noticed that if I bring the token to for example elevation -5 then the token ends up behind the background image, the toke HUD still works but the arrows disappear

Aedif commented 1 year ago

As of the latest release overlays can now be marked as UI Element: https://github.com/Aedif/TokenVariants/releases/tag/4.56.0

Set the elevation controls as UI Elements and this issue should be resolved. image

Ackerfe commented 1 year ago

Amazing! Thanks so much for all the help really ^^