PDA

View Full Version : Natural Selection - A solution to stacked tokens



Saagael
December 21st, 2022, 22:45
Forge Link: https://forge.fantasygrounds.com/shop/items/953/view

Wish there was a way to gracefully handle when multiple tokens are stacked together on a map? Well now there is! This extension detects when multiple tokens share a grid space and will pop up a selector window that lets you pick which token in the stack to select. This also works in reverse, allowing you to target a specific token in a stack without selecting it. You can also drop rolls onto the token selector window as if it were the token on the map.

This extension adds a new game option that lets you specify where, relative to the token being selected, the token selector window appears (default is top-right).

This extension has very little risk colliding with any other extension, and should work for any ruleset based on CoreRPG.

Known Issues
- Player interacting with stacks that contain hidden tokens doesn't always work right. There are two bugs in FGU that I raised with Moon Wizard. When those fixes are implemented I can revisit this issue.
- Token stacking is a little weird with Aura effects. Working on this one.
- Iso grid doesn't really work.

Potential Features
- Add token widgets (health bar, icons, death indicators, etc) on the token selector window. This is currently not possible with the limited access to widgets that we have. If this ever changes in the future, this is #1 on my list of features.

Changelog
v1.8.0 - Added a game option to enable tokens that are part of stacks to display an icon on them. This is somewhat experimental and is likely going to cause performance issues on maps with large amounts of tokens or when running on lower-end hardware.
v1.7.2 - Fixed error when players would click on a token not on the combat tracker.
v1.7.1 - Fixed stack ordering issue introduced with the 'send to back' feature.
v1.7.0 - Added game option to enable selecting tokens that aren't on the combat tracker. Added radial option to the popup window to push a token to the bottom of the stack.
v1.6.1 - The selector window now closes when the clicked image closes.
v1.6.0 - Added targeting and faction widget to token selector window. Middle mouse clicking a token now opens the token's sheet. New game options. Minor bug fixes.
v1.5.2 - Updated the overlap threshold calculations so they're more intuitive and reliable. Added a new game option to scale up token's to the nearest multiple of the image's grid size before performing overlap detection.
v1.5.0 - Added game options to set an overlap detection threshold, as well as set the calculation method used for the different grid types.
v1.4.1 - Fixed an error that was preventing you from selecting stacked tokens.
v1.4.0 - Added support for hex grids (the math to make this work is simplified so the overlap calculation isn't not exact) and holding shift to multi-select.
v1.3.0 - Hidden tokens no longer appear in the selector window for clients. Tokens in the selector window now have a tooltip that displays their name.
v1.2.0 - The token selector window now opens precisely next to the token, and the tokens in the selector window are scaled to roughly match the token's on the map. There is a new game option to specify where, relative to the token being selector, you want the selector window to appear (default is top-right)
v1.1.0 - Tokens of different size now correctly calculate overlap
v1.0.0 - Initial release

SilentRuin
December 22nd, 2022, 00:21
Very nice - next stage you know what to do! Very impressive and I feel it will soon be perfected!

rhagelstrom
December 22nd, 2022, 00:24
This sounds great. Thank you for this.

nephranka
December 22nd, 2022, 00:49
Very cool!

ScribblingRambler
December 22nd, 2022, 01:39
Awesome!
This will make life so much easier for my groups with familiars or mounts, or tiny creatures, on top of the general usefulness of things like players accidentally moving simultaneously to the same space.
Great stuff!

ScribblingRambler
December 22nd, 2022, 01:47
The one minor issue I have noticed is that there are some glitches with the Aura Effects extension, as only the top token is automatically targeted. Not sure which extension would be more easily adjusted.

SilentRuin
December 22nd, 2022, 02:27
The one minor issue I have noticed is that there are some glitches with the Aura Effects extension, as only the top token is automatically targeted. Not sure which extension would be more easily adjusted.

Not sure what you mean the only problem I have (and author is aware and going to address it) is that its center point only matching. Since it has to be EXACTLY on top of eachother. As this should be taking into account the size of the critter and how things in that overlapped space need to also pop up on list that is an issue.

For sure I've not deeply tested it yet but I used all the things in my signature plus BCEG, AURA, Token Height, and Sir Motte's theme - with no issues yet - other than the one I mention above.

MrDDT
December 22nd, 2022, 02:34
Thanks this is pretty cool!

ScribblingRambler
December 22nd, 2022, 02:36
I only tried it very briefly, so I will try to play with it more tomorrow.
What I noticed is that I had a character with an AURA effect stacked with a mount token. When I selected the mount, all of the FROMAURA effects went away, and they came back when I selected the character. It appeared that the mount never received the aura effect.
In any case, I will play with it more tomorrow.
And it's just a minor quibble. I still greatly appreciate your hard work.

Saagael
December 22nd, 2022, 03:48
I only tried it very briefly, so I will try to play with it more tomorrow.
What I noticed is that I had a character with an AURA effect stacked with a mount token. When I selected the mount, all of the FROMAURA effects went away, and they came back when I selected the character. It appeared that the mount never received the aura effect.
In any case, I will play with it more tomorrow.
And it's just a minor quibble. I still greatly appreciate your hard work.

I think I know why this might be. In order to pop a token to the top of the stack I move the token one pixel back and forth. Since the token on top is the last one to move, this puts it on the top of the stack. Likely this movement is causing aura effects to get funky. I'll explore more with this and hit up that dev for some ideas on how to fix this.

SilentRuin
December 22nd, 2022, 04:22
I think I know why this might be. In order to pop a token to the top of the stack I move the token one pixel back and forth. Since the token on top is the last one to move, this puts it on the top of the stack. Likely this movement is causing aura effects to get funky. I'll explore more with this and hit up that dev for some ideas on how to fix this.

Pretty sure token height guy was having same issues - how to get things to trigger onMove.

nephranka
December 22nd, 2022, 10:50
I did notice large size and up tokens don't let you select under unless the other tokens under it are on center. So a huge dragon can hide a token under it if that token is not at the center of the dragon. I am running a lot of exts so I will give it a test solo.

Edit: Same issue with only this ext loaded (see s2 screenshot). Here you can not get the pop up for the Acolyte. Additionally, I see the pop up box does not move with the map (see s1 screenshot).

Jiminimonka
December 22nd, 2022, 12:20
Forge Link: https://forge.fantasygrounds.com/shop/items/953/view

Wish there was a way to gracefully handle when multiple tokens are stacked together on a map? Well now there is! This extension detects when multiple tokens share a grid space and will pop up a selector window that lets you pick which token in the stack to select. This also works in reverse, allowing you to target a specific token in a stack without selecting it. You can also drop rolls onto the token selector window as if it were the token on the map.

This extension has very little risk colliding with any other extension, and should work for any ruleset based on CoreRPG.

Upcoming Features
Currently tokens need to be exactly on top of each other for this to work. Next update will support differently sized tokens overlapping in any way

Changelog
v1.0.0 - Initial release

Nice one. Thanks!

MrDDT
December 22nd, 2022, 13:35
I did notice large size and up tokens don't let you select under unless the other tokens under it are on center. So a huge dragon can hide a token under it if that token is not at the center of the dragon. I am running a lot of exts so I will give it a test solo.

Edit: Same issue with only this ext loaded (see s2 screenshot). Here you can not get the pop up for the Acolyte. Additionally, I see the pop up box does not move with the map (see s1 screenshot).

This is currently a known issue.


Upcoming Features
Currently tokens need to be exactly on top of each other for this to work. Next update will support differently sized tokens overlapping in any way

nephranka
December 22nd, 2022, 13:52
This is currently a known issue.

Missed that. I should read closer! Thanks.

Saagael
December 22nd, 2022, 15:59
New version - v1.1.0

Tokens of different sizes now correctly detect stacking.

There is one corner case I didn't solve in this update: If there is one huge token and underneath it are multiple small tokens, but the small tokens don't overlap in any way, then clicking on a small token won't include the other small tokens (because they don't overlap with each other). Selecting the largest token in a stack will always solve this issue though.

