PDA

View Full Version : [extension] Spell Tokens Extension



Pages : 1 2 [3] 4 5

SmackDaddy
October 18th, 2021, 01:38
bractch9, are you still providing updates to this extension on DMsGuild for those who previously purchased it there? Thank you in advance for your time.

bratch9
October 18th, 2021, 11:22
Thanks, That really helped
Cheers
What does the "pixels per 5 units" and "Collision percentage" mean/do?

'pixels per 5 units' is the translation from graphics size to the grid square on the map. ( Normally grid squares are 5ft in 5e, so its basically number of graphics pixels to the 5ft grid square. )

If you have a spell token graphic that is for a 20ft square effect, with normal 5e setting this would define an effect that is 4x4 grid squares. ( 20ft/5ft = 4 ) With a graphics for this that is 200x200 pixels you would set the 'pixels per 5 units' = 50 ( 200/4=50 ). Its basically a measure of number of pixels of the graphic token that maps to a grid square.

[ Its got odd wording as this changes with ruleset to be more generic, which is also why the 'suffix' extra config screen is available for mapping when using 'meters' instead of 'ft'. Also for the likes of dnd 4e which uses 1 unit per grid square. Most cases you just want to divide the graphic pixel resolution by the number of grid squares you want it to cover. ]

'Collision percentage' allow the shape checked to be reduced relative to the display on the screen. This can help with 'selection' relative to the grid. At 100% on a circle spell token the system will 'target' players/npc at full radius, but this might over selection depending on position around the circle. This of say the 45 degree point of the circle which might 'just' clip into the corner of a grid square. This would then force a token in this grid to be selected. Which 'correct' that the effect goes into that square and the player/npc is in that square, most players would consider this 'not' a target. So if you want to be very 'strict' you can leave this at 100%. If you find your game and players this its 'over selecting', then feel free to nudge this down until you are happy with the selection.

Before the 'collision percentage' you have to adjust this with the 'pixels per 5 unit' value, but then the graphic on screen would be 'small' for the area. So the 'collision percentage' allow you to have a full size graphic token for the effect ( which might have a soft edge to the graphic ) and adjust the selection area between strict ( at 100% ) and been a bit 'loose' with maybe 95%.

This also allow you to have a spell token graphic that fits bigger than the effect, at a 20ft square effect that should take up 4x4 grid squares, been drawn to fit on a 6x6 grid squares to allow for the 'edge' fade off for the 'look' of the effect. ( This maybe fireball with its main 30ft radius but with a 35ft radius graphic to show the edge effect. ) So you can 'correct' the selection with the 'collision percentage' to get it back to 30ft radius selection.

Its not too complex once you get used to it, but because I dont know if you are using 10ft per grid square and if this been set to 1 unit or 5 units per grid square in the way the map is configured and how your spell tokens are drawn to the size or 'over sized for effect', the system has to have configurations for these things.

-pete

Maldev
October 18th, 2021, 11:26
Again, thanks for the info :)
I am playing 4E d&d, so it's a bit trickier. However so far I am happy with how it's going.
Cheers

bratch9
October 18th, 2021, 11:29
bractch9, are you still providing updates to this extension on DMsGuild for those who previously purchased it there? Thank you in advance for your time.

For FGU, yes the DMsGuild will be getting an update. It has been delayed due to personal/work issue that pulled me away. ( Which is why the forge version has not been updated either for a little while. )

I wanted to get this round of 'features' working in forge and getting it stable without having to do extra updates into DMsGuild. Once the 'select friend' side of the code is added then the forge version will be stable and at a good feature level. So will be doing an update on both forge and DMsGuild.

[ I will have to 'adjust' the DMsGuild side a bit to make sure the non-update for the FGC version ext/mod is marked up correct and clear. Which is why I've been working in the clean FGU forge version. ]

This should happen this week at some point, but depends if real work dumps a bunch of extra on me !!

-pete

bratch9
October 18th, 2021, 11:33
Again, thanks for the info :)
I am playing 4E d&d, so it's a bit trickier. However so far I am happy with how it's going.
Cheers

Yes some of this is because of the 'odd' 4e use of 1 unit per grid square, so distances are different.

In most cases assume setting up as 5e rules and the 4e side is 'scaled' internally by default by 5. This allows the 'spelltoken.xml' template to be imported in both 4e and 5e ( and other rulesets ) and the values work. Without the need for ruleset specific xml configs.

-pete

bratch9
October 26th, 2021, 16:28
update,

v6.4 adds a 'friend' target selection button, and if 'shift' is pressed on either target selection it will select 'all'.

nephranka
October 26th, 2021, 19:51
update,

v6.4 adds a 'friend' target selection button, and if 'shift' is pressed on either target selection it will select 'all'.

Exciting news! I will test it out this weekend. Thank you!

Weissrolf
October 26th, 2021, 20:50
Seems to work as advertised. Thanks for that! :)

bratch9
October 28th, 2021, 14:56
Just processed updating the DMsGuild side of this extension, now that the forge version is back to been stable.

Because of this I've renamed the spelltoken/template.xml with a 'B9_' at the start of this thread to keep a consistent set of files around and to help simplify keeping Forge and DMsGuild in sync.

On the DMsGuild, the old v4.1 is now been used for the FGC and these files have an '_FGC' in the filename and the latest v6.4 for FGU has been uploaded.

The DMsGuild FGC version will no longer be updated. The FGU version I will try and keep in sync, but the DMsGuild might end up been a few builds behind and then catch up in one jump. ( It depends of the changes. )

Frodie
October 28th, 2021, 15:50
How do you get the spell icon to show up in the P2e datasets?

bratch9
October 28th, 2021, 16:54
How do you get the spell icon to show up in the P2e datasets?

What stage are you at that you are having issues ?

One thing you might need to do is re-add or re-parse the spells on a character sheet if these were previously added before adding/configure the extension.

The basic steps are,

1. make sure you have configured a spell in the 'spell token configuration' system, see button in the bottom right of the sidebar.
2. Once in the 'spell token configuration', set up a spell by using the normal FG edit systems. Add a line to the configuration and type in a matching name for the spell and assign it an icon(optional) and a graphic from the assets. Set up its size relation to a grid square.
3. add the named spell to a character, and you should see the icon or the full spell token been shown.
4. drag spell from character sheet to a map etc..

If you are using the likes of the 5e spell token graphics from Gareth Jensen you will have to edit the 'SPELL_TOKENS_2.1.mod' definition.xml file, to change the <ruleset>5E</ruleset> to <ruleset>Any</ruleset>, save and repack. ( Or use the 7zip open archive/edit file open to have make the change. ) Once this is done you can use the 'import xml' file button on the configuration screen to import the 'B9_Spelltokens.xml' from the top of the thread to configure for this pack.

I obviously dont provide any graphics with the extension, but you can use what ever images you have to configure, or just some random ruleset token to 'test' setup a spell to check which part you have not configured.

hope this gets you along the correct path to sorting it out.

nephranka
November 17th, 2021, 11:56
Have you seen the changes in Test? I gave it a spin and thought I would report back. It looks like I get an error when I open a map:
[ERROR] Script execution error: [string "scripts/image_B9ST.lua"]:78: attempt to call field 'onGridStateChanged' (a nil value)

I know this is still on test but I thought I pass it along.

amanwing
November 18th, 2021, 17:54
I can't find the side button for the spell tokens configuration. Do I have to activate it somehow?

bratch9
November 18th, 2021, 18:02
Have you seen the changes in Test? I gave it a spin and thought I would report back. It looks like I get an error when I open a map:
[ERROR] Script execution error: [string "scripts/image_B9ST.lua"]:78: attempt to call field 'onGridStateChanged' (a nil value)

I know this is still on test but I thought I pass it along.

I've not had change to check my extensions against the 'test' branch, i'm sure more error than this exist from reading the massive list of changed.

-pete

bratch9
November 18th, 2021, 18:04
I can't find the side button for the spell tokens configuration. Do I have to activate it somehow?

Are you in FGC ot FGU ?

You should only need to have the extension enabled to have this show up.

If you have it enabled, and still can not see it, please try disable of any other extensions as it could be a conflict.

-pete

amanwing
November 18th, 2021, 18:25
Are you in FGC ot FGU ?

You should only need to have the extension enabled to have this show up.

If you have it enabled, and still can not see it, please try disable of any other extensions as it could be a conflict.

-pete

in FGU I bought it in forge. How can I check if the files are truely there? I did not found it under extensions.
I disabled all extensions.
Edit:
NM it's visible under extensions now. Maybe a problem with updating from the forge.

bratch9
November 18th, 2021, 19:36
in FGU I bought it in forge. How can I check if the files are truely there? I did not found it under extensions.
I disabled all extensions.
Edit:
NM it's visible under extensions now. Maybe a problem with updating from the forge.

If its showing up in your extension selection list then it should be ok.

Not sure what 'NM' is that you are referring to.

-pete

EDIT: Which ruleset are you using. ( Just checked the 5e side and it seems to be showing up on my machine. )

EDIT2: Did you previously have the DMsGuild version ? ( This might be in the folder, also the DMsGuild version now has FGC and FGU versions you have to look out for. )

amanwing
November 18th, 2021, 19:53
If its showing up in your extension selection list then it should be ok.

Not sure what 'NM' is that you are referring to.

-pete

EDIT: Which ruleset are you using. ( Just checked the 5e side and it seems to be showing up on my machine. )

EDIT2: Did you previously have the DMsGuild version ? ( This might be in the folder, also the DMsGuild version now has FGC and FGU versions you have to look out for. )

It just showed up after repeating update it's now in the list of extensions and I think I made it work.

bratch9
November 19th, 2021, 09:48
It just showed up after repeating update it's now in the list of extensions and I think I made it work.

Good to know you got it working.

Thanks, Pete

Larsenex
November 19th, 2021, 10:34
Greetings Bratch,
I wanted to know would I need to purchase a separate extension or module which contains the tokens for the spells?
The various 'tokens' for the spells looks great in your example on the forge and I needed to know if those are a separate purchase.
I believe I understand how this extension works and it seems very handy for myself and my players to use.
We have been using FGU since its early release 2019.
We play Pathfinder 2e and I am also wondering does this extension change the map from 5 feet to 1.5 or is that only for the spells?
Best,
Larsenex

bratch9
November 19th, 2021, 13:37
Greetings Bratch,
I wanted to know would I need to purchase a separate extension or module which contains the tokens for the spells?
The various 'tokens' for the spells looks great in your example on the forge and I needed to know if those are a separate purchase.
I believe I understand how this extension works and it seems very handy for myself and my players to use.
We have been using FGU since its early release 2019.
We play Pathfinder 2e and I am also wondering does this extension change the map from 5 feet to 1.5 or is that only for the spells?
Best,
Larsenex

You are correct no spell token graphics provided with the extension. You need to provide your own or grab a pack from a different source.

