PDA

View Full Version : [extension] Spell Tokens Extension



Pages : 1 [2] 3

bratch9
July 29th, 2021, 11:25
Virtual Table Tops are token based, it's part of their DNA.

Token priority sorted by importance to game-play:

1. Player character tokens (high strata).
2. Non-player character tokens (should be medium strata, but currently are low).
3. All other Asset tokens (should be low strata, but currently are medium).

There is a clear and likely easy to solve conflict between NPC and Asset tokens. This bad design choice keeps me from using both your extension (which I bought) and most of my other bought token assets.

I don't even want to guess how much you are spending on working around said design flaw when it's really just a simple question of sprite strata. Any layer based software can handle this better than FGU, even Word can handle it better than FGU. But if proper token handling is not a priority thing for SG, so be it.

Yep I agree, it could do with been sorted. But after posting issue reports and direct messages over the last 18+ months ( By me and others ), we got the 4.10 update release which brought the FGC token order system into FGU and the spell templates onto the layer system for the dm. I see this as the dev team already looked/decided/fixed the issues that had been reported into how they wanted it to look.

"You can use your tokens on the layer system", I suspect would be the FG dev team response.

If the dev team did change the stack order, then next thing would be 'mask via LoS', and then selection only by that section. So it would go a lot deeper than just draw order. Which is why I suspect we are not getting a fix, that stuff is designed for the layer system....

As I said, feel free to create new posts on the FGU general forum about token stack order showing issues in the main game(no extensions). This has a chance that another review of the stack order gets back into the bug list/items to look at. You can always post a wish list item on moon wizards page.

MrDDT
July 29th, 2021, 19:29
Thanks for all your work just getting us this far. I know it can be a hassle and at a certain point no longer wanting to mess with it.

I do this sometimes where I'm just like "I will just work around it as the time saved the other way is not worth the time lost trying to get it changed/fixed".

daggerfortysix
July 30th, 2021, 21:00
Hi Bratch9 - I now have your Spell Token Extension now via the Forge. Where does it put the SpellTokens.xml and SpellTemplates.xml now?

bratch9
July 30th, 2021, 22:06
Hi Bratch9 - I now have your Spell Token Extension now via the Forge. Where does it put the SpellTokens.xml and SpellTemplates.xml now?

It does not, you need to grab them from the top of this thread.

Thanks, Pete

daggerfortysix
July 30th, 2021, 22:23
Ah, right on. Do those ever get updated? Or are they pretty much once you've got them, you got them and can rely on the Forge updating the extension.

bratch9
July 31st, 2021, 10:24
Ah, right on. Do those ever get updated? Or are they pretty much once you've got them, you got them and can rely on the Forge updating the extension.

The spell token/spell template xml do not change much at all. They could if I get reports that they have gone out of sync due to updates to the graphic token source modules.

Yep forge should keep the extension and starfinder module up to date for you.

I'm not 100% sure that the 'check for updates' box goes red for forge updates yet, but it probably should and if its not it will get a fix at some point.

-pete

bratch9
July 31st, 2021, 18:47
Created some theads to report issues on token stack and tracking control...