nephranka
December 22nd, 2022, 16:04
New version - v1.1.0

Tokens of different sizes now correctly detect stacking.

There is one corner case I didn't solve in this update: If there is one huge token and underneath it are multiple small tokens, but the small tokens don't overlap in any way, then clicking on a small token won't include the other small tokens (because they don't overlap with each other). Selecting the largest token in a stack will always solve this issue though.

Wow. Very fast! Nice work.

MrDDT
December 22nd, 2022, 17:25
Wow nice!

BushViper
December 22nd, 2022, 22:46
I repeatedly find myself wondering why wonderful extensions, such as this one, have to exist at all. It genuinely blows my mind that such 'features' aren't part of the standard client. Unfortunately, there are literally dozens of other examples of the community 'fixing' the game.

Tirade over - fantastic work, Saagael.

MrDDT
December 23rd, 2022, 00:03
I repeatedly find myself wondering why wonderful extensions, such as this one, have to exist at all. It genuinely blows my mind that such 'features' aren't part of the standard client. Unfortunately, there are literally dozens of other examples of the community 'fixing' the game.

Tirade over - fantastic work, Saagael.

Welcome to the club. I've said this 100s of times. Some functions should just be into the system.

seycyrus
December 23rd, 2022, 00:04
This is pretty awesome, thanks!

I notice that it seems to only work with square grids. Any chance that it could be made to work with hex?

SilentRuin
December 23rd, 2022, 03:10
Also if you could have an option to turn it off and on in runtime that would be cool.

Jiminimonka
December 23rd, 2022, 07:57
Welcome to the club. I've said this 100s of times. Some functions should just be into the system.

A clever idea for software with a big variety of games and rules would be allowing extensions to be written to fill a niche or fix something you don't like... and then also have the option to add that to the Core at a future point?

Oh yeah, they did that already 😉😝😊😊

Ulric
December 23rd, 2022, 16:30
I am running a clean campaign with only Natural Selection v1.1.0 by Saagael loaded. I can not get the ext to function.
I placed PC and multiple NPCs on the CT.
Opened a map and drug tokens from CT to individual squares.
Selected a token moved it on top of another token
Pressed CTR and no window appeared.
I selected the token stack and pressed CTR no window appeared.

Am I missing a step?

SilentRuin
December 23rd, 2022, 17:28
I am running a clean campaign with only Natural Selection v1.1.0 by Saagael loaded. I can not get the ext to function.
I placed PC and multiple NPCs on the CT.
Opened a map and drug tokens from CT to individual squares.
Selected a token moved it on top of another token
Pressed CTR and no window appeared.
I selected the token stack and pressed CTR no window appeared.

Am I missing a step?

Works fine in 5E for me. Keep in mind the window he puts out there is not an FGU form type of window - if you pop the application or any other window - it will cover it up. Check behind something for it and it sometimes tosses that external window pretty far off to the right.

Ulric
December 23rd, 2022, 18:09
Works fine in 5E for me. Keep in mind the window he puts out there is not an FGU form type of window - if you pop the application or any other window - it will cover it up. Check behind something for it and it sometimes tosses that external window pretty far off to the right.
I am on a 42" screen with only the CT and the map open. I have moved the two windows and their isn't any other window opening when I press CTR. I am on a Mac, so is there a chance the ext is only looking for Windows key mapping? I have tried various combinations of other keys like ALT, Shift, Command but nothing happens.

Saagael
December 23rd, 2022, 18:13
I am on a 42" screen with only the CT and the map open. I have moved the two windows and their isn't any other window opening when I press CTR. I am on a Mac, so is there a chance the ext is only looking for Windows key mapping? I have tried various combinations of other keys like ALT, Shift, Command but nothing happens.

You should only have to click Command/Control if you want to target. Otherwise simply clicking on tokens should result in the popup window. If the issue you're describing is a window placement issue, then I currently have a new version processing that overhauls the window placement to make it more consistent.

EDIT: also regarding windows vs mac key mappings, I use built in FG functions to get those keys, so if that's the issue, it's an FGU issue, not an extension issue.

Ulric
December 23rd, 2022, 18:31
You should only have to click Command/Control if you want to target. Otherwise simply clicking on tokens should result in the popup window. If the issue you're describing is a window placement issue, then I currently have a new version processing that overhauls the window placement to make it more consistent.
When I click press and hold the CTR or Command key and select a stack by left clicking my mouse nothing happens. I have moved the CT and Map windows to various locations and repeated the steps to activate the ext targeting window and nothing appears. Here is a photo of my FG Desktop and you can see I am updated and only loading your latest ext from the Forge.

Saagael
December 23rd, 2022, 18:44
When I click press and hold the CTR or Command key and select a stack by left clicking my mouse nothing happens. I have moved the CT and Map windows to various locations and repeated the steps to activate the ext targeting window and nothing appears. Here is a photo of my FG Desktop and you can see I am updated and only loading your latest ext from the Forge.

The selector window opens when the release the mouse button. So try just clicking without pressing any keys.

Ulric
December 23rd, 2022, 18:53
The selector window opens when the release the mouse button. So try just clicking without pressing any keys.I was already releasing the left mouse button but I tried again and also various combinations of holding and releasing the CTRL and Left Mouse Button but nothing happens. I also tried both the left and right CTRL keys.

