PDA

View Full Version : [Extension] 5E Attunement Tracker



dmssanctum
July 7th, 2018, 22:34
This is an extension for the 5E rule set to add a column at the end of the Character Sheet Inventory tab to allow players to track which items they have attuned. I found no way to track this easily within Fantasy Grounds, so created the extension.

Thanks to badgr for providing an update to the extension that adds proficiency based attunement, artificer support, smart attunement, and individual attunement limits. Also for directing me on how to make more improvements.
Thanks to st4lk3r87 for providing an update to the extension that adds an option to change the attunement limit from 1 to 10 within Options and also enforce the limit on the inventory tab. The default value is 3.
Thanks to Valerian for providing an update to the extension that correctly handles deleting an item and updating the total attunement count.

Version Changes
2021/04/11 - Fixed an oversight where the [Add Item] button was covered by the attunement counter label.

Screenshots and Explanation
New Section in Options Menu to set the default attunement limit for all characters. Choices include 2, 3, 4, 5, or Proficiency Bonus based attunement limit.

https://imgur.com/1o0P13r.png

Equipment now has an ATND column to check which items a character is attuned to. Items will be parsed to have a dash [-] if they do not have the tag "Requires Attunement". Once the limit is hit, further attunement will be disabled with an icon. The current and maximum attunement counts for each character are displayed and updated in real time above the ATND column.

https://imgur.com/9u8pNfM.png

The Link next to the ATND column opens settings for individual characters, allowing one character to have additional or fewer attunement slots. The total limit is updated instantly on the equipment page.

https://imgur.com/ricRqLY.png

These options should allow tracking of any future total attunement errors, and provide a multitude of options for those of you who wish to have very customized attunement settings.

Compatibility
The extension should be fully compatible with other extensions since it employs a merge join.

Zacchaeus
July 7th, 2018, 23:35
Nice. Send me a PM so I remember to add it to the extension sticky.

Gwydion
July 30th, 2018, 20:21
Awesome! Nicely done and thanks for sharing.

skarr
January 5th, 2019, 16:18
How would I go about limiting the attunement to 3? For those of us who use raw.

Zacchaeus
January 5th, 2019, 17:56
Hi skarr and welcome to FG.

As the author says in his initial post just count the ticks. Once you get to three that's it. (Just because there is no limit doesn't mean that it can't be used RAW; I suspect that it was just easier to not try to limit it to any particular number)

If you wanted to actually gray out the boxes once the third one is ticked you'd need to dig into the code yourself.

skarr
January 6th, 2019, 00:41
Thanks for the quick response Zacchaeus! I was afraid that was going to be the answer.. Guess I will try to learn .xml !!

Zacchaeus
January 6th, 2019, 01:03
Thanks for the quick response Zacchaeus! I was afraid that was going to be the answer.. Guess I will try to learn .xml !!
I suspect lua as well.

dmssanctum
January 7th, 2019, 17:16
How would I go about limiting the attunement to 3? For those of us who use raw.

It's been a while since I touched this, but I chose to leave it unlimited so that people could just count them and it would be fast to code. Creating a hard limit looked to be difficult, since that would be a different use of the checkboxes than anything else I've seen in Fantasy Grounds. Normally you have a specific number of boxes and once they are ticked, they grey out / disappear (Inspiration, spells). If that happened, your attunement boxes could disappear entirely. If I get some time, I will see if I can find some code that will work in this situation. The ideal scenario would be adding a selection in the Options that lets you select how many attunement slots you want to enforce, but I felt trying to go that far was overkill.

Some of my players have complained that they want the 3 limit to be hard coded, so they don't have to count or pay attention, but this is still a lot better than having no guidance for tracking attunement at all, like a standard character sheet or any app I've seen.

skarr
January 7th, 2019, 18:45
I agree, this IS MUCH better than nothing, and I appreciate your time in making this extension. I was just curious how hard it would be to limit the number of items. I like your idea of having it in the options menu but that sounds like a lot of effort for not much gain. For now my lazy players will just have to deal with it. Thanks for you time!

dmssanctum
January 7th, 2019, 19:30
Yea, that's what it boils down to, effort vs gain. I wanted some way to track it, but didn't want to have to spend days learning and troubleshooting the code. I'm not sure how much this extension is used right now, but if more people think the effort is worth it, I'll try to tackle it.

st4lk3r87
January 8th, 2019, 07:07
Yea, that's what it boils down to, effort vs gain. I wanted some way to track it, but didn't want to have to spend days learning and troubleshooting the code. I'm not sure how much this extension is used right now, but if more people think the effort is worth it, I'll try to tackle it.

I jumped on it actually. I hope you don't mind.

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

The way it works is very easy. If the user reach the maximum number specified in the options the other checkboxes change icon and become unclickable.

dmssanctum
January 8th, 2019, 15:20
That's actually perfect. Awesome! Thanks for helping out. That would have taken me hours as I don't know XML well and I would have had to trial and error until I got it working.

st4lk3r87
January 8th, 2019, 16:19
That's actually perfect. Awesome! Thanks for helping out. That would have taken me hours as I don't know XML well and I would have had to trial and error until I got it working.

I'm very happy to help ☺ we could actually go further with it and adding some filter like "showing the checkbox only if the item requires attunement"! Eheh.

dmssanctum
January 8th, 2019, 16:23
I'm very happy to help ☺ we could actually go further with it and adding some filter like "showing the checkbox only if the item requires attunement"! Eheh.
I don't know if that's necessary, but it looks like you've done something like that before with the 2 weapon extension you made. I did update what you had to allow from 1-10 slots, just in case someone wants to go hardcore with fewer attunements.

st4lk3r87
January 8th, 2019, 16:58
I don't know if that's necessary, but it looks like you've done something like that before with the 2 weapon extension you made. I did update what you had to allow from 1-10 slots, just in case someone wants to go hardcore with fewer attunements.