Token stack order (https://www.fantasygrounds.com/forums/showthread.php?69883-token-stacking-order)
Token drag api callback issues (https://www.fantasygrounds.com/forums/showthread.php?69881-token-onDragStart-onDrag-onDragEnd)
Token add/delete api call back issues (https://www.fantasygrounds.com/forums/showthread.php?69875-token-onMove-onAdd-onDelete-OnContainerChanged-call-order-and-issues)

If we want these to get resolved then please go and add a comment to make it more visible that people want these sorts of things fixed.

Thanks, Pete

bratch9
August 15th, 2021, 14:10
FORGE update only for now.

Updated Spell Tokens with some new structure and the ability to add a spell token 'icon' and 'shape' into the configuration system.

At the moment the 'shape' is only partly used, you should not see any real changes, but this allows character spell 're-parse' to start to track the icon/shape side for later updates. ( Just trying to not require extra re-add of spells or lots of re-parse usage.. )

I would advise re-adding spells, re-parse with shift held should be ok.

I've updated the spell tokens xml file which can be re-imported on the host to update the spell tokens configuration window.

( I'll ask if we can get some icons from Gareth Jensen, as a lot of the high resolution graphics when small on the character sheet look poor. Hence why I added icon support. )

If you have any issue, feedback or comments please let me know.

Thanks, Pete

Weissrolf
August 15th, 2021, 14:46
As a DMG owner I now bought the discounted version from the Forge and will give it another try. Last week I used spell tokens (without extension) and noticed that you at least you can now move NPCs easily even when they are covered by Assets tokens.

nephranka
August 15th, 2021, 16:09
Everything seems to have come in fine. The re-parse works. I did notice we are missing the shape option of wall or line for things like walls, gust of wind...etc.

bratch9
August 15th, 2021, 16:56
Everything seems to have come in fine. The re-parse works. I did notice we are missing the shape option of wall or line for things like walls, gust of wind...etc.

Not sure what you are looking for, they are basically square. The system deals with aspect ratio of the spell token texture, so it should be ok.

Unless you are thinking about size control for things like wall of fire, that could be arranged to different length. Again not a supported item, you would need to use the layer brush system on the DM side for that level of control.

I do intend to look into shape detecting things like the tool tip and maybe the selection call back functions, so that maybe we can get more done without having to force multi-sprite movements on the drag. But its a complex bit of code area to deal with for multi-selection/keyboard movement and the pain of the token lock system.

I hope that we can get traction on the dev team to do better work on the token stack draw order so this can be simplified. But I'm still not expecting much movement from the dev team side.

bratch9
August 15th, 2021, 16:57
As a DMG owner I now bought the discounted version from the Forge and will give it another try. Last week I used spell tokens (without extension) and noticed that you at least you can now move NPCs easily even when they are covered by Assets tokens.

If you are willing to keep clicking you can select down the stack of tokens to 'find' the one you want. It works but would be nice if they token stack order was fixed by the dev team......

nephranka
August 15th, 2021, 17:28
Not sure what you are looking for, they are basically square. The system deals with aspect ratio of the spell token texture, so it should be ok.

Unless you are thinking about size control for things like wall of fire, that could be arranged to different length. Again not a supported item, you would need to use the layer brush system on the DM side for that level of control.

I do intend to look into shape detecting things like the tool tip and maybe the selection call back functions, so that maybe we can get more done without having to force multi-sprite movements on the drag. But its a complex bit of code area to deal with for multi-selection/keyboard movement and the pain of the token lock system.

I hope that we can get traction on the dev team to do better work on the token stack draw order so this can be simplified. But I'm still not expecting much movement from the dev team side.

I am not sure. I noticed that I have some tokens that indicate line and that was not an option for the shape. It may not mean anything. Here is an example:

<WallOfFire>
<name type="string">Wall Of Fire</name>
<pixels type="number">70</pixels>
<spell_token type="token">tokens/WALL OF FIRE (ROUND) [email protected] Tokens</spell_token>
</WallOfFire>
<WallOfFireLine>
<name type="string">Wall Of Fire (Line)</name>
<pixels type="number">70</pixels>
<spell_shape type="string">square</spell_shape>
<spell_token type="token">tokens/WALL OF FIRE [email protected] Tokens</spell_token>
</WallOfFireLine>


Also, I noticed not every entry has an icon or shape line line?
<spell_icon type="token">tokens/A.png</spell_icon>
<spell_shape type="string">triangle</spell_shape>

bratch9
August 15th, 2021, 18:00
I am not sure. I noticed that I have some tokens that indicate line and that was not an option for the shape. It may not mean anything. Here is an example:

<WallOfFire>
<name type="string">Wall Of Fire</name>
<pixels type="number">70</pixels>
<spell_token type="token">tokens/WALL OF FIRE (ROUND) [email protected] Tokens</spell_token>
</WallOfFire>
<WallOfFireLine>
<name type="string">Wall Of Fire (Line)</name>
<pixels type="number">70</pixels>
<spell_shape type="string">square</spell_shape>
<spell_token type="token">tokens/WALL OF FIRE [email protected] Tokens</spell_token>
</WallOfFireLine>


Also, I noticed not every entry has an icon or shape line line?
<spell_icon type="token">tokens/A.png</spell_icon>
<spell_shape type="string">triangle</spell_shape>

players can pick a line or round 'wall of fire', so the spell token graphics have both options... so I configured both. Players can duplicate the spell and rename one to then have both options available when in use.

<spell_shape> is default as 'circle', so only need lines that change the default.

the odd <spell_icon> are my testing, I could have used the 'tokens/[email protected]' type versions but then it becomes per ruleset. Its shows blank if it can not find the token, so most people will just see an empty slot in game. ( Only noticed if you look at the xml file !! ) Well I guess in the fireball case you would end up with a blank circle on the character sheet. ( I'll edit and remove these.. )

I've asked Gareth on dmsguild spell tokens side if he could provide icons to help 'tidy' up the fact some of the spell tokens when used at 40x40 pixels just look very wrong. ( most of the line ones actually, as they have very odd aspect ratios... ) I also requested a flipped 'cone' version, which is 'triangle' in the shape selections. The system has a proper round top cone which points up by default.. Hence why I asked for flipped triangle (cone) versions so they can be consistent. Not sure on the legal side if I resize down his textures and touch them up to make reasonable icons.. So felt best ask him first before looking at creating them.

bratch9
August 15th, 2021, 18:03
I am not sure. I noticed that I have some tokens that indicate line and that was not an option for the shape. It may not mean anything. Here is an example:

<WallOfFire>
<name type="string">Wall Of Fire</name>
<pixels type="number">70</pixels>
<spell_token type="token">tokens/WALL OF FIRE (ROUND) [email protected] Tokens</spell_token>
</WallOfFire>
<WallOfFireLine>
<name type="string">Wall Of Fire (Line)</name>
<pixels type="number">70</pixels>
<spell_shape type="string">square</spell_shape>
<spell_token type="token">tokens/WALL OF FIRE [email protected] Tokens</spell_token>
</WallOfFireLine>


Also, I noticed not every entry has an icon or shape line line?
<spell_icon type="token">tokens/A.png</spell_icon>
<spell_shape type="string">triangle</spell_shape>

The 'line' graphics tend to just be very wide aspect rectangle tokens. I take aspect into account... so basically rectangle/line all fall into square'..

edit: to add an example of wall of fire, round and line version. ( line using square settings, also a 'cone' test template is in view to show the difference between 'cone' and 'triangle' )

nephranka
August 16th, 2021, 02:26
I see. So square works for the ones that are line.

bratch9
August 16th, 2021, 12:32
I see. So square works for the ones that are line.

yep, sprite size is taken into account.

so, ( game rotation amount is also considered, so it should cope with the 'iso' grid 45 degree square side etc.. )

'square' can deal with 'rectangle' ( The full extent of the sprite is used. )
'circle' can deal with 'ellipse' ( The ellipse touches the center top/bottom and center right/left points of the sprite. )
'triangle' ( Takes the center top point down to the bottom left/right point. I feel this is upside down but its how the Gareth cone sprites are drawn.. )

the 'cone' version only takes sprite height into account, as it does a radius check from the center bottom to center top for the arc part, and then +-45 degree off vertical lines from the center bottom, so taking sprite 'aspect' would distort the 45 degree.

While I track these in my cursor side, FG does not... FG always considers them as round, as shown with the green/red selection circle. These selection circles are not part of the rule set graphics, they are found in the FG game data. As I wanted to see if I could 'add' more shapes to the highlight selection so had a look for them. But again this is done outside the 'token' and addBitmap graphics that add the health/effect graphics by the ruleset. I guess because they want to control the draw layer order over the token+health bar group.

When I get some more time, i'm going to adjust the 'tool tip' that displays the token name when you enter the FG area of the token to also take shape into account. And I might try and see if I can use the addBitmap api side to add our own token highlight shapes. But this api has limited scale control so might not work for non square spell sprites. It will take some 'play' time to see what I can make it do.

-pete

Weissrolf
August 17th, 2021, 03:05
If you are willing to keep clicking you can select down the stack of tokens to 'find' the one you want. It works but would be nice if they token stack order was fixed by the dev team......
This answer confused me, because I saw a different/better behavior. Then I did some tests and saw the behavior you described, but only for player tokens, while NPC tokens were not clickable. Then I noticed that the "Extra selection mode" seems to be broken in that it always resets the (N)PC token back instead of the spell token.

Then I cracked it: If any overlay is applied to any token via an extension (like "Has initiative" or "Wound overlay") then these tokens can directly be grabbed and moved underneath a spell token. The only drawback is that even player tokens get covered after being moved unless the spell token is clicked again. This works for both players and GMs, locked or unlocked.

As a consequence I edited "Wound overlays" to overlay a transparent PNG for the "Healthy" wound status:
https://i.imgur.com/jtr7CxE.gif

Weissrolf
August 17th, 2021, 03:13
Do you happen to know where the graphic for that big ugly green circle is found in FGU's data structure and wether it can be edited. My main grief is that it adds its own grey background in the center on top of being generally too large.

bratch9
August 17th, 2021, 10:08
Do you happen to know where the graphic for that big ugly green circle is found in FGU's data structure and wether it can be edited. My main grief is that it adds its own grey background in the center on top of being generally too large.

See attached for the location, but you have to unpack unity resource packages to get to the directory structure, and to make a change you would have to re-pack the required resource unit package.

It looks like its shader coded to allow different colors, so you would have to work around that by guessing at how the shader splits the rgba from the png texture. ( Probably not hard to guess. )

It would probably better if a wish list was made to allow the graphics set via the rule set files, and extended to allow 'shape' style api control on it. But again thats a low priority wish list type of thing that needs reasonable code api design. ( which I suspect we will not get with the stack layer draw order side.. )

I need to look at your other find, as I'm not sure 'how' that 'help' in this case. But I'm sure I can force on a layer in the same way you did... as i think it would by my extension responsibility to 'bodge' that sort of fix.

bratch9
August 17th, 2021, 10:23
This answer confused me, because I saw a different/better behavior. Then I did some tests and saw the behavior you described, but only for player tokens, while NPC tokens were not clickable. Then I noticed that the "Extra selection mode" seems to be broken in that it always resets the (N)PC token back instead of the spell token.

Then I cracked it: If any overlay is applied to any token via an extension (like "Has initiative" or "Wound overlay") then these tokens can directly be grabbed and moved underneath a spell token. The only drawback is that even player tokens get covered after being moved unless the spell token is clicked again. This works for both players and GMs, locked or unlocked.

As a consequence I edited "Wound overlays" to overlay a transparent PNG for the "Healthy" wound status:
https://i.imgur.com/jtr7CxE.gif

I dont see the (N)PC issue, when i have a spell token over a (n)pc on drag it always returns the spell token if you drag the stack or just the spell token if you drag select away from the (n)pc.

But you find on the overlay is interesting... if we can make that work then we need to not worry about the stack order in these cases, and only deal with keeping things like spirit guardians 'with' the (n)pc when it moves... which might then be better as an 'addbitmap' overlay as I'm sure most users will be ok with it not rotating.

bratch9
August 17th, 2021, 10:40
This answer confused me, because I saw a different/better behavior. Then I did some tests and saw the behavior you described, but only for player tokens, while NPC tokens were not clickable. Then I noticed that the "Extra selection mode" seems to be broken in that it always resets the (N)PC token back instead of the spell token.

Then I cracked it: If any overlay is applied to any token via an extension (like "Has initiative" or "Wound overlay") then these tokens can directly be grabbed and moved underneath a spell token. The only drawback is that even player tokens get covered after being moved unless the spell token is clicked again. This works for both players and GMs, locked or unlocked.

As a consequence I edited "Wound overlays" to overlay a transparent PNG for the "Healthy" wound status:
https://i.imgur.com/jtr7CxE.gif

Ive had a quick look at 'wounds overlay', and i can see its adding a bitmap but does not seem to be doing anything else. I dont understand why this would cause the token to be on top of draw stack over the spell tokens. And I dont see why this is any different to the already health 'dot'/'effects' bitmaps that are setup without the extension, why are these not causing the same draw stack order.

I'll keep looking, maybe its related to the widget.bringToFront() functions... so I might be able to add a blank spell token bitmap to the spell tokens and use the widget.setToBack to try and keep the spell tokens at the back..

If you have any thoughts on this let me know.

Weissrolf
August 17th, 2021, 11:01
Yeah, that widget.bringToFront() smiled at me as well. Curiously this leads to PC tokens being send to behind the spell token, which they normally would be in front of. But with semi-transparent spell-tokens this is less of a problem (no horse-riding, though) as long as (N)PC tokens can simply be grabbed the way they can with the bitmap trick.

Watch out when you create your blank token bitmap. I first tried a bitmap where I deleted everything from the light wound overlay and it did not work. Then I tried deleting everything but a single pixel and FGU would not display it at all. Then I simply set the (single) layer transparency of the light wound overlay to 0%, saved it as new file and this one works.

Weissrolf
August 17th, 2021, 11:08
See attached for the location, but you have to unpack unity resource packages to get to the directory structure, and to make a change you would have to re-pack the required resource unit package.
Which software do you use to extract and repackage the files? I found AssetsStudio and AssetsBundleExtractor, but the first can only export and the latter works with some "raw" format.

bratch9
August 17th, 2021, 12:11
Which software do you use to extract and repackage the files? I found AssetsStudio and AssetsBundleExtractor, but the first can only export and the latter works with some "raw" format.

I did not repackage it, I only unpacked it. I only wanted to confirm it was in the asset pack and that I have not missed it in the rule set data side.

I think tool talk of this nature is not something for the forums, I'm sure FG mod/dev might take an issue.

-pete

bratch9
August 17th, 2021, 12:15
Yeah, that widget.bringToFront() smiled at me as well. Curiously this leads to PC tokens being send to behind the spell token, which they normally would be in front of. But with semi-transparent spell-tokens this is less of a problem (no horse-riding, though) as long as (N)PC tokens can simply be grabbed the way they can with the bitmap trick.

Watch out when you create your blank token bitmap. I first tried a bitmap where I deleted everything from the light wound overlay and it did not work. Then I tried deleting everything but a single pixel and FGU would not display it at all. Then I simply set the (single) layer transparency of the light wound overlay to 0%, saved it as new file and this one works.

The bring to front is not the cause of this 'solution', it work the same with send to back the (n)pc tokens are selected on top of the spell tokens even when drawn under the spell token.

It also looks like a 'bug' in FG because I would not expect the mouse selection code to be out of sync with the draw order... most people would expect visual order for selection. ( So it might get 'fixed' at some point. )

It looks more like the fact that the widget bitmap is deleted on every update, which is not the case in the rule set for health bar/dot/effect which update the bitmap details not re-create them..

I'm looking further into it to see if I can get to a minimal something to add to my extension, as I'd like to remove lots of selection code in the extension and get things like locked tokens working etc..

-pete

bratch9
August 17th, 2021, 13:51
The bring to front is not the cause of this 'solution', it work the same with send to back the (n)pc tokens are selected on top of the spell tokens even when drawn under the spell token.

It also looks like a 'bug' in FG because I would not expect the mouse selection code to be out of sync with the draw order... most people would expect visual order for selection. ( So it might get 'fixed' at some point. )

It looks more like the fact that the widget bitmap is deleted on every update, which is not the case in the rule set for health bar/dot/effect which update the bitmap details not re-create them..

I'm looking further into it to see if I can get to a minimal something to add to my extension, as I'd like to remove lots of selection code in the extension and get things like locked tokens working etc..

-pete

So what is happening is that bitmap widgets live above all the graphics from what I can see. So while the 'wounds overlay' shows this up for you, you can drag the (n)pc token that is under a spell token with any of the bitmap widgets like the 'effects' or 'health'. They are small but they do work. As the wounds overlay covers the bulk area of the (n)pc token this is what you are dragging... ( not the token... but the token gets dragged with it sort of. )

I'm going to look to see if I can add a transparent token over the combat tracker tokens when the combat tracker adds all the other bitmap layers, so it will only be done once when the token is added to the map. But not on my spell tokens add.

But thanks for the find on this one, I has assumed bitmap images on a token were processed at the token level.

Weissrolf
August 17th, 2021, 14:18
I did not repackage it, I only unpacked it. I only wanted to confirm it was in the asset pack and that I have not missed it in the rule set data side.

I think tool talk of this nature is not something for the forums, I'm sure FG mod/dev might take an issue.
I can replace them directly within the package now, but obviously that only works until the next update. So allowing to theme the selection rings would be a better option.

Here I just quickly got rid of the background texture within and around the circle. Makes things more visible already.
https://i.imgur.com/LkWwZyy.png

bratch9
August 17th, 2021, 15:45
I can replace them directly within the package now, but obviously that only works until the next update. So allowing to theme the selection rings would be a better option.

Here I just quickly got rid of the background texture within and around the circle. Makes things more visible already.
https://i.imgur.com/LkWwZyy.png

That does look nice. ( If you increased the resolution would it still work, at that size its staring to show pixels due to the spell token large size.. )

Maybe you could start a thread and ask FG mod/dev if it is ok to talk about the tools you used to do that, or if they are willing (maybe wish-list it ) to allow theme access for us to be able to replace these/and other things ?

I'm sure some users would be happy to hand update the game if it could be automated with a few installed tools. ( And lost on an version update, the pack resources are not updated on every update. )

Just not sure on the legality of doing a resource pack change like this.

-pete

bratch9
August 17th, 2021, 16:04
I can replace them directly within the package now, but obviously that only works until the next update. So allowing to theme the selection rings would be a better option.

Here I just quickly got rid of the background texture within and around the circle. Makes things more visible already.
https://i.imgur.com/LkWwZyy.png

Ive pushed a build for forge approval with an invisiable bitmap on combat tracker tokens.

So look out for that update later, when i can make it live..

This should help the selection process and allow me to remove a chunk of 'fixes' to work around the selection issues. And with selection working better the token lock is working and cursor keys for movement etc...

Now I will have to strip out a bunch of code, and get things like spirit guardian spell tokens 'sticking' with the (n)pc token when they move. Then I can get back to doing the 'select target' on a key press while you drag the spell token about.

-pete

nephranka
August 17th, 2021, 16:34
Ive pushed a build for forge approval with an invisiable bitmap on combat tracker tokens.

So look out for that update later, when i can make it live..

This should help the selection process and allow me to remove a chunk of 'fixes' to work around the selection issues. And with selection working better the token lock is working and cursor keys for movement etc...

Now I will have to strip out a bunch of code, and get things like spirit guardian spell tokens 'sticking' with the (n)pc token when they move. Then I can get back to doing the 'select target' on a key press while you drag the spell token about.

-pete

This is great news! Thanks to you and Weissrolf for working on this. I will give it some testing.

Weissrolf
August 17th, 2021, 17:31
The overlay of "Has Initiative" (HI) demonstrates that the overlay is important to be hovered over so that the tooltip changes. HI creates a crown overlay at the top of a token, only when that part is grabbed can the token be moved underneath the spell-token.

With "Wound overlay" no tooltip appears, so whenever I see no spell-token tooltip (like Fireball) I know that the token can be moved. Overall it seems as if we are using those overlay tokens and then the (N)PC token just follows suit.

On a side note: Extra Selection Mode is working as intended again. No idea what caused the change or solution.

bratch9
August 17th, 2021, 17:37
The overlay of "Has Initiative" (HI) demonstrates that the overlay is important to be hovered over so that the tooltip changes. HI creates a crown overlay at the top of a token, only when that part is grabbed can the token be moved underneath the spell-token.

With "Wound overlay" no tooltip appears, so whenever I see no spell-token tooltip (like Fireball) I know that the token can be moved. Overall it seems as if we are using those overlay tokens and then the (N)PC token just follows suit.

On a side note: Extra Selection Mode is working as intended again. No idea what caused the change or solution.

I've just made the new build live, let me know if you have any issues.

Weissrolf
August 17th, 2021, 18:31
I see no difference yet, so I will wait some more.

The overlay workaround both benefits and hinders single-square spell-tokens. It benefits, because not even PC tokens are covered by the small spell-token, thus the spell remains visible. It hinders, because moving the spell-token means to first move the (N)PC token out of the way. My current solution is to put single-square spell-tokens at half-squares (edges of the (N)PC token).

Weissrolf
August 17th, 2021, 19:41
Is there an elegant way to handle horizontal vs. diagonal cone tokens? Current I set up two tokens and would ask the player to change the name on the fly ("Color Spray H" vs. "Color Spray D") and then shift-reparse.

Weissrolf
August 17th, 2021, 19:52
Curious observation: When overlapping (N)PC tokens and single-square spell-tokens are grabbed at their edge/circle then both are moved at the same time (glued together) when Extra Selection Mode is enabled.

bratch9
August 17th, 2021, 20:30
Curious observation: When overlapping (N)PC tokens and single-square spell-tokens are grabbed at their edge/circle then both are moved at the same time (glued together) when Extra Selection Mode is enabled.

yes, if they have the same ( or near ) center locations, these are joined for the likes of spirit guardian to auto move with either token. You have to press 'shift' to split them, as the logic is inverted in this case when extra selection mode is enabled.

if the (n)pc and spell token doe not align on the center then the (n)pc will be moved and the spell token will also move but be replaced on its original location... unless you press 'shift' in which case both tokens are moved.

bratch9
August 17th, 2021, 20:31
Curious observation: When overlapping (N)PC tokens and single-square spell-tokens are grabbed at their edge/circle then both are moved at the same time (glued together) when Extra Selection Mode is enabled.

what is up with rotating the token ?

or do you have a specific 'squared' cone graphic for the likes of 45 deg which ends up with a different pattern on the grid. ( as shown in the likes of FG spell template graphic tokens. )

Weissrolf
August 17th, 2021, 20:36
Yes, Pathfinder (2) uses squared spell areas, so I own some corresponding tokens.

Weissrolf
August 17th, 2021, 21:54
yes, if they have the same ( or near ) center locations, these are joined for the likes of spirit guardian to auto move with either token. You have to press 'shift' to split them, as the logic is inverted in this case when extra selection mode is enabled.
With Wound overlays being enabled the shift logic does not seem to work when extra selection is disabled, but it works to split when it's enabled.

bratch9
August 17th, 2021, 23:13
With Wound overlays being enabled the shift logic does not seem to work when extra selection is disabled, but it works to split when it's enabled.

most features only run with extra selection turned on, because I have to track the stack under the cursor and that is what the extra selections is controlling. If I track the stack or not.

I'm looking to have it turned on by default, as I think I can tidy away a big chunk of code that also has to deal with token scale/rotate when its below the spell token.. which should now work without this requirement.

nephranka
August 17th, 2021, 23:18
Selection for both player and GM seem to be working great. No issues so far. The aura centered move with the token and shift separates them.

My two observations:
I would love to have a more transparent background when the spell token is selected (like Weissrolf was showing)
Token lock still is a problem but I know this one is more the way the system works and not much we can do about it.

Otherwise working good here!

Thanks!

Weissrolf
August 18th, 2021, 09:11
I tried to give a spell-token a "Darkness" light. Unfortunately that does not seem to work well. I have to close and reopen the map window for any changes made and generally have to set it up as light first and then use the darkness button (darkness spell preset does not work). Too bad, would have been nice for darkness spells.

Weissrolf
August 18th, 2021, 10:57
Edit: forget my last post. Turns out that the Extensions folder gets precedence over the Vault folder and I still had the DMS version installed in Extensions.

bratch9
August 18th, 2021, 11:53
Edit: forget my last post. Turns out that the Extensions folder gets precedence over the Vault folder and I still had the DMS version installed in Extensions.

yep the vault is the lowest priority, with extension .ext been next and then the unpacked extension in a folder. That way developers working with source get that version..

bratch9
August 18th, 2021, 11:55
Selection for both player and GM seem to be working great. No issues so far. The aura centered move with the token and shift separates them.

My two observations:
I would love to have a more transparent background when the spell token is selected (like Weissrolf was showing)
Token lock still is a problem but I know this one is more the way the system works and not much we can do about it.

Otherwise working good here!

Thanks!

In what way is token locking not working, can you expand ?

with the new vault version and selection you would be able to select a player token and move it and set up a token locked path to approve. It should then move as expected. ( It probably will not pull a 'joined' spell token with it, for spirit guardian type. )

thanks.

Weissrolf
August 18th, 2021, 12:08
I am struggling a bit with the documentation. What do the circle/triangle/cone/square settings with each spell do and what is the different between square and circle extra selection modes?

Weissrolf
August 18th, 2021, 12:42
So this time I tested the real updated version in combination with Wound overlays. The following happens when extra selection mode is enabled, (N)PC tokens and spell tokens move together at any point they overlap. Shift dragging then resets the (N)PC token position. It's possible that this does not happen every time, not sure about that.

Animated GIF:
https://i.imgur.com/uIlrCC1.gif

On a side note: FGU's token selection mode seems to be working with (N)PC + spell tokens (either stacked or just in fixed position to one another).

Weissrolf
August 18th, 2021, 12:46
Targeting through spell-tokens seems to work flawlessly. So even when the spell token covers a (N)PC token you can still ctrl-click on the the (N)PC token for targeting. :)

Now let's hope that SW does not "fix" this newly found workaround.

nephranka
August 18th, 2021, 12:47
In what way is token locking not working, can you expand ?

with the new vault version and selection you would be able to select a player token and move it and set up a token locked path to approve. It should then move as expected. ( It probably will not pull a 'joined' spell token with it, for spirit guardian type. )

thanks.

If we have token lock on and they grab the spell token it gets very big and hard to move around. So, when we are using the spell token we keep the lock off and then turn it back on when done. The only place this is a problem is auras. Since a pc moves with it we have to keep the lock off during their movement.

bratch9
August 18th, 2021, 12:54
I tried to give a spell-token a "Darkness" light. Unfortunately that does not seem to work well. I have to close and reopen the map window for any changes made and generally have to set it up as light first and then use the darkness button (darkness spell preset does not work). Too bad, would have been nice for darkness spells.

The extension does add a light, but not a darkness.. My plan is to add a lighting pop up in the spell tokens configuration. But that will create too much data to store in the 'name' of the spell token, so I'll have to create a reference list to store this.

I'm not sure what the light/dark/torch buttons do, I assumed they did a combat tracker search and added the effect and then that added and tracked the light element that is added onto the map image. I'm sure what you did just broken the chain at some point. If I add it to the config then I dont need to worry about this as it will already be configured and sorted with the spell.

bratch9
August 18th, 2021, 12:56
So this time I tested the real updated version in combination with Wound overlays. The following happens when extra selection mode is enabled, (N)PC tokens and spell tokens move together at any point they overlap. Shift dragging then resets the (N)PC token position. It's possible that this does not happen every time, not sure about that.

Animated GIF:
https://i.imgur.com/uIlrCC1.gif

On a side note: FGU's token selection mode seems to be working with (N)PC + spell tokens (either stacked or just in fixed position to one another).

With the selection layer, i need to remove/fix up all the extra selection code. I'd now basically broken all of that code because now it need a new solution.

Weissrolf
August 18th, 2021, 12:57
I suggest a different workaround, Nephranka. Have the player mark the destination via left+right mouse-button dragging (arrow) and the GM then moves the aura.

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

bratch9
August 18th, 2021, 12:59
If we have token lock on and they grab the spell token it gets very big and hard to move around. So, when we are using the spell token we keep the lock off and then turn it back on when done. The only place this is a problem is auras. Since a pc moves with it we have to keep the lock off during their movement.

Yep, this is broken at the moment, I need to catch up the drag for this case.. but now that the player token is always on top, you should never need to drag the spell token, and it can move match it with the drag while its not selected. which should resolve this sort of issue pair issue.

it will not solve token lock on just a basic spell token drag.

bratch9
August 18th, 2021, 13:01
I am struggling a bit with the documentation. What do the circle/triangle/cone/square settings with each spell do and what is the different between square and circle extra selection modes?

basically nothing at the moment, the system for selection is broken due to the change. But at some point I'll add the ability while you drag the token to press ctrl and push all the tokens under that into the target selection of the creator of the spell effect.

bratch9
August 18th, 2021, 13:06
at the moment run with extra selection off, and the only thing that should not be working is the spirit guardian type (n)pc token+spell token drag.

I've got to re-evaluate things like drag/drop of damage onto a token, and some extra interactions with other extensions. Before I can get back to getting features back up and running.

-pete

nephranka
August 18th, 2021, 13:41
I suggest a different workaround, Nephranka. Have the player mark the destination via left+right mouse-button dragging (arrow) and the GM then moves the aura.

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

Thanks for the suggestion.

Weissrolf
August 18th, 2021, 14:12
But at some point I'll add the ability while you drag the token to press ctrl and push all the tokens under that into the target selection of the creator of the spell effect.
And that would be very sweet indeed. ;)

Weissrolf
August 18th, 2021, 18:10
I wonder if spell tokens could be applied to effects instead of spell names? This way we could have different tokens for the same spell (i.e. different cones or changing tokens per mirror image intact).

bratch9
August 18th, 2021, 22:36
I wonder if spell tokens could be applied to effects instead of spell names? This way we could have different tokens for the same spell (i.e. different cones or changing tokens per mirror image intact).

While it could work like that, assuming people name up the effect description properly.

Not clear on 'changing tokens per mirror image intact', I guess that depends on your PF graphics tokens again.. maybe something I'm not thinking about. Could you expand/some images etc.

Did you create the PF tokens ? or are they a pack I could get hold of etc ?

Weissrolf
August 18th, 2021, 22:52
I bought several tokens and today I saw a token pack that had tokens for mirror images 1-3, so I thought that maybe my player would like to put that on the map for fun and profit. Not really important. The whole idea was more about being able to have multiple tokens for single spells where needed, like cone angle or line vs. circle walls.

nephranka
August 18th, 2021, 23:44
Yep, this is broken at the moment, I need to catch up the drag for this case.. but now that the player token is always on top, you should never need to drag the spell token, and it can move match it with the drag while its not selected. which should resolve this sort of issue pair issue.

it will not solve token lock on just a basic spell token drag.

My testing is that without token lock, everything is fine for both pc and gm. When I have token lock on the gm is fine but the pc will have issues. Even the centered aura dose not move with the pc when they move and any attempt to move the spell token gets the huge graphic. The gm can move both together or just the spell token under lock. No big deal just reporting back.

bratch9
August 19th, 2021, 01:31
I bought several tokens and today I saw a token pack that had tokens for mirror images 1-3, so I thought that maybe my player would like to put that on the map for fun and profit. Not really important. The whole idea was more about being able to have multiple tokens for single spells where needed, like cone angle or line vs. circle walls.

New build version 4.4, done a lot of work on the spell token move and display.

I've added back tool tip for what spell token you are over, that now takes shape into account and its got custom drag processing and tracking. Dont select the spell token, just grab and drag it without the green highlight... you still get green highlight if you select it as i can not stop it doing that.

The spirit guardian (aura) for now is not available. I need to think about how to process that, thinking I might have to do the data tracking side so that I can record and track the (n)pc token reference with the spell token to make that work when you move the (n)pc token side.

Have fun, let me know if you have issues or feedback.

-pete

bratch9
August 19th, 2021, 01:41
Ive had to drop back to the 4.3 version for now... done some extra campaign clean down and setup of token and it was giving a 'nil' error which it was not doing before, so will look into that in the morning.

-pete

Weissrolf
August 19th, 2021, 01:45
I did a quick test of 4.4 trying to move the spell token without selecting it. Unfortunately it always got selected the moment I move it around.

bratch9
August 19th, 2021, 02:06
I did a quick test of 4.4 trying to move the spell token without selecting it. Unfortunately it always got selected the moment I move it around.

Ive moved the build over to 'test' stream, but I found an issue to do with if you delete a spell token.

Not sure on why it selects for you, i press and hold left mouse and then drag, never selects. only selects if i press and release the mouse before starting to drag.

Weissrolf
August 19th, 2021, 02:12
Maybe some interaction with other extensions? I already disabled all overlay extensions for quick testing, but that didn't make a difference.

bratch9
August 19th, 2021, 02:27
Maybe some interaction with other extensions? I already disabled all overlay extensions for quick testing, but that didn't make a difference.

Not sure then, are you running with the map window open or maximised or double maximised to the background ?

Weissrolf
August 19th, 2021, 02:29
I only tried windowed yet. Maximized has its benefits, but eats more GPU power (even when mostly empty) and is not saved (aka reopened) by the FBTabber extension.

Just enabled the Test channel, but Updater keeps telling me that it is copying files while it is likely finished already.

Weissrolf
August 19th, 2021, 11:01
I used TEST today. The token select overlay happens when spell tokens are dragged from the character sheet. When the same spell token is dragged from the Spell Tokens window then it moves without being selected. But it moves faster than the mouse, which it shouldn't do.

bratch9
August 19th, 2021, 12:32
I used TEST today. The token select overlay happens when spell tokens are dragged from the character sheet. When the same spell token is dragged from the Spell Tokens window then it moves without being selected. But it moves faster than the mouse, which it shouldn't do.

is this from a player sheet on the gm side or a player sheet on the player side ?

Weissrolf
August 19th, 2021, 15:36
Token selection seems to happen for one PC character, but not for another. The PC where it does not happen is owned by myself even as a player client. So I cleared and then took ownership of the PC character where it happens, but that made no difference, it still happens.

I tried to put the same spell on both PC chars, but still one char has it happen and the other not. While trying to move the spell token of another char (not owned) the console got flooded with the following error. Later it also happened when I tried to move a spell token owned by me (this time owning both chars, but trying the originally owned one). Only happens on the player side, not GM side.

[8/19/2021 3:34:52 PM] [ERROR] Handler error: [string "scripts/image_B9ST.lua"]:146: attempt to index local 'target' (a userdata value)

bratch9
August 19th, 2021, 16:42
Token selection seems to happen for one PC character, but not for another. The PC where it does not happen is owned by myself even as a player client. So I cleared and then took ownership of the PC character where it happens, but that made no difference, it still happens.

I tried to put the same spell on both PC chars, but still one char has it happen and the other not. While trying to move the spell token of another char (not owned) the console got flooded with the following error. Later it also happened when I tried to move a spell token owned by me (this time owning both chars, but trying the originally owned one). Only happens on the player side, not GM side.

[8/19/2021 3:34:52 PM] [ERROR] Handler error: [string "scripts/image_B9ST.lua"]:146: attempt to index local 'target' (a userdata value)

I've updated a new build, those errors come from when tokens dont belong to the correct user so access becomes an issue. I've protected against some of this but can not be sure if I have every path.

I'm not sure I understand your issue, it might be that because i only have one account and log in to gm and player with it, maybe some other issue happens with a full proper multi-user log in situation ?

I've adjusted movement to try and keep them in sync with the mouse, and added shift/control wheel support when mouse is over the spell token.

Let me know if you not get the image errors, and if you do it might be worth zipping up a campaign so i can have a look at the xml data and check owners and user information to see if I can spot something.

kevininrussia
August 19th, 2021, 22:07
I have downloaded the Forge version and the 4e Power support is not showing spell token on player sheet (was working on the previous version I had from DMsGuild). The Combat Tracker is showing spell icons so that part is working still.
https://i.imgur.com/Umfo2OH.png

nephranka
August 19th, 2021, 23:50
New build version 4.4, done a lot of work on the spell token move and display.

I've added back tool tip for what spell token you are over, that now takes shape into account and its got custom drag processing and tracking. Dont select the spell token, just grab and drag it without the green highlight... you still get green highlight if you select it as i can not stop it doing that.

The spirit guardian (aura) for now is not available. I need to think about how to process that, thinking I might have to do the data tracking side so that I can record and track the (n)pc token reference with the spell token to make that work when you move the (n)pc token side.

Have fun, let me know if you have issues or feedback.

-pete

So, without token lock I can move the spell tokens with no green border. That is very nice! It works on both the pc and gm sides. Tooltips are working.

Bummer the aura move is off now.

With token lock on, you still have the same issue as the spell token gets the green circle the second you grab it. The GM can move it for the player, so easy work around.

Weissrolf
August 20th, 2021, 00:26
I will give the update a try. Before updating I had one odd case where a normal CT creature token was moved by your faster than mouse-speed code even when no spell token was used on the map. Will keep an eye on that one.

Weissrolf
August 20th, 2021, 00:44
Turns out that the update deletes the extension from Test, so I had to return to Live first in order to access it again. My changes to the target circle resources were removed by going back and forth between Live and Test, so I have to change that again. It's not too difficult once, though.

Unfortunately spell tokens from my players' sheets still get the selection circle, while the one from my own char sheet does now. I will have to ask one of my players to connect and try his own character's token to see what happens then. For me as GM the token selection does show up, though, which is rather inconvenient (at least until I change the marker again).

bratch9
August 20th, 2021, 11:51
I have downloaded the Forge version and the 4e Power support is not showing spell token on player sheet (was working on the previous version I had from DMsGuild). The Combat Tracker is showing spell icons so that part is working still.
https://i.imgur.com/Umfo2OH.png

have you tried 'restet power actions' or delete and re-add the power ?

see attached, they are showing for me and in the image I changed the icon and did a reset power actions to have it update on the character sheet.

bratch9
August 20th, 2021, 11:52
Turns out that the update deletes the extension from Test, so I had to return to Live first in order to access it again. My changes to the target circle resources were removed by going back and forth between Live and Test, so I have to change that again. It's not too difficult once, though.

Unfortunately spell tokens from my players' sheets still get the selection circle, while the one from my own char sheet does now. I will have to ask one of my players to connect and try his own character's token to see what happens then. For me as GM the token selection does show up, though, which is rather inconvenient (at least until I change the marker again).

sorry, I removed the 'test' branch version when i updated the latest build.

bratch9
August 20th, 2021, 11:53
So, without token lock I can move the spell tokens with no green border. That is very nice! It works on both the pc and gm sides. Tooltips are working.

Bummer the aura move is off now.

With token lock on, you still have the same issue as the spell token gets the green circle the second you grab it. The GM can move it for the player, so easy work around.

I will get the aura back at some point, it was just too much to be thinking about when re-doing much of the control code..

Weissrolf
August 20th, 2021, 12:28
I sent you a private message with a link to a 7Z compressed campaign folder.

bratch9
August 20th, 2021, 14:41
I sent you a private message with a link to a 7Z compressed campaign folder.

Thanks for the campaign...

Yes I can replicate it, the issue is your character has a name with a bracket in it... if you remove that it should work.

I'll think about the solution... basically a token with a () in its name is a spell token, I would guess with double brackets caused by the character name also having a bracket... causes the token to not be a 'spell token' and just a normal token.. hence it gets its green outline when you drag it.

While not Ideal for now just remove the () in character name, or put it in a [] instead.

Weissrolf
August 20th, 2021, 14:55
Great find! The names in brackets are my players' names for me to more easily discern their chars (at least at the beginning of a campaign). I can easily change them.

bratch9
August 20th, 2021, 15:19
Great find! The names in brackets are my players' names for me to more easily discern their chars (at least at the beginning of a campaign). I can easily change them.

Yep I could see, or guess that is what they were. I have a fix, just checking a few edge cases errors to trap. So you should be ok soon.

-pete

Weissrolf
August 20th, 2021, 16:05
I already changed the names, first to [] then just deleted that part as the campaign is old enough for everyone to know their names. ;) Still good to find these little things before others stumble over them.

bratch9
August 20th, 2021, 16:16
I already changed the names, first to [] then just deleted that part as the campaign is old enough for everyone to know their names. ;) Still good to find these little things before others stumble over them.

New build is up, which should fix this. Unless you have a player called 'circle' it should not get confused on the shape.

My plan is to create a database list of spell tokens to store the increased data, so I dont need to encode it on the spell token name. So this should also resolve this issue.

But to hold that database, I probably need to adjust the characters stored data, so needs a bit of planning to try and keep it working, and probably needs a spell reparse to adjust the character storage of information.

espanRebel
August 20th, 2021, 17:07
Is there a way to target tokens with your spells token extension from the combat tracker? Is your stuff compatible with Diablobob's?

bratch9
August 20th, 2021, 17:27
Is there a way to target tokens with your spells token extension from the combat tracker? Is your stuff compatible with Diablobob's?

I dont expect to target from the combat tracker in the extension, and it should not cause issues with diablobobs but I can not say 100% as I've not tested the latest versions. ( And he has a few extensions, so would need to know what you are thinking... I'm assuming the critically awesome one which does the extra token effect line. )