Saagael
December 23rd, 2022, 19:04
I was already releasing the left mouse button but I tried again and also various combinations of holding and releasing the CTRL and Left Mouse Button but nothing happens. I also tried both the left and right CTRL keys.

Alright, just wanted to check. Here's a version that has debug info enabled. Run this and send a screenshot of the chat entries.

Ulric
December 23rd, 2022, 20:15
Alright, just wanted to check. Here's a version that has debug info enabled. Run this and send a screenshot of the chat entries.
This version works as expected.

Saagael
December 23rd, 2022, 20:16
This version works as expected.

Good to know. That version is currently awaiting approval on the forge

seycyrus
December 23rd, 2022, 20:19
Good to know. That version is currently awaiting approval on the forge

Do you think this extension would work with non-square grids?

Saagael
December 23rd, 2022, 20:42
Do you think this extension would work with non-square grids?

I haven't tested it with hex grids, and there are a few places I check to see if the map's grid is square so I can do math to calculate token overlap. However, it should work very simply with hex grid. I imagine it will only consider tokens overlapping if they're exactly on the same space (and thus won't work right for larger tokens). I have plans to fix this, but the math is more complex and I will take a bit longer. Probably after the holiday I'll get to this.

Saagael
December 23rd, 2022, 22:15
New version - v1.2.0

The selector window now opens precisely next to the token that's being selected. Added a new game option that lets you specify where, relative to the token selected, the selector window appears. The default is to the top-right of the token. Tokens in the selector window are now scaled to roughly match how big they are on the map.

Also fixed the issue where multiple small tokens under one big token would not count as being stacked. Now all tokens in contact with the largest token in the stack are considered 'stacked'.

SilentRuin
December 23rd, 2022, 22:45
new version - v1.2.0

the selector window now opens precisely next to the token that's being selected. Added a new game option that lets you specify where, relative to the token selected, the selector window appears. The default is to the top-right of the token. Tokens in the selector window are now scaled to roughly match how big they are on the map.

Also fixed the issue where multiple small tokens under one big token would not count as being stacked. Now all tokens in contact with the largest token in the stack are considered 'stacked'.

center for the win!!! :)

SilentRuin
December 23rd, 2022, 23:39
I noticed some weird behavior testing with player side. Non owned tokens come up in the selection list - this should not be. Nothing on player side that is not owned (DB.isOwner(node) or token equivalent) should be selectable or part of the list.

Also noticed some left over windows on player side but don't remember how I got in that state.

Saagael
December 24th, 2022, 00:01
I noticed some weird behavior testing with player side. Non owned tokens come up in the selection list - this should not be. Nothing on player side that is not owned (DB.isOwner(node) or token equivalent) should be selectable or part of the list.

Also noticed some left over windows on player side but don't remember how I got in that state.

Those tokens appear in the selector window so that they can ctrl+click to target them. Players can't select them, but they can see them.

MrDDT
December 24th, 2022, 00:37
Those tokens appear in the selector window so that they can ctrl+click to target them. Players can't select them, but they can see them.

I do think this is an issue as the players will be able to see hidden targets that are stacked.


Also slightly diff topic.
Is it possible to have the name come up when you hover over them? As some tokens look exactly alike and can be hard to tell apart.

Saagael
December 24th, 2022, 00:39
I do think this is an issue as the players will be able to see hidden targets that are stacked.


Also slightly diff topic.
Is it possible to have the name come up when you hover over them? As some tokens look exactly alike and can be hard to tell apart.

Both good points. I can not display tokens that are not visible unless the user is the session host. I can also set the token's tooltip to be the creature's name in the CT (or the non-id name if they're not identified).

SilentRuin
December 24th, 2022, 01:32
Those tokens appear in the selector window so that they can ctrl+click to target them. Players can't select them, but they can see them.

My bad - was thinking they were not seen but duh - if they were not visible to player they could not be selected. Sorry about that.

Saagael
December 26th, 2022, 18:49
New version - v1.3.0

Tokens that are not visible to client will no longer appear in the token selector pop up window. Within the token selector window, tokens now have a tooltip that displays their name. If the token is unidentified, it will display the unidentified name to clients.

KliquidK
December 28th, 2022, 02:34
This ext fixes an issue so many of us have been having forever. An older rob2e ext used to try to address this, but that hasn't worked in a long time. Thank you! You should charge money on forge for it.

Saagael
December 28th, 2022, 03:47
This ext fixes an issue so many of us have been having forever. An older rob2e ext used to try to address this, but that hasn't worked in a long time. Thank you! You should charge money on forge for it.

Thank you for the kind words! Like you said, this is a feature that should be included with every ruleset, but isn't. I wouldn't feel right charging for something that should just be a basic feature. My only hope is it gets enough attention that Smiteworks takes it and implements it themselves.

Saagael
December 31st, 2022, 03:15
New version - v1.4.0

Added support for hex grids. The calculations to check overlap of hexagons is not as precise as with squares, so it might not be exactly correct with overlaps, but it should work most of the time.

Also added support for multi-selecting tokens by holding shift.

Jiminimonka
December 31st, 2022, 11:24
New version - v1.4.0

Added support for hex grids. The calculations to check overlap of hexagons is not as precise as with squares, so it might not be exactly correct with overlaps, but it should work most of the time.

Also added support for multi-selecting tokens by holding shift.

Thanks!

seycyrus
December 31st, 2022, 13:52
New version - v1.4.0

Added support for hex grids. The calculations to check overlap of hexagons is not as precise as with squares, so it might not be exactly correct with overlaps, but it should work most of the time.

Also added support for multi-selecting tokens by holding shift.

Seems to work very well! Thanks!

Saagael
January 3rd, 2023, 17:58
New version - v1.5.0

Added more game options.

Overlap threshold. This lets you set the amount of overlap tokens must have in order to pop up the window. Previously the window would appear if even a single pixel overlapped another token. This increases that threshold based on a percentage of the token. So you can set tokens to only count as stacked if they are 5% - 25% overlapped.

Calculation Methods. Three options (one for each grid type) that let you set how the extension calculates whether tokens are overlapped. If you tend to use circular tokens, then change your calc method to circle. If you use square tokens, set the method to square.

SilentRuin
January 3rd, 2023, 18:06
New version - v1.5.0

Added more game options.

Overlap threshold. This lets you set the amount of overlap tokens must have in order to pop up the window. Previously the window would appear if even a single pixel overlapped another token. This increases that threshold based on a percentage of the token. So you can set tokens to only count as stacked if they are 5% - 25% overlapped.

Calculation Methods. Three options (one for each grid type) that let you set how the extension calculates whether tokens are overlapped. If you tend to use circular tokens, then change your calc method to circle. If you use square tokens, set the method to square.

But I use a mishmash of tokens! Where is the mishmash option? ;)