Yes, I saw it. Thank you for the mention :) If I have time I might implement the filter too. In this period I'm in berserk mode for coding FG stuff ahah.

skarr
January 8th, 2019, 17:13
That is AWESOME! Thanks st4lk3r87! Also thank you to dmssanctum for the original ext. I love these forums; so many friendly and helpful people.

Gozer the Gozerian
April 17th, 2019, 06:59
I seem to have run into an issue - 2 of my characters seem to be able to ignore the attunement limit. I have the limit set at 3, and for two of my players, when they check a third item, the rest show the circle with a line through it, but the other two players don't. Any ideas why this might be occurring?

EDIT: After further testing, those two characters seem to allow one more attunement than the others - that is, if I set the limit to 3, two of the players can check 4 before the red circles show up, whereas if I change the limit to 2, those two players can check three, while the others can only check two.

dmssanctum
April 17th, 2019, 16:28
I seem to have run into an issue - 2 of my characters seem to be able to ignore the attunement limit. I have the limit set at 3, and for two of my players, when they check a third item, the rest show the circle with a line through it, but the other two players don't. Any ideas why this might be occurring?

EDIT: After further testing, those two characters seem to allow one more attunement than the others - that is, if I set the limit to 3, two of the players can check 4 before the red circles show up, whereas if I change the limit to 2, those two players can check three, while the others can only check two.

Try testing it without any other extensions enabled. There may be an incapability with one now that I am not aware of. Inconsistent behavior like that is normally a sign of two extensions fighting each other.

LordEntrails
April 17th, 2019, 16:46
Also check the magic items themselves. One might be formatted differently and hence the extension is not seeing it as an attuned item? Maybe it's case sensitive or something is misspelled?

Eru the One
April 17th, 2019, 17:57
I seem to have run into an issue - 2 of my characters seem to be able to ignore the attunement limit. I have the limit set at 3, and for two of my players, when they check a third item, the rest show the circle with a line through it, but the other two players don't. Any ideas why this might be occurring?

EDIT: After further testing, those two characters seem to allow one more attunement than the others - that is, if I set the limit to 3, two of the players can check 4 before the red circles show up, whereas if I change the limit to 2, those two players can check three, while the others can only check two.

When I enabled the extension for the first time in my long running campaign I also had the same issue, but re-dropping the magic items fixed the problem.

Gozer the Gozerian
April 17th, 2019, 18:36
When I enabled the extension for the first time in my long running campaign I also had the same issue, but re-dropping the magic items fixed the problem.

Re-dropping the items did it for me - thanks for the help!

Thorn_Polamar
May 20th, 2019, 21:55
What folder do we put it in to activate it?

dmssanctum
May 20th, 2019, 21:57
What folder do we put it in to activate it?

Same as any extension. Just unzip it into the Fantasy Grounds\extensions folder and then you can activate the extension when you load a campaign in 5E.

Thorn_Polamar
May 20th, 2019, 21:58
Got it. Thank you. I have a history with putting things in the wrong place.

dmssanctum
May 20th, 2019, 22:00
Got it. Thank you. I have a history with putting things in the wrong place.

Been there. Hope it works great for you.

Trenloe
May 21st, 2019, 03:37
What folder do we put it in to activate it?
No need to unzip, just copy the .ext file from post #1 into the <FG App Data>\extensions directory.

ColinBuckler
May 25th, 2019, 12:38
Several groups I am in tend to play with the option of Attunement = Proficiency Bonus. This is where you can Attune to the number items equal to your proficiency bonus, thus allowing the number of items you can attune to scale with you as you level.

Whilst I appreciate we can set the maximum number of attunement items in the options manually to be equal to the maximum for the highest PC, some PC's may be of a slightly lower level and thus have a different proficiency bonus. This means they could attune to more items than they should be able to.

Would it therefore be possible to add an additional option in the configuration menu to allow the GM to select a proficiency bonus option instead of a absolute number of items and then have it calculate the attunement items correctly based on the proficiency bonus?

dmssanctum
May 29th, 2019, 16:59
Several groups I am in tend to play with the option of Attunement = Proficiency Bonus. This is where you can Attune to the number items equal to your proficiency bonus, thus allowing the number of items you can attune to scale with you as you level.

Whilst I appreciate we can set the maximum number of attunement items in the options manually to be equal to the maximum for the highest PC, some PC's may be of a slightly lower level and thus have a different proficiency bonus. This means they could attune to more items than they should be able to.

Would it therefore be possible to add an additional option in the configuration menu to allow the GM to select a proficiency bonus option instead of a absolute number of items and then have it calculate the attunement items correctly based on the proficiency bonus?

Theoretically it should be possible, but the code is written for integer values right now. I'll dig into it as time allows to see if I can find the proficiency variables, or maybe someone else will jump on this to help again.

caocbox
June 7th, 2019, 02:48
This extension is AWESOME. Very helpful and should be implemented in the software.

Sooooo... I deleted a attuned (checked) magical item from a character and it seems that it still count for the max limit. So with max set to 3, this specific character can only attune to 2 items and all other characters are fine.

I tried changing the max limit, unchecking and checking items, copying the character and nothing worked.

Is there a way to fix this?

Thanks in advance!

dmssanctum
June 7th, 2019, 04:44
This extension is AWESOME. Very helpful and should be implemented in the software.

Sooooo... I deleted a attuned (checked) magical item from a character and it seems that it still count for the max limit. So with max set to 3, this specific character can only attune to 2 items and all other characters are fine.

I tried changing the max limit, unchecking and checking items, copying the character and nothing worked.

Is there a way to fix this?

Thanks in advance!

I was able to recreate your issue. It looks like it will require a code change to fix that bug. I'm brainstorming ways to deal with it. I hope to have a fix for you this weekend.

caocbox
June 7th, 2019, 20:46
I was able to recreate your issue. It looks like it will require a code change to fix that bug. I'm brainstorming ways to deal with it. I hope to have a fix for you this weekend.