At the moment due to the shapes this becomes complex, my thoughts on selections are to add right click radial onto the spell tokens to select friend/foe on the map... and possibly also a key press during a drag of a spell token to select those during the drag. ( for likes of spirit guardian along the walk path you are taking... but this also depends on how the spirit guardian type aura+player token ends up working. )

Time line for these things is now known.

Weissrolf
August 20th, 2021, 17:34
One reason I removed the () part of the names was to shorten the already long tooltip that covers part of the map. Getting rid of the (circle) part would surely serve that end, too. Do these circle/square/whatever parts do anything mechanically or are they just an information?

Mattkilt
August 20th, 2021, 18:31
@bratch9 I am having an issue. I bought the token pack, subed on Forge for the ext, enabled it, imported the xml files, and I see the spell list and the tokens in Spell Token tab... But none of the tokens are showing up on the character sheets under their actions. I see the spells, but not the tokens. What am I missing?

Weissrolf
August 20th, 2021, 19:16
Found another issue with the new movement system: the owner PC token of a spell token cannot freely be moved underneath its own spell token. Instead the spell token has to be specifically selected and then it seems to follow FGU's default stacking order switch.

Furthermore the owner PC token cannot be affected by the Token Height ALT+scroll-wheel to change its flying height.

Non owner PC tokens do not suffer from these.

kevininrussia
August 20th, 2021, 19:16
have you tried 'restet power actions' or delete and re-add the power ?

see attached, they are showing for me and in the image I changed the icon and did a reset power actions to have it update on the character sheet.

Reset fixed the issue. Thanks for that tip!

Weissrolf
August 20th, 2021, 19:56
I created a thread about Waypoint/Token Ring asset editing here:

https://www.fantasygrounds.com/forums/showthread.php?70160-Can-Waypoint-Token-Ring-assets-be-themed

Weissrolf
August 20th, 2021, 19:59
Found another issue with the new movement system: the owner PC token of a spell token cannot freely be moved underneath its own spell token. Instead the spell token has to be specifically selected and then it seems to follow FGU's default stacking order switch.

Furthermore the owner PC token cannot be affected by the Token Height ALT+scroll-wheel to change its flying height.

Non owner PC tokens do not suffer from these.
Forget about this. Turns out that the owning PC token was still present on the map, but not in the CT. So all oddities stemmed from that.

bratch9
August 20th, 2021, 20:11
I created a thread about Waypoint/Token Ring asset editing here:

https://www.fantasygrounds.com/forums/showthread.php?70160-Can-Waypoint-Token-Ring-assets-be-themed

Thanks, hope we get some good feedback from the dev team. ( I dont expect any, past put it on the wish list.. )

bratch9
August 20th, 2021, 20:13
Forget about this. Turns out that the owning PC token was still present on the map, but not in the CT. So all oddities stemmed from that.

Thanks for letting me know. A lot of the token code does a 'find on CT' so this type of issue can cause loads of token issues. Not surprised that this has knock on issues.

bratch9
August 20th, 2021, 20:22
One reason I removed the () part of the names was to shorten the already long tooltip that covers part of the map. Getting rid of the (circle) part would surely serve that end, too. Do these circle/square/whatever parts do anything mechanically or are they just an information?

At the moment they are used to tell what type of token to process it as. If you go into the campaign/moduledb/'mappack???.xml', find the layer with the <token> section with the name and change a circle token into square by changing the name in the file... when you re-load the campaign the token will act as a square token.

With looking to add a 'light effect' block of data into the spell token configuration, this is then 'to much' data to encode on the spell token name... who wants 'fireball,(bob,circle,2000,400,200,0500,204,ff0022 ,000022)' type to store all the distance and type numbers from a light...

So I'm going to create list of 'spell token' token references in the database so I can 'hide' that extra data and clean up the name.

I can then add an option for 'name format layout', so if users just want 'fireball' or 'fireball - bob' type tool tip then that becomes possible. ( But data restructure first to allow it.. )

bratch9
August 20th, 2021, 20:27
@bratch9 I am having an issue. I bought the token pack, subed on Forge for the ext, enabled it, imported the xml files, and I see the spell list and the tokens in Spell Token tab... But none of the tokens are showing up on the character sheets under their actions. I see the spells, but not the tokens. What am I missing?

Did the character already have spells on the character sheet ?

If so use the re-parse spell option on the radial menu. In most rulesets pressing 'shift' will just process the spell token update part... or you can fully reparse the spell. ( Note spells like rob2e/'phb automated effects' custom spells do not re-parse, which is why the hold 'shift' option is available, or you can delete/re-add the spell etc.. )

Hope this solves your issue, try on a clean campaign with just this extension, if not please give some extra information. eg ruleset, list of (other) extensions, screen shot, attach to the thread a test campaign that have issues with so I can have a look down the db.xml and see what is causing the issue.

-pete

kevininrussia
August 20th, 2021, 20:51
4E
Is it possible to move the spell token to the left of the die icon on the character sheet? It will look better with its placement moved in my opinion.

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

bratch9
August 20th, 2021, 22:28
4E
Is it possible to move the spell token to the left of the die icon on the character sheet? It will look better with its placement moved in my opinion.

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

The short answer is 'no'.

The long answer is 'maybe' its more complex because oddly the 'name + icons + gap + dice' form a subwindow, while the mini version of the character sheet does not have the dice, so looks as you want.. causing the code to have multiple depths in the database to try and track and update custom code+lua.

Its doable, but not a simple move the merge join about in the file.

Weissrolf
August 20th, 2021, 22:46
Ah, I tested square vs. circle and despite my grid-based tokens being more "square" I prefer the circle setting for moving them around. With square they can be dragged at their empty corners, which is more confusing than dragging them on the often circular image with superimposed grid instead. So thanks for that setting, it seems quite useful.