EllivasKram
January 3rd, 2023, 23:53
This ext fixes an issue so many of us have been having forever. An older rob2e ext used to try to address this, but that hasn't worked in a long time. Thank you! You should charge money on forge for it.

I’m using CAE (critical assume essentials) and this extn to create stacks (shift-alt left click) and then allow choosing which token is on top. Perfect for mounts. But this finally fixes dropping spell tokens and not losing player NPC tokens on the layers.

Saagael
January 4th, 2023, 20:49
New version - v1.5.2

Updated the overlap threshold formula so that it is now more intuitive and robust. If your threshold is set at 20%, then if either of the tokens is more than 20% overlapping another, it will pop up the selector. This calculation is very precise for calculating overlaps of squares, and slightly less precise for calculating overlaps of circles (though still good enough for here).

Added a new game option

Round Token Size to Nearest Grid Increment. If enabled, this option will scale tokens up to the nearest multiple of the grid size before calculating overlap. For example, if a token is scaled to 80% of the grid's size, enabling this option will cause the calculating to round that up to 100% of the grid size. Or if the token was 125% of the grid size, it would round up to 200%.

MrDDT
January 4th, 2023, 20:52
Nice, let me test this out, this sounds exactly what I was talkin about, Thanks Saagael!

Saagael
January 9th, 2023, 18:27
New version - v1.6.0

- Since double-clicking tokens to open their sheet is problematic with the pop up window, middle-mouse-clicking a token on the map (or a token in the selector window) will open its sheet.
- Tokens in the token selector window now have an icon that displays their faction
- Tokens in the token selector window now have a targeting icon to indicate if that token is targeted by your currently selected token.
- Added 75% and 100% options for overlap threshold detection.
- Added a new game option to enable or disable the extension's features without reloading the campaign.
- Fixed issue where targeting would fail when a player targets something in a new campaign
- Fixed issue where some settings that should be GM-only were changeable by players.
- Fixed issue with ownership detection when selecting a token.

mattekure
January 14th, 2023, 03:48
In game tonight, the image window got closed while the Natural Selection was open. this left the natural selection window visible and threw this error whenever it was clicked. I finally was able to right click on it and select close window

https://i.imgur.com/yLIpgB0.png

Saagael
January 14th, 2023, 04:45
In game tonight, the image window got closed while the Natural Selection was open. this left the natural selection window visible and threw this error whenever it was clicked. I finally was able to right click on it and select close window

https://i.imgur.com/yLIpgB0.png

Thus far I'm unable to reproduce this issue. If I close an imagewindow while the pop up is still open, selecting a token doesn't throw an error (though it also doesn't close it). This might be a ruleset specific issue, or a weird extension conflict.

I will look at adding some checks so that the selector window closes if the image is closed.

mattekure
January 14th, 2023, 14:30
yeah, I kind of figured it was a weird case. It was easy enough to right click and close the selector window.

Saagael
January 14th, 2023, 17:12
yeah, I kind of figured it was a weird case. It was easy enough to right click and close the selector window.

Just pushed v1.6.1 that closes the selector when the image that was clicked on closes. Whenever you have a chance can you double-check that it works with your ruleset/extensions?

drempel
January 24th, 2023, 21:02
Love it, works great for me, at least with tokens from the combat tracker. I tried just dropping a spell token from my Assets->Tokens folder (like web) and while the web was on top of the character tokens the extension didn't kick off, and it appeared to behave like it did before the extension. Moving the spell token off on it's own space again, and I'm able to select the other ones using the popup.

Saagael
January 24th, 2023, 21:16
Love it, works great for me, at least with tokens from the combat tracker. I tried just dropping a spell token from my Assets->Tokens folder (like web) and while the web was on top of the character tokens the extension didn't kick off, and it appeared to behave like it did before the extension. Moving the spell token off on it's own space again, and I'm able to select the other ones using the popup.

Thanks for the feedback. This is currently the intended behavior. Natural Selection only checks for tokens that are on the combat tracker. This is primarily to improve performance in the case that maps have lots of non-CT tokens, but I can add a game option toggle to also check overlap against tokens that aren't on the combat tracker.

drempel
January 24th, 2023, 21:37
Thanks for the feedback. This is currently the intended behavior. Natural Selection only checks for tokens that are on the combat tracker. This is primarily to improve performance in the case that maps have lots of non-CT tokens, but I can add a game option toggle to also check overlap against tokens that aren't on the combat tracker.

I see, yeah. That's my primary use case I think. Usually when there's been overlaps that are a pain, it's been because of a AoE spell token ;)

nephranka
January 24th, 2023, 23:44
I would 2nd the option.

drempel
January 25th, 2023, 17:34
Do people put a lot of tokens on their maps? I generally use brushes for movable objects and the like for prep (you can use a token as a brush).

Spell tokens are good for getting them out there quick during gameplay (brushes have a few more steps, add layers, etc. Bit more finicky, but they work for if the player wants to move some furniture around in my experience...like to block a door ;)

nephranka
January 25th, 2023, 17:38
Would say spell tokens is going to be a large area and used by a few people here in the forums. Spell tokens are used by players as well as gms.

MrDDT
January 25th, 2023, 20:32
Would say spell tokens is going to be a large area and used by a few people here in the forums. Spell tokens are used by players as well as gms.

Depending on how you getting your spell tokens, they are not useable by default by players, it requires an ext for that. Using B9 Spell tokens, there is no conflict with NS and B9 ST.

I've not tested with CAE (Rob2e's one), if you are just putting tokens on the map as a GM, I can see how that can cause issues, however, the GM is not normally the one with issues selecting the tokens under something as they can move the token around to get to what they need.

I would say if you are pulling tokens in and using those in FGU, you might want to look into B9 Spell Tokens on the FORGE to use that. It works really well and no issues with NS.

The issue comes in that if NS is to support it the other way, it can cause issues for people not using tokens in this way having the NS window to select pop up and have issues.

I think its an effect of you can't make it work for everyone. So if you not using B9 and use you use tokens from assets, you might want to just move the token off the location to access the stuff under it. Like you would normally do.
One issue with not using an ext to help with spell tokens and just using assets is the layering on which one you will see. Again highly suggest getting B9 spell tokens for this as it helps greatly.

Saagael
January 25th, 2023, 20:44
I think its an effect of you can't make it work for everyone. So if you not using B9 and use you use tokens from assets, you might want to just move the token off the location to access the stuff under it. Like you would normally do.
One issue with not using an ext to help with spell tokens and just using assets is the layering on which one you will see. Again highly suggest getting B9 spell tokens for this as it helps greatly.