Thank you so much!

The Decorated Man
June 10th, 2019, 00:06
This is great! Good job!

June 12th, 2019, 17:11
I cant see were i can Download this extension on the post am i missing something ?

dmssanctum
June 12th, 2019, 17:13
I cant see were i can Download this extension on the post am i missing something ?

Click on the first page of this forum post. Just below the images there is a different colored section for Attachments. There is a png and ext attachment. Download the ext file and drop it in your Fantasy Grounds extension folder. Hope that was clear enough.

June 12th, 2019, 17:16
For some reason no idea why it wont allow me to interact with that link can you PM me the file?

dmssanctum
June 12th, 2019, 17:21
Thank you so much!

Alright, after doing some testing on this extension over the weekend, I'm admitting defeat. I do data sets, not procedural languages, so LUA and XML are not my thing. I know what needs to be done pseudo code-wise, but haven't successfully made an update to the extension that fixes the bug.

The extension is failing to clear a checkbox on inventory delete. Alternatively, i added a header for Attunement with a counter to keep track of the total attuned items, which could be manually overwritten to correct the bug, but the counter is not keeping track in my testing. I'm just not calling the variables correctly. My XML skills are normally limited to editing existing code when I have examples.

If anyone wants to take a crack at updating the code to get the onDelete function working properly, I'm happy to integrate it into the extension. I'll keep trying to correct this myself, but I've got other languages that take a priority to learn over XML.

LordEntrails
June 12th, 2019, 17:34
For some reason no idea why it wont allow me to interact with that link can you PM me the file?
You must be viewing on the Full Site and in the "FG Responsive" theme. Make sure you are not viewing the mobile site and in the bottom left corner set the theme to FG Responsive.

Davinci522
July 16th, 2019, 02:40
Never mind. I read two responses up and it explains the problem I am having.

Valerian Stormbreaker
July 21st, 2019, 20:21
Alright, after doing some testing on this extension over the weekend, I'm admitting defeat. I do data sets, not procedural languages, so LUA and XML are not my thing. I know what needs to be done pseudo code-wise, but haven't successfully made an update to the extension that fixes the bug.

The extension is failing to clear a checkbox on inventory delete. Alternatively, i added a header for Attunement with a counter to keep track of the total attuned items, which could be manually overwritten to correct the bug, but the counter is not keeping track in my testing. I'm just not calling the variables correctly. My XML skills are normally limited to editing existing code when I have examples.

If anyone wants to take a crack at updating the code to get the onDelete function working properly, I'm happy to integrate it into the extension. I'll keep trying to correct this myself, but I've got other languages that take a priority to learn over XML.

Ok! I have fixed the extension for you. I have added a script reference to the "attuned_label" control in the record_char_inventory.xml file. This script points to the new "campaign/scripts/charsheet_inventory.lua" file that updates the "attunedCount" DB value whenever an inventory item is deleted. I have tested it and this corrects the problem!!!

I have updated the extension to v1.2 so that dmsanctum can easily update the OP.

EDIT: While this version is fixed, it did not work with the coin_weight extension. I have correct this problem too and posted the fix in a later post.

dmssanctum
July 21st, 2019, 22:21
Ok! I have fixed the extension for you. I have added a script reference to the "attuned_label" control in the record_char_inventory.xml file. This script points to the new "campaign/scripts/charsheet_inventory.lua" file that updates the "attunedCount" DB value whenever an inventory item is deleted. I have tested it and this corrects the problem!!!

I have updated the extension to v1.2 so that dmsanctum can easily update the OP. For now, the fixed extension can be downloaded here:

Thank you very much. I wasn't calling all the right items in the code I was testing. I've updated the extension and given you credit on the original post. This extension is not 100% compatible with the Con Weight extension now, having both on at the same time disables the attunemnt delete update portion, even though both extensions are using merge joins.

Valerian Stormbreaker
July 21st, 2019, 23:07
Thank you very much. I wasn't calling all the right items in the code I was testing. I've updated the extension and given you credit on the original post. This extension is not 100% compatible with the Con Weight extension now, having both on at the same time disables the attunemnt delete update portion, even though both extensions are using merge joins.

I'll take a look at it. Is that the coin weight (https://www.fantasygrounds.com/forums/showthread.php?41109-The-weight-of-the-coins&highlight=Con+Weight) extension?

Valerian Stormbreaker
July 21st, 2019, 23:51
Thank you very much. I wasn't calling all the right items in the code I was testing. I've updated the extension and given you credit on the original post. This extension is not 100% compatible with the Con Weight extension now, having both on at the same time disables the attunemnt delete update portion, even though both extensions are using merge joins.

Ok. I have fixed the problem with running this extension with the Coin Weight extension. For some reason, when the Coin Weight extension loads, this extension refuses to load an external script inside the label. So, I just moved the code into the script tag for the label and now it works!!! :D

Here's the version that works with the Coin Weight extension:

dmssanctum
July 21st, 2019, 23:57
Ok. I have fixed the problem with running this extension with the Coin Weight extension. For some reason, when the Coin Weight extension loads, this extension refuses to load an external script inside the label. So, I just moved the code into the script tag for the label and now it works!!! :D

Here's the version that works with the Coin Weight extension:

Yep, that looks good. Thanks for the assistance. I really should get better at XML with all the ideas I have for modifying Fantasy Grounds.

Valerian Stormbreaker
July 21st, 2019, 23:58
Yep, that looks good. Thanks for the assistance. I really should get better at XML with all the ideas I have for modifying Fantasy Grounds.

It just takes time to learn how to program. I've been doing it professionally for 18 years. So, don't feel too bad.

dmssanctum
July 22nd, 2019, 00:00
It just takes time to learn how to program. I've been doing it professionally for 18 years. So, don't feel too bad.

I do SQL, so my set based mindset doesn't always translate well to other programming languages.