( I normally link the 5e pack on DMsGuild, But with you talking about PF 2e I'm not sure of any specific packs for those spells. If you use a 5e pack you might have to hand edit the definition file in the art pack 'mod' file to set the 'ruleset' to 'any'. For the spell token graphics pack to show up outside 5e. )

Not sure on your 5 feet to 1.5. I'm assuming you are talking 1.5 meters ?

The extension does not change the map settings, but the extension does have 'suffix' support so if you change the map grid to '1.5' and set gird 'suffix' to 'm', it should then correct scale a spell token to that map grid size configuration. ( ie normal 5 foot per square map with a 10 foot spell token would take up 2x2 grid squares, and if the map grid is configured as '1.5 m' per square that same 10 foot configured spell token will still take up the 2x2 grid squares. )

Hope this helps, Pete

amanwing
November 20th, 2021, 12:41
I try to figure out how the sizing of the tokens work. For example I have a map set to Distance Multiplier 5.0 Distance Suffix '
I create a Spell Tokens Configuration Fireball 100 100 circle and the fireball tokens. Map Suffix ' 5
When I drag the token to the map it has this size:
50036
It looks like 15' radius. What do I need to do to have it the needed 20 ' radius?
I know I can resize it with the mouse but is there a beter way to habe the correct size when I drag it?

bratch9
November 20th, 2021, 18:01
I try to figure out how the sizing of the tokens work. For example I have a map set to Distance Multiplier 5.0 Distance Suffix '
I create a Spell Tokens Configuration Fireball 100 100 circle and the fireball tokens. Map Suffix ' 5
When I drag the token to the map it has this size:
50036
It looks like 15' radius. What do I need to do to have it the needed 20 ' radius?
I know I can resize it with the mouse but is there a beter way to habe the correct size when I drag it?

If you have it at 100 'pixels per 5 unit' in the configuration, and this comes out at 15 feet for you. ( Your image looks a little shorter than 15 feet )

Assuming its about 2.8 squares from the look of your screen shot. This gives the spell token graphic in use of resolution 2.8*100 = 280 pixels.. if you want that to cover 4 squares ( 20 feet radius ) then 280/4 = 70 'pixels per 5 unity'

So you need to set the 'units per 5 feet' to 70 instead of 100.

For a radius effect, to reduce 'over' selection some people reduce the collision down to about 95%. So players can stand on the edge of the effect when it cuts across a tiny bit of the corner of a square.

This effect looks like 'gareths' 5e spell tokens set. I've provided the 'B9_spelltokens.xml' file at the start of this thread which can be 'imported' with the 'blue' import xml button on the configuration screen. And this will set up the correct sizes for this pack. ( It does not 'refine' any of the collision sizes, these are all set at 100% as its upto the DM to decide if they want exact collision or a little flexibility. )

Hope this helps.

-pete

amanwing
November 20th, 2021, 21:18
I imported the xml but now it's worse. I included a picture. Maybe you can see what I did wrong?
50039
I included the config of my spell tokens here. Maybe thats why It doesnt scale for me?
50040

bratch9
November 21st, 2021, 11:11
I imported the xml but now it's worse. I included a picture. Maybe you can see what I did wrong?
50039
I included the config of my spell tokens here. Maybe thats why It doesnt scale for me?
50040

This all looks ok to me, and I did a quick clean setup and the sizes were working as expected. ( I was using an FG battle map, and not the 150x150 sewer map as I dont own that. )

You should not need the suffix for the default (''' 5) feet, it normally just has the ('m' 1.5) to convert between meters and feet.. ( but this should not cause an issue, I tested it and even setting it to 10, just enlarged the spell tokens as expected. )

The only questions that I have are,

1. how did you 'drag' on the fireball token. ( Was it from the spell config window or from a character sheet ? )
2. If it was from a character sheet did you re-add/reparse the spell to make sure its information was updated. ( This can get out of sync depending on how it was added, but in most cases it only needs a reparse if you have changed the icon/token graphic and want to get the update onto a character sheet. )

Also you do not need the 'fireball (150)=' in the spell configuration... normally you have 'fireball' on the spell configuration and 'fireball (150)=' on the character sheet. ( From the rob2e spell effects naming. )

This should not be an issue, unless you changed the name in the configuration and have a miss-match on the character sheet from an old setting. ie the character sheet still has the 'fireball' icon showing but now you have changed the name in the spell configuration and it can not match up the character sheet name with the configuration name.

The character spell->configuration name matching works by looking for an 'exact' match first, if that is not found the it strips off things like () sections to support the likes of character spell, 'fireball (150)=' from a rob2e spell effect, while the spell configuration only has the 'fireball' part. This matching/stripping back has a few situations that are used to work around naming conventions of a few modules, including the polymorph and rob2e etc.. that have extra 'stuff' encoded into the name of the character sheet.

If the 'name' match does not happen properly between the character sheet and the configuration, the token will be placed with default sizes. This is probably what is causing your issue.

Try deleting the spell on the character sheet and re-adding it. ( As the rob2e/'grim press auto effect' spells do not re-parse because of how they are made.. For these if you press and hold 'shift' when you select the right-click reparse spell then it should just update the spell token and not re-parse the actual spell description which would remove the custom effects of these types of modules. )

Normally go with the most 'basic' name for the spell in the 'spell configuration', if you want a 'fireball' spell token and a different one for 'fireball (150)=' then you do need to have both in the spell configuration.


Hope this helps.
pete

amanwing
November 21st, 2021, 11:27
1. I tried both. Same results.
2. I deleted the old spell from the character sheet and incuded the spell using drag and drop.
I tried the things you mentioned and I test now with a regular spell from 5e without using rob2es spells.
Same. I just drag the spell call lightning onto the character sheet. It assigns the token and I drag the token to the map. Same effect.50049
I also changed maps. It's the same.
And thank you for your help

bratch9
November 21st, 2021, 14:13
1. I tried both. Same results.
2. I deleted the old spell from the character sheet and incuded the spell using drag and drop.
I tried the things you mentioned and I test now with a regular spell from 5e without using rob2es spells.
Same. I just drag the spell call lightning onto the character sheet. It assigns the token and I drag the token to the map. Same effect.50049
I also changed maps. It's the same.
And thank you for your help

is it possible for you to attach a zip of the campaign, so I can have a more detailed look at this. As I might be able to spot something specific.

also, can you confirm which version of FGU, ruleset, spell tokens extension version and if you have any other extensions enabled.

Thanks, Pete

bratch9
November 21st, 2021, 14:20
1. I tried both. Same results.
2. I deleted the old spell from the character sheet and incuded the spell using drag and drop.
I tried the things you mentioned and I test now with a regular spell from 5e without using rob2es spells.
Same. I just drag the spell call lightning onto the character sheet. It assigns the token and I drag the token to the map. Same effect.50049
I also changed maps. It's the same.
And thank you for your help

Hi,

Just had a look at the 'call lightning' in your example, and this looks like a source spells token issue. If you go to the DMsGuild site for Gareths tokens he lists 'CALL LIGHTNING 10ft' and the graphic is 140x140 and these are normally authored at 70 pixels per square. So does look like a 10 foot spell token.

I know the spell lists a 60 foot radius.

Can you try the fireball, as I know that spell token is the correct size in the spell token graphics and configuration.

For 'call lightning' you will have to report the spell token graphic as the wrong size to Gareth to get him to 'fix' the token. ( My guess is it was read as 'cylinder that is 10 feet tall with a 60-foot radius' as was built as 10 feet tall instead of radius.. )

-pete

amanwing
November 21st, 2021, 16:10
You were right. The Call Lightning token was the problem here. I also needed to set the Token (GM) autoscale to grid to 80 or 100% it was OFF.
It seems to work now without problems. Fantastic! Thank you for your help!

bratch9
November 21st, 2021, 18:26
You were right. The Call Lightning token was the problem here. I also needed to set the Token (GM) autoscale to grid to 80 or 100% it was OFF.
It seems to work now without problems. Fantastic! Thank you for your help!

Happy to help get it working.

( If you want the call lightning at 60 foot, you would have to set to about 12 pixels per 5 units. ( But the resolution would then be low due to its size. )

-pete

arcanjl
December 5th, 2021, 16:10
How to create tokens for custom spells?

bratch9
December 5th, 2021, 19:25
How to create tokens for custom spells?

To make a custom token you need to,

1. make/find a suitable graphic for the spell.
2. add this to the 'install' location of FGU, in the 'tokens' sub folder.
3. then you need to check in game that you can see that token in game. It should be in the 'assets' tab under 'tokens' probably in a folder called 'data'. ( or campaign, if you put the graphic in a campaign specific 'tokens' folder.. )
4. when you are happy the game can see your graphic, open the 'spells token configuration' window. Right click in some space should give the 'radial' button for FGU and at the south position you should have 'add item'.
5. use the radial control to add a new item. Give this the name of your spell, so it matches up with the character sheet or source module name for the spell.
6. once you have a this new line, drag the spell graphic from the 'assets','tokens' ( probably 'data' ) folder onto the spell configuration window graphic space on the right end of the new line you made.
7. next configure the 'size per 5 units'. If you have a 200pixel x 200 pixel spell token and want that to cover a 20ftx20ft space. This is a 4x4 grid selection. You set the 'size per 5 units' to 200/4=50.
8. you can now 'reparse' the spell on the character sheet, you might want to hold 'shift' when you do this to just update the spell token on the character sheet.
9. check this is now working and showing the correct size on a map. If its too big you need to increase the 'size per 5 units' and if its too small you need to reduce it. ( And then drag a new test spell token onto a map... until you are happy. )

Most spell tokens are normally 50 ( or 70 or 100) pixels per 5 foot. But could be anything if you have drawn it. But if you have the artwork and can look at its resolution and you know how big the spell covers, convert that into the grid box size and take the resolution and divide by the number of grid squares. ( These in 5e are the typical 'pixels per 5 unit' that are used. If you are in 4e then assume the setup as for 5e as the system automatically scales the sizes by '5' due to 4e ruleset counting in grid squares instead of feet. )

Hope this help,
-pete

( If you still have issue, consider posting some images of the stages you are at, and I can advise further. )

arcanjl
December 5th, 2021, 20:19
Worked like a charm - Thanks!!

bratch9
December 5th, 2021, 21:36
Worked like a charm - Thanks!!

You are welcome.

-pete

bratch9
December 6th, 2021, 19:02
Have you seen the changes in Test? I gave it a spin and thought I would report back. It looks like I get an error when I open a map:
[ERROR] Script execution error: [string "scripts/image_B9ST.lua"]:78: attempt to call field 'onGridStateChanged' (a nil value)

I know this is still on test but I thought I pass it along.

This should be fixed in version 6.5. ( Should work on current and test releases. )

-pete

nephranka
December 6th, 2021, 19:09
This should be fixed in version 6.5. ( Should work on current and test releases. )

-pete

Great news. I will test it out. Thanks!

Edit: All looks good. No issues on test. Thanks!

Sesa
December 10th, 2021, 18:43
Is there a way to disable the vision of the spell tokens? I have set up a token for Dancing Lights, and it's way more convenient if the player moves it themselves. The token having vision however means they can now peak around corners etc. with the spell.

bratch9
December 11th, 2021, 10:59
Is there a way to disable the vision of the spell tokens? I have set up a token for Dancing Lights, and it's way more convenient if the player moves it themselves. The token having vision however means they can now peak around corners etc. with the spell.

At one stage I had a global option to enable/disable vision, but that was removed as it now check the 'Token (GM) party vision and movement' to control that.

I could add that option back in to disable all vision on spell tokens, not sure if this would stop it as the spell tokens belong to the respective player so I think the system would still process the spell token as addition vision to the player token.

I'll add a note in my todo list to check on this process and look to add an option if possible.

But I'm waiting now for the big ruleset change that was due out last week to arrive and cause a bunch of unknown issues... so i'm not sure when I'll get back to feature adding as I expect a bunch of bugs generated to need fixing !!

-pete

gmdmb3
December 23rd, 2021, 15:20
Is anyone else having an issue with this extension where it randomly places an invisible wall under the character token that blocks LOS and character token movement?

bratch9
December 26th, 2021, 13:17
Is anyone else having an issue with this extension where it randomly places an invisible wall under the character token that blocks LOS and character token movement?

No seen this. Can you give a little more context ?

ie,

1. What ruleset you are using.
2. does it happen on a specific spell token, or all when you place them.. ( ie can you sometimes get a fireball to work, and then sometimes fireball does the line of site blocker issues.. )
3. is this from an 'npc' spell token drop, a player spell token drop, or a spell token drop from the 'configuration' window.
4. if you move the token does the blocker to LOS move with the token or does it stay static in the place the spell token was initially placed ?
5. is this in combination with other extensions loaded ? ( Have you tried replicating with just the spell tokens extensions and a simple campaign file... ie some conflict between extensions ? )
6. is this FGU or FGC?

Thanks, Pete

zanaffar81
January 6th, 2022, 01:42
Im having a different problem, I dont have an area to type in a spell name, while using 5e core rule set. I have snipped a portion of a my screen to show how it appears in fantasy grounds 5e.

Thank you.

50783

P.S. I have figured it out. Why is it I can never figure this stuff out until I ask for help. Must be a loose nut in my brain, lol. I never thought to click the shield on the far left, then type in the name on top of the new sub window.

bratch9
January 6th, 2022, 11:14
Im having a different problem, I dont have an area to type in a spell name, while using 5e core rule set. I have snipped a portion of a my screen to show how it appears in fantasy grounds 5e.

Thank you.

50783

P.S. I have figured it out. Why is it I can never figure this stuff out until I ask for help. Must be a loose nut in my brain, lol. I never thought to click the shield on the far left, then type in the name on top of the new sub window.

While you can do that, its not the normal way to enter the name.

Not sure on what ruleset/pack you are using for that view... but if you make the window wider you should get a name on the main configuration window to edit the name. ( You can use the 'shield' to open up the optional 'lighting' effect pop-up, which has a 'linked' name... so you can edit the name from the main window or the pop up as you were doing.. )

50791

Hope this helps.

-pete

( NOTE.. It might be that your spell configuration window is small ( and maybe size locked ), due to the art pack you are using... let me know which it is as it might need reporting for a compatibility update for min-width etc.. )

zanaffar81
January 6th, 2022, 12:01
Thank you for the reply and yes it worked when I unlocked then expanded the right side of the screen (face plant).

I have been playing around with this extension and its very fun to explore the different options. Thank you again for the reply and making an awesome extension.

Raddu
January 8th, 2022, 00:53
Just found a conflict with your extentions. The Advantages extension (which allows targeting based on drawing shape) https://www.fantasygrounds.com/forums/showthread.php?66564-Advantages-Extension-(FGU-5E)/page4

When I have your extension on the Advantages targeting doesn't work. I'd appreciate if you could work with Silent Ruin to figure out the issue. Thanks! Love the extension!

bratch9
January 9th, 2022, 20:25
Just found a conflict with your extentions. The Advantages extension (which allows targeting based on drawing shape) https://www.fantasygrounds.com/forums/showthread.php?66564-Advantages-Extension-(FGU-5E)/page4

When I have your extension on the Advantages targeting doesn't work. I'd appreciate if you could work with Silent Ruin to figure out the issue. Thanks! Love the extension!

I'll take a look, but the quick read on the forum I spotted that 'coned image.lua' to resolve some issues. Obviously Spell tokens has to deal with the 'image.lua' scripts to attach, so we both probably clone this file. My guess is my extension loads after and so my version 'take over' the one from 'Advantage' extension.

I'll see what was 'added' and have to add some extra code to detect the 'Advantage' extension and 'merge/call' the required code.

I do this for some other SilentRuin extensions to generate small 'patch' code detect and re-apply 'lost' calls like this.

I'll see if I can sort this out on monday when I have some time.

-pete

bratch9
January 14th, 2022, 13:48
Just found a conflict with your extentions. The Advantages extension (which allows targeting based on drawing shape) https://www.fantasygrounds.com/forums/showthread.php?66564-Advantages-Extension-(FGU-5E)/page4

When I have your extension on the Advantages targeting doesn't work. I'd appreciate if you could work with Silent Ruin to figure out the issue. Thanks! Love the extension!

Hi,

I've talked with Silent Ruin and its complex to merge due to the image.lua file is not designed to extend, so it tends to get replaced hence the merge issue.

He has split his extension into 3 parts, so you should be able to now use the main parts of that one and just use either the (pointer) PA.ext or my spell_tokens.ext. But you will have to pick which.

Hope this helps, let us both know if you really really need both to work together, but Silent Ruin class this as a high risk issue and he would prefer that the Dev team for FG implement something like his point target selection as c# native.

-pete

Raddu
January 14th, 2022, 15:41
Hi,

I've talked with Silent Ruin and its complex to merge due to the image.lua file is not designed to extend, so it tends to get replaced hence the merge issue.

He has split his extension into 3 parts, so you should be able to now use the main parts of that one and just use either the (pointer) PA.ext or my spell_tokens.ext. But you will have to pick which.

Hope this helps, let us both know if you really really need both to work together, but Silent Ruin class this as a high risk issue and he would prefer that the Dev team for FG implement something like his point target selection as c# native.

-pete

Ah, that's a bummer, but I understand and appreciate you looking into it. Decisions, decisions.

SteveStewart332
January 15th, 2022, 17:45
Hi Bratch9 - I have just purchased this on The Forge, and I do not see a spell tokens button in the sidebar, which (I guess) means I can't access the spell tokens for NPCs. Is there an idiot's guide somewhere so that idiots such as I can get this up and running? I am running fully updated FGU, 5e, I have the Spell Tokens add-on and am also using Critically Awesome Essentials with its spell token ability for PCs.

bratch9
January 16th, 2022, 18:02
Hi Bratch9 - I have just purchased this on The Forge, and I do not see a spell tokens button in the sidebar, which (I guess) means I can't access the spell tokens for NPCs. Is there an idiot's guide somewhere so that idiots such as I can get this up and running? I am running fully updated FGU, 5e, I have the Spell Tokens add-on and am also using Critically Awesome Essentials with its spell token ability for PCs.

the spell tokens button to open the spell tokens configuration, is under the 'library' drop down for the side bar. ( Or it should be.. )

-pete

SteveStewart332
January 17th, 2022, 17:57
Thanks Pete - found that. All I need to do now is figure out how to make it work! If there is an idiot's guide anywhere, that would be useful. Also got your Spell Domain extension - already proving to be really useful, thanks!

bratch9
January 18th, 2022, 13:31
Thanks Pete - found that. All I need to do now is figure out how to make it work! If there is an idiot's guide anywhere, that would be useful. Also got your Spell Domain extension - already proving to be really useful, thanks!

It depends on what you want to know about, as some of it can get complex.

Are you using a spell token pack, ie 'Gareth Jensen' pack for 5e ?? , if so the quickest option is to use the 'blue' import button to use the 'B9_SpellTokens.xml' to setup for this pack.

( Even if you dont have this pack, I would advise you to create a new campaign and import this anyway, as it gives you a bunch of settings to look at.. even with out the graphics pack once imported you could always just drag any graphic onto the 'token' dots in the configuration window. )

Most of the basics are shown on the forge page, in a few graphics.. Basically I assume an import of graphics data, then add some spells that use the tokens onto a character sheet, select a map and drag them on as needed. Once on the map you can 'right click' to get the option wheel and use the 'red','green' icons ( that look like the ones from the bottom of the combat tracker.. ) and use this to select 'hostile' or 'friendly' creatures... ( Or use shift to select all on either icon.. ) It should have help text on the icon, I think..

Past this it starts to get technical, if you want to talk about the different option selection modes, and configuring reduced collision space to 'tighten' up the selection area to more how you want it to work, and then extra advanced mode of building spell tokens and doing configuration of the resolution mapping and even possibly setting up light effect for the token.

Most have been covered in the thread, yep scattered about in the thread does not make it easy.

But what 'stage' of information do you want so I can write up some words for you.

( As some point, if I get time, I'll pull some more details into the top of the thread, or expand the store page. As a few new things have been added. )

-pete

SteveStewart332
January 21st, 2022, 19:54
Managed to get everything up and running - looking forward to springing it on my players in about 15 minutes time!

Maldev
January 22nd, 2022, 10:08
G'day. Is the "save/export" spell tokens a thing yet. I know there was talk of it :)
Cheers

bratch9
January 22nd, 2022, 15:30
G'day. Is the "save/export" spell tokens a thing yet. I know there was talk of it :)
Cheers

Not at the moment... but you can just open the db.xml in the campaign and find the section <spelltokens> and cut'n'paste that into other campaign.

Its still in my todo list, but I've not had much time to look after my extensions.

-pete

Maldev
January 22nd, 2022, 23:42
No probs, cheers

Weissrolf
January 23rd, 2022, 15:54
Hello. Everytime I open a map I get the following error when the extension is enabled in PF2E:

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

Anything I can do about it?

Weissrolf
January 24th, 2022, 16:36
Turns out that I had a version 6.4 EXT file in my extensions folder that would not get removed even when I disabled the extension in Forge. I manually deleted the file and re-enabled the extension in Forge and now got a version 6.5 that does not throw the error.

bratch9
January 25th, 2022, 13:46
Turns out that I had a version 6.4 EXT file in my extensions folder that would not get removed even when I disabled the extension in Forge. I manually deleted the file and re-enabled the extension in Forge and now got a version 6.5 that does not throw the error.

Thanks for the update on this.
-pete

bratch9
January 25th, 2022, 23:31
released v6.6, this now supports both import and export of the spell configuration and spell suffix data. ( And a few bits of tidy up.. )

BushViper
February 2nd, 2022, 07:31
I purchased this extension months ago, but I put it down shortly after because it still needed some work. However, it seems to have come a long way. That said, I've read the Forge entry and the first post here, but both places seem to be lacking some important, but basic information. The answers to my questions might be buried in the 55 pages, but do people really need to spend a couple of hours reading the entire thread to find out:

1. What the options in the options menu do, exactly?
2. What does collision percentage do?
3. If I want to change the map suffix, what is the syntax? Is it just f________________5'?

This stuff might be incredibly obvious to some, but I can 100% guarantee you that there are a bunch of people that don't have clue, but are too proud or embarrassed to ask.

bratch9
February 2nd, 2022, 13:39
I purchased this extension months ago, but I put it down shortly after because it still needed some work. However, it seems to have come a long way. That said, I've read the Forge entry and the first post here, but both places seem to be lacking some important, but basic information. The answers to my questions might be buried in the 55 pages, but do people really need to spend a couple of hours reading the entire thread to find out:

1. What the options in the options menu do, exactly?
2. What does collision percentage do?
3. If I want to change the map suffix, what is the syntax? Is it just f________________5'?

This stuff might be incredibly obvious to some, but I can 100% guarantee you that there are a bunch of people that don't have clue, but are too proud or embarrassed to ask.

Hi,

Yep, I agree the details are out of date, and most do exist in the pages of this thread. I've got some fixes to make to some of my other extensions and will get around to updating the forge/DMsGuild listing for all my extensions as soon as I get time.

For the default suffix the usage 1 square is 5 feet is assumed, I dont think you need to do anything with the suffix unless you want to have 'km/miles' level spell tokens !! The system already includes a suffix 'm' for meters at '1.5' for a grid set as meters. This is used to convert from grid squares to the graphic representation of the token that is always calculated in 5 feet units of resolution. Normally a spell token will be '70 pixels per 5 feet' and this is normally 1 square in 5e. The value comes from the number of 'meters in 5 feet' ( 1.524, rounded to 1.5 for ease. )

Collision percentage reduces the size of the radius of the shape by that amount. So a 30 foot circle will be reduced to a 30*Percentage foot collision circle. This can be used to make the grid selection for target smaller than the spell token, so you do not get selection on squares that get a tiny fraction of the circle ( or token shape ) just going over the corner of a square and hence selecting that token. Normally by about 95% size of collision a 30 foot circle would select what most people playing on a grid would consider the correct selection of a person stood on the 45 degree axis of the center. ( This typically been the point on a circle that just goes over the corner of that square by a tiny amount. ) The system is design to allow the flexibility of been 'perfect' selection to allow reduced collision to get closer to what players would expect as a grid.

The other graphics options are to do with a software render that convers and scan the spell shapes into 'pixels' that represent grid squares. You can configure this to also have a 2x2 subpixel selection per square. ( Mainly for games that allow snapped by not in square positions, ie player token center on the cross junction of a sqaure. ) Again this then matches what pixels the square token is in, and if any overlap then the token is selected. Most people do not use this method, and just reduce the collision size, which results in the same basic outcome. It was mainly a debug system designed to allow GM to see what squares are 'hit' for the token at a given collision and position. So they can tune a spell token to cope with a reasonable grid selection for a spell token that is centered on the center/line edge/corner of a square and grid output of what squares would have been selected.

But I expect most GM just use the basic templated xml files listed at the top, as this might cause the odd edge case extra/missing selection depending on how that GM runs the game.

Our group is reasonable flexible and tend to just fix any slight miss selected or 'on the edge of a spell token' cases with a quick confirm with the current GM at the time, so we just use the basic imported xml at full collision between the shapes.

Because of this I've not updated much of these details on the forge, because the average user does not want to see pages of advanced descriptions and think its going to be a massive pain to configure... when in fact most people I'd guess just import the xml template and just play. ( Which is how its basically designed to work... )

The system is already configured for all rulesets that run the 5 units (feet) to one square default, it has a '*5' factor for 4e as this defaults to 1 unit per square, and has a default suffix for the users that want to use 1 unit as meter per square. I dont think people put spell tokens down on travel maps that are in km/miles level or 100 feet per square type things. ( Tokens would be so small on these you would never be able to select them, which is why FG defaults player token to one square... implying you are now a 100x100 foot character which you obviously are not.. )

Hope this help,
pete

nephranka
February 2nd, 2022, 13:58
I was wondering if you ever gave any thought to automatically removing spell tokens from the map tied to concentration ending. It would help with map clean up but i am not sure it is even possible. Just a thought.

bratch9
February 2nd, 2022, 16:27
I was wondering if you ever gave any thought to automatically removing spell tokens from the map tied to concentration ending. It would help with map clean up but i am not sure it is even possible. Just a thought.

No thought on it, as it does not interact with the effect part of combat tracker it would probably be an issue to track.

I'll add it to my to look into todo list..

-pete

BushViper
February 2nd, 2022, 22:48
Thank you for the explanation, Pete.

MrDDT
February 10th, 2022, 07:59
Is there a way to turn line tokens so they don't turn so much when you use shift scroll wheel?

bratch9
February 10th, 2022, 11:26
Is there a way to turn line tokens so they don't turn so much when you use shift scroll wheel?

The simple answer is yes..... ( Its already on my look into todo list )

The longer answer is that this is a global setting that will make everything that could rotate also get the increased count.

It also has UI interface issues, is 16 possible instead of the normal 8 suitable ?

( Maybe for you, but maybe somebody wants better than 22 degrees per click, maybe 32... why not 360..... Then do I add shift+wheel => 1 click, shift+ctrl+wheel => 5 clicks, shift+alt+wheel => 20 clicks, shift+alt+ctrl+wheel => 60.... )

On top of this, do users want to now have many more clicks to rotate non rectangle tokens, or even the 'facing arrow' or other location in the general game that rotate and use this setting.... All would have to be 'patched', I just dont know at the moment the number of location this will change.

Hence the 'maybe/possible' attitude to 'should' I do this...

Also you are talking about 'rectangle' spell tokens.... do you want the same number for 'square' spell tokens that maybe don't require as many angles to 'fit' onto the map. At what 'aspect' do I introduce fine control. Do I try and adjust the system to 32 possible angles, and make every click count as '4 click' for shift+wheel, and then a fine control 'shift+ctrl+wheel' to add '1 click'... so could be used on anything that rotates...

I've just not decided which path the code could/should take.

I've given a couple of my thoughts and options, do you have any idea how many angles you might need ? Any preference on how to control this, ie shift+ctrl+wheel for access to fine control, or just for line spell tokens etc..

-pete

heckipatang
February 10th, 2022, 11:27
Hey B9,

i purchased the Extension via forge and managed to set the tokens in the spell tokens configurator. I use the tokens from g.jensen from the guild and the token appear in the character sheets as well as in the ct for npcs. When i drag the token on the map, i only see a small hardly visible previev of the token (size of one square, no matter what the actual size of the spell is, but the token never "materialize" on the map. Any idea what the problem is? I read through a lot of this thread but cant find anything related to this problem. Help would be awesome. By the way... i think a short tutorial video for the extension would be dope too.

heckipatang
February 10th, 2022, 11:36
I am a total Dork! Found out what "Pixel per 5 Unit" Does. Sorry man, and thank you for that awesome Extension!

bratch9
February 10th, 2022, 14:12
I am a total Dork! Found out what "Pixel per 5 Unit" Does. Sorry man, and thank you for that awesome Extension!

Glad its working... I assume you had this value 5 times too big... making everything small... which it clamps to just 1 square as a min size.

Yep its number of pixels to cover one square... so if you use 50 'units per 5 feet', then a 5x5 spell token would require a spell token with 50x50 pixels.

If you are using g.jensen, then import the 'spell_tokens.xml' these have the sizes configures for you... and the pack uses 70 pixels per 5 units.

-pete

MrDDT
February 10th, 2022, 18:10
The simple answer is yes..... ( Its already on my look into todo list )

The longer answer is that this is a global setting that will make everything that could rotate also get the increased count.

It also has UI interface issues, is 16 possible instead of the normal 8 suitable ?

( Maybe for you, but maybe somebody wants better than 22 degrees per click, maybe 32... why not 360..... Then do I add shift+wheel => 1 click, shift+ctrl+wheel => 5 clicks, shift+alt+wheel => 20 clicks, shift+alt+ctrl+wheel => 60.... )

On top of this, do users want to now have many more clicks to rotate non rectangle tokens, or even the 'facing arrow' or other location in the general game that rotate and use this setting.... All would have to be 'patched', I just dont know at the moment the number of location this will change.

Hence the 'maybe/possible' attitude to 'should' I do this...

Also you are talking about 'rectangle' spell tokens.... do you want the same number for 'square' spell tokens that maybe don't require as many angles to 'fit' onto the map. At what 'aspect' do I introduce fine control. Do I try and adjust the system to 32 possible angles, and make every click count as '4 click' for shift+wheel, and then a fine control 'shift+ctrl+wheel' to add '1 click'... so could be used on anything that rotates...

I've just not decided which path the code could/should take.

I've given a couple of my thoughts and options, do you have any idea how many angles you might need ? Any preference on how to control this, ie shift+ctrl+wheel for access to fine control, or just for line spell tokens etc..

-pete

My issue is coming from lines, But I get you, where does it end right?

anathemort
February 11th, 2022, 01:49
I've given a couple of my thoughts and options, do you have any idea how many angles you might need ? Any preference on how to control this, ie shift+ctrl+wheel for access to fine control, or just for line spell tokens etc..

Personally, I would love a way to do 5 or 10 degree rotations for lines. I rarely find the line tokens usable right now, with only 45 deg rotations available. I don't generally rotate anything else, so it's not a big deal there in my opinion... although an extra modifier to do fine control would be a great happy medium!

MrDDT
February 11th, 2022, 05:12
B9, thanks for this EXT.

I wanted to report an error I had (a few 1000 times in a row).

This error in the attached image happened when I dropped a spell token on a PC token, it would lock to that token creating it to be stacked. I was trying all sorts of things to unlock it to no avail, so I deleted the spell token and anytime I moved the PC token it would call this error over and over.

Also as a request is it possible to set the vision on spell tokens to default to 0? So when someone who controls the token can't see from it's vision? I'm not sure how this would mess up playstyles but if it can't be set because of playstyle change, maybe an option to set it?

The issue I have for this is that if a player casts a spell 120' away they now can click on that token and see everything around it, which they shouldn't be able to see because their player is 120' away.

Also I seem to be having problems with my players not able to load the tokens when pulled on to their PC sheets but I as a GM can reparse it or drag the spell from the spells list onto the PC sheet and it would show the token.

Next question someone ask if you can target using the token, I know CAE does (or did this) but I'm not sure this does that. I've tried to read through all the pages here but its a lot and stuff is out of date because of FGC to FGU and changes over time to FGU.

P.S.
I would love the option to hold a few keys and rotate it based on that by 1 degree then hold another few keys and it rotate by 5 degrees or whatever that option was.

bratch9
February 11th, 2022, 06:58
B9, thanks for this EXT.

I wanted to report an error I had (a few 1000 times in a row).

This error in the attached image happened when I dropped a spell token on a PC token, it would lock to that token creating it to be stacked. I was trying all sorts of things to unlock it to no avail, so I deleted the spell token and anytime I moved the PC token it would call this error over and over.

Also as a request is it possible to set the vision on spell tokens to default to 0? So when someone who controls the token can't see from it's vision? I'm not sure how this would mess up playstyles but if it can't be set because of playstyle change, maybe an option to set it?

The issue I have for this is that if a player casts a spell 120' away they now can click on that token and see everything around it, which they shouldn't be able to see because their player is 120' away.

Also I seem to be having problems with my players not able to load the tokens when pulled on to their PC sheets but I as a GM can reparse it or drag the spell from the spells list onto the PC sheet and it would show the token.

Next question someone ask if you can target using the token, I know CAE does (or did this) but I'm not sure this does that. I've tried to read through all the pages here but its a lot and stuff is out of date because of FGC to FGU and changes over time to FGU.

P.S.
I would love the option to hold a few keys and rotate it based on that by 1 degree then hold another few keys and it rotate by 5 degrees or whatever that option was.

I'll look into the error message, not sure on the exact combination that creates this but a quick glance at the code I can see the possibility of this. Just need to make sure I cover a 'nil' case the system is not expecting. ( Not sure how you got the 'nil'... )

'vision', is linked to 'token party vision'.. Do you also have this enabled to get other players token vision ? ( Others have requested spell tokens get vision... so I suspect if I turn it off I'll get people asking for it back.. )

I dont think I've ever had issues with configured spell tokens not arriving on a player when they add the spell or reparse it, not sure why as the GM you can do this but not the player. I do know FG has some issues with shared tokens, so maybe something in a FG update has broken this again. I'll do some testing.

Spell token, you can right click the spell token and on the radial menu you have red/green target 'people' icons. ( Like the ones at the bottom of the combat tracker use to place groups on the map.. ) This can be used with 'shift' to target both types.

-pete

MrDDT
February 11th, 2022, 07:15
'vision', is linked to 'token party vision'.. Do you also have this enabled to get other players token vision ? ( Others have requested spell tokens get vision... so I suspect if I turn it off I'll get people asking for it back.. )

I dont think I've ever had issues with configured spell tokens not arriving on a player when they add the spell or reparse it, not sure why as the GM you can do this but not the player. I do know FG has some issues with shared tokens, so maybe something in a FG update has broken this again. I'll do some testing.

Spell token, you can right click the spell token and on the radial menu you have red/green target 'people' icons. ( Like the ones at the bottom of the combat tracker use to place groups on the map.. ) This can be used with 'shift' to target both types.

-pete

Ok, I can see this issue, currently though those people in a dark setting (no light sources) already the tokens wouldn't have vision so this could be a problem already for them (partly solved for me :) ).

I don't see the mod of the spell tokens when I load in as a GM or my players to load it, but it seems like that's how it's meant to be. I can see it in assets.

Ahh thanks, this is what I was missing.

heckipatang
February 11th, 2022, 09:47
Glad its working... I assume you had this value 5 times too big... making everything small... which it clamps to just 1 square as a min size.

Yep its number of pixels to cover one square... so if you use 50 'units per 5 feet', then a 5x5 spell token would require a spell token with 50x50 pixels.

If you are using g.jensen, then import the 'spell_tokens.xml' these have the sizes configures for you... and the pack uses 70 pixels per 5 units.

-pete

Dear Pete,

Thank you so much for the information and your effort to answer in detail and provide additional help. Make your life a little bit easier and put together an FAQ for the forge, so you dont have to answer the same dumb questions over and over again. Great product with great support. Thanks!

bratch9
February 11th, 2022, 15:31
B9, thanks for this EXT.

I wanted to report an error I had (a few 1000 times in a row).

This error in the attached image happened when I dropped a spell token on a PC token, it would lock to that token creating it to be stacked. I was trying all sorts of things to unlock it to no avail, so I deleted the spell token and anytime I moved the PC token it would call this error over and over.

Also as a request is it possible to set the vision on spell tokens to default to 0? So when someone who controls the token can't see from it's vision? I'm not sure how this would mess up playstyles but if it can't be set because of playstyle change, maybe an option to set it?

The issue I have for this is that if a player casts a spell 120' away they now can click on that token and see everything around it, which they shouldn't be able to see because their player is 120' away.

Also I seem to be having problems with my players not able to load the tokens when pulled on to their PC sheets but I as a GM can reparse it or drag the spell from the spells list onto the PC sheet and it would show the token.

Next question someone ask if you can target using the token, I know CAE does (or did this) but I'm not sure this does that. I've tried to read through all the pages here but its a lot and stuff is out of date because of FGC to FGU and changes over time to FGU.

P.S.
I would love the option to hold a few keys and rotate it based on that by 1 degree then hold another few keys and it rotate by 5 degrees or whatever that option was.

Just asking about the error report, just how were you trying to split the spell token from the player ? ( Normally I use the delete token radial on the spell token... )

Asking because I want to look at 'what caused' the 'nil', while I can protect against the error I want to solve the 'thing' you did you cause it. As the code making the nil error message should not be getting called with nil...

( But might if you did something like move the player off the map, or maybe re-add it from the combat tracker etc... with the old spell token still thinking it was attacked to the now delete old player token.. hence the nil... )

Just any extra information for me to re-create it and work out what path in the code was failing and generating the nil for the error code to fire...

-pete

bratch9
February 11th, 2022, 15:36
Ok, I can see this issue, currently though those people in a dark setting (no light sources) already the tokens wouldn't have vision so this could be a problem already for them (partly solved for me :) ).

I don't see the mod of the spell tokens when I load in as a GM or my players to load it, but it seems like that's how it's meant to be. I can see it in assets.

Ahh thanks, this is what I was missing.

Due to the new sidebar, the spell tokens configuration window is now in the top part of the side bar with the 'modules'/'assets' drop down.

51439

It does only show on the GM/DM side for the configuration window. If the players were allowed to configure the token share of FG would have kittens and break.. hence limited to configure and spell tokens been on the GM/DM machine only.

-pete

MrDDT
February 11th, 2022, 17:34
Just asking about the error report, just how were you trying to split the spell token from the player ? ( Normally I use the delete token radial on the spell token... )

Asking because I want to look at 'what caused' the 'nil', while I can protect against the error I want to solve the 'thing' you did you cause it. As the code making the nil error message should not be getting called with nil...

( But might if you did something like move the player off the map, or maybe re-add it from the combat tracker etc... with the old spell token still thinking it was attacked to the now delete old player token.. hence the nil... )

Just any extra information for me to re-create it and work out what path in the code was failing and generating the nil for the error code to fire...

-pete


Honestly I can't remember all the things I tried. I did repull the CT player onto the map (that had the token attached) so maybe that is it. I tried diff combos of keys like alt shift click, ctrl shift click, shift alt ctrl click, then did double clicks, use scroll wheel combos. I changed factions. Changed visibility of the tokens and the players. Reset fog.



Due to the new sidebar, the spell tokens configuration window is now in the top part of the side bar with the 'modules'/'assets' drop down.

51439

It does only show on the GM/DM side for the configuration window. If the players were allowed to configure the token share of FG would have kittens and break.. hence limited to configure and spell tokens been on the GM/DM machine only.

-pete


So yeah I'm saying when I look into mod activation, I don't see the mod to activate, nor do my players. I get that the GM/DM side should be the only one editing the profiles of the spell tokens. I've even updated them all for me to have lighting effects. (Little wary to add darkness to any of them though)

I just wasn't sure how it was meant to happen. Like I said currently when my players load into the game and drag spells from the spell list onto PC sheet, it doesn't give them the spell token, when I do it (as DM), it does, also if I reparse it, it does.

Thanks so much for your time. In any case I can work around this.

kevininrussia
February 12th, 2022, 08:49
Ruleset 4E

[ERROR] Handler error: [string "scripts/image_B9ST.lua"]:656: attempt to index local 'target' (a userdata value)

Error shown on Host when client swaps their token using this extension: Critically_Awesome_Essentials_-_Generic_Token_Swapper_FGU.ext\

A player is a Druid. I have an effect set up so that with a click of a button on the client side, the token will swap between an elf token and puma token. When this switch happens, the error above pops up on the Host with every token swap.

bratch9
February 17th, 2022, 14:14
FORGE ONLY release of the v6.65, this has the 'high' count rotation support for spell tokens. This is done with 'shift+ctrl' and wheel, on a square grid you should get 5 degree ticks.

I've done this as a forge only, and will look at the couple of 'MrDDT' and 'kevininrussia' error reports early next week and once these are fixed release a forge and dmsguild update.

If you get chance to try out the high count rotation, let me know if you have any issues. ( Its got a number of edge cases, I've tried to get most but could be missing a few... hence forge only for this new feature release. )

-pete

Arnagus
February 19th, 2022, 14:55
5155051551515525155351554
Stumbling the other day over a few spelling errors in your "Spell Token" XML. You might want to correct (and check again for "'" in spell titles with wizard names).

Arnagus
February 19th, 2022, 15:12
Apparently can only attach 5 items... here is the updated XML for my last post.

bratch9
February 19th, 2022, 15:50
Apparently can only attach 5 items... here is the updated XML for my last post.

Thanks for this, the names are based off the Gareths tokens file names.. Mainly built from a 'dir /b' type name list and then converted into xml..

I'll do a check down them by hand to see if any others turn up, but thanks for the updated xml file.


EDIT: Released a new B9_SpellTokens.xml ( on DmsGuild and at top of this thread. ) Includes fixes from 'Arnagus' and a couple of others I found doing a full by hand check.

-pete

MrDDT
February 20th, 2022, 00:10
FORGE ONLY release of the v6.65, this has the 'high' count rotation support for spell tokens. This is done with 'shift+ctrl' and wheel, on a square grid you should get 5 degree ticks.

I've done this as a forge only, and will look at the couple of 'MrDDT' and 'kevininrussia' error reports early next week and once these are fixed release a forge and dmsguild update.

If you get chance to try out the high count rotation, let me know if you have any issues. ( Its got a number of edge cases, I've tried to get most but could be missing a few... hence forge only for this new feature release. )

-pete


Thanks for this, the names are based off the Gareths tokens file names.. Mainly built from a 'dir /b' type name list and then converted into xml..

I'll do a check down them by hand to see if any others turn up, but thanks for the updated xml file.


EDIT: Released a new B9_SpellTokens.xml ( on DmsGuild and at top of this thread. ) Includes fixes from 'Arnagus' and a couple of others I found doing a full by hand check.

-pete


I have the DMsG version only, so can't say what is happening on the forge one, however, using shift + control + scroll wheel resizes the spell effect token.

bratch9
February 20th, 2022, 13:15
I have the DMsG version only, so can't say what is happening on the forge one, however, using shift + control + scroll wheel resizes the spell effect token.

Yes on the DMsGuild version you are subject to the old 'control' has priority over 'shift' rules. So CTRL+(none or any button)+wheel is resize.

Due to wanting to have fine control on the rotate, I had to make 'shift' higher priority. So now shift+ctrl+wheel is rotate, shift+wheel is rotate, ctrl+wheel is resize.

Once I've had chance to look at the couple of reported bugs to do with 'delete' of a linked token, I'll be releasing a forge and dmsguild update.

I use the forge version as the lower number of sales as a test location, as its also got the ability to put a build in the 'test' channel while dmsguild does not. ( Not that i used the forge 'test' channel to release the fine rotate build.. I just put it on 'live' )

-pete

MrDDT
February 20th, 2022, 16:56
B9 want to say again thanks for all the hard work here, I was going to request feature if you could.

Can you make another option outside of Ally, Foe for targeting for All?
This would save us a couple extra clicks.

bratch9
February 20th, 2022, 23:32
B9 want to say again thanks for all the hard work here, I was going to request feature if you could.

Can you make another option outside of Ally, Foe for targeting for All?
This would save us a couple extra clicks.

You can press 'shift' on either button to include all.

-pete

MrDDT
February 21st, 2022, 01:04
You can press 'shift' on either button to include all.

-pete

Sweet thanks.

bratch9
February 22nd, 2022, 15:33
Ruleset 4E

[ERROR] Handler error: [string "scripts/image_B9ST.lua"]:656: attempt to index local 'target' (a userdata value)

Error shown on Host when client swaps their token using this extension: Critically_Awesome_Essentials_-_Generic_Token_Swapper_FGU.ext\

A player is a Druid. I have an effect set up so that with a click of a button on the client side, the token will swap between an elf token and puma token. When this switch happens, the error above pops up on the Host with every token swap.

Hi,

Been looking at this for a while now, too long... as the instructions for the mod make very little sense. I can get a character when adding the effect line to become 'big' but it does not seems to pick up my token in the SName: token; section when I configure this to a token name in my token folder. ( I've got version 2.11 from the past, but not sure if that is the version you are using ? )

Looking at line 656 of image_B9ST.lua, this is a system function override,
function onMoveToken(target), use by the extension when tokens move. And 'SHOULD' always have a 'target' been passed to it. From the error it looks like this is either not been provided due to some call like
imagecontrol.onMoveToken() which would not pass the parameter and maybe cause an error like this. If it was just 'nil' then I would expect a report on 'nil', not 'attempt to index local 'target' (a userdata value)' as per your report.

Since I dont have the 4E side, I was using PF2, maybe this is why the instructions make no sense to me as the .mod file most have been made from some ruleset. But it does not look complex.. take the effect line and set the SName:, and all should work.

Please confirm which version of spell tokens (forge/dmsguild and version. [ I think you are dmsguild 6.5 ] ), and the version of the generic token swapper.

If you can add some screen shots of the exact effect line you are using, and maybe attach the puma token, so I can add it to my folders. Maybe its not working due to a 'case' issue in the filename as my test token had a mix of upper and lower case, maybe this should be all lower case in the filename on my machine and in the string... I matched them for case on my filesystem..

Since I dont get the error you report when it makes the token big, maybe because it did not find the replacement image it did not do some other part of the code that was causing this issue for you... but I was not getting the reported error.

I'm happy to look further, but with so little information and it been in a ruleset 4E which has the stupid guarded subscription rubbish access mode, I just can not play in the same ruleset.

If you could test this with just spell tokens, and generic swapper in a clean campaign in say PF2 with just the core rulebook loaded... then you can attach a zip of the campaign already configured for me to be able to replicate it. ( Either you have some thing setup that I dont or your config is different to me... )

I just have no idea, I spent multiple hours just trying to replicate it and can not.

-pete

bratch9
February 22nd, 2022, 15:39
B9, thanks for this EXT.

I wanted to report an error I had (a few 1000 times in a row).

This error in the attached image happened when I dropped a spell token on a PC token, it would lock to that token creating it to be stacked. I was trying all sorts of things to unlock it to no avail, so I deleted the spell token and anytime I moved the PC token it would call this error over and over.

Also as a request is it possible to set the vision on spell tokens to default to 0? So when someone who controls the token can't see from it's vision? I'm not sure how this would mess up playstyles but if it can't be set because of playstyle change, maybe an option to set it?

The issue I have for this is that if a player casts a spell 120' away they now can click on that token and see everything around it, which they shouldn't be able to see because their player is 120' away.

Also I seem to be having problems with my players not able to load the tokens when pulled on to their PC sheets but I as a GM can reparse it or drag the spell from the spells list onto the PC sheet and it would show the token.

Next question someone ask if you can target using the token, I know CAE does (or did this) but I'm not sure this does that. I've tried to read through all the pages here but its a lot and stuff is out of date because of FGC to FGU and changes over time to FGU.

P.S.
I would love the option to hold a few keys and rotate it based on that by 1 degree then hold another few keys and it rotate by 5 degrees or whatever that option was.

Ive had a look at this, and I have no idea what you were doing to replicate this. I've tried dragging the token between maps, using the 'green' CT or just the CT token line to move between different maps and other things I could think of for what you did to cause this issue. And in all cases it functions as I'd expect without error. Maybe an extension also loaded is causing a different result and a conflict of call order to expected FG calling flow.

If you could have a go on a clean campaign with just spell tokens, and see if you can remember or create a 'flow' of what you did to replicate. This information would be good.

I've tested a number of combinations and can not get this to happen.

Any information on what you were doing and/or some form of replication steps would help a lot.

Thanks, Pete

bratch9
February 22nd, 2022, 15:52
Because I can not replicate the couple of error reported, I've updated the DMsGuild with v6.65 so this is in sync with the forge versions and both now have the 'fine' rotation support.

-pete

MrDDT
February 22nd, 2022, 17:33
Ive had a look at this, and I have no idea what you were doing to replicate this. I've tried dragging the token between maps, using the 'green' CT or just the CT token line to move between different maps and other things I could think of for what you did to cause this issue. And in all cases it functions as I'd expect without error. Maybe an extension also loaded is causing a different result and a conflict of call order to expected FG calling flow.

If you could have a go on a clean campaign with just spell tokens, and see if you can remember or create a 'flow' of what you did to replicate. This information would be good.

I've tested a number of combinations and can not get this to happen.

Any information on what you were doing and/or some form of replication steps would help a lot.

Thanks, Pete

I will for sure keep an eye out. I've not been able to make it happen again either.



Because I can not replicate the couple of error reported, I've updated the DMsGuild with v6.65 so this is in sync with the forge versions and both now have the 'fine' rotation support.

-pete



Thanks awesome going to mess with this new one now.

MrDDT
February 22nd, 2022, 18:09
Wow AMAZING!
Testing out the rotations and it's working flawlessly. Thanks B9



Side question, I notice that when I place the spell tokens, their map visibilities defaults to (Mask Sensitive Visibility) which allows it to be seen threw LOS and vision ranges.
Is there a reason for this or oversight? I think it might be best for making them sensitive to LOS and vision. Unless I'm missing something.


Thanks again for all this super hard work. I know you've been working on this a lot to get it working with in FGU.

Garrick147
February 22nd, 2022, 19:04
I am probably an idiot but is there a video for this extension?

bratch9
February 22nd, 2022, 19:20
I am probably an idiot but is there a video for this extension?

You are not an idiot... I've not made a video. ( Unless somebody else has that I dont know about. )


-pete

bratch9
February 22nd, 2022, 19:28
Wow AMAZING!
Testing out the rotations and it's working flawlessly. Thanks B9



Side question, I notice that when I place the spell tokens, their map visibilities defaults to (Mask Sensitive Visibility) which allows it to be seen threw LOS and vision ranges.
Is there a reason for this or oversight? I think it might be best for making them sensitive to LOS and vision. Unless I'm missing something.


Thanks again for all this super hard work. I know you've been working on this a lot to get it working with in FGU.

LOS and vision are a pain and all mixed up with ownership. Which is needed for players to be able to move their own spell tokens about. With the 'party vision' options adds more complexity.

Its basically not very flexible, and because its so new (ish) very limited api access is available.

I've added your comments to me notes, and when I've got some time I'll try and have further looks.. but I've got a reasonable backlog at the moment.
-pete

MrDDT
February 22nd, 2022, 20:50
LOS and vision are a pain and all mixed up with ownership. Which is needed for players to be able to move their own spell tokens about. With the 'party vision' options adds more complexity.

Its basically not very flexible, and because its so new (ish) very limited api access is available.

I've added your comments to me notes, and when I've got some time I'll try and have further looks.. but I've got a reasonable backlog at the moment.
-pete

Completely understand, just trying to get the most we can.

MrDDT
February 23rd, 2022, 22:25
Using this ext, I've noticed that my players can't use it to target or add spell tokens when they add spells to the PC sheet.

Is this normal working or is this a bug on my end?

(Tested also without any exts but this one loaded)

Garrick147
February 24th, 2022, 12:35
This is pretty much the same issue I am having. I have had to discontinue use of the extension unfortunately I am not computer savvy like most people on the site which was why I wanted to know if there was a video tutorial so a numbnut like me might figure it out.

nephranka
February 24th, 2022, 12:48
Using this ext, I've noticed that my players can't use it to target or add spell tokens when they add spells to the PC sheet.

Is this normal working or is this a bug on my end?

(Tested also without any exts but this one loaded)

I tried it with a client connected and was able to add a spell with its spell token on the player sheet as a player and then add it to the map. Is this only happening when a true player is connected or any client like in my case?

MrDDT
February 24th, 2022, 18:12
I tried it with a client connected and was able to add a spell with its spell token on the player sheet as a player and then add it to the map. Is this only happening when a true player is connected or any client like in my case?

Either me connecting to myself as a player, or someone else connecting. Both are not able to drag a spell from the spell list onto the PC sheet and have it have the spell token on the PC sheet.
If they reparse, it doesn't add the token either.

If I do it as a GM, or reparse as a GM it works.

nephranka
February 24th, 2022, 19:59
Either me connecting to myself as a player, or someone else connecting. Both are not able to drag a spell from the spell list onto the PC sheet and have it have the spell token on the PC sheet.
If they reparse, it doesn't add the token either.

If I do it as a GM, or reparse as a GM it works.

Strange. It works for both me as GM and client. Do you use the Forge or DMsguild?

MrDDT
February 24th, 2022, 20:03
Strange. It works for both me as GM and client. Do you use the Forge or DMsguild?

DMsG

You on discord so we can talk in real time faster?

nephranka
February 24th, 2022, 20:30
DMsG

You on discord so we can talk in real time faster?

Sure thing. I will message you.

MrDDT
February 24th, 2022, 21:13
So we confirmed that the player side with no other exts on my table is not working DM side is.

Nephranka is not seeing this on HIS table, but connecting to mine it is not working correctly.

I do have the DMsG ext version and Nephranka is using the FORGE version. However, I tested my friends table who uses DMsG and it's working. Im going to check for more info on new campaigns and removing xml and stuff.

MrDDT
February 24th, 2022, 21:58
ok tracked down what the issue is (mostly)

It has something to do with my DB.xml

I can remake a new campaign and it works. I can delete my db.xml in the other campaign and it works.

You think you can help me track down what in my db.xml is causing this issue where players are not able to use it to add spell tokens/target with spells tokens?

I've tried deleting all the spell tokens from the spell token list, and using the spell token xml again in my current db.xml, that didn't fix it either.

MrDDT
February 24th, 2022, 22:35
@B9

So I fixed it by editing my db.xml file

This is what I removed. Which also caused me to bring in a new xml for spell tokens. I'm not sure if this was a conflict with the old ext I ran before, or CAE ext or what. But this fixed it once I deleted these lines from the db.xml.

As we all know editing the db file is not great thing to do lightly, so I'm not suggesting anyone take this on, however, once I knew it was limited down to just this one campaign. I knew this was my only option.

Here is a screenshot of the edit I made. This is mostly here for other people if they run into this problem.

Garrick147
February 25th, 2022, 09:27
Like I said earlier I have zero Idea what the technical stuff you smart people are talking about is but I did get it through the Forge.

bratch9
February 25th, 2022, 16:47
@B9

So I fixed it by editing my db.xml file

This is what I removed. Which also caused me to bring in a new xml for spell tokens. I'm not sure if this was a conflict with the old ext I ran before, or CAE ext or what. But this fixed it once I deleted these lines from the db.xml.

As we all know editing the db file is not great thing to do lightly, so I'm not suggesting anyone take this on, however, once I knew it was limited down to just this one campaign. I knew this was my only option.

Here is a screenshot of the edit I made. This is mostly here for other people if they run into this problem.

This looks like old data was in your db.xml file and was causing a conflict of information. Removing them allowed the correct data to be re-added to the db.xml

I'll add a todo to add a 'nuke' button on the configuration file to 'clean' out all the sections.

( Not sure on the '<spell>' group, I thought that was a normal group when you duplicate/add a new spell... I'll take a look as I dont want to delete real player data !! )

-pete

bratch9
February 25th, 2022, 16:54
This is pretty much the same issue I am having. I have had to discontinue use of the extension unfortunately I am not computer savvy like most people on the site which was why I wanted to know if there was a video tutorial so a numbnut like me might figure it out.

Its not hard to setup, but if you previously had a version in the campagin and stopped using it for a long time and then came back, you probably have corrupted data. ( Most of the time If I change the format I 'upgrade' the data as best I can, but only the previous version.. so if you skip a chunk of versions it does not work very well to upgrade.. )

Can you confirm if you had previously used an old version of the extension and are now looking to use a new version ?

Or if you are new and can not figure out how to get things working, it would be best to post a couple of screen shots. ( As you have only basically said can not get it working, which is not much help to figure out the issue. )

If you could post some screen shots of the 'spell configuration' window on your DM side, and a shot of a character sheet that is not showing a spell token when it should.. The I/we can probably help you get the setup correct. Lots of people end up with an odd letter mismatch in the spell name to the spell token configurations.

But the first step is always to check the spell configuration file, list the ruleset, and if you have tested on a clean campaign with just this extension. ( So we can rule out extension conflicts.. )

Once the spell configuration is working, looking at the character sheet to see if a spell token is showing up or not, normally fall into a name-mismatch with the configuration.

Until you can see the token on a character sheet the players have nothing to 'drag' to the map image and hence nothing to target with.

So if you can please post some images of the stage you are at.

Thanks, Pete

bratch9
February 25th, 2022, 16:55
Sure thing. I will message you.

Thanks for helping out MrDDT with this.

-pete

nephranka
February 25th, 2022, 17:07
Thanks for helping out MrDDT with this.

-pete

No worries!

bratch9
February 25th, 2022, 18:53
Just doing a bit of a plug on my new extension for the technical people on the forum, its the only post I'll make linking to this.

-pete

B9's Damage Per Round Extension on Forge (https://forge.fantasygrounds.com/shop/items/521/view)
B9's Damage Per Round Calculation Forum (https://www.fantasygrounds.com/forums/showthread.php?72760-extension-Damage-Per-Round-Calculation-Extension)

nephranka
February 25th, 2022, 19:35
Just doing a bit of a plug on my new extension for the technical people on the forum, its the only post I'll make linking to this.

-pete

B9's Damage Per Round Extension on Forge (https://forge.fantasygrounds.com/shop/items/521/view)
B9's Damage Per Round Calculation Forum (https://www.fantasygrounds.com/forums/showthread.php?72760-extension-Damage-Per-Round-Calculation-Extension)

Looks like something my group might like. Thanks!

bratch9
February 25th, 2022, 21:03
Looks like something my group might like. Thanks!

Any feedback, please put it on its actual forum for me.

It should be on our group game this weekend, so maybe I'll get some feedback from my group as well.

-pete

nephranka
February 25th, 2022, 22:20
Any feedback, please put it on its actual forum for me.

It should be on our group game this weekend, so maybe I'll get some feedback from my group as well.

-pete

Will do.

bratch9
February 26th, 2022, 14:37
v6.67 update adds a couple of strings for the 'better menus' extension.

anathemort
February 26th, 2022, 18:43
I think you've discussed this before, but I wanted to be sure... my spellcaster players are not too excited to use spell tokens because they can't really see what is under the token when they drop it on the map and try to move it around. In this first image, the token has just been dropped and selected, and you can see it is quite opaque and layered above the NPC/PC tokens, making them very difficult to see (the green selection ring doesn't help, but I believe that is baked into FG and can't be easily changed).
51677

If I deselect the token it seems to move down a layer, and it's much easier to see the tokens it's affecting. Is it possible to make this the default layer instead, or maybe a setting for token opacity?
51678

MrDDT
February 26th, 2022, 18:50
I think you've discussed this before, but I wanted to be sure... my spellcaster players are not too excited to use spell tokens because they can't really see what is under the token when they drop it on the map and try to move it around. In this first image, the token has just been dropped and selected, and you can see it is quite opaque and layered above the NPC/PC tokens, making them very difficult to see (the green selection ring doesn't help, but I believe that is baked into FG and can't be easily changed).
51677

If I deselect the token it seems to move down a layer, and it's much easier to see the tokens it's affecting. Is it possible to make this the default layer instead, or maybe a setting for token opacity?
51678

I'm not having this issue. The only time I get the issue with what you show in the first image is if I left mouse click on the token.

If I left mouse click and drag, it doesnt do that. Soon as I drag it off the PC sheet onto the map, it doesnt do that.

About the opacity, this is based on YOUR tokens you use. I've turn down the opacity on most of my images that stay on the map longer than instant. Like Fireball I didn't turn down, but something like Spirit Guardians I did turn it down.

Oddly enough, Fog Cloud, I wouldn't turn down because it also can't be seen through. I even put the darkness effect on it for lighting.

anathemort
February 26th, 2022, 19:02
I agree it's when the token is selected. I have token lock on so players can measure out their movement better, and of course it applies to NPCs and spell tokens too. The result is that it ends up selected and opaque, but I noticed that player tokens don't seem to have any change in opacity when selected - just the green ring.

MrDDT
February 26th, 2022, 19:21
I agree it's when the token is selected. I have token lock on so players can measure out their movement better, and of course it applies to NPCs and spell tokens too. The result is that it ends up selected and opaque, but I noticed that player tokens don't seem to have any change in opacity when selected - just the green ring.

It's normal for this to happen to tokens with transparency on them. The transparent area is showing up when selected as kinda light colored/white. This would happen with a player token also with transparency.

I will let B9 talk more on this maybe he can do something with it, me or my players currently not having this issue as we just know to unselect the token to see under it just fine. Also only the owner/DM of the spell can even do anything with it.

bratch9
February 26th, 2022, 23:53
Spell tokens have a number of issues like this, normally you dont select them as dragging them does not require it to be selected. The token system has no control of the amount of transparency, this is defined by the graphic, if this is from a pack you dont control then you will have to request it to be reduced by the owner of the pack. Or as others have said, if you have access to the token you can tone this down to the level you like.

The stacking order, ie getting the spell token to be 'under' the player tokens ( also a pain for the dm as the npc tokens tend to go under the spell tokens ), we have a 'wish list' item to try and get this fixed as the api side has no control to split the draw order of the tokens. ( and hence the spell tokens that are mixed in with it. )

We have issues getting these sorts of fixes sorted out with the dev team because they decided the way to do spell tokens is to have the DM add them into the map edit layer. This solves the issue of tokens been under the spell token, it also gives you some alpha control of the layer. But the biggest issue is that its all done by the DM and the players have to tell the location and the DM has to edit the map. Its generally also a pain to do and gives more work to the busy DM.

A lot depends on how often you plan to place spell tokens. Our group session tonight had just one placed on the map for a while out of the full 3 hour session and the DM had to move it about to access the npcs under it due to it been a dark token. ( hungar of hadar spell by gareth is a very nice token but very dark around the edge of the circle. )

I feel the biggest issue is that people want it to 'work' perfectly. ( I'm going to go with the like foundry which I have not used, but i think they get all sorts of nice animated spell effects from the videos I've seen.. ) But the reality is we have to work based on the api that is exposed to us and due to the dev team deciding that you have to edit the map to add spell effects by the DM, we are stuck wanting changes to the api that I feel with never happen. Since they think its already a solved issue. Even if players want to place down spell tokens.

On an 'map/image' you can place 'shortcut' pins or 'tokens', and spell tokens become a 'token' just like a player/npc token. And the system is designed to 'bring' the last moved token to the top, and it fails to do this consistently in the game. I've seen the just moved token end up at the bottom of the stack under everything. Which is also a pain if you end up with a smaller token under a big token due to grid snap.

Token locking is also an issue, our group does not use this and its not advised with spell tokens to use this either. It complicates things, because again the api while in token locked mode does not call the token move call back to the clients properly. Which can cause all sorts of issues to try and keep synced positions for the spell tokens. ( Specially linked tokens like spirit guardians etc.. )

I know its not a lot of help and does not answer or solve issues, I've been asking the dev team for nearly 2 years to get some of the important fixes sorted out so we can have better spell token support. They do need a new category to go with 'shortcuts' and 'tokens', but its a brick wall for suggestions as they have a massive wish list of things to deal with. Maybe at some point they might help out and give us some api access.

Spell tokens are the current best 'bodge' to get this working, its got issues that have been talked about a lot on this thread and in wish list for the devs. We have what we have at the moment, when i find 'bugs' i can exploit to sort thing I use them until it gets fixed... And the system uses a couple of bugs and some un-documented api calls to do the things it does. ( And a lot of reverse engineered maths to re-translate and redo lots of the token selection logic )

Its not perfect, I dont advise it to be used on every spell just on the ones that stick around for a while. ( ie I dont advise it for markers on 'instant' spells that vanish instantly, its not a fantastic marker/selector tool for these )

The other option is to have your DM do all the map edit work to add/place/move/configure/size, and I know when I DM that I dont have the time and effort to do that. (Specially for an instant vanish spell, for a multi-round spell maybe at a push. )

What we need to do is get it as good as it can, and I dont see any real ways to improve it further, and continue with the pressure that players want to be able to add spell tokens. Maybe the dev team will allow limited map edit to clients, I dont know.

I wish I could fix some of the stack order issues as I think this would help a lot, I'd love to be able to have animated spell tokens, I'd love to be able to mask them with the line of sight data... but these are flights of fancy for the wish list that I expect never to see.

-pete

anathemort
February 27th, 2022, 02:02
What we need to do is get it as good as it can, and I dont see any real ways to improve it further, and continue with the pressure that players want to be able to add spell tokens. Maybe the dev team will allow limited map edit to clients, I dont know.

I wish I could fix some of the stack order issues as I think this would help a lot, I'd love to be able to have animated spell tokens, I'd love to be able to mask them with the line of sight data... but these are flights of fancy for the wish list that I expect never to see.

-pete

Thanks pete, this resonates with me. Compared to Foundry, which one of my players recently evaluated, we aren't missing a lot of core functionality, albeit the UX is jankier because you've had to do work around instead of with the system; there is a certain smoothness to spell templates that Foundry has out of the box (click cast, click the map to drop your token; it is beneath character tokens and auto-targets affected tokens as you move it around), but what you've built with this extension helps quite a bit and adds a coveted glitz factor for spells that have visible effects.

I sympathize with the struggles and I've voted for these issues on the ideainformer when I've seen them (like this one (https://fgapp.idea.informer.com/proj/?ia=135367)). Thanks for the extra tips on how you are using spell tokens, as that helps me make some suggestions to my players as well.

nephranka
March 7th, 2022, 13:50
Last night my players noticed that if they used the red/green helmets on a spell token to target they pick up hidden tokens on the map as well. These npcs were hidden on the CT and invisible to players on the map but they got picked up in targeting. I was not sure this is expected and if it is possible to change?

bratch9
March 7th, 2022, 14:31
Last night my players noticed that if they used the red/green helmets on a spell token to target they pick up hidden tokens on the map as well. These npcs were hidden on the CT and invisible to players on the map but they got picked up in targeting. I was not sure this is expected and if it is possible to change?

I'm not sure on this one, as I actually think they should get targeted. But I also think in some situations that it should not target them, and the game has no context for it...

An example would be this I guess ?

51904

Which has 3 npc bats, and a player. Only one bat is 'shown' to the player. ( player screen is on the right of the image, gm on the left. )

If the player drags on a fireball, and targets they get to see 'bat 3,2,1' on the target list. The player screen even with the 'arrows' to selected target does not 'give the position' of bat 2,3 away.

But I'm sure the player and I'd agree, that all 3 bats are about to take damage ?

When the damage is rolled, the GM sees the bat 2,3 damage with the 'hidden' icon, and the bat 1 damage... and the player sees only bat 1 damage.

I guess the question is 'should' the combat tracker show hidden NPC names if they are targets or not ?

If its this is hidden from the player on the combat tracker, it might still be selected without them knowing, when they target something else next round ? ( How would they resolve this.. )

Also if they were not targeted, then the DM would have to hand 'fix' the damage on 'bat 2,3' because they should have taken damage. ( Not been shown on the CT, is not 'invincible' )

I'm inclined to say this is fine, unless my player was 'fafing' with the spell token... and selecting targets, moving the spell token, and re-selecting to try and 'find' hidden. In which cased I'd be telling off the player to finalise the placement before targeting..

Can you give a better description of the exact situation in your game, player/npc basic name, and why the gm thought this was an issue ? ( Just some basic context so we can chat about it.. )

-pete

nephranka
March 7th, 2022, 17:19
I'm not sure on this one, as I actually think they should get targeted. But I also think in some situations that it should not target them, and the game has no context for it...

An example would be this I guess ?

51904

Which has 3 npc bats, and a player. Only one bat is 'shown' to the player. ( player screen is on the right of the image, gm on the left. )

If the player drags on a fireball, and targets they get to see 'bat 3,2,1' on the target list. The player screen even with the 'arrows' to selected target does not 'give the position' of bat 2,3 away.

But I'm sure the player and I'd agree, that all 3 bats are about to take damage ?

When the damage is rolled, the GM sees the bat 2,3 damage with the 'hidden' icon, and the bat 1 damage... and the player sees only bat 1 damage.

I guess the question is 'should' the combat tracker show hidden NPC names if they are targets or not ?

If its this is hidden from the player on the combat tracker, it might still be selected without them knowing, when they target something else next round ? ( How would they resolve this.. )

Also if they were not targeted, then the DM would have to hand 'fix' the damage on 'bat 2,3' because they should have taken damage. ( Not been shown on the CT, is not 'invincible' )

I'm inclined to say this is fine, unless my player was 'fafing' with the spell token... and selecting targets, moving the spell token, and re-selecting to try and 'find' hidden. In which cased I'd be telling off the player to finalise the placement before targeting..

Can you give a better description of the exact situation in your game, player/npc basic name, and why the gm thought this was an issue ? ( Just some basic context so we can chat about it.. )

-pete

For me I agree that things like fireballs will move around corners and pick up targets. I can live with that. What the spell tokens don't handle is full cover since the graphic can go through walls, for example.

Our case was a covered wagon where there were thugs inside and thugs driving it. The player did hypnotic pattern, laid out the graphic and clicked the helmet. I had the ones inside the wagon hidden on the CT. The targeting picked them all up.

Foe me, I would like it not to target anything hidden on the CT and the GM can assign the targets manually if the graphic indicates they would be effected.

Perfect world the use of LoS would solve the problem as you could hide things on the CT but the wall would block the targeting on the token. But that is more than likely not possible.

In the bats case, the GM would see all the other bats that are effected at target the player for them. They pick up new information but the GM controls when and how much.

bratch9
March 7th, 2022, 18:27
For me I agree that things like fireballs will move around corners and pick up targets. I can live with that. What the spell tokens don't handle is full cover since the graphic can go through walls, for example.

Our case was a covered wagon where there were thugs inside and thugs driving it. The player did hypnotic pattern, laid out the graphic and clicked the helmet. I had the ones inside the wagon hidden on the CT. The targeting picked them all up.

Foe me, I would like it not to target anything hidden on the CT and the GM can assign the targets manually if the graphic indicates they would be effected.

Perfect world the use of LoS would solve the problem as you could hide things on the CT but the wall would block the targeting on the token. But that is more than likely not possible.

In the bats case, the GM would see all the other bats that are effected at target the player for them. They pick up new information but the GM controls when and how much.

Yep ive been talking with other Gm in my my group.. Some would prefer to it to target them so that it can do the 'save rolls' and 'damage' rolls as required. But they also did not want it showing to the player..

I think the best is to not add them and hence not apply the damage rolls to the non-visible-CT npc...

Then its upto the GM to decide to 'show' the extra bats and have a re-target/add the targets if they want to have it deal the damage with the roll for them.. or not like in your case when inside a cart..

I dont like the idea of possible having 'hidden' selected items on the player side, even if the gm can see what that player has selected.

Also without the spell tokens, the playing situation would be that the non-visible-CT npc would not get targeted or damage rolled for it, as the player would not be able to select the non-visible item... so it would then be the same... the gm would have to decide if the hidden npc would get hit, un-hide them and allow target onto them etc..

I'll add it to my todo list.

( But I still suspect people will ask for hidden npc to get damage... as you say with LoS access we might be able to do that, but its getting spell tokens to be a first class entity which they are not at the moment. It would be nice to just be able to right click a spell token and have the UI for 'cast' and 'damage' icons off the power/spell page show up and it just target everything correct under the shape/LoS taken into account... spell info taken into account for 'hits every body including players or enemies... and maybe popups on the gm side to allow them to 'include or not' hidden npc on the CT... it would be a massive automation change to how FG works... I dont see it happening as the devs dont want to fully automate because a lot of context is missing/not known making it near impossible to manage properly.. its always going to have edge cases to cope with. )

-pete

nephranka
March 7th, 2022, 18:48
I thought the GM can drag the target to npc (hidden) and they do not appear on the player CT but do get listed on the target list of the player's CT?

If so, the way I would see it play out is:
1. The player uses the spell token to target
2. Only non hidden npcs on the CT get targeted.
3. The GM stops the player while they add any additional hidden targets.
4. Rolls are done.
5. GM removed the hidden targets from the player's CT.

So really is is changing the helmets function to only target non hidden npcs. Maybe this could be an option setting?

bratch9
March 7th, 2022, 21:44
I thought the GM can drag the target to npc (hidden) and they do not appear on the player CT but do get listed on the target list of the player's CT?

If so, the way I would see it play out is:
1. The player uses the spell token to target
2. Only non hidden npcs on the CT get targeted.
3. The GM stops the player while they add any additional hidden targets.
4. Rolls are done.
5. GM removed the hidden targets from the player's CT.

So really is is changing the helmets function to only target non hidden npcs. Maybe this could be an option setting?

Not sure on the wording of your first sentence.

But if the Player can only see 'bat 1' and spell token selects it and it only targets non hidden... so player CT target lists 'bat 1'.

when the GM drags the players 'target cursor on the CT' to say 'bat 2', this will show as 'bat 1, bat2' on the players CT, exposing the still hidden npc (bat 2) to the player... in just the same way as it does with the spell token target at the moment.

Which is what I said in my response... Basically if I change the spell token to only add non-hidden, then the GM would have to manually add the hidden to the players target list. This will expose that npc to the player, so the gm may as well just make it shown.

The gm can not make the player CT target list on the gm side list 'bat1, bat2,bat3' and have the player CT target list on the players side only show 'bat 1'. its always going to show the other added npc's to the player.

To allow the GM to have a different target list for a player to what the player is seeing would cause a lot of sync issues.

Its only possible to 'expose' the names of the hidden item to the player, if the gm wants the save/roll/damage system to damage all the bats. ( Or the people in your cart. )

Or the GM will have to work out the save/roll/damage by hand for the bat2,3 ( people in the cart) if they dont want to expose the hidden npc name on the player CT. ( By not adding them )

-pete

nephranka
March 8th, 2022, 00:24
Not sure on the wording of your first sentence.

But if the Player can only see 'bat 1' and spell token selects it and it only targets non hidden... so player CT target lists 'bat 1'.

when the GM drags the players 'target cursor on the CT' to say 'bat 2', this will show as 'bat 1, bat2' on the players CT, exposing the still hidden npc (bat 2) to the player... in just the same way as it does with the spell token target at the moment.

Which is what I said in my response... Basically if I change the spell token to only add non-hidden, then the GM would have to manually add the hidden to the players target list. This will expose that npc to the player, so the gm may as well just make it shown.

The gm can not make the player CT target list on the gm side list 'bat1, bat2,bat3' and have the player CT target list on the players side only show 'bat 1'. its always going to show the other added npc's to the player.

To allow the GM to have a different target list for a player to what the player is seeing would cause a lot of sync issues.

Its only possible to 'expose' the names of the hidden item to the player, if the gm wants the save/roll/damage system to damage all the bats. ( Or the people in your cart. )

Or the GM will have to work out the save/roll/damage by hand for the bat2,3 ( people in the cart) if they dont want to expose the hidden npc name on the player CT. ( By not adding them )

-pete

I guess my point is letting the GM add the hidden npcs, allows the GM the choice of what information to share and when. In the case of the wagon, I would have not added them to the target list (those inside) and the party would not have that information. When the player uses their token, they can picked up new information before I am ready to share or should share. I understand that at some point the information will be know (appearing on the target list). It is just a matter of when. As it is right now, when they target they get all the npcs alerting them to the presence of the ones in the wagon even though they can not be effected by the spell. Forcing me to remove them from their target list but now the info is out there. This caught me off guard.

In the case of the bats, I would add them and they would get the information but that is fine since it is the best that can be done at this time. When npcs are in buildings and other full cover, I think it would be better to let the GM add them or not. Even if this means a more manual process under different circumstances like the bat (which would have been done automatically with the spell tokens function currently).

This is really my preference, hence I thought an option to let others play the way they want would make sense but may be too much work.

Just giving my 2 cents.

I don't want different lists so sorry if that came across that way.

I currently just keep npcs off the map that are behind total cover and add them back at the correct time. It is more work but it is the current system we have. Either way the spell tokens are worth the work, at least in my games.

I hope this helps explain my position better.

bratch9
March 8th, 2022, 13:58
I guess my point is letting the GM add the hidden npcs, allows the GM the choice of what information to share and when. In the case of the wagon, I would have not added them to the target list (those inside) and the party would not have that information. When the player uses their token, they can picked up new information before I am ready to share or should share. I understand that at some point the information will be know (appearing on the target list). It is just a matter of when. As it is right now, when they target they get all the npcs alerting them to the presence of the ones in the wagon even though they can not be effected by the spell. Forcing me to remove them from their target list but now the info is out there. This caught me off guard.

In the case of the bats, I would add them and they would get the information but that is fine since it is the best that can be done at this time. When npcs are in buildings and other full cover, I think it would be better to let the GM add them or not. Even if this means a more manual process under different circumstances like the bat (which would have been done automatically with the spell tokens function currently).

This is really my preference, hence I thought an option to let others play the way they want would make sense but may be too much work.

Just giving my 2 cents.

I don't want different lists so sorry if that came across that way.

I currently just keep npcs off the map that are behind total cover and add them back at the correct time. It is more work but it is the current system we have. Either way the spell tokens are worth the work, at least in my games.

I hope this helps explain my position better.

yep, and i think we agree. I've added a todo item to check for visible.

-pete

nephranka
March 8th, 2022, 18:22
yep, and i think we agree. I've added a todo item to check for visible.

-pete

Cool. Looking forward it! Thanks!

bratch9
March 8th, 2022, 22:07
v6.68 is now released and should not select hidden npc for the player.

let me know if you have any issues..

-pete

nephranka
March 8th, 2022, 22:57
v6.68 is now released and should not select hidden npc for the player.

let me know if you have any issues..

-pete

We will test it this weekend as a group. I will test it on my tonight. Thanks!

Edit: Working as you described. I am shocked you did not make it an option since I am sure not everyone would play it the way we described but either way thanks!

bratch9
March 9th, 2022, 12:59
We will test it this weekend as a group. I will test it on my tonight. Thanks!

Edit: Working as you described. I am shocked you did not make it an option since I am sure not everyone would play it the way we described but either way thanks!

I made it the default, because if the player was not using spell tokens, that player could only ctrl-click on visible npc to target. So it follows the standard of what happens in targeting by default.

If people want I can 'option' the ability to auto select hidden for player.

But I wanted to keep it more inline with how the target system works by default.

-pete

nephranka
March 9th, 2022, 13:49
I made it the default, because if the player was not using spell tokens, that player could only ctrl-click on visible npc to target. So it follows the standard of what happens in targeting by default.

If people want I can 'option' the ability to auto select hidden for player.

But I wanted to keep it more inline with how the target system works by default.

-pete

Makes sense. Thanks again for the fast turn around. It happens more in play than you think...at least for me.

bratch9
March 9th, 2022, 18:38
v6.69 fix radial token rotate buttons for high rotation support.

bratch9
March 15th, 2022, 22:52
Added a batch file to the start of this thread, 'GenerateSpellTokenImage.txt' ( FG only allow TXT uploads, rename to '.bat' ) which uses ImageMagick to generate blank spell token png given a 'size in feet' and 'pixels per 5 feet'.

It should help people who want to create spell tokens as this can then be loaded in photoshop/gimp and the blank color replaced with an image. The alpha is setup as the shape.

-pete

bratch9
March 29th, 2022, 21:09
v6.7 updated, added extra cone shapes. So now the system has 'cone narrow' and 'cone wide' options to cover the 5e narrow code and the wider cones of pathfinder. Also added 'centred' version of code which waste some image space to allow it to rotate around the cone fire point. Also updated the 'GenerateSpellTokenImage.txt' (.bat) file to generate these extra shapes, and added a section that can be enabled to also generate 35x35 pixel icons with the shape and a blue centre/rotation point.

bratch9
May 18th, 2022, 10:35
Just a note on the new released 'Version 4.2.0 (2022-05)', this lists a number of api changes that adjust the 'units' space. I'm sure this is going to impact token placement/hit box/movement.

I'll try and take a look at this and release an update soon.

Thanks, Pete

bratch9
May 18th, 2022, 21:02
v6.8 updated to reflect the 'units' space adjustment in the image.

plap3014
June 24th, 2022, 15:28
Hi,

it is possible to have all of the token from spell token 2.1 from DM guild alreay setup?
https://www.dmsguild.com/product/195599/DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21

regards

bratch9
June 24th, 2022, 15:34
Hi,

it is possible to have all of the token from spell token 2.1 from DM guild alreay setup?
https://www.dmsguild.com/product/195599/DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21

regards

At the start of this thread is a download 'B9_SpellTokens.xml' which can be imported with the 'blue' button on the spell configuration window. This should configure for the dmsguild pack you are asking about.

-pete

plap3014
June 24th, 2022, 15:36
Perfect! and thanks for your quick reply!

Gezzer
July 1st, 2022, 11:28
Okay I'll admit that I'm a bit of an idiot with some stuff, but I'm totally lost here. I gather that the purpose of this add-on is to add an animation of a token to trigger when a spell is used right? Well I'm just not getting it to work. I'm using a set of custom spell tokens from a artist I support on patreon. I've got them located in my campaign tokens folder. I've been able to create an entry in the Spell Token Configuration field titled "Black Dragonborn Breath Weapon" using the most appropriate token from my folder for the effect. I reparse the spell actions holding down the shift key and I see the entry for the ability in the character sheet actions tab now has a little icon beside it. So now when I use it I don't see any sort of token effect. I've dragged the save and damage rolls onto both the NPC entry in the combat tracker and the token for the NPC on the encounter map and nothing. I've tried dragging the token from the character sheet on to the battle map and the whole thing covers the entire map. As I said I've got no idea what I need to do to get this to work.

bratch9
July 1st, 2022, 16:20
Okay I'll admit that I'm a bit of an idiot with some stuff, but I'm totally lost here. I gather that the purpose of this add-on is to add an animation of a token to trigger when a spell is used right? Well I'm just not getting it to work. I'm using a set of custom spell tokens from a artist I support on patreon. I've got them located in my campaign tokens folder. I've been able to create an entry in the Spell Token Configuration field titled "Black Dragonborn Breath Weapon" using the most appropriate token from my folder for the effect. I reparse the spell actions holding down the shift key and I see the entry for the ability in the character sheet actions tab now has a little icon beside it. So now when I use it I don't see any sort of token effect. I've dragged the save and damage rolls onto both the NPC entry in the combat tracker and the token for the NPC on the encounter map and nothing. I've tried dragging the token from the character sheet on to the battle map and the whole thing covers the entire map. As I said I've got no idea what I need to do to get this to work.

First, welcome always happy to help.

So the first thing to clear up, since you have got probably further than most do with custom graphics effect token, is the issue with the configured size. If you open up the spell configuration window, and use the icon or image and drag that only any image map it will translate the graphics resolution via a 'size per 5 feet' into the map size. So if you have a graphic that is 100x100 pixels, and you want this to cover 2x2 squares, ie a 10 foot x 10 foot space.. then you set the 'pixels per 5 units' to 50. ( Note in ruleset 4e that uses 1 unit per square the factor of 5* is taken into account, so you might be miss-mapping for that ruleset. Its simple to process for all the rulesets that tend to use 5 feet squares. The other thing might be that your map is using a different square to space size, as this also adjusts the scale factors. ) if you drag the token onto a map and it ends up been 10x10 squares on the grid and you wanted it to be 5x5 squares then you need to double the 'pixels per 5 units'

See,

53383

This uses a 280x280 pixel main graphic ( the small icon is not configured hence the blank token space. ) because the alarm is a 20 foot x 20 foot effect, this covers 4x4 on the typical image grid. So requires 280/4 = 70 pixels per 5 unit on the image map.

Second, it sounds like you have much of the rest as I'd expect. It seems that your player and NPC are seeing this image on the character sheet for the spell and/or on the NPC. You are correct that you have to drag this image onto the image map and it should draw it as a token. ( You say its too big, hence the above to help you correct the size. )

Third, expectations... The system does not 'automate' spells, it only places a token onto the map to show the location the player/npc is using causing the effect. You still need to use the character sheet spell effect buttons/npc spell line to process the spell. For the spells to process you have to 'target' as normal in FG. What the spell tokens extension also adds, is a 'right click' radial menu on the spell token you placed on the map to allow targeting of players(green)/foe(red) person icon like on the CT bottom middle icons. This can set the player that cast the spell/placed the tokens targets ready for you to process the spell off the character sheet/npc CT lines.

Hope this helps you get further and understand the limits of the extension. ( Automated spells need a lot of context for anything but the simplest spells, and automating the simplest spells has no reason as they are so simple.. )

-pete

bratch9
July 1st, 2022, 16:21
Okay I'll admit that I'm a bit of an idiot with some stuff, but I'm totally lost here. I gather that the purpose of this add-on is to add an animation of a token to trigger when a spell is used right? Well I'm just not getting it to work. I'm using a set of custom spell tokens from a artist I support on patreon. I've got them located in my campaign tokens folder. I've been able to create an entry in the Spell Token Configuration field titled "Black Dragonborn Breath Weapon" using the most appropriate token from my folder for the effect. I reparse the spell actions holding down the shift key and I see the entry for the ability in the character sheet actions tab now has a little icon beside it. So now when I use it I don't see any sort of token effect. I've dragged the save and damage rolls onto both the NPC entry in the combat tracker and the token for the NPC on the encounter map and nothing. I've tried dragging the token from the character sheet on to the battle map and the whole thing covers the entire map. As I said I've got no idea what I need to do to get this to work.

First, welcome always happy to help.

So the first thing to clear up, since you have got probably further than most do with custom graphics effect token, is the issue with the configured size. If you open up the spell configuration window, and use the icon or image and drag that only any image map it will translate the graphics resolution via a 'size per 5 feet' into the map size. So if you have a graphic that is 100x100 pixels, and you want this to cover 2x2 squares, ie a 10 foot x 10 foot space.. then you set the 'pixels per 5 units' to 50. ( Note in ruleset 4e that uses 1 unit per square the factor of 5* is taken into account, so you might be miss-mapping for that ruleset. Its simple to process for all the rulesets that tend to use 5 feet squares. The other thing might be that your map is using a different square to space size, as this also adjusts the scale factors. ) if you drag the token onto a map and it ends up been 10x10 squares on the grid and you wanted it to be 5x5 squares then you need to double the 'pixels per 5 units'

See,

53383

This uses a 280x280 pixel main graphic ( the small icon is not configured hence the blank token space. ) because the alarm is a 20 foot x 20 foot effect, this covers 4x4 on the typical image grid. So requires 280/4 = 70 pixels per 5 unit on the image map.

Second, it sounds like you have much of the rest as I'd expect. It seems that your player and NPC are seeing this image on the character sheet for the spell and/or on the NPC. You are correct that you have to drag this image onto the image map and it should draw it as a token. ( You say its too big, hence the above to help you correct the size. )

Third, expectations... The system does not 'automate' spells, it only places a token onto the map to show the location the player/npc is using causing the effect. You still need to use the character sheet spell effect buttons/npc spell line to process the spell. For the spells to process you have to 'target' as normal in FG. What the spell tokens extension also adds, is a 'right click' radial menu on the spell token you placed on the map to allow targeting of players(green)/foe(red) person icon like on the CT bottom middle icons. This can set the player that cast the spell/placed the tokens targets ready for you to process the spell off the character sheet/npc CT lines.

Hope this helps you get further and understand the limits of the extension. ( Automated spells need a lot of context for anything but the simplest spells, and automating the simplest spells has no reason as they are so simple.. )

-pete

kevininrussia
July 8th, 2022, 02:16
Ruleset 4e
Extensions: Spell Tokens, Critically Awesome Essentials Generic Token Swapper FGU, Aura Effects.

I get this error when shape changing to a new token image and then entering a square that adds an aura effect.

[7/7/2022 6:13:00 PM] s'newAddEffect('', '', 'Dashinka', 'Shifted; SName: Panther; SSize: M', true, 'nil')'
[7/7/2022 6:13:04 PM] s'newAddEffect('', '', 'Dashinka', 'FROMAURA; Infectious Wrath; IF: Bloodied; ATK: 1', false, 'nil')'
[7/7/2022 6:13:04 PM] [ERROR] Handler error: [string "scripts/image_B9ST.lua"]:752: attempt to index local 'target' (a userdata value)

bratch9
July 8th, 2022, 11:42
Ruleset 4e
Extensions: Spell Tokens, Critically Awesome Essentials Generic Token Swapper FGU, Aura Effects.

I get this error when shape changing to a new token image and then entering a square that adds an aura effect.

[7/7/2022 6:13:00 PM] s'newAddEffect('', '', 'Dashinka', 'Shifted; SName: Panther; SSize: M', true, 'nil')'
[7/7/2022 6:13:04 PM] s'newAddEffect('', '', 'Dashinka', 'FROMAURA; Infectious Wrath; IF: Bloodied; ATK: 1', false, 'nil')'
[7/7/2022 6:13:04 PM] [ERROR] Handler error: [string "scripts/image_B9ST.lua"]:752: attempt to index local 'target' (a userdata value)

Just taking a very quick look at this, ( code snip.. )



function onMove(target)
if target.getContainerNode() ~= getDatabaseNode() then
return;
end


The above is the code that checks what container (ie image) the target is on, when the 'onMove' callback runs. This suggests to me that something managed to cause a 'onMove' but did not provide a 'target' some how. This is an 'token' standard api override.

I dont have the 'token swapper FGU' extension, but auraEffects v0.4 is available on the forum. I can see the generic 'critically awesome essentials and one click druid' dmsguild if this the extension you are thinking about.. Or can you provide a link to the actual extension ?

Could you check to see if this can be replicated in a 5e ruleset with basic character and these extensions and FG battle map, and attach the campaign. ( I know you say 4e, but I have none of the 4e stuff as I understand its previous subscription only )

It looks like some extension interaction, with the token onMove and I'd expect all 3 extensions to grab that callback so it could just be an order of execution thing.

Any extra information would be nice, I'll try with spell token extension and aura as I have those and give it a test.. but it sounds like the token swapper interaction....

Did you have a spell token on the map for that character before doing a token swap to a creature/back to player, and then move around ? ( Just thinking if it happened during a delete/swap interaction and its some database sync issue between clients/servers. )

Also was the error on the client that did the swap, or is this a host error when a client swapped etc ?

Thanks,
-pete

kevininrussia
July 8th, 2022, 15:11
Just taking a very quick look at this, ( code snip.. )



The above is the code that checks what container (ie image) the target is on, when the 'onMove' callback runs. This suggests to me that something managed to cause a 'onMove' but did not provide a 'target' some how. This is an 'token' standard api override.

I dont have the 'token swapper FGU' extension, but auraEffects v0.4 is available on the forum. I can see the generic 'critically awesome essentials and one click druid' dmsguild if this the extension you are thinking about.. Or can you provide a link to the actual extension ?

Could you check to see if this can be replicated in a 5e ruleset with basic character and these extensions and FG battle map, and attach the campaign. ( I know you say 4e, but I have none of the 4e stuff as I understand its previous subscription only )

It looks like some extension interaction, with the token onMove and I'd expect all 3 extensions to grab that callback so it could just be an order of execution thing.

Any extra information would be nice, I'll try with spell token extension and aura as I have those and give it a test.. but it sounds like the token swapper interaction....

Did you have a spell token on the map for that character before doing a token swap to a creature/back to player, and then move around ? ( Just thinking if it happened during a delete/swap interaction and its some database sync issue between clients/servers. )

Also was the error on the client that did the swap, or is this a host error when a client swapped etc ?

Thanks,
-pete

Hi, the error only happens after the token is swapped (I only tested on the Host). For example, a druid shape changing to a bear. If no token swap, then no error.

"critically awesome essentials and one click druid" has the generic token swapper. Might be better to test on Pathfinder for example because they have a specific extension for 5e. https://www.dmsguild.com/product/261591/Critically-Awesome-Essentials--One-Click-Druid-Fantasy-Grounds

I did not have a spell token on the map.

I will do more testing on this today with other rule set. I'm sure its something with the generic token swapper but this error was not happening some builds ago and the token swapper has not been updated in a long time.

bratch9
July 11th, 2022, 12:18
Hi, the error only happens after the token is swapped (I only tested on the Host). For example, a druid shape changing to a bear. If no token swap, then no error.

"critically awesome essentials and one click druid" has the generic token swapper. Might be better to test on Pathfinder for example because they have a specific extension for 5e. https://www.dmsguild.com/product/261591/Critically-Awesome-Essentials--One-Click-Druid-Fantasy-Grounds

I did not have a spell token on the map.

I will do more testing on this today with other rule set. I'm sure its something with the generic token swapper but this error was not happening some builds ago and the token swapper has not been updated in a long time.

My testing in the 5e version, I can have a druid swapped to bear with a spirit guadian effect on, and move an npc into and out of the area and dont see to have any issues.. its adding the effect onto the npc...

Because the shapes are not coded and I dont use other rulesets, I can not test/configure a 4e/pf version and spend ages setting up test. ( Already spent over an hour trying to configure in other rulesets and in 5e. )

If I get more time then I'll look at it further, but getting me a configured campaign test zip and instrunctions... 'apply effect this...' move npc to this location etc... to replicate would help a lot on this.

Thanks, Pete

EDIT: Added a zip of a 4e campaign. Set up a blank character and made a blank npc, added to the FG battlemap... added an aura and a wildeshape effect. ( The effect does not seem to 'process' onto the character like it does in 5e. ) But the aura is been added/removed from the npc as it moved to the aura size of the player.
If you can let me know what 'options' or thing I'm doing wrong to make the shape change happen and cause the error then I can take a look..

( Or provide a configured zip file.. )

-pete

kevininrussia
July 11th, 2022, 17:14
My testing in the 5e version, I can have a druid swapped to bear with a spirit guadian effect on, and move an npc into and out of the area and dont see to have any issues.. its adding the effect onto the npc...

Because the shapes are not coded and I dont use other rulesets, I can not test/configure a 4e/pf version and spend ages setting up test. ( Already spent over an hour trying to configure in other rulesets and in 5e. )

If I get more time then I'll look at it further, but getting me a configured campaign test zip and instrunctions... 'apply effect this...' move npc to this location etc... to replicate would help a lot on this.

Thanks, Pete

EDIT: Added a zip of a 4e campaign. Set up a blank character and made a blank npc, added to the FG battlemap... added an aura and a wildeshape effect. ( The effect does not seem to 'process' onto the character like it does in 5e. ) But the aura is been added/removed from the npc as it moved to the aura size of the player.
If you can let me know what 'options' or thing I'm doing wrong to make the shape change happen and cause the error then I can take a look..

( Or provide a configured zip file.. )

-pete

Hi, I will check out your test campaign today. I quickly made a test campaign with only the three extensions loaded. Token swap is added and when moving into the aura the error happens. Attaching campaign zip.

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

jfg1984
July 11th, 2022, 18:30
So I've got a question,

Is there any way to adjust the degree to which you rotate these spell tokens when you have them on the battle map? I'm loving the visuals that they bring but I find that the default 45 degree rotation increments that FG wants to do with them to be incredibly limiting when trying to make use of a token that happens to represent a cone or line type spell effect. Having a more granular rotation increment would help make the use of these tokens smoother on the battle map.

bratch9
July 12th, 2022, 15:20
So I've got a question,

Is there any way to adjust the degree to which you rotate these spell tokens when you have them on the battle map? I'm loving the visuals that they bring but I find that the default 45 degree rotation increments that FG wants to do with them to be incredibly limiting when trying to make use of a token that happens to represent a cone or line type spell effect. Having a more granular rotation increment would help make the use of these tokens smoother on the battle map.

using 'shift + wheel' to rotate 45 deg
using 'shift + ctrl + wheel' for fine control rotation.

-pete

jfg1984
July 12th, 2022, 15:38
You sah, are both a gentlemen and a scholar. I tip my hat to you.

bratch9
July 12th, 2022, 16:10
Hi, I will check out your test campaign today. I quickly made a test campaign with only the three extensions loaded. Token swap is added and when moving into the aura the error happens. Attaching campaign zip.

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

Had to adjust all your tokens to get to a working campaign,

53512

I can get the main issue to fire with just the token swapper and aura system... Causing the system level 'mouse update' to fail with a what looks like a nil. ( Which obviously causes spell token 'onmovetoken' to fail when included, just code sequence order.. )

Can you try at your side without spell token extension, as I suspect you will get the same issue.

Thanks, Pete

kevininrussia
July 12th, 2022, 19:33
Had to adjust all your tokens to get to a working campaign,

53512

I can get the main issue to fire with just the token swapper and aura system... Causing the system level 'mouse update' to fail with a what looks like a nil. ( Which obviously causes spell token 'onmovetoken' to fail when included, just code sequence order.. )

Can you try at your side without spell token extension, as I suspect you will get the same issue.

Thanks, Pete

When testing I was using arrow keys for movement which caused the error with Spell Token loaded and not happen when it's not loaded. Using the mouse movement, I do see the error when Spell Token is not loaded.

Now that I see it happens on mouse drag without Spell Token, I will report to the token swapper dev. Thanks for your time :-)

bratch9
July 12th, 2022, 22:17
When testing I was using arrow keys for movement which caused the error with Spell Token loaded and not happen when it's not loaded. Using the mouse movement, I do see the error when Spell Token is not loaded.

Now that I see it happens on mouse drag without Spell Token, I will report to the token swapper dev. Thanks for your time :-)

I dont tend to use the keys to move. Maybe that will help find the path that is causing the issue in the token swapper. As its probably to do with the delete of the token when the wild shape gets reversed, maybe that delete causes a movement update. Hence the token onmove and mouse update getting called with a nil and trying to access causes the errors. It just so happened that the spell token one fires before the more global mouse update function.

I suspect if it only started happening with no real update to the aura or swapper, that a FGU update at the system level might have added some extra function flow that needs to now be taken into consideration.

With the mouse drag, when you drag into the aura it cause the error, when you drag out the aura it causes the error... but dragging the token around away from the aura does not cause the error. This implies something that aura does, that the swapper probably catches and then ends up deleting the token in some way and leaving a nil pointer reference that happens to be used in the mouse update.

If you get an update from either extension that fixes the issue, please update this part of the post thread to say which extension and version number fixed the issue. So that if anybody see the thread for my extension, knows that its been fixed.

Thanks, Pete

bratch9
July 15th, 2022, 21:24
v6.9 Updated with ruleset changes to remove 'isClientFGU' usage due to this now been removed from the API.

similarly
July 18th, 2022, 13:04
Quick question:
I've been putting the xml files in the extensions folder, but should they go there, or in the mod folder? I can't remember, and there's no longer a page on dmsguild

bratch9
July 18th, 2022, 17:05
Quick question:
I've been putting the xml files in the extensions folder, but should they go there, or in the mod folder? I can't remember, and there's no longer a page on dmsguild

Hi,

You can put those files any place on your computer. When you use the 'import' button on the spell token configuration with, it opens a 'system folder window' which you can move to any place on your machine to load the file from. ( The extension does not auto load these from a known location, as I dont know if you are using a spell token pack or not or which it would be etc.. )

I'd stuff them some place in the FG folder tree, either the root or extension or modules.

-pete

amanwing
July 18th, 2022, 20:29
is there a way to use this with AD&D 2e?

bratch9
July 18th, 2022, 22:58
is there a way to use this with AD&D 2e?

I have no idea, I've never used the 2e ruleset so probably have very little data to even be able to configure up the required testing to look into it.

If you are willing to create a test campaign and upload it, I'll take a look. I can not say if/when I might get around to adding support.

I'd need a character with spells, maybe fireball and/or a few others like Alarm, fog cloud, and say an npc on the CT that might have these sorts of spells. ( If you take a look in a txt editor of the 'B9_SpellTokens.xml' you could look down the <name> sections for spells that exist in that spell token pack. ( Its 5e based so probably a lot of overlap with the original 2e ruleset spells. )

Do not enable any extensions, so just the 2e ruleset campaign. ( You dont even need to have the spell tokens extensions, as you did not say if you owned it or not.. )

Just zip the clean campaign file and attach it to this thread and I'll pick it up and take a look at some point.

I can not say if its possible, it depends on how the ruleset was built and if the linkage and image and token control systems are close to the other supported ruleset for the extension.

Thanks, Pete

similarly
July 18th, 2022, 23:54
Hi,

You can put those files any place on your computer. When you use the 'import' button on the spell token configuration with, it opens a 'system folder window' which you can move to any place on your machine to load the file from. ( The extension does not auto load these from a known location, as I dont know if you are using a spell token pack or not or which it would be etc.. )

I'd stuff them some place in the FG folder tree, either the root or extension or modules.

-pete

Thank you very much! I bought this ages ago and couldn't remember how it worked!

amanwing
July 19th, 2022, 07:02
I have no idea, I've never used the 2e ruleset so probably have very little data to even be able to configure up the required testing to look into it.

If you are willing to create a test campaign and upload it, I'll take a look. I can not say if/when I might get around to adding support.

I'd need a character with spells, maybe fireball and/or a few others like Alarm, fog cloud, and say an npc on the CT that might have these sorts of spells. ( If you take a look in a txt editor of the 'B9_SpellTokens.xml' you could look down the <name> sections for spells that exist in that spell token pack. ( Its 5e based so probably a lot of overlap with the original 2e ruleset spells. )

Do not enable any extensions, so just the 2e ruleset campaign. ( You dont even need to have the spell tokens extensions, as you did not say if you owned it or not.. )

Just zip the clean campaign file and attach it to this thread and I'll pick it up and take a look at some point.

I can not say if its possible, it depends on how the ruleset was built and if the linkage and image and token control systems are close to the other supported ruleset for the extension.

Thanks, Pete

I made a test campaign with a PC and NPC like you asked. I have your spell tokens but I only used them for 5e. How can I export the campaign to get it to you?

bratch9
July 19th, 2022, 12:32
I made a test campaign with a PC and NPC like you asked. I have your spell tokens but I only used them for 5e. How can I export the campaign to get it to you?

Just go to the fantasy grounds install location, and open the folder 'campaigns', inside this you should see the folder of the name you called the campaign... just zip that and attach it to the forum.

-pete

amanwing
July 19th, 2022, 12:47
Here is the campaign

Athinar
July 30th, 2022, 15:18
Okay, I have the Spell Token Extension, now I need the step by step instructions to make this work

jfg1984
July 30th, 2022, 17:37
Okay, I have the Spell Token Extension, now I need the step by step instructions to make this work

Should be able to follow the ones in the OP. That worked for me.

Athinar
July 30th, 2022, 17:55
The ones in the OP?

jfg1984
July 30th, 2022, 17:58
The Original Post, back on page 1 of the thread.

Athinar
July 30th, 2022, 18:00
Where did everyone get the Tokens from? Website? How to assign the token to the spell, Drag it to the page?

XMLs uploaded

Where do you place the GenerateSpellTokenImage.bat file?

Video?

MrDDT
July 30th, 2022, 19:50
Hit me up on discord and I will get you set up.

bratch9
July 31st, 2022, 19:02
Okay, I have the Spell Token Extension, now I need the step by step instructions to make this work

Hi Athinar,

So the step by step can get very complex depending on what you want to do. If you have access to the DMsGuild typical spell pack most people use as spell tokens, DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21 (https://www.dmsguild.com/product/195599/DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21) , then you can use the import button on the 'spell configuration window' to load the 'B9_SpellTokens.xml' from any location on your computer to configure 5e spells for this pack.

If you want to draw your own spell tokens, then you can use the 'GenerateSpellTokenImage.bat' and ImageMagic ( linked on first post of this thread ), this with some basic size settings will generate a number of masked shape token images you can use in any image editor (gimp/photoshop etc. ) to draw your token on. Pick the shape type you want, ie one of the 'cone' shapes for a cone spell token effect.

In the 'spell configuration window' you can add a new line with the 'green +' button on the bottom. ( or the radial ), Find your token from the 'assets' menu button on the right ( probably in the tokens submenu, assuming you put your custom graphics in the FG install folder/tokens folder. ) And drag this onto your new line 'token circle' at the far right of the line. ( If you also used the 'i_shape.png' smaller icon made with the batch file you can use the other 'token circle' for that. ) With a name and graphics configures, you need to set the 'size per 5 units' which you used in the batch file, and set the shape toggle box to the shape you used.

Now you can test this by just dragging it from the 'spell config window' onto a map image, to check that the spell token shows as the expected size and responds to the shape selected correctly. If the shape is the wrong size, adjust the 'size per 5 units'.

For the 'collision percentage' set this to 100% to start with, but you can reduce it down if you want to give your players a little more 'play room' around the token.. This depends on how you have 'snap to grid' and how 'loose' a DM you are with exact square coverage to selection.. Its flexible for you to play with. I think most circle at about 95% on grid snap, tends to better select tokens more on the grid in the shape more expected for full square selection etc..

For the players/npc as long as the name in the spell configuration window matches the name of the spell, then the player adds the spell to character sheet the spell token should now show on the right of the spell name. ( And in the combat tracker for 5e, NPC on the effects list of the spell etc.. ) These will either be the 'icon' you set, or FG will use the full size spell token if you did not specify an icon.

If a token is dropped such that the centres of the spell token and a player/npc token match, these will be 'linked'. Think 'spirit guardian' spell.. And you can drag the 'spell token' and it will drag the player/npc with it.. or drag the player/npc and the spell token should drag with player/npc. NOTE... pressing 'shift' stops this default link action.

You can rotate the spell tokens in the normal way, for fine rotation you can use shift+control+wheel.

If you want to get extra advanced, you can also configure a 'spell lighting effect' using the 'link shield' type button at the end of the spell effect name in the configuration window. This gives access to the lighting values that can be configured within FG. To understand these read FG documentation about lighting effects...

Players/NPC can right-click 'radial' target using the icons at the bottom of the radial menu for the spell token on a map.. Using the green/red friend/foe icons on the radial. ( The same ones on the DM combat tracker bottom middle.. )

I think this covers the basic, to slightly past basic configuration and setup. If you need more advanced help, post a question with some images as to how far you have got and what issue you are trying to configure. ( Its possible that it might not be a valid feature you are thinking, but it might be a good suggestion to add etc.. )

-pete

LtAugie
August 23rd, 2022, 00:39
Any pre-made spell tokens available for Pathfinder 2.0 ?

bratch9
August 24th, 2022, 18:27
Any pre-made spell tokens available for Pathfinder 2.0 ?

Not that a know about.

This 5e set DmsGuild-Spell-Tokens-21 (https://www.dmsguild.com/product/195599/DUNGEONS-AND-DRAGONS-5e-Spell-Tokens-21) has some fantastic tokens, you can convert that from a 5e only into any ruleset with a quick edit of the '.mod' file. But I'm not a pathfinder 2.0 player so do not know the 'spells' that need tokens to know if this is suitable for you.

if you search 'spell tokens' on DmsGuild you can find a number of people providing tokens. Again, non specific for PF2, but you might like the look of the token(s) and could add them to your 'tokens' folder and configure them by hand in the spell tokens configuration screen.

-pete

Zacchaeus
August 24th, 2022, 18:36
Any pre-made spell tokens available for Pathfinder 2.0 ?

You'll also find spell tokens here; which can be used in any ruleset https://www.fantasygrounds.com/store/product.php?id=SWKARTPACK_SPELLTEMPLATES

bratch9
August 24th, 2022, 19:05
You'll also find spell tokens here; which can be used in any ruleset https://www.fantasygrounds.com/store/product.php?id=SWKARTPACK_SPELLTEMPLATES

Yes these do exist, but are not recommended as suitable for use with this extension. As they have incorrect alpha values due to been designed for the GM to apply them into the map image layers which has alpha control. While player placed 'tokens' on the map do not get this support due to the current exposed API for tokens. ( I do have a mapping file for them 'B9_SpellTemplates.xml' available at start of this thread. )

And hence they can be configured into the 'spell token configuration' window to allow them for use in this extension, the result image when used by players dragging them onto the map from a character sheet spell will be a 'solid' spell token that make using on the map by the player very hard as they will not be able to see any enemy tokens that happen to be under the spell token. ( Again exposed API does not allow for stopping the token order getting into poor situations. )

So these tokens fall into the GM does all the spell token size/placement when a player requests a token for a spell been cast. The advantage is the GM can control the alpha and the layer in the map the token image is placed and so can place then between the layers in the map as needed. Say 'grease' spell, could be placed on a map via the GM layer control, on top of the 'base' map image but under the 'table+chairs' layer... assuming the map is made of many layers and not just an imported single jpg/png map etc..

-pete

spencerg
September 15th, 2022, 03:35
after double-clicking to clear --- how do you get it back? I see no drop-zone to add a token back.?

MrDDT
September 15th, 2022, 03:55
after double-clicking to clear --- how do you get it back? I see no drop-zone to add a token back.?

right click the spell, hold shift, and while holding shift click reparse.

bratch9
September 15th, 2022, 10:29
right click the spell, hold shift, and while holding shift click reparse.

This is correct, thanks MrDDT for the quick response.

I'm thinking of removing the 'clear' double click, or do people still want a way to remove a spell token from the character sheet if they are not going to be using it. ( But the DM configured it for use etc.. )

-pete

MrDDT
September 15th, 2022, 14:02
I do think its a bit to easy to clear it, I know a lot of people clear it by mistake. Maybe use another combo of keys/mouse to clear it.

bratch9
September 15th, 2022, 14:30
I do think its a bit to easy to clear it, I know a lot of people clear it by mistake. Maybe use another combo of keys/mouse to clear it.

I could change to to have shift+ctrl+double click... but mainly people read the help text and tend to think more that it will clear the spell token off the map and not off the character...

But thinking about changing it.

-pete

spencerg
September 15th, 2022, 17:11
thank you!

Arnagus
September 25th, 2022, 09:21
Hey Pete,
My group found and exploited a bug in your spell token extension last night.
I am using the spell tokens not only for player spells but also monster spells. Those NPCs are usually unidentified - I put the type into the unidentified name attribute (e.g. "outsider", or "animal") and only after a knowledge (survival) check, they get them named. When such an unidentified critter casts a spell with a token, the token owner is shown when hovering over the spell token. However - this is the identified name, even if the critter is still unknown.
Can you please add a check if the caster of the spell is identified or not and use the corresponding attribute for ownership?
Many thanks in advance!

bratch9
September 28th, 2022, 16:53
Hey Pete,
My group found and exploited a bug in your spell token extension last night.
I am using the spell tokens not only for player spells but also monster spells. Those NPCs are usually unidentified - I put the type into the unidentified name attribute (e.g. "outsider", or "animal") and only after a knowledge (survival) check, they get them named. When such an unidentified critter casts a spell with a token, the token owner is shown when hovering over the spell token. However - this is the identified name, even if the critter is still unknown.
Can you please add a check if the caster of the spell is identified or not and use the corresponding attribute for ownership?
Many thanks in advance!

Hi, This has been an issue from the start, it does not come up very often. I'll add it, as I know a lot has changed in the ruleset with addition of extra functions. ( I think they have now added 'ResolveName', in the time of the extension you had to do a number of hoop jumps to get the name consistently... so maybe its been sorted not.. )

I'm looking at a bigger changed to spell tokens, so will add this into the re-write code as I split it into the CommonCore and SpellToken extension.

-pete

MrDDT
September 28th, 2022, 17:04
Hi, This has been an issue from the start, it does not come up very often. I'll add it, as I know a lot has changed in the ruleset with addition of extra functions. ( I think they have now added 'ResolveName', in the time of the extension you had to do a number of hoop jumps to get the name consistently... so maybe its been sorted not.. )

I'm looking at a bigger changed to spell tokens, so will add this into the re-write code as I split it into the CommonCore and SpellToken extension.

-pete

Awesome, thank you for providing this magic, this changes the landscape of how we see FGU thank you so much.

nephranka
September 30th, 2022, 19:23
Don't know if you have been on TEST but I was on TEST and I saw this ext was throwing an error. I know it made not matter until it is live but I thought I would pass it along:
[ERROR] template: Unrecognized merge attribute (replace) for template (image_record_step), skipped. [B9_SpellTokens] [scripts/template_B9ST.xml]

Arnagus
October 1st, 2022, 08:11
Hi, This has been an issue from the start, it does not come up very often.

Okay, thanks - I must have missed that. Came really as a surprise.


I'll add it, as I know a lot has changed in the ruleset with addition of extra functions.

Thanks - that would be great! Any idea on a time line? I have some upcoming bigger battle - guess I need to rename everything before to avoid a spoiler (unless you say: in two weeks).

bratch9
October 4th, 2022, 14:06
Okay, thanks - I must have missed that. Came really as a surprise.



Thanks - that would be great! Any idea on a time line? I have some upcoming bigger battle - guess I need to rename everything before to avoid a spoiler (unless you say: in two weeks).

No idea on the timeline, i'm very busy with my work, so you might have noticed not a lot of updates on the extensions for a while. ( Mainly just ruleset 'fix' changes that need to be made.. )

I've been doing some 'tests' of things that are just not ready to either be added/changed in current extensions or make into new extensions.

Sorry I can not say when I'll get around to looking into this further.

-pete

bratch9
October 4th, 2022, 14:10
Don't know if you have been on TEST but I was on TEST and I saw this ext was throwing an error. I know it made not matter until it is live but I thought I would pass it along:
[ERROR] template: Unrecognized merge attribute (replace) for template (image_record_step), skipped. [B9_SpellTokens] [scripts/template_B9ST.xml]

Not looked at the TEST branch, I've seen some 'version 4.3' blocked changes leak into public ruleset code, so was expecting some changes. ( As I spotted some changes with dice, so fingers crossed we get good changes... maybe import of texture on the dice.. but I've not even gone and looked at any of the 'stuff happing in next release' so you probably know more about this sort of thing that I do. )

My guess is they have refactored/removed the 'image_record_step', which is the main low level 'hook' the spell token extension uses to access things in core(under all the rulesets)... So my best guess is that this is going to totally break the spell tokens extension.

-pete

nephranka
October 4th, 2022, 15:28
Not looked at the TEST branch, I've seen some 'version 4.3' blocked changes leak into public ruleset code, so was expecting some changes. ( As I spotted some changes with dice, so fingers crossed we get good changes... maybe import of texture on the dice.. but I've not even gone and looked at any of the 'stuff happing in next release' so you probably know more about this sort of thing that I do. )

My guess is they have refactored/removed the 'image_record_step', which is the main low level 'hook' the spell token extension uses to access things in core(under all the rulesets)... So my best guess is that this is going to totally break the spell tokens extension.

-pete

Doh!

Moon was commenting on a different ext that I saw also broke. Maybe he can give you some insight for this one?

bratch9
October 4th, 2022, 18:07
Doh!

Moon was commenting on a different ext that I saw also broke. Maybe he can give you some insight for this one?

If you have a link to moon's comment, that would be a nice read...

But I think they have removed <template merge="replace">, which I use to swap some items... It does not need to be a replace, it can be done with the default 'add' mode. ( Made a quick test )

While this sorts the warning out and allows spell tokens to be placed onto the map, I had issues doing 'targeting' selection. So I'm sure more 'other' stuff has changed. I can see they have moved some things into the manager_image.lua global code section in coreRPG. Its possible they have changed the 'units' reported by the image system.

So its not a 10 min fix to correct that one error, it goes further into the code and bigger changes.

[ I do like the new dice trails, I'll probably take a look at a 'store' dice and see how its done.. see if its possible for 'us' to make dice packs... or if its been hidden in the c# side of the code and not exposed into the lua side for user created dice packs !! ]

-pete

nephranka
October 4th, 2022, 18:44
https://www.fantasygrounds.com/forums/showthread.php?73131-FGTabber2-More-space-for-your-FG-client/page3

bratch9
October 4th, 2022, 20:34
https://www.fantasygrounds.com/forums/showthread.php?73131-FGTabber2-More-space-for-your-FG-client/page3

thanks, thats not quite the same... I'll dm moon and let him know about the template issue because it might be a mistake error or an actual change.

-pete

nephranka
October 4th, 2022, 22:23
thanks, thats not quite the same... I'll dm moon and let him know about the template issue because it might be a mistake error or an actual change.

-pete

I figure they were different but figured he would help given he said he thought the changes would have a very small impact on ext.

bratch9
October 5th, 2022, 10:55
Okay, thanks - I must have missed that. Came really as a surprise.



Thanks - that would be great! Any idea on a time line? I have some upcoming bigger battle - guess I need to rename everything before to avoid a spoiler (unless you say: in two weeks).

Just a quick question about this.... Just been doing some tests... If I add a creature to the combat tracker, and make it unidentified, when it drags a spell token off that creature to the map it will show as 'light (unidentified)' and it will stay as unidentified when you make the creature identified... if you drag another spell token on, this new one will have the 'fireball (baba)'.

So apart from it not been dynamic on the identification change, spell tokens do get marked a 'unidentified creature' or the creature name.

Maybe its a conflict with an extension ?

Could you give it a go with a clean campaign and a couple creatures and just spell token extension and let me know if this resolves it ?

If its still leaking the name, can you add some screen shots and attach the clean campaign zip for me to take a look at. ( ie more detail )

If it does not leak the name, but does with your extensions enabled, maybe only enable half your extensions and check... can binary chop to the conflicting extension. I can then take a look to see if I can fix it my side, or if I need to let the other extension owner know.

Thanks,
Pete

bratch9
October 5th, 2022, 11:10
I figure they were different but figured he would help given he said he thought the changes would have a very small impact on ext.

Ive done a non-version number update and removed the merge tag. So it should not report this issue now on the 4.3 build or live build. Spell tokens still have issues with 4.3, I could not target off the radial... But I could add them. So I need to debug that further. But at least they showup..

-pete

nephranka
October 5th, 2022, 11:15
Ive done a non-version number update and removed the merge tag. So it should not report this issue now on the 4.3 build or live build. Spell tokens still have issues with 4.3, I could not target off the radial... But I could add them. So I need to debug that further. But at least they showup..

-pete

Progress!

bratch9
October 5th, 2022, 11:28
Progress!

So the non-target issue off the radial, looks like because I'd created the player on the host and testing on just the host. When I joined a client and claimed the character, when it added spell tokens the radial was selecting as expected.

My guess is that its working fine in 4.3, but I've not spent much time double checking this. ( I'll try and get some time and load up all my extensions and do a basic check they all work.. )

If you spot anything else, let me know.

-pete

nephranka
October 5th, 2022, 11:55
So the non-target issue off the radial, looks like because I'd created the player on the host and testing on just the host. When I joined a client and claimed the character, when it added spell tokens the radial was selecting as expected.

My guess is that its working fine in 4.3, but I've not spent much time double checking this. ( I'll try and get some time and load up all my extensions and do a basic check they all work.. )

If you spot anything else, let me know.

-pete

Will do. I should have some time this weekend.

bawsr
November 13th, 2022, 05:22
I am getting errors whenever spell tokens loads. You are still updating the DMsguild version also right?

MrDDT
November 13th, 2022, 08:14
I am getting errors whenever spell tokens loads. You are still updating the DMsguild version also right?

I'm not getting errors and I use the DMsGuild one, do you have B9 Common Core ext?

bratch9
November 13th, 2022, 19:29
I am getting errors whenever spell tokens loads. You are still updating the DMsguild version also right?

yes the forge and dmsguild version should be on 7.0, and you will need the b9 common core on forge.

if you are having errors please post an image and further information so I can look into it. ( It could be an extension conflict, so please try on a clean test campaign with just this extension + b9 common core, to see if you still get the issue, and if not try adding your extensions until the error happens... and report which extension you think is a conflict for me to look into as a possible bug fix on mine or the other extension as required etc. )

-pete

MrDDT
December 3rd, 2022, 20:47
Running into an issue with B9 Spell Tokens (only loaded or with B9 Common Core)

When I run B9 spell tokens ext, when I have a hidden CT creature players can hover over the place where the creature would be and get a cursor change. This is a problem as I will post an example.

Example:

PC is next to creature, creature casts invisible then uses bonus action to stealth and moves 30ft away. (DM sets the token to hidden and moves token)

Players can see where the creature is because they can hover over the spot where the creature went to and see the mouse change to another icon.

This does not happen when this EXT is loaded and following the same steps. (No ext loaded or mods)

bratch9
December 4th, 2022, 13:55
Running into an issue with B9 Spell Tokens (only loaded or with B9 Common Core)

When I run B9 spell tokens ext, when I have a hidden CT creature players can hover over the place where the creature would be and get a cursor change. This is a problem as I will post an example.

Example:

PC is next to creature, creature casts invisible then uses bonus action to stealth and moves 30ft away. (DM sets the token to hidden and moves token)

Players can see where the creature is because they can hover over the spot where the creature went to and see the mouse change to another icon.

This does not happen when this EXT is loaded and following the same steps. (No ext loaded or mods)

Thanks, I'll take a look at this... So its just a normal player/npc token that is getting the incorrect cursor ?

-pete

MrDDT
December 4th, 2022, 17:42
Thanks, I'll take a look at this... So its just a normal player/npc token that is getting the incorrect cursor ?

-pete

It's all hidden tokens a player can see by scrolling cursor over it. GM can see them and of course should get the cursor change.
This applies to any token on the map once using this ext. Turning if off, does not cause this effect.

bratch9
December 5th, 2022, 15:54
It's all hidden tokens a player can see by scrolling cursor over it. GM can see them and of course should get the cursor change.
This applies to any token on the map once using this ext. Turning if off, does not cause this effect.

I've made a test campaign for this and will take a look. It should not be too hard to find this, its a missing check for 'visibility' which is in place for things like 'drag' to make sure a player can not drag an npc etc... I'm sure its just a slip through case I've not looked at. ( Our game(s) dont tend to hide many npc so it does not come up much in our sessions... )

-pete

MrDDT
December 5th, 2022, 18:49
Awesome, let me know if you need more info.

Thanks for all your hard work!

bratch9
December 6th, 2022, 20:49
Running into an issue with B9 Spell Tokens (only loaded or with B9 Common Core)

When I run B9 spell tokens ext, when I have a hidden CT creature players can hover over the place where the creature would be and get a cursor change. This is a problem as I will post an example.

Example:

PC is next to creature, creature casts invisible then uses bonus action to stealth and moves 30ft away. (DM sets the token to hidden and moves token)

Players can see where the creature is because they can hover over the spot where the creature went to and see the mouse change to another icon.

This does not happen when this EXT is loaded and following the same steps. (No ext loaded or mods)

v7.1 should resolve this issue.

-pete

MrDDT
December 6th, 2022, 22:50
v7.1 should resolve this issue.

-pete

Awesome thank you, I will check it out and let you know if I see anything again.

Lexi the Red
December 30th, 2022, 17:34
So I've been running into an issue when using Spell tokens along with the 5eAE mods and the Equipped Effects extension. There seems to be an interaction with all 3 that causes the spell tokens to not pull into the CT for NPC spells.

I posted about in detail on the AE thread, I hope you will take a look when you get the chance and see if you have any thoughts.

Automatic Effects, Equipped Effects, and Spell Tokens - HELP! (https://www.fantasygrounds.com/forums/showthread.php?67481-5E-Automatic-Effects/page38)

EDIT: One other thing of note. The spell tokens load correctly on PC sheets when dropping the effect spells from Automatic Effects onto their sheet. It's only with NPCs that this is any kind of issue.

dbachen
January 2nd, 2023, 01:57
I did a series of tests myself, which seems to support what you are saying Alexander. This is a brand new test campaign with either just B9ST or B9ST + EE loaded.
I don't believe it has anything specifically to do with 5eAE by itself. I believe it has to due with when Equipped Effects replaces the default parsed spell with alternate data besides PHB (in this case it happens to be 5eAE

Now, the parsing of the spell text differs in the scenarios based on the module priority, but this test is proving that B9ST by itself can work with data (and no other extensions) and display its token.

Test #1 -- [EXT] B9 Spell Tokens only
Scenario 1 - Only PHB loaded - Spell tokens show up
55621

Scenario 2 - Only 5eAE loaded - Spell tokens show up
55622

Scenario 3 - Both PHB and 5eAE loaded - Spell tokens show up
55623

dbachen
January 2nd, 2023, 02:04
Test #2 - [EXT] B9 Spell Tokens + Equipped Effects
Scenario 4 - Both PHB and 5eAE loaded. I see the behavior which is 1) No Spell Token 2) Spell details = full 5eAE versions of spells
55624

Scenario 5 - Only PHB loaded.. Even though both extensions are running, since Equipped Effects isn't changing any CT data, it still shows the spell tokens.
55625

Scenario 6 - Only 5eAE loaded.. This is just testing that there is no module priority going on with PHB.. in this case, spell tokens are not displayed, but 5eAE is parsed.
55626

In every case, my test scenario was to remove the NPC from the CT and then readd it after a fresh FG start.
I noticed on the player sheet for example, it didn't add spell tokens to spells that were already there.. If you had a matching spell you would have to remove the spell and add it back again.
I was also using the "evoker wizard" from MGttM which uses the new format of "no spells on the NPC, just the listed trait"

dbachen
January 2nd, 2023, 02:08
I'm not an extension coder, but I've looked at a few extensions, I knew that depending on how you interrupted the original call to do something, you could either clobber subsequent calls in the pipeline, or allow it to continue depending on how you hooked into the original procedure rewrite.. so perhaps one or the other is not properly hooking so that things run in sequence (logical guess only).

Both B9ST and EE are doing something as the spell is being parsed and processed onto the CT.. B9ST adds the token, and EE is altering the text.

I'm hoping with this information (which I've also provided to SR), that there might be a way to have both extensions co-exist and gracefully accomplish what they need to and then pass the baton down the line to the next extension.

Leprekorn
January 11th, 2023, 16:28
Hey B9 just to ask if you managed to take a look at what dbachen and Alexander Red have highlighted it would be really great if we could get these 2 great exts to work in unison.

bratch9
January 11th, 2023, 19:07
I'm not an extension coder, but I've looked at a few extensions, I knew that depending on how you interrupted the original call to do something, you could either clobber subsequent calls in the pipeline, or allow it to continue depending on how you hooked into the original procedure rewrite.. so perhaps one or the other is not properly hooking so that things run in sequence (logical guess only).

Both B9ST and EE are doing something as the spell is being parsed and processed onto the CT.. B9ST adds the token, and EE is altering the text.

I'm hoping with this information (which I've also provided to SR), that there might be a way to have both extensions co-exist and gracefully accomplish what they need to and then pass the baton down the line to the next extension.

I'm sure in the not so distant pass this was all working fine, but you are correct the ST extensions has to 'correct' for overriding a couple of functions that EE also adds into. ( FG and extension merges into the same function do not always go so well depending on what has to happen.. )

My guess would be that due to a ruleset change, that EE adjusted how it was linking and my 'patch' needs to update around those changes.

I've not been around much of the last month so not had access to my dev machine/source code to take a look... But I will try and get to look at it.

-pete

MrDDT
January 11th, 2023, 19:19
I'm sure in the not so distant pass this was all working fine, but you are correct the ST extensions has to 'correct' for overriding a couple of functions that EE also adds into. ( FG and extension merges into the same function do not always go so well depending on what has to happen.. )

My guess would be that due to a ruleset change, that EE adjusted how it was linking and my 'patch' needs to update around those changes.

I've not been around much of the last month so not had access to my dev machine/source code to take a look... But I will try and get to look at it.

-pete

I think the issue happened when SW forced the issue to remove the spell info from the spell and provide links only.
So now 3rd party spells are linked to the book spells.

bratch9
January 11th, 2023, 20:05
I think the issue happened when SW forced the issue to remove the spell info from the spell and provide links only.
So now 3rd party spells are linked to the book spells.

This might be an issue for the advanced spell damage extension but I 'pre-look' and 'relink' those those automatically if the 'link' code is the first item in the description... But I also think the EE effects might then cause an interaction with things like the L05 coding and the 'cast at higher' level control in advanced spell damage.


In the case of Spell tokens and EE, the loss of the spell token on the CT is caused when 'translate NPC powers' is enabled, because EE loads on top of ST and replaces the parseNPCPower functions, and only calls the 'original' function ( which in this case would be the ST version that is overriding the ruleset version.. ) in some cases of the code..

The issue can be fixed if the spell token addToken code section is added to the EE code base..



function parseNPCPower(nodePower, bAllowSpellDataOverride)
...
...
...
if SpellTokens_B9ST and SpellTokens_B9ST.addToken then
-- try and add the token
SpellTokens_B9ST.addToken(nodePower)
end
return UtilityManager.copyDeep(sortedpowerdata);
...
..
..




the call to SpellTokens_B9ST.addToken(nodePower), will read the nodePower name and do the matching for the name in the spell tokens configuration, and if it finds the matching name it adds the data into the icon for spell tokens etc..

-pete

bratch9
January 13th, 2023, 16:40
Updated load order to 116 to move Spell Tokens to load after Equipped Effects to resolve a conflict causing spell tokens to not show up on the CT.

-pete

MrDDT
January 13th, 2023, 17:27
Updated load order to 115 to move Spell Tokens to load after Equipped Effects to resolve a conflict causing spell tokens to not show up on the CT.

-pete

It was updated to 116 just wanted to note that it was 110, B9 is updated to 116.

bratch9
January 13th, 2023, 20:53
It was updated to 116 just wanted to note that it was 110, B9 is updated to 116.

Yep its now 116, I've edited my original update post for this mistake.

Tan0
January 13th, 2023, 21:24
Hi guys, any suggestion on how to handle this issue?

[1/13/2023 9:39:18 PM] [ERROR] Handler error: [string "B9_SpellTokens:scripts/tokenspell_B9ST.lua"]:152: attempt to index local 'nPath' (a nil value)


I have two campaigns with same extensions. One is reporting this error each time I move a token (whatever it is) from CT to a different position on the map. If I add the token from CT on the map for the first time instead, that won't happens.

bratch9
January 13th, 2023, 22:11
Hi guys, any suggestion on how to handle this issue?

[1/13/2023 9:39:18 PM] [ERROR] Handler error: [string "B9_SpellTokens:scripts/tokenspell_B9ST.lua"]:152: attempt to index local 'nPath' (a nil value)


I have two campaigns with same extensions. One is reporting this error each time I move a token (whatever it is) from CT to a different position on the map. If I add the token from CT on the map for the first time instead, that won't happens.

EDIT: Could you confirm when you say token you are talking a spell token and not a npc/player token... I try and always assume 'token' will be a npc/player token and 'spell token' for the spell tokens as it directs down different source code paths to look at..

I'm going to need more information on just what you are doing to cause this... At line 152 of that file is in the 'DeleteSpellToken' function, but you seem to be saying you get this when you add at spell token to a map ?

You might have a 'lost' token on a map that its trying to clean up, but it should only be doing that when FG thinks it needs to delete a token... this can happen when you 'remove one/all' tokens, or if you drag it from a map to another map...

Is it possible for you to zip up your campaign and post it on the forum. ( If you dont want to public share it this is fine, or if you can host it on say your google drive and DM me the link to that file etc.. )

If possible could you backup your campaign and try it with just the spell tokens extension, just in case its a conflict with a different extension. ( Since you dont give any detailed information. )

If you could attach some screen shots, say with /console open, the CT and the Map image with some words like, dragged 'web' from CT spider onto map when I let go on the map it generated the error... or when I start dragging the spell token off the CT it gives the error... so I can see if its drag start or drag end points to try and trace etc.

Some information as to 5e or PF2 etc... it does not sound like a game specific from the file you list.

If you are happy to open your campaign in a text editor, like notepad, you could look in the section.. <spelltokenlist> see the quote below you can see I've added a 'Web' Spell from 2 different CT giant spiders onto a battle map. The line error at 152 is looking for the 'map' 'name', eq '<name type="string">image.id-00008.image@FG Battle Maps</name>', so I expect you have a block at this level that has no 'name' for a map and hence when its trying to match up a 'delete token' from a 'map' into the tracking 'spelltokenlist' for that map it just can not find it, as it does not exist.

If you could grab this section out of the db.xml of the campaign file, and post that I can take a look at it.

But my best advise would be to just delete this section from the db.xml, and it should clear off the error. You will have some 'spell tokens' on maps that you might have to delete by hand.

But to me it looks like an out of sync issue in this data.

(Sorry if this is too technical for you... otherwise I can look into your db.xml file if you post it for me to look at... and then I can probably advise you to just delete that section. )

-pete



<spelltokenlist>
<public />
<id-00001>
<public />
<id-00001>
<public />
<id type="string">2</id>
<name type="string">Giant Spider</name>
<nodename type="string">combattracker.list.id-00007</nodename>
<spellname type="string">Web</spellname>
</id-00001>
<id-00002>
<public />
<id type="string">4</id>
<name type="string">Giant Spider 2</name>
<nodename type="string">combattracker.list.id-00001</nodename>
<spellname type="string">Web</spellname>
</id-00002>
<name type="string">image.id-00008.image@FG Battle Maps</name>
</id-00001>
</spelltokenlist>

Tan0
January 13th, 2023, 22:31
Sorry, I think I've been a little bit unprecise. For token, I meant a PC/NPC token, not a spell token.
So, when I drag a PC or a NPC whos token is already on the map from CT to another part of the map I suddenly get that line error in the log.

However, I solved deleting the section you suggested. Fun fact is that there wasn't a line referring to any know token to me in that section, just reference to some "death indicators" tokens which I never used :-)

Thanks for the support!

bratch9
January 14th, 2023, 14:57
Sorry, I think I've been a little bit unprecise. For token, I meant a PC/NPC token, not a spell token.
So, when I drag a PC or a NPC whos token is already on the map from CT to another part of the map I suddenly get that line error in the log.

However, I solved deleting the section you suggested. Fun fact is that there wasn't a line referring to any know token to me in that section, just reference to some "death indicators" tokens which I never used :-)

Thanks for the support!

Any change you could post the section with the death indicators into the thread. As that looks like maybe a bug, or some other extension adding into my extensions data and not filling it out properly. ( Or just some giant FG db bug we will never replicate/find !! )

I've added some extra logic to detect when the map 'name' section is null and protected the code, so any token in a block like that will just get skipped now making them orphaned.

-pete

Tan0
January 14th, 2023, 15:06
Any change you could post the section with the death indicators into the thread. As that looks like maybe a bug, or some other extension adding into my extensions data and not filling it out properly. ( Or just some giant FG db bug we will never replicate/find !! )

I'm attaching the code portion I deleted. Hope can help!

bratch9
January 14th, 2023, 15:20
I'm attaching the code portion I deleted. Hope can help!

I'll try and track that down, because it looks like when the extension adding those is changing the locations of the storage I expect... which is fine until you turn off that extension and then my extension goes back to its default locations for searching... this then will start causing this error... My guess is its one of the death indicator extensions, do you know which one you use as I think a couple exist ?

thanks,
pete

bratch9
January 14th, 2023, 15:22
v7.2 has been released. This adds extra protection for missing 'name' block sections and also removed these blocks from the list to tidy up.

Leprekorn
January 18th, 2023, 21:29
I was using spell tokens tonight and got this error message whenever I added tokens from the CT to a map.55875

bratch9
January 18th, 2023, 22:58
I was using spell tokens tonight and got this error message whenever I added tokens from the CT to a map.55875

Can you try the 7.3 build, this has update merges from coreRPG which sources the function you have an error with. ( So fingers crossed it should sort you out.. )

If you still have issue, please try a clean campaign with just spell tokens extension enabled.. To make sure its not an interaction with other extensions. If you still have issues can you give more details, like is it every spell token, or just from players ( on client/host ) or just host npc spell tokens etc ?

( Is it on a custom map, what mode is the map in ? could it have been in edit mode etc ? )

Thanks, Pete

Leprekorn
January 19th, 2023, 06:37
I will check what version I have enabled.

rhagelstrom
January 20th, 2023, 13:48
I was getting the same errors both client and host using 7.2. Adding encounters to the CT/Map

Leprekorn
January 20th, 2023, 14:12
I tested the 7.3 build earlier and its working fine now.

bratch9
January 21st, 2023, 21:17
I tested the 7.3 build earlier and its working fine now.

Thanks for letting me know.

-pete

Gawain the Great
January 27th, 2023, 16:30
I've been loving the B9 Spell Token extension. It's been working great for months. Bullet-proof, in fact. (I have had so much fun with it, I make Spell Tokens for everything--even things that aren't strictly spells, like Barbarian Rage.)

However, in the past day or so (and during last night's game), the Spell Tokens aren't connecting to the Token onto which they are dropped like they used to. Usually, I drop a Spell Token on top of a PC/NPC token and it sort of clicks/connects to it, and when I move the PC/NPC token, the Spell Token goes with it.

Now it isn't doing that. I have turned off the extension I thought might be causing the problem--Natural Selection. And I even turned off ***. GM, just to be safe. Nothing else seems to have changed in my game from when the Spell Tokens were working and now, when they aren't.

Any suggestions where to look for a solution? Thanks for the great extension!

bratch9
January 27th, 2023, 17:41
I've been loving the B9 Spell Token extension. It's been working great for months. Bullet-proof, in fact. (I have had so much fun with it, I make Spell Tokens for everything--even things that aren't strictly spells, like Barbarian Rage.)

However, in the past day or so (and during last night's game), the Spell Tokens aren't connecting to the Token onto which they are dropped like they used to. Usually, I drop a Spell Token on top of a PC/NPC token and it sort of clicks/connects to it, and when I move the PC/NPC token, the Spell Token goes with it.

Now it isn't doing that. I have turned off the extension I thought might be causing the problem--Natural Selection. And I even turned off ***. GM, just to be safe. Nothing else seems to have changed in my game from when the Spell Tokens were working and now, when they aren't.

Any suggestions where to look for a solution? Thanks for the great extension!

I'll try and do some testing over the weekend, and see what has changed in the ruleset to break this. ( I had also noticed that NPC spell tokens no longer 'targeted' off the spell token radical menu.. ) So I guess something 'looking up' the NPC/PC has probably been changed and the old way to look up has been removed....

-pete

MrDDT
January 27th, 2023, 18:04
I've been loving the B9 Spell Token extension. It's been working great for months. Bullet-proof, in fact. (I have had so much fun with it, I make Spell Tokens for everything--even things that aren't strictly spells, like Barbarian Rage.)

However, in the past day or so (and during last night's game), the Spell Tokens aren't connecting to the Token onto which they are dropped like they used to. Usually, I drop a Spell Token on top of a PC/NPC token and it sort of clicks/connects to it, and when I move the PC/NPC token, the Spell Token goes with it.

Now it isn't doing that. I have turned off the extension I thought might be causing the problem--Natural Selection. And I even turned off ***. GM, just to be safe. Nothing else seems to have changed in my game from when the Spell Tokens were working and now, when they aren't.

Any suggestions where to look for a solution? Thanks for the great extension!

I noticed this also, it's not working for the GM side, but the players that own it does work. It's weird.

@B9 you might want to look there.

Gawain the Great
January 27th, 2023, 18:45
Reply From bratch9 - "I'll try and do some testing over the weekend, and see what has changed in the ruleset to break this. ( I had also noticed that NPC spell tokens no longer 'targeted' off the spell token radical menu.. ) So I guess something 'looking up' the NPC/PC has probably been changed and the old way to look up has been removed...."

-pete


I noticed this also, it's not working for the GM side, but the players that own it does work. It's weird.

@B9 you might want to look there.

Thanks for confirming the issue and looking into it. The extension worked so well, I figured it had to be something changed in the FGU source.

Farnaby
January 30th, 2023, 14:02
Your extension doesn't play well with the Decked Out extension (https://www.fantasygrounds.com/forums/showthread.php?75772-Decked-Out-Play-With-Cards-in-Fantasy-Grounds).
The Decked Out extension gives players cards (bridge, hero point, etc.) and you can drag these cards onto an image.
56017
But when your extension is enabled I can only create pins.
56018

I have informed the creator of the Decked out extension as well.

Saagael
January 30th, 2023, 16:15
Following up on Farnaby's post, I'm the creator of Decked Out. I'm happy to take a look at the code and see if I can find the issue. Is there a code repo I can look at?

The code for Decked Out is available on github (https://github.com/Gtaray/DeckedOut/), and if I had to guess I'd say the collision is in how we have both registered callbacks when shortcut is dropped on an image. The code for mine is in decked_out_events.lua in the onCardDroppedOnImage() function (which is registered with ImageManager as a callback when a shortcut is dropped on an image.

Having two registered callbacks doesn't look like it should cause any problems, but unless I can see the code for Spell Tokens I won't know for sure.

bratch9
January 31st, 2023, 15:56
Following up on Farnaby's post, I'm the creator of Decked Out. I'm happy to take a look at the code and see if I can find the issue. Is there a code repo I can look at?

The code for Decked Out is available on github (https://github.com/Gtaray/DeckedOut/), and if I had to guess I'd say the collision is in how we have both registered callbacks when shortcut is dropped on an image. The code for mine is in decked_out_events.lua in the onCardDroppedOnImage() function (which is registered with ImageManager as a callback when a shortcut is dropped on an image.

Having two registered callbacks doesn't look like it should cause any problems, but unless I can see the code for Spell Tokens I won't know for sure.

Hi,

When you released it a while ago, I grabbed it on forge and had a quick look.. I suspected with the overrides in 'image' it was going to clash with spell tokens, if I recall my quick look at the source. I'm not sure what happens with the image onDrop when multiple extensions extend this. Unlike other functions that can be extended, because this is a replacement function of a pure class its a little different.

It also looks like FGU has changed some of the onDrop for images and moved it from the campaign source tree into the scripts source tree and manage_image... I've not looked into these changes and they could also reflect the non-selectable targets for npc issues other people are having.. Not related to your extensions..

Because your extension is much newer, you might be using the newer systems and my extension not been updated might be forcing in parts of the old system and causing a mix. I've been trying to get time to basically re-write spell token extension, but only been getting time to quick patch reported bugs.

I'll take a look when I have more time, but I suspect it might be more complex to sort out than you think because spell tokens digs deep into replacement features of the image system... Basically I re-do much of the selection and pointer handling the game does on images in c# native with special lua versions due to no-api access between the c# and lua. Because the selection pointer has to deal with the different spell token shapes and rotations and tokens stacked on top of each other... ( I wish we had better api access !!! )

-pete

Saagael
January 31st, 2023, 16:02
I suspected with the overrides in 'image' it was going to clash with spell tokens, if I recall my quick look at the source. I'm not sure what happens with the image onDrop when multiple extensions extend this. Unlike other functions that can be extended, because this is a replacement function of a pure class its a little different.

It also looks like FGU has changed some of the onDrop for images and moved it from the campaign source tree into the scripts source tree and manage_image... I've not looked into these changes and they could also reflect the non-selectable targets for npc issues other people are having.. Not related to your extensions..

This sounds like it could be correct. I don't actually override anything in ImageManager or in the imagerecord class. I register a drop callback using ImageManager.registerDropCallback("shortcut"). It could be that Spell Tokens is overriding some more root level functions that are causing my functions to not fire with the normal callback resolution.

EDIT: With regards to overrides in image, maybe you're thinking about Natural Selection, another extension I released? That one does override some image functions, though folks have reported Natural Selection and Spell Tokens work perfectly fine together.

bratch9
January 31st, 2023, 20:51
I've been loving the B9 Spell Token extension. It's been working great for months. Bullet-proof, in fact. (I have had so much fun with it, I make Spell Tokens for everything--even things that aren't strictly spells, like Barbarian Rage.)

However, in the past day or so (and during last night's game), the Spell Tokens aren't connecting to the Token onto which they are dropped like they used to. Usually, I drop a Spell Token on top of a PC/NPC token and it sort of clicks/connects to it, and when I move the PC/NPC token, the Spell Token goes with it.

Now it isn't doing that. I have turned off the extension I thought might be causing the problem--Natural Selection. And I even turned off ***. GM, just to be safe. Nothing else seems to have changed in my game from when the Spell Tokens were working and now, when they aren't.

Any suggestions where to look for a solution? Thanks for the great extension!

v7.4 should resolve this issue.

-pete

bratch9
January 31st, 2023, 20:53
Your extension doesn't play well with the Decked Out extension (https://www.fantasygrounds.com/forums/showthread.php?75772-Decked-Out-Play-With-Cards-in-Fantasy-Grounds).
The Decked Out extension gives players cards (bridge, hero point, etc.) and you can drag these cards onto an image.
56017
But when your extension is enabled I can only create pins.
56018

I have informed the creator of the Decked out extension as well.

v7.4 should resolve this issue.. Let me know if you spot anything else not functional between the 2 extensions.

-pete

bratch9
January 31st, 2023, 20:55
This sounds like it could be correct. I don't actually override anything in ImageManager or in the imagerecord class. I register a drop callback using ImageManager.registerDropCallback("shortcut"). It could be that Spell Tokens is overriding some more root level functions that are causing my functions to not fire with the normal callback resolution.

EDIT: With regards to overrides in image, maybe you're thinking about Natural Selection, another extension I released? That one does override some image functions, though folks have reported Natural Selection and Spell Tokens work perfectly fine together.

Ive added a manual call into your function from my extensions, as this is quicker than re-doing a bunch of code at my side for the changed new registerDropCallback process.. ( I'll have to upgrade to this new process at some point, but that is a bigger fix to do later.. )

-pete

bratch9
January 31st, 2023, 20:57
v7.4 has been released.

Fixes,
Integration with DeckedOut.
Fixes 'locked' to npc/player spell token and combined drag.
Fixes NPC radial target system.
Fixes spell token's been resized on start of FGU.

-pete

Gawain the Great
February 1st, 2023, 00:09
Tested it out, and it works great again. I'll go through and test it a bit in different setups, and let you know if I find any issues.

Thanks so much for the quick fix. Love it.

GG

Farnaby
February 2nd, 2023, 18:21
Just tried it out and they both play well together.

Thank you so much.

Hjorimir
February 15th, 2023, 21:01
I'd buy this in a heartbeat if it worked for 2e D&D. Just throwing it out there.