I think I could solve this issue for everyone involved by adding a game option that enables NS to work when selecting tokens that aren't on the combat tracker. The default is that things will stay exactly as they are now for most folks, but anyone that uses spell effect tokens can enable the game option and have the ability to select spell tokens with NS.

With this feature I'll see if I can add a way to push a token to the bottom of the stack so people can place spell effects behind everything else.

MrDDT
January 25th, 2023, 21:02
I think I could solve this issue for everyone involved by adding a game option that enables NS to work when selecting tokens that aren't on the combat tracker. The default is that things will stay exactly as they are now for most folks, but anyone that uses spell effect tokens can enable the game option and have the ability to select spell tokens with NS.

With this feature I'll see if I can add a way to push a token to the bottom of the stack so people can place spell effects behind everything else.

Nice, you do great work!

Saagael
January 26th, 2023, 18:44
New version - v1.7.0

New feature: Right-clicking on a token in the selector popup window will bring up a radial menu that has an option to send the token to the bottom of the stack. Doing this might adjust the order of the other tokens in the stack.

New game option: Added a game option that, when enabled, will allow tokens that aren't on the combat tracker to be selected through the selector popup window.

Arimil508
January 29th, 2023, 20:55
Saagel what is the most recent forge update because it is not the one i have is 1.5.2
and even after deleting the extension it refuses to download any newer version from the forge.

Saagael
January 29th, 2023, 21:02
Saagel what is the most recent forge update because it is not the one i have is 1.5.2
and even after deleting the extension it refuses to download any newer version from the forge.

1.7.0, which you almost certainly have. I forgot to update the version number displayed in chat when you load in. I'll get it fixed shortly.

Arimil508
January 29th, 2023, 21:23
the reason why I ask is because I am experiencing a bug.
when having two tokens overlapping if i click on token a token b is brought to the front.
if i click on token b token a is brought to front.
and it is just broken when more that 3 tokens are overlapped.
I have tested this in an empty pathfinder 1e campaign.

Saagael
January 29th, 2023, 21:40
the reason why I ask is because I am experiencing a bug.
when having two tokens overlapping if i click on token a token b is brought to the front.
if i click on token b token a is brought to front.
and it is just broken when more that 3 tokens are overlapped.
I have tested this in an empty pathfinder 1e campaign.

Thanks for reporting that. Not sure how that slipped past all of my testing, but I just pushed 1.7.1 with a fix for this.

eriktedesco
February 27th, 2023, 09:07
HI Saagael, hope you are doing fine!

I have downloaded this extension but each time I click on a token, a lot of stuff appears in the chat. I have yet to test the extension in more controlled conditions (without other running extension) but I attach to the present post a snapshot of my screen.

Hope it will help somehow.

56443

Saagael
February 27th, 2023, 14:29
HI Saagael, hope you are doing fine!

I have downloaded this extension but each time I click on a token, a lot of stuff appears in the chat. I have yet to test the extension in more controlled conditions (without other running extension) but I attach to the present post a snapshot of my screen.

Hope it will help somehow.

56443

That's debug info I was using to track down an issue.. not sure how I managed to release it that way. Regardless, I pushed an update on the Forge that removes it.

eriktedesco
February 27th, 2023, 16:37
That's debug info I was using to track down an issue.. not sure how I managed to release it that way. Regardless, I pushed an update on the Forge that removes it.

is 1.1.0 the updated version? I'm still seeing the debug info when I click on tokens.

Saagael
February 27th, 2023, 16:38
is 1.1.0 the updated version? I'm still seeing the debug info when I click on tokens.

Version 1.7.3 is the latest version.

eriktedesco
February 27th, 2023, 16:55
Issue solved!!! For whatever reason, your extension was not updating from the Forge. Delete, reinstalled and now everything is working like a charm.

Thank yu very much for the prompt reply!

Xerophilex
May 22nd, 2023, 12:58
Love this extension, thanks for your hard work. Feature request: could you add a visual that tokens are stacked in a hex or square? That way my players (and me, the GM) could more easily tell if multiple tokens are taking up the same space and we can use the extension's functionality to pick one.

Saagael
May 22nd, 2023, 22:27
Love this extension, thanks for your hard work. Feature request: could you add a visual that tokens are stacked in a hex or square? That way my players (and me, the GM) could more easily tell if multiple tokens are taking up the same space and we can use the extension's functionality to pick one.