Valerian Stormbreaker
July 22nd, 2019, 00:04
I do SQL, so my set based mindset doesn't always translate well to other programming languages.

Most of my experience is developing gaming engines, probability calculators, par-sheet generators, and server side back-of-the-house systems for Oklahoma's casino gaming industry. So, I know software engineering and databases extremely well. The XML and LUA scripts are actually pretty easy. Think of it like this. The XML provides the definitions / tables and the LUA provides the stored procedures. ;)

Autismo-Prime
August 12th, 2019, 13:28
I don't see anything in this thread about it, but Invidivual Attunement is a fairly important thing if it can be implemented, for things such as boons from gods or the Artificer class, without having to adjust the entire party's attunement slots.

dmssanctum
August 13th, 2019, 03:45
I don't see anything in this thread about it, but Invidivual Attunement is a fairly important thing if it can be implemented, for things such as boons from gods or the Artificer class, without having to adjust the entire party's attunement slots.

Since there are so many potential unofficial exceptions or homebrew methods of doing attunement, the best thing to do there would be to just increase the total limit of allowed attunement slots and keep track. It still provides a cleaner tracking system than pen and paper.

Autismo-Prime
August 15th, 2019, 16:05
Since there are so many potential unofficial exceptions or homebrew methods of doing attunement, the best thing to do there would be to just increase the total limit of allowed attunement slots and keep track. It still provides a cleaner tracking system than pen and paper.

Well it's still worth bringing to notice, adding meta option in the character sheet for individual attunement maximum would allow for most if not all homebrew methods to work, and would allow for more attunement slots while still applying the maximum for the other players, so that the feature still works properly with the removal of the attunement boxes upon attuning to the maximum. Still great extension, and I understand if you don't want to put in the effort to add a ton of homebrew options, but adding an individual value would be fairly simple, and would allow all homebrew options to work a lot easier than presently.

WinterSoldier7
June 23rd, 2020, 14:02
Is this FGU compatible?

dmssanctum
June 23rd, 2020, 14:40
Is this FGU compatible?

I haven't seen any errors using it in FGU yet.

HeavyDeception
August 2nd, 2020, 03:29
Is there a way to have it to look at your class artificers can attune to more times than Normal classes.

Beemanpat
August 3rd, 2020, 18:24
Is there a way to have it to look at your class artificers can attune to more times than Normal classes.

You can adjust how many items that you can attune in options. See post #1.

Lou Ciphor
August 19th, 2020, 05:51
Unsure if you're still supporting this or not, but lately we've been seeing (in games I run and games I play in) cases where it's not tracking the # of attuned items properly in FG Classic. (I haven't used it extensively enough in Unity yet to see if it happens there, too.)

For example, if max items is set to 3 in Options, it will usually allow 4 items, sometimes 5, before locking out additional selections. This does scale when changing the max in Options (set to 5, can attune 7).

HeavyDeception
August 19th, 2020, 10:50
I have a request is there a way for this to work were 1 PC can have more attuned items than another?
This is to account of artificer or if a PC gets a blessing.

dmssanctum
August 19th, 2020, 14:19
Unsure if you're still supporting this or not, but lately we've been seeing (in games I run and games I play in) cases where it's not tracking the # of attuned items properly in FG Classic. (I haven't used it extensively enough in Unity yet to see if it happens there, too.)

For example, if max items is set to 3 in Options, it will usually allow 4 items, sometimes 5, before locking out additional selections. This does scale when changing the max in Options (set to 5, can attune 7).

Support is pretty minimal, I'm surprised they aren't adding this feature in unity considering its a core mechanic in 5E. Earlier versions of the extension did have trouble tracking but it happened when you would delete an attuned item. I've not heard any reports of it allowing extra items. You'd need to provide some examples and how it happened. I cannot reproduce the issue at this time.

As for the extra attunement slots for 1 character, it would require a rework of the code to save individual slots, not sure if there is anything like that in FG since the bonus inspiration slots are also globally determined. The best way to handle that is to just increase the max slots allowed for everyone and just keep track of it manually.

Rbbrbootz
August 23rd, 2020, 05:49
I've a question concerning this. How easy would it be to have the value change according to proficiency bonus? I seriously suck at coding, or I would have tried to do it myself, based off your work. It can do what I need, as long as I remember to increase things accordingly.

Lou Ciphor
September 5th, 2020, 18:22
Not working in Unity.

Displaying the "no" symbol alongside the tick mark circles. Able to attune unlimited items.
NO other extensions loaded whatsoever.

https://www.dropbox.com/s/ds6kh5pml9tgv3k/5E%20Attunement%20Tracker.png

dmssanctum
September 5th, 2020, 18:31
Not working in Unity.


Displaying the "no" symbol alongside the tick mark circles. Able to attune unlimited items.
NO other extensions loaded whatsoever.

I just updated unity to the 9/03 build to verify.
Never had an issue in Unity, just tested again. Even with other extensions loaded, it is working as expected. What version of Unity are you on? You may need to clear some caches or reset your DB. I know there are some other cases where an extension doesn't work properly because of duplicated rulesets or things not being updated properly. I've had it happen to me in the past.