Mattkilt
August 21st, 2021, 00:22
Did the character already have spells on the character sheet ?

If so use the re-parse spell option on the radial menu. In most rulesets pressing 'shift' will just process the spell token update part... or you can fully reparse the spell. ( Note spells like rob2e/'phb automated effects' custom spells do not re-parse, which is why the hold 'shift' option is available, or you can delete/re-add the spell etc.. )

Hope this solves your issue, try on a clean campaign with just this extension, if not please give some extra information. eg ruleset, list of (other) extensions, screen shot, attach to the thread a test campaign that have issues with so I can have a look down the db.xml and see what is causing the issue.

-pete

Yep, that did it!

Weissrolf
August 21st, 2021, 23:57
I understand that horizontal cone images have to be rotated so that the origin is on the lower side (6 o'clock). But what about diagonal ones? These seem to be missing an entry?!

bratch9
August 22nd, 2021, 01:42
I understand that horizontal cone images have to be rotated so that the origin is on the lower side (6 o'clock). But what about diagonal ones? These seem to be missing an entry?!

I'm not sure what the 'missing an entry' is all about.

You should have one cone image, but might change for a centred one, that looks like cone.png... then you use the token rotate mouse wheel to spin it around. ( I want to move to use the centred point in the centre of the graphic so that make the bottom half graphic blank space, but at least it would rotate around a better point. )

For me you just create the pointing up version and let the mouse wheel rotate do its job to rotate the spell token graphic. ( its not going to square match as it rotates.. )

I'm not adding cone_up, cone_right, cone_diagonal_up, cone_diagonal_down etc.. because that would be a total 'f**k' to deal with as you would need 8 versions custom for every spell and matching graphic tokens plus maybe multiple square origin point.

It not possible to have custom shapes for all start points, say centre and then a corner point ( or all 9 possible points on the square assuming left/middle/right and the top/middle/bottom ) and then have all the rotations and shapes and sizes. You could end up with a hundreds custom shape layout grids. ( No user is going to click a list box with that many options to configure. )

I'm looking to make a centred cone, and a centred triangle that both points up. I dont expect 'perfect' square hit custom graphics to work.

A diagonal graphic would also need to be rotated for its source to be centre bottom pointing up, and then middle scroll to rotate it. Basically what ever cone graphic you want has to sit on the pattern image. If you want to have multiple versions of each spell configured with a different spell token designed for custom axis that a player drags out knowing they want a vertical,diagonal,horizonal spell cast token and they are going to use the vertical for up/down, horizonal for left/right and diagonal for the other 4 directions once placed they rotate it. that is up to you.

does that cover all options, as i'm not clear on what you are trying to deal with.

( Maybe dm me some of the graphics for spell tokens you are trying to use, so I can think about options/solutions etc. )

Weissrolf
August 22nd, 2021, 02:01
We are using grid-based spell tokens, which in turn would need two different cone shapes to work with your extension.

This orthogonal one is already possible with the current "Cone" shape. It needs to start with the origin at 6 o'clock and then can be rotated.
https://i.imgur.com/MLu4ABF.png

But this diagonal one is currently not possible, even when the graphic is rotated to fit the 6 o'clock point of origin. Unfortunately the "Triangle" form doesn't fit these neither. The closest thing is the "Square" shape, which then allows to also grab the token in the three empty squares.
https://i.imgur.com/0v9bgJv.png

Concerning the point of rotation. I did try to put insert more space to make the point of origin the rotation point, too. Works well for rotation, but then again a lot of empty space can be used to drag the spell token, which might be more confusing than just leaving the rotation point on the center square.

bratch9
August 22nd, 2021, 11:00
We are using grid-based spell tokens, which in turn would need two different cone shapes to work with your extension.

This orthogonal one is already possible with the current "Cone" shape. It needs to start with the origin at 6 o'clock and then can be rotated.
https://i.imgur.com/MLu4ABF.png

But this diagonal one is currently not possible, even when the graphic is rotated to fit the 6 o'clock point of origin. Unfortunately the "Triangle" form doesn't fit these neither. The closest thing is the "Square" shape, which then allows to also grab the token in the three empty squares.
https://i.imgur.com/0v9bgJv.png

Concerning the point of rotation. I did try to put insert more space to make the point of origin the rotation point, too. Works well for rotation, but then again a lot of empty space can be used to drag the spell token, which might be more confusing than just leaving the rotation point on the center square.

Empty space in a spell token should not be draggable, unless it has the green selection. It checks the shape space and cursor point. ( which also controls the tool tip to show. )

if you 'added space' and used the 'cone' shape it will still consider the bottom middle of the graphic the origin of the cone, so you would then have empty space to grab.. which might be what you were seeing. ( A proper centre cone option would not drag the extended space below the graphic. )

bratch9
August 22nd, 2021, 11:19
We are using grid-based spell tokens, which in turn would need two different cone shapes to work with your extension.

This orthogonal one is already possible with the current "Cone" shape. It needs to start with the origin at 6 o'clock and then can be rotated.
https://i.imgur.com/MLu4ABF.png

But this diagonal one is currently not possible, even when the graphic is rotated to fit the 6 o'clock point of origin. Unfortunately the "Triangle" form doesn't fit these neither. The closest thing is the "Square" shape, which then allows to also grab the token in the three empty squares.
https://i.imgur.com/0v9bgJv.png

Concerning the point of rotation. I did try to put insert more space to make the point of origin the rotation point, too. Works well for rotation, but then again a lot of empty space can be used to drag the spell token, which might be more confusing than just leaving the rotation point on the center square.

I'm not sure on the 2 images you show.. both look to be covered reasonably with a 'cone' shape. (spray.jpg, i've covered the 2 FG spell template for prismatic spray which is the same thing you show)

You can just rotate your diagonal image by 45degrees at the bottom left corner, so make a version with the source in the bottom centre pointing up and store that as a the spell graphic ?

Or am i missing something ?

bratch9
August 22nd, 2021, 11:56
We are using grid-based spell tokens, which in turn would need two different cone shapes to work with your extension.

This orthogonal one is already possible with the current "Cone" shape. It needs to start with the origin at 6 o'clock and then can be rotated.
https://i.imgur.com/MLu4ABF.png

But this diagonal one is currently not possible, even when the graphic is rotated to fit the 6 o'clock point of origin. Unfortunately the "Triangle" form doesn't fit these neither. The closest thing is the "Square" shape, which then allows to also grab the token in the three empty squares.
https://i.imgur.com/0v9bgJv.png

Concerning the point of rotation. I did try to put insert more space to make the point of origin the rotation point, too. Works well for rotation, but then again a lot of empty space can be used to drag the spell token, which might be more confusing than just leaving the rotation point on the center square.

Made an example for you, you would need 2 spells one for your normal cone and one for the other diagonal graphic.

I configured the diag.png as a '25 cone', which makes it about the corrects size, give or take some pixel cropping and rotation stuff. ( I'm not an artist so is rough )

In diagonal.png, you can see i've added the normal 15' cone test to show the area that would be considered for selection. ( Which seems to cover ok.. )

Does this answer you question ?

Weissrolf
August 22nd, 2021, 12:21
Empty space in a spell token should not be draggable, unless it has the green selection. It checks the shape space and cursor point. ( which also controls the tool tip to show. )
That is the problem with using "Square" for the diagonal cone, it leaves 3 squares of empty space within the dragable share (as square is larger than the original cone). So square is not the best solution.


if you 'added space' and used the 'cone' shape it will still consider the bottom middle of the graphic the origin of the cone, so you would then have empty space to grab.. which might be what you were seeing. ( A proper centre cone option would not drag the extended space below the graphic. )
Yes, that is what happened when I tried to add space for making the rotational point of the token match the point of origin (which makes placement easier, as drop-point = point of origin). Works flawlessly for the rotation, but then the empty space below becomes dragable. So not a good compromise:
https://i.imgur.com/eMBsvoA.png

This also caused the 45 rotated diagonal cone not to match. When you rotate the image via image software it leaves the upper part empty to match the original square image shape (which upon close inspection isn't even fully empty):
https://i.imgur.com/IBi09in.png

This in turn caused the oddities I was experiencing:
https://i.imgur.com/8zmWYJW.png

So I have to cut the upper free space out of the rotated image. The FGU cone shape is a bit smaller than the grid shape at the sides, while covering part of empty squares at the front. Nothing dramatic, though. But now I have to rotate all diagonal cone graphics by -45 and cut the (not so) empty space out. ;)
https://i.imgur.com/XipbhvX.png

Thanks for the ongoing support!

bratch9
August 22nd, 2021, 12:54
That is the problem with using "Square" for the diagonal cone, it leaves 3 squares of empty space within the dragable share (as square is larger than the original cone). So square is not the best solution.


Yes, that is what happened when I tried to add space for making the rotational point of the token match the point of origin (which makes placement easier, as drop-point = point of origin). Works flawless for the rotation, but then the empty space below becomes dragable. So not a good compromise:
https://i.imgur.com/eMBsvoA.png

This also caused the 45 rotated diagonal cone not to match. When you rotate the image via image software it leaves the upper part empty to match the original square image shape (which upon close inspection isn't even fully empty):
https://i.imgur.com/IBi09in.png

This in turn caused the oddities I was experiencing:
https://i.imgur.com/8zmWYJW.png

So I have to cut the upper free space out of the rotated image. The FGU cone shape is a bit smaller than the grid shape at the sides, while covering part of empty squares at the front. Nothing dramatic, though. But now I have to rotate all diagonal cone graphics by -45 and cut the (not so) empty space out. ;)
https://i.imgur.com/XipbhvX.png

Thanks for the ongoing support!

I'm a few stages of code away from this, but I plan to allow spell graphics to have a coded name item in them.. and then look that up based on the rotation value. eg. 'prismatic{1}.png'->'prismatic{8}.png', with the 3 type square/circle/cone centred so rotation looks ok.

Then you can ask for... pattern of squares is wrong depending on source point centre of square or corner of square... so I could add 'prismatic{1}.png' for centre square and 'prismatic{c1}.png' for corner.

I can probably 'fold' the square spaces in the check hit math to deal with square matching..

But this is a number of steps of code away, and I'm not sure I can switch textures on rotation. ( My tests suggest I have to delete and re-add the spell token.. )

Always trying to get it better if I can..

-pete

Weissrolf
August 22nd, 2021, 13:05
Just for your info: I had two oddities happen during tests lately, which may or may not be connected to your extension. Yesterday the mouse click point was shifted for both me and a player I tested spell templates with. First we thought that CTRL-clicking would not work for targeting tokens on the map anymore, but later I noticed that I have to place the mouse-pointer a good centimeter below anything I want to click, including window close buttons. Restart solved that.

Today while I was doing the screenshots above I dragged a second spell token to the map. When I released the mouse-button all of a sudden *all* tokens and pointers were shifted so far to the upper left that they landed a good way into the black part surrounding the map, viewpoint was also instantly shifted.

I will keep an eye on these.

graphil
August 22nd, 2021, 13:17
Probably doing something wrong or there is a conflict somewhere but I'm not getting the spell token showing up on the actions tab. Extension seems to have installed OK. I can see spelltokens in the menu bar.
Extensions of note: Equipped effects, automatic effects, charsheet effects display, kit'n'kaboodle, generic actions, character sheet tweaks.
Any ideas?

Updated: Tested with no extension enabled and same issue. Probably user error however.

bratch9
August 22nd, 2021, 16:51
Just for your info: I had two oddities happen during tests lately, which may or may not be connected to your extension. Yesterday the mouse click point was shifted for both me and a player I tested spell templates with. First we thought that CTRL-clicking would not work for targeting tokens on the map anymore, but later I noticed that I have to place the mouse-pointer a good centimeter below anything I want to click, including window close buttons. Restart solved that.

Today while I was doing the screenshots above I dragged a second spell token to the map. When I released the mouse-button all of a sudden *all* tokens and pointers were shifted so far to the upper left that they landed a good way into the black part surrounding the map, viewpoint was also instantly shifted.

I will keep an eye on these.

These sound very odd, I dont mess with the cursor so I dont see how it could be 'off' for a window close button etc.. But I'll also keep an eye out.

In our game last night, our DM managed to mess up the (n)pc tokens, we had spell tokens enabled as extension but no spell tokens in use, he had them go off screen like your second part. Can not say if it was the same issue, or some bad miss click on his side. He ended up deleting all tokens from the map and putting everything back and we had fun trying to put stuff back in the location it was supposed to have been.. we were out by one square on a couple but the combat structure was good.. the correct players next to the correct npc... so was not a big issue... but yep some odd token thing happened once in the 4+ hour session. ( But probably a miss click.. its so easy drag the map instead of a token in FG if you have the cursor just off a token.. )

I will also keep an eye out, but our group just does one game a week with rotating DMs, so we dont get to stress the extension all the time.

EDIT: in our game our DM added more enemies to the CT and used the red 'hostile' icon to drag these on the map, not realising this would move all the hostile currently on the map.. Which is how he moved all the tokens in one go.. So in our case it was not an extension issue.

bratch9
August 22nd, 2021, 16:54
Probably doing something wrong or there is a conflict somewhere but I'm not getting the spell token showing up on the actions tab. Extension seems to have installed OK. I can see spelltokens in the menu bar.
Extensions of note: Equipped effects, automatic effects, charsheet effects display, kit'n'kaboodle, generic actions, character sheet tweaks.
Any ideas?

Updated: Tested with no extension enabled and same issue. Probably user error however.

Did your character already have spells/powers on the character sheet. Normally advise to delete and re-add spells, or use the hold 'shift' and use the radial re-parse spell option. ( See many previous comments for new users in the thread.. )

Did you import/configure any spell tokens, thats the other step people forget. As the extension does not come with spell token graphics, so it can depend on what you have/configure etc.

Hope this helps, if not please add some screen shots of the character and the spell config window scrolled to a spell the matches with a player. You might just have a slight name miss-match for example.

-pete

Weissrolf
August 22nd, 2021, 17:31
I had the cursor thing happen again, so it might happen often enough to better reproduce.

The token off the map thing should not happen with a simple miss-click. All I did was to drag another spell token to the map, which not only moved the new spell token off the map, but also the tokens and pointers that were already present.

I wouldn't even know how to do that with a click, but I do know that there have been map oddities in the past where the map zoom did not fit the placement of things. There is some thread where I reported this including a screenshot. Back then I suspected that one of my active overlay extensions was at least the catalyst of this. So with your extension now also including overlays we now have at least 4 extensions doing that on my setup (Wound overlays, Spell tokens, Token Height, Has Initiative).

We currently only play every 2 weeks on Mondays, so there is little time and motivation to do bug-hunting during our sessions. ;)

graphil
August 22nd, 2021, 17:35
Did your character already have spells/powers on the character sheet. Normally advise to delete and re-add spells, or use the hold 'shift' and use the radial re-parse spell option. ( See many previous comments for new users in the thread.. )

Did you import/configure any spell tokens, thats the other step people forget. As the extension does not come with spell token graphics, so it can depend on what you have/configure etc.

Hope this helps, if not please add some screen shots of the character and the spell config window scrolled to a spell the matches with a player. You might just have a slight name miss-match for example.

-pete

Hi Pete. Is was the import spell tokens step. All working now.
Just got to find some good spell effect tokens to use now.

Weissrolf
August 22nd, 2021, 18:46
Unfortunately I found another issue. Mouse-overs for character effects (icons or marks) seem to get confused by the extension. When the extension is loaded then I often either don't get any mouse-overs for effects or just for a single character token out of all PCs and NPCs. Doesn't matter whether a spell token is present on the map or not (and I also disabled my other 3 overlay extensions).

graphil
August 22nd, 2021, 19:56
So from reading back tokens with 50% transparency are the best to use for now. Any recommendations for those?

bratch9
August 22nd, 2021, 20:19
So from reading back tokens with 50% transparency are the best to use for now. Any recommendations for those?

if you are on 5e, Gareths Jensen (dmsguild) (https://www.dmsguild.com/product/195599/DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21) is the set that matches up with the 'SpellTokens.xml' hosted at the start of this thread.

But other packs for free are available, but you would then have to add each to the configuration window and sort out the resolution factor to size ratio.

Weissrolf
August 22nd, 2021, 22:57
On Windows you can use the free Paint.net to read in tokens and then just change the Transparency slider at the layer panel to 127.

https://i.imgur.com/8Naq8DU.png

Save as new name if you want to keep the 100% token, or overwrite.

bratch9
August 23rd, 2021, 21:04
Released version 4.9, sorry its a re-parse job on the character spells.

I've changed how the data is been passed around to allow for extra data.

I've added a lighting section in the configuration for the spells. The updated spelltoken.xml at the top of thread has an example 'alarm' flashing light configured.

Thanks,
pete

Weissrolf
August 24th, 2021, 01:05
The new light option should allow us to quickly drag light sources/spell onto characters, using our own preferred presets. That might prove faster, easier and more useful than using FGU's token light options. I'll give this a test-run once I find time.

bratch9
August 24th, 2021, 12:49
The new light option should allow us to quickly drag light sources/spell onto characters, using our own preferred presets. That might prove faster, easier and more useful than using FGU's token light options. I'll give this a test-run once I find time.

this would apply a spell token at the location of a character, which i suspect at the moment the 'drop onto character' callbacks do not know about spell tokens...

you could drag a spell token with a light effect from a character to the map, and then 'move' it under a player character to simulate this.

Until I get back to 'aura' side, which will use the drop spell token onto a character to allow the 'pair' to be tracked, I suspect it will not work as you expect.

Weissrolf
August 24th, 2021, 13:06
Unfortunately I found another issue. Mouse-overs for character effects (icons or marks) seem to get confused by the extension. When the extension is loaded then I often either don't get any mouse-overs for effects or just for a single character token out of all PCs and NPCs. Doesn't matter whether a spell token is present on the map or not (and I also disabled my other 3 overlay extensions).
Could you reproduce this on your setup? It's not a deal-breaker since CT also lists effects, more of an oddity to be aware off (maybe best to disable effect icons in options for less confusion then).

bratch9
August 24th, 2021, 22:18
v5.0 has been release.

This should sort out the effects not show properly.

Also now it keeps a database list of spell tokens, so it can look up data without having to code it in the spell token tool tip. ( So i've removed 'shape' from the tool tip side.. )

-pete

Weissrolf
August 24th, 2021, 22:26
Very fast development, it's well appreciated. :)

Weissrolf
August 25th, 2021, 02:42
Are the settings saved as XML somewhere so that we can edit them (for light) and then reimport?

bratch9
August 25th, 2021, 11:30
Are the settings saved as XML somewhere so that we can edit them (for light) and then reimport?

if you have custom data and/or using the spelltokens.xml, then the values are in a tag in the db.xml in the <spelltokens> group, and you can take a look at the spelltokens.xml to see how to create an import xml file once you are done.

see attached, to get an idea of how they match up..

If you do define a bunch of lights for the spelltokens.xml, would you share that and I can add it to the top of the thread. ( I'm not an artist, so people would get programmer lights if I did it !! )

-pete

graphil
August 25th, 2021, 13:39
Just to check. Do I need to reimport SpellTokens.xml for v5 or just shift click on spells to refresh things?

bratch9
August 25th, 2021, 14:04
Just to check. Do I need to reimport SpellTokens.xml for v5 or just shift click on spells to refresh things?

if you want you can, depends when you last imported it. The latest adds the 'alarm' flashing light with the marked lighting section.

If you are 'setting' up some lighting it probably does not matter as you will replace what i configured as test on the alarm.

graphil
August 25th, 2021, 14:05
Is jt ok to import over the top or should i remove what is there first?

bratch9
August 25th, 2021, 14:48
Is jt ok to import over the top or should i remove what is there first?

on top should be ok

bratch9
August 25th, 2021, 14:49
v5.1 is now live, I've fixed spell token scale on 4e ruleset and moved the spell token to the other side of the activate button for 4e.

anathemort
August 25th, 2021, 17:18
Hi bratch, I know you've done a huge amount of work on token stack order. Does the change in FGU 4.1.5 help or hinder with spell tokens?



Tokens which are added or moved will be placed at top of token draw order.

Weissrolf
August 25th, 2021, 17:25
if you have custom data and/or using the spelltokens.xml, then the values are in a tag in the db.xml in the <spelltokens> group, and you can take a look at the spelltokens.xml to see how to create an import xml file once you are done.
Great, so I can copy them out (export), edit as needed and the reimport (or paste back).


If you do define a bunch of lights for the spelltokens.xml, would you share that and I can add it to the top of the thread. ( I'm not an artist, so people would get programmer lights if I did it !! )
No artist myself. I buy tokens and now can finally use them. Currently I am thinking of downloading some torch, lantern and wisp like images to use as small overlay token on creatures that use these and then program the tokens to shed the corresponding light (emanating from the edges instead of the center). Will have to compare how easy that is compared to using effects as lights.

Weissrolf
August 25th, 2021, 21:47
New error popping up when I open the CT:

4 times in a row:
[8/25/2021 9:43:45 PM] [ERROR] Handler error: [string "scripts/manager_token_B9ST.lua"]:27: attempt to index local 'selectWidget' (a nil value)

kevininrussia
August 25th, 2021, 21:50
v5.1 is now live, I've fixed spell token scale on 4e ruleset and moved the spell token to the other side of the activate button for 4e.

Thanks for this! Looks great!
I am having an issue with this build though. Dragging the token from the player power sheet to the map is not dropping a token. Nothing happens. Dragging from the Combat Tracker from NPC's to map works.


*EDIT*
I reset the power and it works as intended.

kevininrussia
August 25th, 2021, 22:35
I have added a light to a torch token but it does not light up the map. Is there a process I am not doing to make it work?

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

bratch9
August 26th, 2021, 16:25
New error popping up when I open the CT:

4 times in a row:
[8/25/2021 9:43:45 PM] [ERROR] Handler error: [string "scripts/manager_token_B9ST.lua"]:27: attempt to index local 'selectWidget' (a nil value)

I can see that part of code and can add protection. Did you have any old tokens on the CT/image, that might not have had the extra spell token bitmap image added to them ?

I'll add nil protection around that code, as it probably should have it anyway.

-pete

bratch9
August 26th, 2021, 16:29
I have added a light to a torch token but it does not light up the map. Is there a process I am not doing to make it work?

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

Not sure, when you select it does it sort the lighting out ? ( ie it has personal light, from the configuration it will not be assigned to anybody, so maybe it does not know which 'party/player' vision to update ? So I might have to assign NPC spell tokens to the actual NPC as owner so the vision exists for that owner etc... )

I'll take a look, is the 'size' of the light correct.. as I'm not sure if I apply the 4e normal '1' unit scale instead of '5' unit scale...

bratch9
August 26th, 2021, 16:54
I have added a light to a torch token but it does not light up the map. Is there a process I am not doing to make it work?

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

So testing the 4.1.5 version even with 'effect' lights on a player, it seems the 'light' can sometimes not be drawn. It seems to be if you change the zoom level some amount of the map this turn it on or not... its very odd.

It could still be an interaction with my extension, let me look further into it.

( But in the 5e test I have on this machine, i'm not on my dev machine, it does seem that a player with no sight is on a black map, and with an alarm in view they can see that alarm area of the map flashing. which suggests its updating the vision based on the view of the spell token.. )

bratch9
August 26th, 2021, 17:02
I have added a light to a torch token but it does not light up the map. Is there a process I am not doing to make it work?

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

In the light.png image you can see the DM view has light for the player and can see some of the alarm light, but the player side gets no light.

( The player also has the same alarm type flash effect on him, but as a custom 'effect' added with the CT effect... )

I also noticed that when I moved the player with the effect on and token lock, that at the end of the movement the player light effect was not fully in position of the final player movement. It sorted its self out once i move the player token on the gm side..

As a lot of light/layer changes have been made in 4.1.5 some of these issue might be related to the update. So I'll do some tests without my extension to see if I can re-create some of these issue... As they might have to be reported as bugs in the new update. And I need to know if they are update bugs or if it works find without my extension and my extension causes issues due to code binding issues from the update etc..

-pete

kevininrussia
August 26th, 2021, 17:18
When I select the "torch" icon that has the light parameter added and move it around on the map no light happens. I have party vision off if that matters. If I select the "torch" token and add a torch token light to it using the sidebar then it lights up correctly.

*EDIT* oops, wrote this before I saw your updates. I will do more testing on my end too.

Weissrolf
August 26th, 2021, 17:37
I can see that part of code and can add protection. Did you have any old tokens on the CT/image, that might not have had the extra spell token bitmap image added to them ?
It was the same group of PCs as last time (we played on the same map we stopped 2 weeks ago) and is the same campaign I tested 4.8 and 4.9 with. The error only came up with the last updates to the extension.

There is one "Weissrolf" PC token that I keep adding and removing for tests only (not part of the campaign). Curiously it only seems to happen when I open the CT first, but not when the map is opened before the CT.

bratch9
August 26th, 2021, 18:22
Hi bratch, I know you've done a huge amount of work on token stack order. Does the change in FGU 4.1.5 help or hinder with spell tokens?

I don't think this causes any issues, it does not solve anything because when you move a spell token it will now be on top of all the (n)pc tokens. So the extension still has to manage 'fake' keeping the (n)pc tokens above the spell tokens.

Just now you can move (n)pc tokens on top of a pre-placed 'cart', you just can not move the cart as it will go above the (n)pc and cause you issues to re-move the (n)pc.. depending on size of cart and movement.. Obviously if you move the cart further than all the tokens on top then you can move the (n)pc tokens back onto the cart for them to be on top. Not sure if this works if you group select the cart and some (n)pc that are on top of the cart, if it manages any form of order or not...

But from my quick tests this 'placed on top' does not fix anything with the spell token draw order... as we want all non-combat tracker tokens to be drawn under everything all the time regardless of (n)pc token movement. If the draw order did this, so (n)pc tokens always were over spell tokens, then the 'fake' (n)pc tokens to be on top would still be fine to use just the tokens would actually be on top. So I think even if they fixed this 'properly' it would not cause an issue for the current solution.

bratch9
August 26th, 2021, 18:35
I have added a light to a torch token but it does not light up the map. Is there a process I am not doing to make it work?

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

I've setup a 'big' torch on a character, NOTE... you need the new 5.2 build for this as I've made the 'Bright' and 'Dim' radius in 5ft units so that if you import the spelltokens.xml in either 4e or other rules sets the values are the same, like the pixel's per 5ft. And the extension scales them for the 4e ruleset that uses 1 unit values...

This obviously will confuse if you look against a pre-effect torch with its 0,2.5 bright,dim values as they will be 0,12.5 in the spell configuration side.

From the images you can see the green light flashing on/off between t1.png and t2.png.

I'm not sure if this is vision correct, but as your light was not showing maybe you had the option off for 'add lights' which I have removed now in the 5.2 build as you can do this by setting bright and dim distance to zero.

bratch9
August 26th, 2021, 18:45
v5.2 is now live, it 'nil' protects the CT before image script error, removed the 'option' for 'add light' ( so now no options in the extension. ), and I've scaled the light configuration radius values for 4e. ( They work in 5ft per square on all rulesets to allow import of the likes of spelltokens.xml to be loaded in any ruleset. So they will look 'wrong' for distance on 4e relative to the light prefab effect radius. )

So you control 'add light' by having bright/dim radius as both zero for no light added, and either with a radius will add the light. ( This is the same as in the core ruleset. ) Along with the 'FF000000' and '000000' been considered as 'inverse' for 'darkness light'

kevininrussia
August 27th, 2021, 01:23
Torches and other token lights are working in 4e now. I had to mess with the parameters to get the right look but works great now. Thanks!

nephranka
August 27th, 2021, 01:31
Just for your info: I had two oddities happen during tests lately, which may or may not be connected to your extension. Yesterday the mouse click point was shifted for both me and a player I tested spell templates with. First we thought that CTRL-clicking would not work for targeting tokens on the map anymore, but later I noticed that I have to place the mouse-pointer a good centimeter below anything I want to click, including window close buttons. Restart solved that.

Today while I was doing the screenshots above I dragged a second spell token to the map. When I released the mouse-button all of a sudden *all* tokens and pointers were shifted so far to the upper left that they landed a good way into the black part surrounding the map, viewpoint was also instantly shifted.

I will keep an eye on these.

I am getting something similar. For example, when I drop the rope trick spell token from the players sheet or the assets window it is moving to bottom right of the cursor on the map? In the screenshot I dropped it on the X but it went to where you see it now.

espanRebel
August 27th, 2021, 14:54
Hello I just purchased this extension. After updating I do see the Spell Token window. It may be my lack of computer skills but that is as far a I can go. How do I load the tokens onto the combat tracker for foes/enemies.

bratch9
August 27th, 2021, 18:44
v5.3 is now live, I've moved over to a different non-documented call to add the tokens a slight different way ( The ruleset uses this version now.. ) so maybe this way will help keep them placed in the correct location. ( I've also added snapToGrid on the drop location, so initial drop point will be centre or on a line if snap is enabled etc.. )

done some tidy up to reflect the above change, and fixed an issue for some 'nil' warning console output, and some host/client sync issues with token cached data.

bratch9
August 27th, 2021, 18:57
Hello I just purchased this extension. After updating I do see the Spell Token window. It may be my lack of computer skills but that is as far a I can go. How do I load the tokens onto the combat tracker for foes/enemies.

The extension comes with no tokens, you need to provide your own or grab a free or paid pack...

If you have your own tokens you need to 'add' the settup on the 'spell tokens configuration' window.. Basically with the '+' buttons at the bottom or right click radial to add a new line... set the name to a spell, configure its size per 5 feet for the token you assign at the end, assign an optional 'icon' and a token graphic ( from assets ). If the name matches up (with some extras to cover external mod naming conventions. ) then it should show up on the CT and player character spell lists ( you might need to re-parse the spell on a character sheet or delete-add them back in. )

If you have Gareth Jensen (https://www.dmsguild.com/product/195599/DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21) pack, which is very popular for 5E ruleset... At the top of this thread is a 'spelltokens.xml' file designed for this pack. On the 'spell tokens configuration' screen you should see an blue up-arrow at the bottom of the window that should 'import spell xml file', which you can select with your windows file system to the location you downloaded the 'spelltokens.xml' file.

At this point you should be seeing spell token graphics in the 'spell token configuration' window. ( Many examples are shown in this thread. )

If you have some spell tokens configured, you should be able to use the matching spell on a character ( or if used on the npc in the combat tracker. ), and it should show up the 'icon' to drag onto a map at the right end of the spell line on the character sheet. ( If icons are not configured, the full spell token graphic will be used on the character sheet. )

After the drag onto a map, the system will swap the icon to the real spell token graphic an resize it for the map.

If you still have issues, please post some images of the stages you are at. ( eg, an image of the spell tokens configuration window and a character or combat tracker image ) So we can see what state you are at.

We have seen people with just slight spelling mis-match and other issues.. The first config is the hardest to play with, but I've tried to make it as simple as possible by providing a couple of pre-configured 'xml' files at the top of the thread.

If you get working and you want to add some comments as to what was your issue, maybe I can word the forge page a little to help. ( Its only got a basic forge page, and if you look at the thread I've been doing updates nearly each day to improve and fix and re-stabilise the extension. )

Hope this helps you get going,
-pete

espanRebel
August 27th, 2021, 21:32
Ok I can get it to work in your FGU campaign. When I try one of my own, it does work. I did unload all but your extension. Is there something I missed?

I did not include any images cause I thought I could explain it decent enough😁

bratch9
August 28th, 2021, 12:22
Ok I can get it to work in your FGU campaign. When I try one of my own, it does work. I did unload all but your extension. Is there something I missed?

I did not include any images cause I thought I could explain it decent enough��

Well maybe you should have included some images, because both cases you talk about you say it works. ( I assume your 'does' should have been a 'doesn't' in your own campaign. )

When you included it in your own campaign, do you get the 'spell tokens' button on the host side and does it show configurations for spell tokens ?

On your own campaign, the biggest reason it does not work is normally characters with spell already on the sheet before adding spell tokens extension. To get these working, you can right-click on a spell and use the 'radial button' option to re-parse the character sheet spell. ( If you press shift when you do this it will keep any custom changes to the spell you have made, or keep the custom setting from grim press/rob2e style spells. )

For the items on the combat tracker these just clear the npc's and re-add... or should start when this happens as part of game play. ( As you do not tend to keep npc for ever on the CT )

Hope this gets you going, welcome if you have any usability feedback please let me know.
-pete

nephranka
August 28th, 2021, 12:46
v5.3 is now live, I've moved over to a different non-documented call to add the tokens a slight different way ( The ruleset uses this version now.. ) so maybe this way will help keep them placed in the correct location. ( I've also added snapToGrid on the drop location, so initial drop point will be centre or on a line if snap is enabled etc.. )

done some tidy up to reflect the above change, and fixed an issue for some 'nil' warning console output, and some host/client sync issues with token cached data.

So the changes have it getting closer to the X but still shifting on drop.

Weissrolf
August 28th, 2021, 12:48
Does it make a difference for your shifting experience whether the map is in windowed, desktop or maximized mode when you try to drop a token? Does it make a difference whether the FGU window itself is in maximized or not?

Weissrolf
August 28th, 2021, 12:49
Furthermore, are you sure that your token image is centered correctly? Maybe there are empty parts in the upper left corner? Please click on the token to let us see the token select circle around it.

bratch9
August 28th, 2021, 14:02
So the changes have it getting closer to the X but still shifting on drop.

Still can not replicate this, I've even added the theme to to see if it was an interaction with that. Tried window max and then desktop, and the same sort of zoom offsets you have configured. The spell token looks like the standard gareth rope spell token so if should not have any odd offsets... unless you have hand edited the graphic. ( Are you upto date with the gareth spell tokens pack, just incase he has edited the centre point ? )

As weissrolf says, can you 'select' it so we can see the green highlight around it, which I assume will be just around it and correct as expected and not some 4 square radius circle that shows a sprite offset.

Could you attach a zip of the campaign folder ( or DM me a link to it ), and I'll load it up and see if it gives me the same issue.

have you tried a totally new clean with just spell tokens extension campaign, does it show the same if you do just the basic minimum. ie no modules loaded, just import the spelltokens.xml setup, and open the map and drag on from the spell tokens configuration window...

Is it any different if you use a character sheet as the source for the rope spell ? and it is just an issue on the spell tokens configuration window ?

As I say I can not replicate this, and I've tried from character/config and window/max/desktop and they all drop in the place I expect. ( with/without grid snap enabled. )

The image is from the host side, did you drag on from the host, or did a player drag it on from a client and it was out of sync on the host side ?

Thanks, Pete

nephranka
August 28th, 2021, 14:13
Does it make a difference for your shifting experience whether the map is in windowed, desktop or maximized mode when you try to drop a token? Does it make a difference whether the FGU window itself is in maximized or not?

No diferences.

nephranka
August 28th, 2021, 14:14
Here you go. Token selected.

nephranka
August 28th, 2021, 14:18
Still can not replicate this, I've even added the theme to to see if it was an interaction with that. Tried window max and then desktop, and the same sort of zoom offsets you have configured. The spell token looks like the standard gareth rope spell token so if should not have any odd offsets... unless you have hand edited the graphic. ( Are you upto date with the gareth spell tokens pack, just incase he has edited the centre point ? )

As weissrolf says, can you 'select' it so we can see the green highlight around it, which I assume will be just around it and correct as expected and not some 4 square radius circle that shows a sprite offset.

Could you attach a zip of the campaign folder ( or DM me a link to it ), and I'll load it up and see if it gives me the same issue.

have you tried a totally new clean with just spell tokens extension campaign, does it show the same if you do just the basic minimum. ie no modules loaded, just import the spelltokens.xml setup, and open the map and drag on from the spell tokens configuration window...

Is it any different if you use a character sheet as the source for the rope spell ? and it is just an issue on the spell tokens configuration window ?

As I say I can not replicate this, and I've tried from character/config and window/max/desktop and they all drop in the place I expect. ( with/without grid snap enabled. )

The image is from the host side, did you drag on from the host, or did a player drag it on from a client and it was out of sync on the host side ?

Thanks, Pete

No edits. This is a clean build. No difference if used from a character sheet or assets window. This has been all on the host side. Campaign attached.

nephranka
August 28th, 2021, 14:30
Token version 2.1 and reimported the xml file. Same issue. Tested on windows and linux.

edit: just built a clean campaign and I have the same effect.

bratch9
August 28th, 2021, 15:24
Token version 2.1 and reimported the xml file. Same issue. Tested on windows and linux.

edit: just built a clean campaign and I have the same effect.

In the 'test' branch, I've uploaded v5.3.1 which when you drag a token on to the map, if you hold down 'shift' before the release it should give you some debug like the attached grid.png.

You can see the tests I did, with the initial drop been at the top left (0,0) part of the map. The (-6,4) was the drop point and the gridsnap result was (0,0) and then the token was placed at (0,0), then a test 5 squares to the right. On the 50x50 grid of the map this should give the (250,0) snap position and then I did a test at 250,250.

In each case the cursor drop location is not quite at the point the spell token would snap to, but its in the correct location.

Its not like your example, that looks like the snap is >50+ pixels off from your 'x' marks the drop spot. ( Those images are a long way off just 'gridsnap' adjustment. )

I've had a quick go with your zip files, 'test3.zip' does not have a db.xml file. Did you zip this up while you had FG still open and it had not done the first save of the db file ?

But I did not get any offset like you on the 'testenviro.zip'.

If you can do the same sort of 'placement' tests with 'shift' held during the drop on a map, you should be able to see if your cursor drop and grid locations come out with >50+ offsets to the drop.

Hope this helps us find out what is going off with this offset issue. Its an odd one.

Thanks, Pete

nephranka
August 28th, 2021, 15:45
I might have zipped test3 up while I was running, so that would explain the missing db file. Here is it rezipped.

nephranka
August 28th, 2021, 16:09
Here is the test:

s'onDrop' | #285 | #295 | #290 | #300
tokeninstance = { { container = [email protected] Battle Maps, id = 1, x,y = (290.0, 300.0)} }


I noticed the further I move to the right the bigger the spacing on drop.

1st drop:
s'onDrop' | #200 | #271 | #198 | #276
tokeninstance = { { container = [email protected] Battle Maps, id = 7, x,y = (198.0, 276.0)} }

2nd drop more to the right on the map:
s'onDrop' | #1028 | #371 | #1023 | #376
tokeninstance = { { container = [email protected] Battle Maps, id = 10, x,y = (1023.0, 376.0)} }

nephranka
August 28th, 2021, 16:18
I do notice that if I take an asset and drop it directly on the map it drops where I click (the X). This shifting seems to be happening when I take the asset from the spell token configurations windows and drop them on the map.

bratch9
August 28th, 2021, 17:20
Here is the test:

s'onDrop' | #285 | #295 | #290 | #300
tokeninstance = { { container = [email protected] Battle Maps, id = 1, x,y = (290.0, 300.0)} }


I noticed the further I move to the right the bigger the spacing on drop.

1st drop:
s'onDrop' | #200 | #271 | #198 | #276
tokeninstance = { { container = [email protected] Battle Maps, id = 7, x,y = (198.0, 276.0)} }

2nd drop more to the right on the map:
s'onDrop' | #1028 | #371 | #1023 | #376
tokeninstance = { { container = [email protected] Battle Maps, id = 10, x,y = (1023.0, 376.0)} }

those numbers look ok to me, its not as if you dropped at #1028 and it placed it at #1200 on the 'x' type thing.

I'm just not sure if I 'show' they are in reasonable locations, when they turn up on the map at not the expected position just what I can do to fix that. Since most people do not get this it must be something odd with your configuration.

Do you dual boot to linux/windows on this machine, or are they different machines ? ( As you said you have the same issue on windows/linux if I recall. )

I only run in windows, it could be a dual boot type issues. But if the 'normal' asset drag ends up in the correct location, I just dont know.

Let me think about it, and have a play with your zipped campaign files.. See if I can spot anything with a manual look at the xml files they hold.

Thanks, Pete

nephranka
August 28th, 2021, 20:21
those numbers look ok to me, its not as if you dropped at #1028 and it placed it at #1200 on the 'x' type thing.

I'm just not sure if I 'show' they are in reasonable locations, when they turn up on the map at not the expected position just what I can do to fix that. Since most people do not get this it must be something odd with your configuration.

Do you dual boot to linux/windows on this machine, or are they different machines ? ( As you said you have the same issue on windows/linux if I recall. )

I only run in windows, it could be a dual boot type issues. But if the 'normal' asset drag ends up in the correct location, I just dont know.

Let me think about it, and have a play with your zipped campaign files.. See if I can spot anything with a manual look at the xml files they hold.

Thanks, Pete

I do dual boot but they have their own source files. Additionally, since it is behaving as you expect for token placement for all other interactions that rules out FG code is making a mistake.

Also, this did not always do this. So I went back to v3.9.8 and tested it. It did do it there as well. So now I am starting to fall into the camp that something has changed with FG core (recent update) and not with this ext. Or at the very least, something you are doing in the placement of the token now has a unexpected result from a change made by FG. Since I can move it around on the map as normal, this is isolated to the initial drop on the map. It happens on host and client.


Edit:
The strangeness of the more right I drop a token the more shifting happens...implies that it thinks my cursor is where it does drop the token and the difference in the position is changing based on where I have moved on the map.

Ckorik
August 28th, 2021, 20:42
The spell effect token mod from dms guild is setup to only allow 5e - you have to go into the mod and add the ruleset you need - this was an issue for me

nephranka
August 28th, 2021, 20:43
Another test:

I dropped a token starting in the upper left corner. It work! Then I dropped one on the right of the 1st one and it shifted a little. Then I dropped another one next to the 2nd and the shift was greater. The last one was dropped next to the 3rd. The 4th had even more shifting. Same thing happens in the vertical.

nephranka
August 28th, 2021, 20:44
The spell effect token mod from dms guild is setup to only allow 5e - you have to go into the mod and add the ruleset you need - this was an issue for me

Thanks but I am 5e.

bratch9
August 28th, 2021, 22:44
The spell effect token mod from dms guild is setup to only allow 5e - you have to go into the mod and add the ruleset you need - this was an issue for me

both the forge and dmsguild version now have the extra rulesets supported by default. ( I changed this once dmsguild removed spell tokens from sale, so I was allowed to have it support multiple rulesets. Which was not the case before because WotC only wanted 5e to be supported. )

bratch9
August 28th, 2021, 22:45
Another test:

I dropped a token starting in the upper left corner. It work! Then I dropped one on the right of the 1st one and it shifted a little. Then I dropped another one next to the 2nd and the shift was greater. The last one was dropped next to the 3rd. The 4th had even more shifting. Same thing happens in the vertical.

This is very odd, I'll try to replicate with multiple tokens in different locations as you have done.

espanRebel
August 29th, 2021, 03:30
Got the tokens to load onto the combat tracker, yea. My next question, do your tokens target tokens and what do you set pixels to?

Ckorik
August 29th, 2021, 03:33
both the forge and dmsguild version now have the extra rulesets supported by default. ( I changed this once dmsguild removed spell tokens from sale, so I was allowed to have it support multiple rulesets. Which was not the case before because WotC only wanted 5e to be supported. )


To be clear - it wasn't your mod that was the issue - the actual spell tokens - that was the issue - I bought the 5e spell tokens like two years ago - but with your mod and wanting to use this in pfrpg and pf2 for the players (you rock btw) - I went and downloaded the newest spell token files today - there is a mod within that download to put the tokens into unity - the problem is that mod is 5e only - Unity doesn't let you load tokens for a non-valid rule set it just loads anything compatible at startup.

I had to modify *that mod* to work - mostly because your xml assumes the tokens are in the default location - which they are not unless you load the mod.

Hopefully that makes sense.

The file specifically I had to alter was 769337-SPELL_TOKENS_2.1.mod

bratch9
August 29th, 2021, 12:30
To be clear - it wasn't your mod that was the issue - the actual spell tokens - that was the issue - I bought the 5e spell tokens like two years ago - but with your mod and wanting to use this in pfrpg and pf2 for the players (you rock btw) - I went and downloaded the newest spell token files today - there is a mod within that download to put the tokens into unity - the problem is that mod is 5e only - Unity doesn't let you load tokens for a non-valid rule set it just loads anything compatible at startup.

I had to modify *that mod* to work - mostly because your xml assumes the tokens are in the default location - which they are not unless you load the mod.

Hopefully that makes sense.

The file specifically I had to alter was 769337-SPELL_TOKENS_2.1.mod

Yep, I normally just use 7zip to open the 2.1.mod file. basically right click the mod with 7zip and 'open archive' then right click and select 'edit' on the 'definition.xml', when notepad opens with the file, change '<ruleset>Any</ruleset>', close notepad and 7zip will the re-write the 2.1.mod file... load in any ruleset, and link using the spelltokens.xml in the import on the config file.

Just leaving this, for others if they do not know how to change this.

bratch9
August 29th, 2021, 12:37
Got the tokens to load onto the combat tracker, yea. My next question, do your tokens target tokens and what do you set pixels to?

On the spell tokens configuration window, the 'pixel per 5 Unity', for 5e will be considered as the number of pixel you have used in the spell token graphic assigned per 5ft on the map.

So if you have a 10ft radius effect, and you have a 200x200 pixel graphic file assigned as the spell token. The 10ft radius has a 20ft diameter across the spell token, this is 4x 5ft unit squares on the map. So you set 200/4=50 'pixels per 5 unit'

Does that make sense ?

Normally if you download a pack of tokens it will tell you the number of pixels used per square, or have the effect radius in the filename or you just have to look up the spell effect to see what its size is, then maybe have a look at the pixel resolution of the spell token to work out just how many pixels should be used to cover one 5ftx5ft square in 5e. ( Or other ruleset. )

NOTE. for 4e you still set this us as per 5e ruleset of 'pixels per 5ft', and the system detects you are on 4e and corrects for the fact that ruleset uses '1 unit' distance per square.

bratch9
August 29th, 2021, 12:39
Got the tokens to load onto the combat tracker, yea. My next question, do your tokens target tokens and what do you set pixels to?

At the moment, the spell tokens extension does not target. My plan is to allow 'shift or ctrl' (not decided yet) to be pressed while the drag is going on, and then this button press will assign tokens under the spell to the target of the owner (n)pc. ( if its know. )

hrscarvalho
August 30th, 2021, 01:19
hi guys! i really need some help here! I bougth the extension months ago, but now i'm realy trying to use it. I have made the configuration for the spells, put the spells on the character sheet, but when i try to put the token on the map, nothing happen :(

Anyone knows the reason to this?

ps. i have the version on the DMsGuild, but I got the new version on the Forge. 48931

nephranka
August 30th, 2021, 02:03
This is very odd, I'll try to replicate with multiple tokens in different locations as you have done.

So tonight all my players had the same effect. Shift on placement. The use a mix of Linux and windows machines so this is not a dual boot or Linux only issue.

anathemort
August 30th, 2021, 06:09
hi guys! i really need some help here! I bougth the extension months ago, but now i'm realy trying to use it. I have made the configuration for the spells, put the spells on the character sheet, but when i try to put the token on the map, nothing happen :(

Anyone knows the reason to this?

ps. i have the version on the DMsGuild, but I got the new version on the Forge. 48931

You could try right-clicking the spell, then holding Shift while you click "reparse" in the lower right. That fixed this issue for me from the update last week.

bratch9
August 30th, 2021, 11:37
hi guys! i really need some help here! I bougth the extension months ago, but now i'm realy trying to use it. I have made the configuration for the spells, put the spells on the character sheet, but when i try to put the token on the map, nothing happen :(

Anyone knows the reason to this?

ps. i have the version on the DMsGuild, but I got the new version on the Forge. 48931

As 'anathemort' suggests try doing the reparse with shift held. ( Or test via deleting and re-add a spell ) The data 'held' on the character sheet is very different between the DMSGuild and the forge version. ( The forge version data has changes a couple of times over the last week or so, causing extra re-parse requirement of the spells. )

Also at the moment 'aura' type spells do now function on the forge version, they will be back, but due to a rewrite of how spell tokens are processed with 'hit box area/shapes' I had to focus on getting this back up and working and stable. So some features were not implemented in the change.

As you can see on the current thread, some 'placement' offsets are still happening with 'nephranka' and his game(s), which has not been tracked down yet.

Hope this helps getting things working for you.

bratch9
August 30th, 2021, 11:41
So tonight all my players had the same effect. Shift on placement. The use a mix of Linux and windows machines so this is not a dual boot or Linux only issue.

I'm guessing you are the host of this game ?

Spell tokens can not be added by non-host users, so if your machine has an issues every game you host will show the same issue for all users.

When a player drags out a spell token off the character sheet, it sends a message to the host, and the host adds the spell token. So client machines have zero influence on initial placement. If you have an issue on local games, all games you host will have the same issues for you and all players.

We do need to try and figure out why your machine has this issue.

Are you ok with running a couple more test builds with some extra debug outputs and providing the output into the thread ?

Thanks, Pete

nephranka
August 30th, 2021, 12:51
I see now. Yes, I would more than happy to run and post some tests.

bratch9
August 30th, 2021, 16:06
I see now. Yes, I would more than happy to run and post some tests.

I have managed to replicate and debug this to a level.. It can get a random 1.5 scale factor, which I just dont know how to get or what its related to, but it seems consistent. I need to do more checks.

It was doing this issue on my dev machine, which I'm back working on now, was away for some days last week using a spare machine. ( So maybe the spare machine was not fully updates, not sure when the 4.1.5 release was made, but I'm sure I had 4.1.5 on my dev machine before I left and it was not showing the issue. ) And I could not replicate it on the spare machine at the time late last week.

Anyway its got a random 1.5 factor scale now which seems to be working, but the 4.1.5 has also broken the non-hightlight drag of the spell tokens, so I'm doing some tests on that now.

-pete

bratch9
August 30th, 2021, 17:18
I see now. Yes, I would more than happy to run and post some tests.

v5.4 is now released, if you would like to give that a go. It on the 'live' branch, I've removed the test one off the 'test' branch.

This should resolve the placement offset, and tidy up a database issues that was been reported on a '\reload'

nephranka
August 30th, 2021, 21:14
v5.4 is now released, if you would like to give that a go. It on the 'live' branch, I've removed the test one off the 'test' branch.

This should resolve the placement offset, and tidy up a database issues that was been reported on a '\reload'

Tried v5.4 same issues nothing changed.

bratch9
August 30th, 2021, 21:19
Tried v5.4 same issues nothing changed.

Not sure how that is the case, is it better or worse now... As I've scaled the drop position by a factor... so in no way should it be the same ? ( it might not be correct, but is it different ?)

bratch9
August 30th, 2021, 21:30
v5.5 added basic aura mode back, if you drop a spell token onto a non spell token they get linked together when you move the non spell token.

( You can drag the spell token away, but if you move the linked non spell token it will try and jump the linked spell token back to the position of the non spell token. )

bratch9
August 30th, 2021, 21:56
v5.6 now does aura rotate and scale of the linked spell token when you scale/rotate the non spell token.

bratch9
August 30th, 2021, 21:57
Tried v5.4 same issues nothing changed.

Just try setting your ui scale factor to 150, and let me know if this is now correct.

I have a thread on the house of healing about this...

Just been playing with my ui scaling and it changes the factor needed... since I run on 150 most of the time, that is the 1.5 factor.

( Looking like a FG bug to me.. )

nephranka
August 30th, 2021, 22:00
So, I did not really focus when I tested it. I noted it still shifted. I will back and tested it again with an eye to the detail this time. You are correct...it is more of a shift. I dropped in on the X. New behavior now. AS I darg a token around on the map it gets ahead of the pointer the more I move to the right. Like it is under some other control scaling my movement.

nephranka
August 30th, 2021, 22:04
Just try setting your ui scale factor to 150, and let me know if this is now correct.

I have a thread on the house of healing about this...

Just been playing with my ui scaling and it changes the factor needed... since I run on 150 most of the time, that is the 1.5 factor.

( Looking like a FG bug to me.. )

Wow! That did it. UI 150 works fine. My ui is 75 normally.

bratch9
August 30th, 2021, 22:05
So, I did not really focus when I tested it. I noted it still shifted. I will back and tested it again with an eye to the detail this time. You are correct...it is more of a shift. I dropped in on the X. New behavior now. AS I darg a token around on the map it gets ahead of the pointer the more I move to the right. Like it is under some other control scaling my movement.

Did you check this with the /scaleui 150 command.. ( As a question what do you normally use for /scaleui value. )

nephranka
August 30th, 2021, 22:06
v5.6 now does aura rotate and scale of the linked spell token when you scale/rotate the non spell token.

Aura is working as expected!

bratch9
August 30th, 2021, 22:08
Wow! That did it. UI 150 works fine. My ui is 75 normally.

Yep, its some major translation factor issue that has creeped into the layer system with the latest build.

I've just been looking to see if I can 'get' the value of the ui scale.. but no function are available at the lua side.

I've updated my thread post about it.. this thread (https://www.fantasygrounds.com/forums/showthread.php?70324-4-1-5-image-onDrop-x-y-to-Token-addToken-x-y-draw-location-miss-match)

I'll probably look to add a number option in the morning to allow people to set it, until its fixed in FGU.

This was such an 'odd' one to track down !!

nephranka
August 30th, 2021, 22:22
Thanks for the help. I am hopeful they will fix it.

bratch9
August 31st, 2021, 14:32
v5.7 released, this adds a 'client' option to select the scale factor to match up with the games scaleui that has been set. Will be required while FG dev fix a missing math/ui scale interaction.

option has 50->200 options in 25 unit increments.

Please use this on host/clients to set to have the player match up the current game scaleui they are using with this option, then spell token drop/drag should stay in relative locations.

Let me know if you find any cases this does not happen.

nephranka
September 1st, 2021, 00:19
v5.7 released, this adds a 'client' option to select the scale factor to match up with the games scaleui that has been set. Will be required while FG dev fix a missing math/ui scale interaction.

option has 50->200 options in 25 unit increments.

Please use this on host/clients to set to have the player match up the current game scaleui they are using with this option, then spell token drop/drag should stay in relative locations.

Let me know if you find any cases this does not happen.

Working perfectly! This is a good patch while we wait for the fix. Thank you.

bratch9
September 1st, 2021, 22:12
v5.8 some fixed for some edge cases, like delete linked spell token aura when you delete the player, etc. Added radial menu 'target' button, as its the radial menu its subject to the random layer order FG decides to pick if you have overlapping spell tokens.

At the moment it does not decide on 'foe', so it will target anything.. and it assumes a fixed radius of 3 grid square distance.

If you have any feedback or spot any cases that need sorting please let me know.

I'll be looking into 'foe' and the correct spell shape for selection tomorrow.

nephranka
September 2nd, 2021, 00:01
v5.8 some fixed for some edge cases, like delete linked spell token aura when you delete the player, etc. Added radial menu 'target' button, as its the radial menu its subject to the random layer order FG decides to pick if you have overlapping spell tokens.

At the moment it does not decide on 'foe', so it will target anything.. and it assumes a fixed radius of 3 grid square distance.

If you have any feedback or spot any cases that need sorting please let me know.

I'll be looking into 'foe' and the correct spell shape for selection tomorrow.

First test cases look good. Working well. I did not this is not on the GM side as it did not work in that case but working great on the player side.

bratch9
September 2nd, 2021, 14:09
First test cases look good. Working well. I did not this is not on the GM side as it did not work in that case but working great on the player side.

Which ruleset were you in ?

At the moment I'm only testing 5e, so it might have issues on others. But my test "giant spider" web spell token was working on for me on the gm side.

nephranka
September 2nd, 2021, 14:43
Which ruleset were you in ?

At the moment I'm only testing 5e, so it might have issues on others. But my test "giant spider" web spell token was working on for me on the gm side.

5e. I tried dropping on from the assets window and then targeting. I see now I might need to bring it from the NPC. I thought the CT current player would pick up the source.

bratch9
September 2nd, 2021, 15:43
5e. I tried dropping on from the assets window and then targeting. I see now I might need to bring it from the NPC. I thought the CT current player would pick up the source.

Yep, I'm just sorting the spell token config window drop, which creates a non-known (GM) token. For this it will look at the 'active' CT to apply the target selection to.

bratch9
September 2nd, 2021, 17:36
v5.9, target selection should be from the 'tool tip' spell token, so if they overlap the tracking should keep the specific spell token active until you move off it to a new spell token. ( Also due to this if you have a round spell token, while FG thinks its square so will show the radial to select the 'target' if you are off the round token but in the empty space of the square, the 'target' action is skipped because you were not on a spell token.. )

adjusted when a 'linked' spell token can move, so if a player links a spell token onto an npc the player can not move the spell token/npc... and if an npc links a token onto a player then the player moves the spell token also moves.

added ability to hold 'shift' down when dropping a spell token, so that it will never 'link'. for the times when you want to 'center' a spell token onto an npc but dont want to 'link' it to that npc.

fixed up so that when a spell token is dragged from the spell tokens configuration window onto a map, and it becomes a (GM) type spell token, when you 'target' with this the active CT gets the targets. ( Added error messages for things like 'not on same map' or 'not in CT anymore' etc. )

NOTE.... at the moment the 'spell token drag a linked (n)pc drag' is processed on the 'host' machine, so you need the host to have the map open. ( I'm waiting for the '[DEV] Token onDrag event was not triggering. Fixed.' to come down to the release before I can probably remove this requirement. )

bratch9
September 2nd, 2021, 22:19
v5.95, adjusted when 'target' option radial is made available. ( Some cases were different between drag on, and map close/open and next reload.. )
Adjusted movement to add extra tracking data during drag, which allows spell tokens/token dragging without the need to have the map open on the host.

nephranka
September 3rd, 2021, 00:27
Initial tests are looking good. GM dropped tokens are working with targeting and dragging is working good. I will keep testing. Thank you for the work to get it to this point!

bratch9
September 3rd, 2021, 18:05
v6.0 now has spell shape selection and checks for foe status.

Weissrolf
September 3rd, 2021, 19:27
Bravo. Hoping for this since the first time I found spell tokens (and bought a similar extension on DMS). Thanks a lot, great show! :)

SirMotte
September 3rd, 2021, 19:32
This just keeps getting better and better. Thanks mate, great work!

Weissrolf
September 3rd, 2021, 19:36
That being said, the shape unfortunately does not match Pathfinder shapes, so it's not as useful to us as I hoped it would be. But even in DnD 5e only those square should count as target that are covered more than half by a circle.

Currently just a tiny portion covering a foe seems to count as being in target. I recognize that this is more abot FG shapes than your extension, though.

Here is an example:
https://i.imgur.com/dlo4g1G.png

PF2 burst shape as white lines for comparison:
https://i.imgur.com/YMhTx4J.png

bratch9
September 3rd, 2021, 20:57
That being said, the shape unfortunately does not match Pathfinder shapes, so it's not as useful to us as I hoped it would be. But even in DnD 5e only those square should count as target that are covered more than half by a circle.

Currently just a tiny portion covering a foe seems to count as being in target. I recognize that this is more abot FG shapes than your extension, though.

Here is an example:
https://i.imgur.com/dlo4g1G.png

PF2 burst shape as white lines for comparison:
https://i.imgur.com/YMhTx4J.png

Well it process by a number of sample points against the shape. I can have it include the edge of the (n)pc size token which will do the then you shown.. or I can have it sample one half square in from the edge. But if you do that you can get 'chunks' of the (n)pc very clearly into the spell token shape.. and people will just say it should get hit by that. ( I'll never win, but I might add an 'option' to enable it. )

The DnD side to 'squares', is do you count fireball radius as a 'square' or a 'circle', because depending on if you count diagonals as 5ft or use the alternative 5ft/10ft cost it changes the shape of these things.

Its mainly a total mess, and since the most popular spell token pack uses round, that is what I've set up.

Basically the spell token shape is 'edge exclusive' ( ie.. I check for < r and not <= r for a circle. ), then that makes the (n)pc tokens should be 'edge inclusive' to match up. Basically a fireball will not 'hit' a (n)pc token that is just on its radius. But due to how the grid works you do get these cases that the corner is clearly in the radius so should be selected, when not considering the grid so should not.

I could make the spell token shape 'edge inclusive' and then using an inclusive but half grid in area on the (n)pc which might work out better.

Or If we had proper 'draw' ability, we could 'cast' the shape into the correct grid squares centres and mark it... But then you would need masses of different spell tokens to cope with the different shapes that the detection would need.

At the end of the day we have limited ability to do things.

I can make the detection more 'square', but it would require me simulating out the shape and detecting a pixel grid for the squares and then cross bit map checking that with other hit boxes.. and lua is just rubbish at that sort of stuff.. ( I'm already surprised that the amount I have to calculate to make this work is not been flagged as slowing down the games. )

The reality is it's going to be a compromise, with the limited access to do things and no access to the line of sight data. To do a proper job requires it to be done at the developer side.

All we can hope to do is the best job, make it clear that the silly GM spell template management method is not suitable, and try and get them to do the correct job with full masking support etc.

Or you could just reduce the spell token size with a slight increase on the 'per 5ft' to pull the radius in a little as a compromise.

bratch9
September 4th, 2021, 14:05
I made some performance tests generating a pixel grid lookup for spell tokens to then use to check target selection form.

On a 200x200 ft spell token ( 40x40 grid squares ), it takes about 30 ms to generate the lookup table grid array.

I suspect the time to call the 'select' token function and the network packets to reflect selection changes around the clients/host, that the network ping/delay will be larger than the 30ms code.

I was expecting the lua to me much slower, in the half second cost level, which you might have noticed. But I'm glad the lua is quick or is JIT compiled to be quick.

-pete

bratch9
September 4th, 2021, 14:13
That being said, the shape unfortunately does not match Pathfinder shapes, so it's not as useful to us as I hoped it would be. But even in DnD 5e only those square should count as target that are covered more than half by a circle.

Currently just a tiny portion covering a foe seems to count as being in target. I recognize that this is more abot FG shapes than your extension, though.

Here is an example:
https://i.imgur.com/dlo4g1G.png

PF2 burst shape as white lines for comparison:
https://i.imgur.com/YMhTx4J.png

My pixel grid tests, allow me to configure the 'per 5ft' of a fireball spell token to generate the PF2 burst square grid selection.. Using a pixel grid sample method. It might not work for all cones/lines as I did not check these.

But I'd probably need to include an extra 'collision per 5ft' in the spell token configuration, so you can mark the graphics side correct and tweak the collision sample side to get the required results.

For the 5e fireball 70 pixel per 5ft spell token at 20ft radius...

setting it to 50 pixels per 5ft got a matching square selection for 30ft burst centred on a gird cross point.
setting it to 74 pixels per 5ft got a matching square selection for 20ft burst centred on a gird cross point.
setting it to 98 pixels per 5ft got a matching square selection for 15ft burst centred on a gird cross point.
setting it to 140 pixels per 5ft got a matching square selection for 10ft burst centred on a gird cross point.
setting it to 280 pixels per 5ft got a matching square selection for 5ft burst centred on a gird cross point.

On the graphic side, these looked a little 'small', as in the 30ft burst look a more like a 26ft spell token... hence the suggestion I might add a collision per 5ft. So 70/74 per 5ft for graphics/collision to get the 20ft burst square selection.

(NOTE: these settings might work of for the current non pixel grid version, as long as you have the spell token on the cross point.. )

Weissrolf
September 4th, 2021, 14:48
Looking forward to test these. ;)

By the way, no JIT compiler in Lua 5.1 and the third party 5.1 JIT compiler developed by a third party does not seem to be compatible with FG. Lua 5.4 promises performance improvements, but again, not compatible with FG.

bratch9
September 4th, 2021, 16:45
Looking forward to test these. ;)

By the way, no JIT compiler in Lua 5.1 and the third party 5.1 JIT compiler developed by a third party does not seem to be compatible with FG. Lua 5.4 promises performance improvements, but again, not compatible with FG.

I'm not sure what is in the actual compiled lua 5.1 dll provided with FGU, I did not do checks to see if its a standard or custom lua language build. ( And if things are not compatible, then maybe they have some custom changes that they make use of. Which might delay them upgrading to newer lua versions. )

The performance was quicker than I was expecting, considering how 'slow' lots of things in FGU are from a user point of view. Just the pure lag of opening a character power page with list of spells gets super slow even with a hand full of spell.

I do pre-transform grid point and direction vectors into the spell token space, so I dont have to keep doing sin/cos rotation code, so pre-doing some work probably helped keep the main math work in faster linear math space. ( Probably introduces a small amount of math rounding errors that get larger with token size. )

But I was impressed with the lua performance of this code, even more if its not getting into a JIT, but I guess the math cos/sin function drop out of lua to do that work. So it probably has some pure hardware performance for things that might take a bit of time.


On a performance note in general, ( I know talking into the wind with this sort of stuff... )

I do see some performance issues in FGU to do with importing the spell tokens xml file, which on the host gets one call back caused by the database changes when it caches the spell token database into a lua table for quick access. On the client they get hundreds of refresh callbacks, as each database line arrives over the network, causing many database update/create callbacks into the spell token refresh cache table code. Which is getting bigger as it gets each part of the list. So will be re-doing more and more work each refresh. But I dont see a way around this.

But these sorts of callbacks happen in a lot of locations, I've seen many update callbacks going off with my other spell damage extension when it makes updates into the power part of the character sheet. It does way more that a quick single refresh as the system re-draws and updates the power structure and window layout.

Maybe these sorts of things will get looked at by the dev team at some point, because the lua seems quick, but the layout of a new window can lag a lot. ( I know its got text characters to render and cache into texture atlas to build up string layouts and sizes that can push window layout around while it does all that initial work. ) But web browsers do a lot of this and they never seem to lag for seconds when doing layout.

FG could feel so much better with some of these issues resolved, when you open a new window on a client and it requests it from the host and stalls all the connected clients.. Even more so when a player logs in and joins. Just a few quality of life bits would make the user experience so much better.

Weissrolf
September 4th, 2021, 17:45
From a users' point of view it is hard to tell whether the most glaring performance issues are Lua based or just bad coding. I always like to point to the nearly game-breaking performance dip when PF2's Feats by Trait list is opened (or worse: moved). It's just a sorted list of text in a window, Windows 3.11 on a DX286 could handle that nearly 28 years back (Excel was a different beast, though).

Unfortunately we cannot just throw money at the problem, because on top of being single-threaded FGU's Lua (same with WoW's) does not seem to benefit from higher CPU IPC or cache sizes. Loading a campaign takes about the same time on my 5900X as on my 9900K. Some benchmarks out there seem to suggest that this is a general limit of Lua, clock-rates are king.

bratch9
September 4th, 2021, 18:35
From a users' point of view it is hard to tell whether the most glaring performance issues are Lua based or just bad coding. I always like to point to the nearly game-breaking performance dip when PF2's Feats by Trait list is opened (or worse: moved). It's just a sorted list of text in a window, Windows 3.11 on a DX286 could handle that nearly 18 years back (Excel was a different beast, though).

Unfortunately we cannot just throw money at the problem, because on top of being single-threaded FGU's Lua (same with WoW's) does not seem to benefit from higher CPU IPC or cache sizes. Loading a campaign takes about the same time on my 5900X as on my 9900K. Some benchmarks out there seem to suggest that this is a general limit of Lua, clock-rates are king.

Yep the single thread is a pain, loading a campaign takes for ever.

If you look at the pure time to load the some thing like the players handbook.. You will find i takes about double the time on FGU as it does on FGC. The performance has gone backwards with the new version.

bratch9
September 10th, 2021, 18:44
is it me, or does the 4.1.6 build now place token in a near but still not correct location ? ( Even with my ui scale set to 100, as this should be sorted now, it seems off... maybe the grid offset it not been taken into account. )

-pete

bratch9
September 10th, 2021, 19:32
v6.2 Adjusted code for changes in release 4.1.6, added usage of 'Interface.getUIScale()' to get the UI scale factor and removed the temp option that was used to control this previously.

nephranka
September 10th, 2021, 22:19
v6.2 Adjusted code for changes in release 4.1.6, added usage of 'Interface.getUIScale()' to get the UI scale factor and removed the temp option that was used to control this previously.

I was thinking this would be something you might do. I will giving it a test tomorrow and will let you know. Thanks!

bratch9
September 15th, 2021, 19:31
v6.3 updated, Now has an 'option' to select between using 'geometry' and 'pixel' map for hit tests. The 'geometry' mode has 'inclusive/exclusive' of (n)pc token edge. The 'pixel' mode has options to run the pixel generation based of 'full squares' or 'half squares' ( double resolution. ). (n)pc tokens are always processed in half square, so 4 samples on a 1x1 normal token. This allows for the likes of cloud of daggers to be placed on a grid cross or an (n)pc been on the grid cross, instead of on a full square.

Also added, a 'collision' percentage value. This allow you to configure a spell token, and have the collision part be say 90% of the spell token, this allows you to tune the geometry/pixel grid sample points.

Note, in the 'pixel' mode, holding 'control' down when you target select will dump out the pixel grid. ( So you can fine tune the selection. )

Weissrolf
September 16th, 2021, 11:03
Good work!

Exclusive geometry mode, 95%, 20" PF2 template, centered on grid intersection:

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

Admittedly I do not understand what pixel mode does. ;)

Would it be possible to include options for targeting friends/all? Maybe by holding a modifier key while clicking the target button (CTRL, SHIFT)?

nephranka
September 16th, 2021, 11:46
Working good. Great work!

Topdecker
September 18th, 2021, 15:55
I am about half-way through the process of adding images to a lengthy list of spells. It just now occurred to me that I really don't want to do this again for other 5e campaigns and having portable data would be beyond nice.

How do I export my 'Spell Tokens Configuration' data?

EDIT: This would also help with providing images and a config xml file.

Thanks!

Top

bratch9
September 19th, 2021, 11:17
I am about half-way through the process of adding images to a lengthy list of spells. It just now occurred to me that I really don't want to do this again for other 5e campaigns and having portable data would be beyond nice.

How do I export my 'Spell Tokens Configuration' data?

EDIT: This would also help with providing images and a config xml file.

Thanks!

Top

Hi Top,

( Not sure on your 'edit' section... is that a request for me to add some images on how to create a config file ? )

If you are just using the setting on your own campaigns, the simplest way is to open the db.xml file and copy the <spelltokens> ... </spelltokens> section into the other campaign files.

If you want to do it a bit more 'formal', then if you look at 'spelltokens.xml', then you could create a file like that. Basically create a new file and copy in the '<spelltokens> ... </spelltokens>' into that file, and rename the '<spelltokens> ... </spelltokens>' to <root> .. </root> tags and add the '<?xml version="1.0" encoding="iso-8859-1"?>' line to the top of the file. You can then just 'import' that file into the new campaigns.

But be aware that a file created like this will have the default un-names ID for the list. This looks like <id-00001> .. </id-00001>, with the number incrementing as you added the values. If you import a file with these types of ID then your data will 'merge' on import with the values already used in the campaign and might conflict.

To stop this a quick search and replace of say 'id-00' to say 'pack-' with 'pack' been anything you want to call your set, would remove the conflicts on import.

If you want to go further, you could rename your <id-00001> .. </id-00001> (could be any number) version of the spell say 'Alarm' to use the 'Alarm' name like in the spelltoken.xml file. So that you only end up with one 'Alarm' in the spell configuration.

If you have 2 spell tokens with the same 'name', if I recall I dont have the code in front of me, then only the first version of that 'name' will ever be found. ( And it could be a bit random on how the import merged to which might end up first in the list. )

At some point I'll add and export button, but again this will not be able to resolve the conflicts as the export ID will be of the type stored. Either from the import of a config file or in the form <id-00001> .. </id-00001> if you added extra. So you would still have to hand edit the exported file to 'tidy' up the names to remove possible conflicts.

Hope this helps, I'll try and add some images to this post when I have more time. ( Probably monday. )

-pete

Topdecker
September 19th, 2021, 16:40
Sorry that my edit was unclear... I am saying that it would help content creators (people that might make the effect images) provide both images and a configuration for them. But exporting as a module might be cleaner / easier.

Top

bratch9
September 19th, 2021, 18:33
Sorry that my edit was unclear... I am saying that it would help content creators (people that might make the effect images) provide both images and a configuration for them. But exporting as a module might be cleaner / easier.

Top

At the moment putting the spell token config into a graphics token module would not be picked up, and the way modules are hosted it would end up as a loose file along side the graphic module.

I could look into a 'onload' for a module and do a check to see if it has a db.xml file that holds a <spelltoken> section and load it.

But in general the 'graphics' modules normally just have the graphics and a definition file to make these load. And I dont think that is suitable to get a module load event. I think it needs a db.xml or client.xml to cause that. But I could probably setup an export button/window that might allow you to define the name you want to export to and have this re-name all the defined <id-00000> items with a prefix for this.

I'll think about it, as it would be nice to allow creators to output the config along with the graphics..

Weissrolf
September 20th, 2021, 22:19
Unfortunately I had to disable the extension today, because I got lots of these:

[ERROR] Script execution error: [string "scripts/image_B9ST.lua"]:184: attempt to call field 'getUIScale' (a nil value)

bratch9
September 20th, 2021, 23:13
Unfortunately I had to disable the extension today, because I got lots of these:

[ERROR] Script execution error: [string "scripts/image_B9ST.lua"]:184: attempt to call field 'getUIScale' (a nil value)

Thats the new FG dev 'Interface.getUIScale()' from version 4.1.6, are you using a 'dev' channel build that does not have this, or a previous build in your settings ? ( in the settings ? ( opens FG update Engine.. ) then the 'advanced' tab and the 'build channel' ? )

It all seems to be working for me in 4.1.7 without spamming errors.

maybe the release notes, "[DEV] Added Interface.getUIScale function.", while it was working, and still seems to be working, actually maybe we have to wait for it to be released properly ?

Are you looking a maybe a 'maximised' and then 'maximised to desktop' type image ? Doing something like that ?

This is very odd,

-pete

Weissrolf
September 20th, 2021, 23:17
I am using Live build 4.1.5. Due to testing various antivirus software I am using restore points to get back to old Windows states, maybe that confused FGU?

bratch9
September 20th, 2021, 23:20
I am using Live build 4.1.5. Due to testing various antivirus software I am using restore points to get back to old Windows states, maybe that confused FGU?

Nope the 'Interface.getUIScale' was added in build 4.1.6 by moon wizard, and so the code assumes this exists now. ( As the 4.1.5 has the position scalling issues as well. )

You would need an older version of spelltokens to match that version of 4.1.5.

On the dev channel you can only get back to previous which is 4.1.6 which is compatible.

But using an old restore point to an old 4.1.5 version will break it like that.

-pete

nephranka
September 20th, 2021, 23:28
So far the extension is working good for my group. The one request would be if there is a way to select targeting (by radial menu) that lets you choose different factions (hostile, neutral, friendly, all)?

Thanks!

Weissrolf
September 20th, 2021, 23:32
I had to specifically switch to DEV and then back to LIVE to get my version up to 4.1.7, switching to TEST and then LIVE did not do the trick and just running Update in the LIVE channel did not work either. No idea why FGU didn't correct this on its own, but now I am back to the correct version it seems.

arcanjl
October 9th, 2021, 23:02
Wasn't there a mod, or an ext that placed all the spells (from "5e Spell Tokens") in the extension? I had it at one time but had to rebuild and can't find it now.

bratch9
October 10th, 2021, 15:36
Wasn't there a mod, or an ext that placed all the spells (from "5e Spell Tokens") in the extension? I had it at one time but had to rebuild and can't find it now.

You are thinking about the 'spelltokens.xml' attached at the start of this thread. You need to go into the 'spell tokens configuration' window and use the 'import xml' button.

Hope this helps you setup the configuration.

-pete


( Obviously you still need to have the mod with the 5e graphics to go with this file from Gareth Jensen. )

arcanjl
October 10th, 2021, 23:58
I did that, I didn't have the right mod loaded :o

But with your suggestion, I figured it out! Thanks :)

Maldev
October 11th, 2021, 10:55
G'day there. I have got the extension and it has been working well! Thanks a bunch.
How do I save/export it so I can use the saved Spell tokens in other campaigns?
Regards

bratch9
October 11th, 2021, 12:59
G'day there. I have got the extension and it has been working well! Thanks a bunch.
How do I save/export it so I can use the saved Spell tokens in other campaigns?
Regards

At the moment you need to copy the section from the campaign db.xml file. You need to copy out the <spellsuffix> and <spelltokenlist> sections.

With a little 'edit' in notepad you can convert the <spelltokenlist> into file much like the 'spelltokens.xml', but I'd advise that the <id-000??> array item be renamed much like in the 'spelltokens.xml' so that on import you do not 'copy over' any current version already defined.

I've got plans to add an export button, but not sure when this will happen.

-pete

Maldev
October 11th, 2021, 13:17
Thank you.
I will have a play and try to work it out.
Cheers :)

Topdecker
October 11th, 2021, 23:41
I want to correctly temper my expectations... Is the spell token supposed to help implement targeting by acting as a smart targeting template? (I think so, but so far it hasn't worked probably because of how I am testing it - which is alone and not as a player.) It is not clear if a player needs to click on targeting mode prior to dropping the token on the map, if they can drop and regain focus of the token (rotating / placing the token can result in some focus loss) and so on.

I really need to get a player online and test - but my schedule hasn't lined up very well with anyone and I apologize for asking fairly basic questions, but a session is coming up and I want this to work smoothly.

Thanks,

Top

bratch9
October 15th, 2021, 14:38
I want to correctly temper my expectations... Is the spell token supposed to help implement targeting by acting as a smart targeting template? (I think so, but so far it hasn't worked probably because of how I am testing it - which is alone and not as a player.) It is not clear if a player needs to click on targeting mode prior to dropping the token on the map, if they can drop and regain focus of the token (rotating / placing the token can result in some focus loss) and so on.

I really need to get a player online and test - but my schedule hasn't lined up very well with anyone and I apologize for asking fairly basic questions, but a session is coming up and I want this to work smoothly.

Thanks,

Top

It can target, but its not part of the 'spell' steps.

You can drag the token onto a map, and then move/rotate it as you like, works for gm and players. ( Assuming gm has pre-setup the spell tokens configuration for the spells. And if the player already had spells before you added the extension they might have to re-add the spell or 're-parse' the spells to get the spell token to show up on the player sheet. )

Once the spell token is on the map, at any point the player can 'right click' the spell token and at the bottom of the radial you should get a red 'target' icon. If the player selects this it will add the targets under the spell token to the target list for the player. If the player already has ALL the npc already targeted then it will remove them from the target list. ( Much like the normal select rectangle group select. ) Once the player has done with the spell token they can right click for the radial menu and use the normal 'delete token' option at the top of the radial menu.

Hope this helps and answers the issue. ( This is assuming you are using the 'forge' version of spell tokens, as the DMsGuild version has not been updated for a while with the latest targeting code. )

-pete

Weissrolf
October 15th, 2021, 14:43
Are there plans yet to add "target friendly" to the right-click menu? :bandit:

nephranka
October 15th, 2021, 15:29
Are there plans yet to add "target friendly" to the right-click menu? :bandit:

I would 2nd this.

Maldev
October 16th, 2021, 05:21
G'day there.
I have just bought the
DUNGEONS AND DRAGONS 5e Spell Tokens 2.1 and of course want to use it asap.
Is there a how to guide?
I have been able to use my own images and add them to spells in my characters for testing. That's fine.
Is there a way to get these Spell Tokens into unity with the Spell tokens xml?
Or do you have to import the imageless xml and add the tokens to that manually?
If so, where are the spell tokens?
When I bought the Spell Token pack I downloaded the module into my FGU modules folder. However I cannot see the module "in game"
Nor can I see the Spell Tokens in the Assets folder.
Sorry if I seem ignorant, I have been looking in this thread but can't see a step by step guide..
Cheers

Topdecker
October 16th, 2021, 15:01
Hope this helps and answers the issue. ( This is assuming you are using the 'forge' version of spell tokens, as the DMsGuild version has not been updated for a while with the latest targeting code. )


Very, very helpful and I *greatly* appreciate you taking the time to explain it.

Top

bratch9
October 16th, 2021, 18:08
Are there plans yet to add "target friendly" to the right-click menu? :bandit:

The short answer is yes.

How I do it, my thoughts are to add a 'green' marker next to the 'red' one. So the green selects friend and the red selects enemy, and then if you press 'shift' on either they it will mark 'all'.

( ie select green with shift, select friend + selects enemy, and select red with shift selects enemy + selects friends... so both end up been select all. )

-pete

bratch9
October 16th, 2021, 18:23
G'day there.
I have just bought the
DUNGEONS AND DRAGONS 5e Spell Tokens 2.1 and of course want to use it asap.
Is there a how to guide?
I have been able to use my own images and add them to spells in my characters for testing. That's fine.
Is there a way to get these Spell Tokens into unity with the Spell tokens xml?
Or do you have to import the imageless xml and add the tokens to that manually?
If so, where are the spell tokens?
When I bought the Spell Token pack I downloaded the module into my FGU modules folder. However I cannot see the module "in game"
Nor can I see the Spell Tokens in the Assets folder.
Sorry if I seem ignorant, I have been looking in this thread but can't see a step by step guide..
Cheers

The '5e spell tokens 2.1' should show up in the 'assets' and 'tokens' list of the game. They do not show up in the 'modules' to load section.

see 49498 and you can open 'spell tokens' to get to 49499 to check that they are available.

On the GM side you need to use the 'spell tokens configuration', yours will start out empty but see 49500 ( see red box markers ) and then you can use the 'import' blue icon to import the 'spelltokens.xml' file hosted at the start of this thread. ( You will get a windows file explorer prompt to 'locate' the file to load' )

Once loaded when a player adds a spell with a token it should automatically get a token, see 49501, if the character already has the spells on the character sheet you can 're-parse' the spells with the 'shift' key held down. Use the right click radial menu to select the re-parse option on the character sheet and hold shift as you select.

Mainly you need to make sure the 'spell tokens configuration' is showing items like my version above.

steps..

1. make sure 5e spell tokens mod file is in the mods folder.
2. make sure spell tokens extension is in the extensions folder.
3. make new campaign and enable the spell tokens extension.
4. use the 'spell tokens' button in the bottom right to open the 'spell tokens configuration' window.
5. import with the blue button the 'spelltokens.xml' file off your computer. ( Should make a list of spell names with tokens show up in the 'spell tokens configuration' window.
6. on character sheets, add spells ( eg alarm ), and you should see a spell token show at the end of the spell name.
7. you should be able to see spell tokens in 'combat tracker' for NPC. ( ie giant spider has web as a spell if I recall )
8. you can drag from NPC spell or a player character can drag from a spell onto a map for the token.

Hope this helps.

-pete

Maldev
October 17th, 2021, 08:04
Thanks, I will dig in
Cheers

Maldev
October 17th, 2021, 09:36
Thanks, That really helped
Cheers
What does the "pixels per 5 units" and "Collision percentage" mean/do?