This is a great idea, and I will investigate it, but I suspect that this isn't really feasible. Tokens don't have an accessible z-order property, which means it is impossible for me to put an little graphic only the top-most token. This means I would need to put the graphic on every token in a stack, and that means I would need to calculate whether every token overlaps any other token. Currently this expensive check is only done for one token when you click on a token (i.e. it's only run once every mouse click event). But in order to put a graphic on the tokens it would need to happen every time a token moves, and that could end up running many times per second as you drag a token. And that would have a very noticeable performance impact.

I'll see if I can get actual measurements on the performance though. Maybe it's not as bad as I think.

Xerophilex
May 24th, 2023, 15:30
This is a great idea, and I will investigate it, but I suspect that this isn't really feasible. Tokens don't have an accessible z-order property, which means it is impossible for me to put an little graphic only the top-most token. This means I would need to put the graphic on every token in a stack, and that means I would need to calculate whether every token overlaps any other token. Currently this expensive check is only done for one token when you click on a token (i.e. it's only run once every mouse click event). But in order to put a graphic on the tokens it would need to happen every time a token moves, and that could end up running many times per second as you drag a token. And that would have a very noticeable performance impact.

I'll see if I can get actual measurements on the performance though. Maybe it's not as bad as I think.

Thanks for considering it! I hope there's a way to implement the feature without too much of a performance hit.

bmos
May 24th, 2023, 19:05
This is a great idea, and I will investigate it, but I suspect that this isn't really feasible. Tokens don't have an accessible z-order property, which means it is impossible for me to put an little graphic only the top-most token. This means I would need to put the graphic on every token in a stack, and that means I would need to calculate whether every token overlaps any other token. Currently this expensive check is only done for one token when you click on a token (i.e. it's only run once every mouse click event). But in order to put a graphic on the tokens it would need to happen every time a token moves, and that could end up running many times per second as you drag a token. And that would have a very noticeable performance impact.

I'll see if I can get actual measurements on the performance though. Maybe it's not as bad as I think.Token.onDragEnd might do what you need.

Saagael
May 24th, 2023, 22:59
Token.onDragEnd might do what you need.

Curse you for suggesting reasonable solutions to my problems! Seriously though thanks for the tip


Thanks for considering it! I hope there's a way to implement the feature without too much of a performance hit.

Thanks to bmos' suggestion I threw together a basic version of this and updated the Forge. You'll get v1.8.0 with an update that adds two game options: one to enable the token icons, and one to control where on the token they're placed. Be warned, I only tested with 8 tokens and performance seemed okay, but with more tokens and especially on lower end hardware you could run into stuttering when opening images or moving tokens around.

The game option to disable the icon is per client, so players can enable or disable it separately from the GM. Just in case your players are running into issues while you are not.

Xerophilex
May 25th, 2023, 20:46
Curse you for suggesting reasonable solutions to my problems! Seriously though thanks for the tip



Thanks to bmos' suggestion I threw together a basic version of this and updated the Forge. You'll get v1.8.0 with an update that adds two game options: one to enable the token icons, and one to control where on the token they're placed. Be warned, I only tested with 8 tokens and performance seemed okay, but with more tokens and especially on lower end hardware you could run into stuttering when opening images or moving tokens around.

The game option to disable the icon is per client, so players can enable or disable it separately from the GM. Just in case your players are running into issues while you are not.

Thank you! And just in time for my weekend games too. Much appreciated :D

rocketvaultgames
December 19th, 2023, 03:51
After the latest update, Natural Selection appears to work if tokens are partially overlapping, but it doesn't seem to work any more if one token is completely on top of another.

ErikDWick
January 12th, 2024, 07:04
Hey all, these past few weeks I have been getting an easily reproducible error from this addon. Moving between maps causes Natural Selection to spit out the following error:

[ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)

This happens when you move token from one map to another map. It does it even when I delete the tokens first and then add them to the new map.

nephranka
January 12th, 2024, 11:14
Hey all, these past few weeks I have been getting an easily reproducible error from this addon. Moving between maps causes Natural Selection to spit out the following error:

[ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)

This happens when you move token from one map to another map. It does it even when I delete the tokens first and then add them to the new map.

That has happened to our games as well but I could not figure out what was causing the issue. Good detective work there!

Saagael
January 12th, 2024, 15:49
Hey all, these past few weeks I have been getting an easily reproducible error from this addon. Moving between maps causes Natural Selection to spit out the following error:

[ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)

This happens when you move token from one map to another map. It does it even when I delete the tokens first and then add them to the new map.

I'm unable to reproduce this by moving a token from one map to another. Do you have any other extensions loaded?

Also, Natural Selection does not in any way interact with the piece of code in the error. That is in core RPG and deals with displaying an enlarged token in the upper right of the image when you hover over a token. NS doesn't have any functionality when hovering the mouse over a token.

nephranka
January 13th, 2024, 12:18
Oh well, I guess it is back to the hunt for the conflict.

MrDDT
January 13th, 2024, 17:36
I'm unable to reproduce this by moving a token from one map to another. Do you have any other extensions loaded?

Also, Natural Selection does not in any way interact with the piece of code in the error. That is in core RPG and deals with displaying an enlarged token in the upper right of the image when you hover over a token. NS doesn't have any functionality when hovering the mouse over a token.


Oh well, I guess it is back to the hunt for the conflict.

Nephranka, I'm not able to see this error either.

I've seen this error before though with Combat Highlighter, do you happen to use that ext?

nephranka
January 13th, 2024, 17:49
Nephranka, I'm not able to see this error either.

I've seen this error before though with Combat Highlighter, do you happen to use that ext?

I do use it. Some maybe that is the culprit? It is hard to replicate the error which in turn makes it hard to track down the ext. I will experiment with that one.

Arimil508
January 13th, 2024, 21:52
I do not have that extension and I experienced the same errors last night. or at least something similar.

MrDDT
January 14th, 2024, 00:06
I do not have that extension and I experienced the same errors last night. or at least something similar.

Are you using any other exts?

Also do you know the exact error? Normally can see this in your log if you don’t remember.

Arimil508
January 14th, 2024, 09:03
Firstly I want to clarify I do not use combat highlighter but it might be a different extension i do have a lot of them and i am in the process of testing. I was just saying it is something that might be effecting multiple extensions or similar ones. I do have an extension that effects what image is used for a characters token but it is effect based and should only function when an effect is on a character which it was not. Though that was not the only error i received, Last session i received 2 types of errors one occurred when players tried to attack something within a stack of tokens the second was when i moved their tokens to a new map.

The first error i do not have logs for because it was my players that got that one but i will be looking into what that was.
the second Error that spammed when moving tokens to other map
"[ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)"

Extensions i generally use now I know there is a lot.

878507-Critically_Awesome_Essentials_-_Generic_Token_Swapper_FGU // Tested extensively and modified to function waiting for a working update that is not as jank as my patch job I will investigate this further.
Advanced Bestiary
Bayne's Emporium-Pathfinder
BigFonts
Custom Damage Manager
dicejail
Encounter Descriptions
FG-ClockAdjuster-main
FG-CoreRPG-Coins-Weight
FG-CoreRPG-Extraplanar-Containers
FG-CoreRPG-Moon-Tracker
FG-CoreRPG-Party-Inventory-Weight
FG-PFRPG-Expanded-NPC-Weapons
Fonts-Extended Fantasy
Name Maker
NaturalSelection
PointsOfInterest
Portals
Remove Effect Tag
FG-Effect-Builder
FG-Effect-Builder-Plugin-35E-PFRPG
FG-PFRPG-Encumbrance-Penalties
RequestedRolls
PowerUp
Advancement XP
Advanced Charsheet
FG-PFRPG-Drain-and-Permanent-Bonuses
FG-PFRPG-Spell-Formatting
FG-Ammunition-Manager
FG-PFRPG-Advanced-Effects
Spell Record Actions
Full OverlayPackage
FG-PFRPG-Enhanced-Items
FG-PFRPG-Malady-Tracker
SWKTHEME_WIZARDSDESK_2
Tooltips
Attack Modifiers
FG-PFRPG-Upgrade-NPC-Actions
FG-PFRPG-Customized-Item-Generator
FG-PFRPG-Advanced-Item-Actions
FG-PFRPG-Live-Hitpoints
FG-PFRPG-Item-Durability
PlayerAgency
CT-Open-On-Turn
calendarplus
CloseEncounters
CombatModifierCalculation
BetterCombatEffects
EffectiveInitiative
Spell Action Info
CohortsAndCompanions
CustomHealthBarWidget
ClearDead
FG-Size-Changes
Urwell // Theme extension
FG-Aura-Effect
Chat Aesthetics Configurator
ZWhisperFGU

Arimil508
January 14th, 2024, 09:28
Cant recreate own errors after session.
though i am trying to connect to local host so i might ask one of my players to be a ginipig

ErikDWick
January 16th, 2024, 00:22
Hello, I can recreate the error consistently when Natural Selection is enabled in my CoS game, but haven't had the time to individually test Natural Selection by itself or against each of the other mods. What I do know is that I can use ALL the mods listed below as long as I don't use Natural Selection. The errors only happen when I have all the below listed mods active AND Natural Selection. I will have to do more testing to see which mod is not playing nice with Natural Selection. I'm using:

Aura Effects
Better Combat Effects Gold
Constitutional Amendments
Official Language Fonts
Dropped Order
Extraplanar Containers
Friend Zone
Generic Action Layer
Inventory Identified
Requested Rolls
Theogeek's Improved Critical
Theogeek's Nat20
Turbo
5E Critically Awesome Essentials
Portals REVAMPED
5E - Generic Actions FGU
5e Undo Last
Calendar Plus
CoreRPG - Wound Overlay
Fen's NPC Portrait Workaround
Fonts - Extended Languages
MNM Buy and Sell Items
MNM Coin Manager 2
MNM Core
MNM Party Combat Stats
MNM Party Combat Stats Upgrade
MNM Player Journal 2
Random Spellbook 5e Extension
5E Extension - NPC flavors
Fonts - Sign Language

ErikDWick
January 16th, 2024, 05:45
Experienced the issue above in another game (this time as a player) and we were able to clear it by deleting the token from the map and adding it back on. The GM has a lot of mods (some the same as me, some different) so still not sure where the conflict is. What I do know is disabling Natural Selection prevents the issue from happening at all. Still need to do more testing to narrow down which specific mod has a conflict with Natural Selection.

Jiminimonka
January 16th, 2024, 06:46
Turn off all extensions and enable them one at a time to see what is causing the error. Make sure they are all updated and then contact the author via that extension forum post.

A few posts back the autbor Saagael already stated this extension doesn't use the function call that is throwing the error, so my guess is its one of the other 10-20.extensions ;)

Fingersome
January 16th, 2024, 07:49
https://www.fantasygrounds.com/forums/showthread.php?79997-onTokenHover-Errors&p=705996&viewfull=1#post705996

Copypasta from that thread


I ran a session on Sunday that had the kibosh put on it by this bug making things unplayable. I ran an un-modified version of the same campaign to see if I could proc the error, but it hasn't happened yet, so I'm leaning toward it just being caused by the Natural Selection extension. Especially since I can now reliably proc the bug using the following steps:

1- Open a map with tokens stacked on top of each other
2- Select one of the tokens, to open the token selection menu popup
3- Close the window
4- Reopen the window and hover over any token

Presto.

MrDDT
January 16th, 2024, 07:57
https://www.fantasygrounds.com/forums/showthread.php?79997-onTokenHover-Errors&p=705996&viewfull=1#post705996

Copypasta from that thread

I'm able to see it with only NS loaded following these steps.

ErikDWick
January 16th, 2024, 08:18
Can confirm, this issue happens even with only Natural Selection loaded in a fresh campaign. No other mods, extensions, etc. loaded except Natural Selection.

[1/16/2024 12:15:14 AM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)

Spits out the error whenever you hover your mouse cursor over a token.

Jiminimonka
January 16th, 2024, 10:46
Since this is probably not related to this extension alone maybe post the issue here:

EDIT: I see some people saying it only happens with Natural Selection... so who knows.

https://www.fantasygrounds.com/forums/showthread.php?79997-onTokenHover-Errors&p=705996&viewfull=1#post705996

nephranka
January 16th, 2024, 12:23
Since this is probably not related to this extension alone maybe post the issue here:

EDIT: I see some people saying it only happens with Natural Selection... so who knows.

https://www.fantasygrounds.com/forums/showthread.php?79997-onTokenHover-Errors&p=705996&viewfull=1#post705996

Thank you for the suggestion. I used Fingersome's steps and I can reproduce this with only NS loaded.

1- Open a map with tokens stacked on top of each other
2- Select one of the tokens, to open the token selection menu popup (NS)
3- Close the window (map)
4- Reopen the window (map) and hover over any token

Saagael
January 16th, 2024, 15:21
Thanks for the help tracking this down folks. With the steps above I can repro the issue and will look into a fix this week.

GKEnialb
January 20th, 2024, 23:27
In case it helps, it looks like it can be reproduced with fewer steps:
1- Open a map with tokens stacked on top of each other
2- Hover of the stacked tokens (don't need to actually select one)
3- Hover over any token (don't need to close / reopen the map)

eporrini
January 21st, 2024, 19:33
I am also seeing this error. Here is a bit of the log. Also, I noticed this extension was not working for me. When I would switch the token on the top, it would still show the other token in the larger image in the upper left hand corner as well as on the hover over. Have disabled this for the time being.


[1/6/2024 9:56:44 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:56:45 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:56:45 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:56:45 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:57:25 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:57:26 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:57:26 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)
[1/6/2024 9:57:30 PM] [ERROR] Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)

SilentRuin
January 23rd, 2024, 04:25
Got this same error in game tonight

Handler error: [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)

Only way to get rid of it was to have player (only one of six got the error) log out and back into the game. Seemed to start after I had them switch maps (tokens moved to new map). Only happened for the one player.

Typically this would be caused if someone was keeping their own private list of pointers outside of FGU control without managing (removing it) when things changed. Always a bad idea to hold pointers that have a local app lifetime in their own list that does not respect that lifetime.

eriktedesco
January 28th, 2024, 18:24
Hi Sagely! There seems to be an interference between Bratch9's Spell Token extension and Natural Selection.

Step to recreate:

1) Open fresh campaign
2) Activate Natural Selection, Bratch9 Core (no problem with only this one on) and Bratch9 Spell Token extension
3) Place two PCs on the CT and place their token on a gridded map.
4) Superimpose one of the tokens on the other
5) Left click and choose the masked token