Lou Ciphor
September 5th, 2020, 18:36
Unity v4.0.0 Ultimate (2020-09-03).
This is a clean install, in an effort to resolve this, and other issues (which I'm still 99.99999% convinced are related to bad network coding).
It was doing this before the reinstall. At least 2 weeks ago. Worked fine up to that point, except for occasionally allowing more attuned items that set in the table settings.

Rbbrbootz
September 5th, 2020, 23:29
I litterally wasjust using it in my game I DM with FGU 4.0.0 Ultimate and have no issues at all. My players also have not had issues with it.

Lou Ciphor
September 6th, 2020, 02:25
...

Roach
September 12th, 2020, 13:32
Just installed The Attunement Tracker on FG Classic, added it to a current campaign. My players can attune to different numbers of magical items. On the screenshot, the tracker is set to a limit of 2 attunements. Only 1 out of 4 had a limit of 2, two get the stop sign at three, and one even at four attuned items... What can be the reason for these differences? 39293

dmssanctum
September 12th, 2020, 14:34
Just installed The Attunement Tracker on FG Classic, added it to a current campaign. My players can attune to different numbers of magical items. On the screenshot, the tracker is set to a limit of 2 attunements. Only 1 out of 4 had a limit of 2, two get the stop sign at three, and one even at four attuned items... What can be the reason for these differences? 39293

I haven't seen any extensions that interfere with the tracker yet, but are you running anything that might be conflicting with the inventory page? The only time I had seen different levels of attunement allowed was before a bugfix was made where deleted items remained attuned.

Lou Ciphor
September 12th, 2020, 20:46
That is the exact same issue I reported before. It's still happening. Disabled ALL extensions except this one, and it still happens... Even in a new campaign with a new character based on SRD only.

razzed1
March 11th, 2021, 19:38
So, the same thing I have seen other people complaining about is now happening to me. The attunement tracker is allowing MORE attunements than what I have it set for.
It looks like the number it allows for each character is a minimum of 3, which is what I have it set for, up to a maximum of the number of attunement-required items that the PC is carrying + 1.
Carrying 4 attunement items, looks like it allows 5 items to be attuned before putting up the NO symbol.

dmssanctum
March 11th, 2021, 20:40
So, the same thing I have seen other people complaining about is now happening to me. The attunement tracker is allowing MORE attunements than what I have it set for.
It looks like the number it allows for each character is a minimum of 3, which is what I have it set for, up to a maximum of the number of attunement-required items that the PC is carrying + 1.
Carrying 4 attunement items, looks like it allows 5 items to be attuned before putting up the NO symbol.

I keep trying to recreate this reported issue, but can't. I have changed the Max Attuned Items, I delete attuned items, non-attuned items. It all looks fine still. The only time I see a discrepancy is when the Max Allowed is 4, I attune to 4 items, then change it to say 2. The other players would have a limit of 2, but the person already attuned to 4 will continue to have the 4 checked until they uncheck 2 and hit the limit again. If you can step by step recreate and explain how it happened, then I can try to recreate and track down where the error is occurring.

I'm happy to incorporate fixes or enhancements other people make and give them credit, but I don't see any reason for the reported issues in the code either.

Rino
March 12th, 2021, 07:16
I noticed yesterday that one character had 4 maximum, while everyone else had 3 (settings had 3 maximum). On the one who had wrong I tried unselect down to 1, and then up again - but still 4. Then I unselect all, and then up to 4. Then I unselect all, and went over to another character and did some up/down there (other was still ok). Then I went back to the one who had wrong (which at this point at 0 selected) - and now I could only go upto 3. So this apparantly fixed that character.

Another thing I notced in the settings is that I click "1" twice before going to "2", while if I click any other number It always goes to next right away.

dmssanctum
March 12th, 2021, 15:51
I noticed yesterday that one character had 4 maximum, while everyone else had 3 (settings had 3 maximum). On the one who had wrong I tried unselect down to 1, and then up again - but still 4. Then I unselect all, and then up to 4. Then I unselect all, and went over to another character and did some up/down there (other was still ok). Then I went back to the one who had wrong (which at this point at 0 selected) - and now I could only go upto 3. So this apparantly fixed that character.

Another thing I notced in the settings is that I click "1" twice before going to "2", while if I click any other number It always goes to next right away.

OK, so it may be something with the number being set/reset by different characters. I'll try to recreate it this weekend if I get a chance.
In the meantime, I see what you mentioned about having to double click "1". I got that fixed and updated the extension. It stemmed from having the values list but then also listing "1" as the first value, which made it get duplicated.

Very minor update that doesn't affect functionality, so up to you all if you want to replace it.

twseifert
March 15th, 2021, 15:37
This is pretty cool, I just used a location entry on the Inventory Tab to keep track, so that things became nested.

Item............................Location
ex: Attuned
------> Ring of Protection...Attuned

dmssanctum
March 19th, 2021, 04:55
With help, a lot of enhancements have been made to the extension and should fix all the outstanding issues, including adding support for Proficiency based attunements, Artificer slots, and individuals having different attunement slots. Oh, and also only being able to attune to items that have the tag "Requires Attunement". After a few days more testing, the updated extension should be released this weekend.

dmssanctum
March 20th, 2021, 22:21
New revision to the extension has been attached in the original post. Quite a few changes have been made; refer to the screenshots so you do not miss any of the extras. The average person will enjoy the continued ability to denote attunements, but now only items requiring attunement will have the option, making it much easier to keep track of your items. Hopefully this will be the last update needed for the extension.

WinterSoldier7
March 22nd, 2021, 15:38
Brilliant, thank you!

Raven Darkstone
April 2nd, 2021, 03:43
I have used this extension for a bit and just updated it. It seems to be working, but I did run into an issue. When I loaded my characters, if they had attuned items equipped, it didn't recognize it and showed me 0/3 (even though I had one ticked). Then I have a character that shows it has 2 of 3 items attuned, but no attuned items are equipped. If I tick one of, then the others can't be equipped. It let's the PC equip one item, but mark of as if he had three :-(

dmssanctum
April 2nd, 2021, 05:49
I have used this extension for a bit and just updated it. It seems to be working, but I did run into an issue. When I loaded my characters, if they had attuned items equipped, it didn't recognize it and showed me 0/3 (even though I had one ticked). Then I have a character that shows it has 2 of 3 items attuned, but no attuned items are equipped. If I tick one of, then the others can't be equipped. It let's the PC equip one item, but mark of as if he had three :-(

The best I can come up with is that there is some weird interaction with other inventory extensions or long running campaigns have a lot of miscalculated data in them from the old version of the mod. You might try unloading the extension and clearing your cache, then resetting everyone's items for using this version of the mod. I've never been able to produce wonky results like these reports so it is very difficult to know what is causing it.

badgr
April 2nd, 2021, 17:09
I have used this extension for a bit and just updated it. It seems to be working, but I did run into an issue. When I loaded my characters, if they had attuned items equipped, it didn't recognize it and showed me 0/3 (even though I had one ticked). Then I have a character that shows it has 2 of 3 items attuned, but no attuned items are equipped. If I tick one of, then the others can't be equipped. It let's the PC equip one item, but mark of as if he had three :-(

Is it possible for you to share a copy of db.xml (or at least the part pertaining to the characters) and maybe it'll help in understanding the issue? As dmssanctum says, it could be to do with a miscalculation from the previous version - or it's something that we entirely overlooked. I'm happy to take a look and help dmssanctum get to the bottom of it.

Edit: if you don't want to share the file publicly on the forum, you can also PM me directly. At a cursory glance, it looks like removing all attunements on the PC's inventory and then reapplying them "resets" the extension into starting the count properly again.

I've been doing a bit of work on AttunementTracker with dmssanctum help give the final bits of functionality, so I'm happy to help debug the latest changes to the extension. :)