Once you move the mouse pointer a bit, the position of the token will revert back to the original state.

Hope I described the issue with enough details to reproduce.

P.S. All extensions and FGU are updated to the last version (I am aware off).

Saagael
January 28th, 2024, 18:43
Hi Sagely! There seems to be an interference between Bratch9's Spell Token extension and Natural Selection.

Step to recreate:

1) Open fresh campaign
2) Activate Natural Selection, Bratch9 Core (no problem with only this one on) and Bratch9 Spell Token extension
3) Place two PCs on the CT and place their token on a gridded map.
4) Superimpose one of the tokens on the other
5) Left click and choose the masked token

Once you move the mouse pointer a bit, the position of the token will revert back to the original state.

Hope I described the issue with enough details to reproduce.

P.S. All extensions and FGU are updated to the last version (I am aware off).

Thanks for the report. As this is a paid extension locked in the vault, I don't have access the source code. Fixes for this will need to be identified on the Spell Tokens side.

MrDDT
January 28th, 2024, 19:22
Hi Sagely! There seems to be an interference between Bratch9's Spell Token extension and Natural Selection.

Step to recreate:

1) Open fresh campaign
2) Activate Natural Selection, Bratch9 Core (no problem with only this one on) and Bratch9 Spell Token extension
3) Place two PCs on the CT and place their token on a gridded map.
4) Superimpose one of the tokens on the other
5) Left click and choose the masked token

Once you move the mouse pointer a bit, the position of the token will revert back to the original state.

Hope I described the issue with enough details to reproduce.

P.S. All extensions and FGU are updated to the last version (I am aware off).


Thanks for the report. As this is a paid extension locked in the vault, I don't have access the source code. Fixes for this will need to be identified on the Spell Tokens side.

This is the same issue I reported with Indicators ext also.

Im able to get this issue with B9 Spell Tokens as reported here. My guess is if you can work with Mattkure and get Indictors to work, it will likely fix this issue too.

ErikDWick
February 8th, 2024, 21:10
Has there been any movement on the issue [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)? Would love to use this extension again since my group currently has a lot of summons and it can be a nightmare to keep everything orderly lol

Saagael
February 8th, 2024, 21:10
Has there been any movement on the issue [string "CoreRPG:scripts/manager_actor_display.lua"]:501: attempt to index local 'cImage' (a userdata value)? Would love to use this extension again since my group currently has a lot of summons and it can be a nightmare to keep everything orderly lol

Nope. All of my attempts to track down the issue have failed.

rhagelstrom
February 8th, 2024, 22:33
You could work around it with
if type(cImage) != 'userdata' or
if type(cImage) == 'image'

Saagael
February 8th, 2024, 23:24
Hey all, I think I got it fixed finally. v1.9.0 is out and should fix this problem.

Saagael
February 8th, 2024, 23:32
This is the same issue I reported with Indicators ext also.

Im able to get this issue with B9 Spell Tokens as reported here. My guess is if you can work with Mattkure and get Indictors to work, it will likely fix this issue too.

I posted this on discord but I'll post it here too.

I looked into this issue and found it is reproduceable with just Indicators loaded (haven't tried it with Spell Tokens, but if they're the same system them they'll have the same problems). It's a result of invisible widgets that Indicators gives all tokens. These invisible widgets seem to not obey the normal z-layering rules that tokens do. So even if token A is above token B, token B's widget will be above token A. Thus when you click on the stack, you get token B, since you clicked on its widget. I was able to confirm this by disabling the invisible widgets in Indicators. Doing so produced the desired behavior, both with and without Natural Selection.

This sounds like a bug in how widgets are processed, and might need to be something Smiteworks fixes on their end. Other than that, I can't do anything from my side as the behavior occurs even without Natural Selection loaded. It just so happens that NS is intended to work in exactly the weird and potentially buggy space that this behavior occupies

eporrini
February 9th, 2024, 22:39
I posted this on discord but I'll post it here too.

I looked into this issue and found it is reproduceable with just Indicators loaded (haven't tried it with Spell Tokens, but if they're the same system them they'll have the same problems). It's a result of invisible widgets that Indicators gives all tokens. These invisible widgets seem to not obey the normal z-layering rules that tokens do. So even if token A is above token B, token B's widget will be above token A. Thus when you click on the stack, you get token B, since you clicked on its widget. I was able to confirm this by disabling the invisible widgets in Indicators. Doing so produced the desired behavior, both with and without Natural Selection.

This sounds like a bug in how widgets are processed, and might need to be something Smiteworks fixes on their end. Other than that, I can't do anything from my side as the behavior occurs even without Natural Selection loaded. It just so happens that NS is intended to work in exactly the weird and potentially buggy space that this behavior occupies

I am not sure exactly what you are suggesting to help make this function correctly again. Is there a recommended course of action?

Saagael
February 9th, 2024, 22:57
I am not sure exactly what you are suggesting to help make this function correctly again. Is there a recommended course of action?

Only speaking for the Indicators extension, which is what I tested, the issue will need to be brought up with the author of that extension. The widgets that are attached to tokens need to be set to ignore mouse events [via setEnabled(false)].

SillyOldeBear
February 13th, 2024, 15:34
Hey all, I think I got it fixed finally. v1.9.0 is out and should fix this problem.

I am still seeing the problem after closing and reopening the map with stacked tokens and then hovering over a token. It doesn't happen when Natural Selection is not loaded.

Saagael
February 13th, 2024, 15:39
I am still seeing the problem after closing and reopening the map with stacked tokens and then hovering over a token. It doesn't happen when Natural Selection is not loaded.

Can you do an update and confirm that you're still getting this issue on version 1.9.0. Thanks.

MrDDT
February 13th, 2024, 19:11
Can you do an update and confirm that you're still getting this issue on version 1.9.0. Thanks.

Tested and it's working great for me thank you.

SillyOldeBear
February 17th, 2024, 21:50
Can you do an update and confirm that you're still getting this issue on version 1.9.0. Thanks.

It looks like it's working now. Thanks!

dbachen
March 10th, 2024, 06:57
Hey Saagael,

I was going through extensions that were generating errors with the latest FGU 4.5, and I found that yours has one.. This is insolation with it being the only extension loaded in a fresh campaign.

Since the error message is about a deprecated function from December, I don't think it's specifically related to this latest update.

s'TokenManager.lua:registerWidgetSet/getWidgetList - DEPRECATED - 2023-12-12 - Use tokeninstance.findWidget/deleteWidget'

Saagael
March 10th, 2024, 16:42
Hey Saagael,

I was going through extensions that were generating errors with the latest FGU 4.5, and I found that yours has one.. This is insolation with it being the only extension loaded in a fresh campaign.

Since the error message is about a deprecated function from December, I don't think it's specifically related to this latest update.

s'TokenManager.lua:registerWidgetSet/getWidgetList - DEPRECATED - 2023-12-12 - Use tokeninstance.findWidget/deleteWidget'

I just pushed version 1.10 to the forge with fixes for this issue. Let me know if you continue to see them.

dbachen
March 10th, 2024, 17:27
I just pushed version 1.10 to the forge with fixes for this issue. Let me know if you continue to see them.

Yup, looks like you got it.. Haven't need to use the actual extension yet in the campaign, but at least the load error is gone. :) Thanks as always for the hard work.