Raven Darkstone
April 2nd, 2021, 20:21
I am really good at using FGU to help me get the story out and take advantage of the extensions, but I haven't looked much into the programming side. This db.xml file, is it located in the active campaign folder with the current issue?
Also, I have removed all items with attunements and the sheet still shows 2/3 attuned items.45377

badgr
April 2nd, 2021, 20:37
I am really good at using FGU to help me get the story out and take advantage of the extensions, but I haven't looked much into the programming side. This db.xml file, is it located in the active campaign folder with the current issue?
Also, I have removed all items with attunements and the sheet still shows 2/3 attuned items.45377

The db.xml file (by default) is stored in your AppData/Roaming folder.

You can get to that folder by pointing Explorer to
%appdata%/Fantasy Grounds Unity/campaigns/ and then whatever your campaign name is.

That should give me a good idea of where the issue is and what's potentially causing problems (and allow me to run tests on it)

Raven Darkstone
April 3rd, 2021, 20:38
OK, hw do I send you the file? I just tried to attach the file to this medium, but it didn't work. Just in case, the file is about 1.5 megs.

badgr
April 3rd, 2021, 22:20
OK, hw do I send you the file? I just tried to attach the file to this medium, but it didn't work. Just in case, the file is about 1.5 megs.

I'll drop you a DM. :)

badgr
April 5th, 2021, 03:41
EDIT: I've uploaded a new version of the code with just a single if statement added that simply checks if an item is attuned, and if it is, it'll let you untick it. If the item doesn't require attunement, it will no longer show the checkbox after that. I'll attach the extension for that for dmssanctum to check it over.

FYI @dmssanctum: so that it makes your life easier double-checking the extension, the added lines are 69-71 of campaign/scripts/at_checkbox.lua (with notes, as I'm sure you're used to seeing from me by now...)



I'll leave the below block of text and explanation for anyone interested in seeing how/what was happening to cause issues with this in the first place.
-----------------------------------------------------------------------------------------------------------------------------

Having read through the db.xml file from Raven Darkstone and taken a deeper dive, this has exposed a flaw that I hadn't considered when working with dmssanctum on the changes. Since the previous version of the extension allowed you to attune to any item, regardless of whether or not the item required it, it meant that if your players attuned to an item they didn't need to, this latest version the extension hides the ability to attune to items that do NOT require it. So, until I can find some time to work on a fix for this, the 'fix' for this would be to un-attune all the items from your players and have them attune the items again when they load up the game.

Alternatively, you can try to debug this in a more thorough manner, which is also fairly easily doable but will obviously take a little more time.

Method #1: Un-attune all items
1. go to %appdata%/Fantasy Grounds Unity/campaigns/the_name_of_your_campaign/ and make a backup of your db.xml file!!!!
2. Open up db.xml and do a search for <attune type="number">1
3. Replace 1 with 0 (this is essentially where the extension stores the "this item is attuned" tickbox, so 0 means not attuned)
4. Load up the game and check the inventories, all items should be unattuned and the "count" should reset to 0/3 or similar

Method #2: A little more in-depth, but gives you a bit more control
To go into further depth with debugging this and how this kinda messed with the extension (my fault, I didn't even think of it!) you will notice the below item is Boots of Elvenkind and is currently attuned, even though the <rarity> of the item doesn't say (Requires Attunement) so... it won't ever show the tickbox to select/deselect attunement. This is where things got a bit funky for Raven Darkstone. So... how to fix that once you've found the issue? You can open up that character's inventory in FGU and edit the item in their inv so that you add (Requires Attunement) to the rarity box. Then you can untick it, and remove the requirement string once more. Or, if the item is one that you have enforced to be attuned, even though the base rules say otherwise... just add the (Requires Attunement) part into rarity and leave it there. Done!


<id-00001>
<holder name="badgr" owner="true" />
<ac type="number">0</ac>
<attune type="number">1</attune> <============= THIS ITEM IS CURRENTLY ATTUNED, EVEN THOUGH IT DOESN'T REQUIRE IT
<bonus type="number">0</bonus>
<carried type="number">2</carried>
<cost type="string">101 - 500 gp</cost>
<count type="number">1</count>
<description type="formattedtext">
<h>Description</h>
<linklist>
<link class="imagewindow" recordname="reference.imagedata.img_boots_of_elvenkind_jpg@*">
<b>Image: </b>Boots of Elvenkind</link>
</linklist>
<p>While you wear these boots, your steps make no sound, regardless of the surface you are moving across. You also have advantage on Dexterity (Stealth) checks that rely on moving silently.</p>
</description>
<effectlist>
<holder name="Althebarberian" owner="true" />
</effectlist>
<isidentified type="number">1</isidentified>
<locked type="number">1</locked>
<name type="string">Boots of Elvenkind</name>
<nonid_name type="string">Boots</nonid_name>
<nonidentified type="string">The finest leather has gone into the making of these superb boots. They are unmistakably Elven in origin.</nonidentified>
<properties type="string">Magic</properties>
<rarity type="string">Uncommon</rarity> <============================ BECAUSE (Requires Attunement) ISN'T INCLUDED AFTER "Uncommon", THE CHECKBOX DOESN'T APPEAR ON INVENTORY, SO WE CAN'T UN-ATTUNE IT
<spells>
<holder name="Althebarberian" owner="true" />
<id-00001>
<holder name="Althebarberian" owner="true" />
<link type="windowreference">
<class />
<recordname />
</link>
<name type="string">Boots of Elvenkind</name>
</id-00001>
<id-00002>
<holder name="Althebarberian" owner="true" />
<link type="windowreference">
<class />
<recordname />
</link>
<name type="string">Boots</name>
</id-00002>
</spells>
<type type="string">Wondrous Item</type>
<weight type="number">0.5</weight>
</id-00001>

I realise that this can be "a lot" to digest, but when I have a bit of spare time to add some additions to the code (or dmssanctum has time) then we can add a code to check against the requirement text and all of that. Hopefully this is a fairly small occurrence but if not, I hope this explanation can help.

Rbbrbootz
April 9th, 2021, 20:40
I have an issue that, for some reason, AT.ext is not showing up as an option on my load screen. I started a post here (https://www.fantasygrounds.com/forums/showthread.php?67672-Extensions-not-loading/)and was told to talk to the authors. Have you seen/heard anything about this issue?

badgr
April 10th, 2021, 05:33
I have an issue that, for some reason, AT.ext is not showing up as an option on my load screen. I started a post here (https://www.fantasygrounds.com/forums/showthread.php?67672-Extensions-not-loading/)and was told to talk to the authors. Have you seen/heard anything about this issue?

I've re-uploaded the file, just to be safe, and I've also fixed a minor mistake that I'd previously made with a value in one of the checks (not a major problem, just makes sense to take this opportunity to fix it.)

Let me know if this doesn't work.

Rbbrbootz
April 10th, 2021, 17:06
Whatever you did, worked! Thank you

dmssanctum
April 10th, 2021, 17:13
I've re-uploaded the file, just to be safe, and I've also fixed a minor mistake that I'd previously made with a value in one of the checks (not a major problem, just makes sense to take this opportunity to fix it.)

Let me know if this doesn't work.

I also updated the original post with the change and updated the version number. Thanks for fixing that. I thought it might be related to items being attuned that weren't supposed to be on this version. Still no clue what was happening in the past with all the reports of mixed up slots.

badgr
April 10th, 2021, 22:05
Whatever you did, worked! Thank you

Yep, that was an error in my packaging script, by the looks of it. It was including the root folder erroneously.


I also updated the original post with the change and updated the version number. Thanks for fixing that. I thought it might be related to items being attuned that weren't supposed to be on this version. Still no clue what was happening in the past with all the reports of mixed up slots.

Same. Still quite perplexing, and I don't foresee it coming up now but I couldn't actually figure out what was going on there either.

Also for your reference dmssanctum, I had made a mistake with Artificers gaining an extra slot at 9th level when it should have been 10th, so that was changed with the most recent upload I made. Code is in at_checkbox.lua if you wanted to make a personal note of any changes made.

rob2e
April 11th, 2021, 03:51
In the current version only the EXTREME RIGHT portion of the plus button on the Equipment bar works. It seems maybe the number to the left of the plus button overlap/block it?

dmssanctum
April 11th, 2021, 05:54
In the current version only the EXTREME RIGHT portion of the plus button on the Equipment bar works. It seems maybe the number to the left of the plus button overlap/block it?

It took me a really long time to figure out what you were referencing. Probably because I almost never use the Add Item button.
I see what you mean though, its blocking the tooltip and click action. I shoved it around and the whole button is usable again, I can get it centered tomorrow with an update.

badgr
April 11th, 2021, 06:28
It took me a really long time to figure out what you were referencing. Probably because I almost never use the Add Item button.
I see what you mean though, its blocking the tooltip and click action. I shoved it around and the whole button is usable again, I can get it centered tomorrow with an update.

Oh jeez, yep that's way off, I didn't notice that, but I see what you mean.

I played around with the values and left offset -37 and right offset -20 seems to work. I think I was trying to set the right offset to -30 and missed the 0.

rob2e
April 11th, 2021, 07:49
It took me a really long time to figure out what you were referencing. Probably because I almost never use the Add Item button.
I see what you mean though, its blocking the tooltip and click action. I shoved it around and the whole button is usable again, I can get it centered tomorrow with an update.

Good times.

dmssanctum
April 11th, 2021, 17:00
Oh jeez, yep that's way off, I didn't notice that, but I see what you mean.

I played around with the values and left offset -37 and right offset -20 seems to work. I think I was trying to set the right offset to -30 and missed the 0.

Yea, I just didn't feel like nudging it around before bed last night. I've updated the extension with some better offsets, the whole button should be usable again.

EllivasKram
April 13th, 2021, 09:28
There must be a better way to find extns than by chance they appear near the top of the forums

humby
April 13th, 2021, 11:51
There must be a better way to find extns than by chance they appear near the top of the forums

There's a sticky: https://www.fantasygrounds.com/forums/showthread.php?27298-Extensions-Modules-Pregens-and-other-5E-resources

EllivasKram
April 13th, 2021, 11:56
That’s a no there isn’t then lol ?

Raven Darkstone
April 13th, 2021, 14:53
I just want everyone to know that these guys are really great. I had an issue with number of items attuned (it was my error) and when I inquired about it, they were on top of it and got it fixed in short order. Fantastic work guys and hats of to you.

dmssanctum
April 13th, 2021, 16:28
That’s a no there isn’t then lol ?

I think this link is what you are looking for specifically. They update it with all the most popular 5E extensions, there are similar threads for other rulesets. It is how I find all my extensions.
https://www.fantasygrounds.com/forums/showthread.php?22975-5E-Community-extensions

LordEntrails
April 13th, 2021, 19:36
Trenloe (or another Mod) will update that thread with any appropriate extensions that an author asks to be posted there.

EllivasKram
April 13th, 2021, 20:44
Thanks guys. Added to favourites

similarly
April 14th, 2021, 02:17
Oh, wow! I didn't see this until now. Totally need this. Great work!

jrowsey1
June 2nd, 2021, 01:40
Looks like this was added to the core rules as of 6-01-21:

"[5E] Added attunement tracking in PC inventory."

Any reason to keep this extension loaded?

Temmpest
June 2nd, 2021, 01:47
Looks like this was added to the core rules as of 6-01-21:

"[5E] Added attunement tracking in PC inventory."

Any reason to keep this extension loaded?

Good catch! I removed the extension. You definitely don't need it. You can adjust # of items attuned in the options menu.

badgr
June 2nd, 2021, 02:36
Looks like the day dmssanctum was waiting for has finally arrived. I've not had a chance to check this out myself yet (got a game on Friday, though) so I imagine the work here is done :D

dmssanctum
June 2nd, 2021, 02:55
Looks like the day dmssanctum was waiting for has finally arrived. I've not had a chance to check this out myself yet (got a game on Friday, though) so I imagine the work here is done :D

I've got a game going on right now so I can't test yet either, but unless the extension adds something extra, no you won't need it.

badgr
June 2nd, 2021, 03:20
Yep, looks good. The extension can be disabled. It works almost exactly the same. I've not looked at the code, so can't tell if it automates anything, but this is basically the feature we wanted in the base ruleset :)

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

Beemanpat
June 2nd, 2021, 03:45
The item will need to be identified before it give the little circle to enabled it to be checked that it is attuned. Took me a minute to figure that out.

dmssanctum
June 2nd, 2021, 04:10
Yep, looks good. The extension can be disabled. It works almost exactly the same. I've not looked at the code, so can't tell if it automates anything, but this is basically the feature we wanted in the base ruleset :)

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

Awesome. I'm glad they finally added this feature!

Moon Wizard
June 2nd, 2021, 07:14
Yes, the item must be identified, and must have the text "Requires Attunement" in the Rarity item field; before you can attune to it.

Regards,
JPG

nephranka
June 2nd, 2021, 10:50
I do note that it has changed from blocking you from attuning more items once you get to the limit to using a red text field showing the ratio of current to total. It does not stop you from over attuning.

Moon Wizard
June 2nd, 2021, 18:16
Yes, it was simpler to implement; and provides the same amount of information. In the end, attunement is just tracking; and doesn't provide mechanical changes to behaviors.

Regards,
JPG

nephranka
June 2nd, 2021, 18:24
Thanks for the explanation. I was just alerting others (like me) who might be changing over that we would need to watch it now as the old ext prohibited that in the past, so it does change the (or at least this) GMs behavior ;)

Gozer the Gozerian
June 4th, 2021, 05:36
Awesome. I'm glad they finally added this feature!

Thank you for your work in providing this extension until it was added.

nephranka
June 15th, 2021, 01:50
Yes, it was simpler to implement; and provides the same amount of information. In the end, attunement is just tracking; and doesn't provide mechanical changes to behaviors.

Regards,
JPG

Quick question. It seems that every time the players login they have all of the items that have been checked as attuned unchecked. Is that also expected behavior? I can watch on the GM side. As soon as they connect all the circles clear even before character selection. No exts, no mods, just the srd,

LordEntrails
June 15th, 2021, 02:15
Quick question. It seems that every time the players login they have all of the items that have been checked as attuned unchecked. Is that also expected behavior? I can watch on the GM side. As soon as they connect all the circles clear even before character selection. No exts, no mods, just the srd,
I'm not seeing this in my game. What ruleset and have you checked with no extensions enabled both when saving and the next time opening the campaign?

nephranka
June 15th, 2021, 10:53
I'm not seeing this in my game. What ruleset and have you checked with no extensions enabled both when saving and the next time opening the campaign?

5e but I think I fixed it. I had to clear the cache data. Once I did that all is working.

Edit: it worked on the first try but after that it was back to erasing the check marks again. So it appears to be tied to the cache data and not saving the attunement information? I am not sure but I will keep looking at it.

Edit 2: Went back and did a new campaign. No exts, srd only, 5e. Tried logging in both client and host making the changes then forcing a save on both client and host then logging out. When the host got up and running everything was there. As soon as the client finish connecting, poof, the check was erased. It is acting like just the attunement info is not saving between sessions. It is working fine in real time. I even checked the DB to see if the attunement tag was updated before relaunch and it was. I do bounce between linux and windows but I have been testing (here at the end) with windows. I am trying to eliminate all the possible variables. I did confirm permissions on the folders and all looks right.

Moon Wizard
June 15th, 2021, 17:33
Can you send a zipped up copy of the new campaign; and which character is affected?

Thanks,
JPG

nephranka
June 15th, 2021, 22:24
Can you send a zipped up copy of the new campaign; and which character is affected?

Thanks,
JPG

So I fully uninstalled FGU and reinstalled it. Created a test campaign and a test1 character. I gave them an item, checked attuned. Saved on both client and host and logged out both. Relaunched and I got the same issue.

Moon Wizard
June 16th, 2021, 18:32
Thanks for the steps. I was able to recreate; and I'll look at getting a fix out with the weekly update next week.

Regards,
JPG

nephranka
June 16th, 2021, 18:55
Thanks for the steps. I was able to recreate; and I'll look at getting a fix out with the weekly update next week.

Regards,
JPG

Thank you.