PDA

View Full Version : Add Annotations to Any "misc" Fields on the Character Sheet



MostTornBrain
March 20th, 2022, 20:58
Hi,

I made a very small extension that will allow adding formatted-text annotations to any "misc" numeric field on the character sheet. I find over time I often will forget where the values I entered for "misc" actually came from, so this allows one to enter a description, or a link to a section of the rules, etc.

I tested this with PFRPG 1E, but I think it should work with any ruleset as it is adding behavior to the number field from the CoreRPG.

This was mostly done as a learning exercise to get myself more familiar with different features within the FGU Lua scripting environment, but I think others might find it useful.

The extension works by overriding the "basicnumber" template and looks for any writeable fields on a charsheet that contain the string "misc" as part of the name. All of those detected fields will get some extra logic applied to add a small widget in the corner as a visual indication of whether an annotation has been attached or not. Also, the field will have a tooltip of the note's plain text if it exists. One can then add annotations to such misc fields by CTRL-clicking on the field. This will bring up a formatted-text editor and behind the scenes the contents will be saved to part of the charactersheet XML.

Here are some screenshots showing what this looks like in operation:
52096
In the above image, the small triangle in the lower right of a field indicates it can be annotated. If the triangle has a blue halo, it means it currently has a note attached. (I reused the combobox icon so hopefully this will coexist with any themes as it should piggyback on the combobox icon changes made for any theme.)

Here's a screenshot showing the hovertext tooltip of an annotation.
52097

Here's a screenshot showing the formatted-text editor (mostly styled after the MOTD windowclass).
52098

Feedback is welcomed. I figured this out with lots of trial and error, so if you notice I did anything in a less than ideal way, feel free to let me know. I tried to do as much of the parsing and caching of values "up-front" as possible during the initial display of the character sheet to hopefully reduce the processing overhead of adding custom handling to all the "misc" fields.

One potentially "quirky" thing is how I set the title of the formatted-text editor when annotating a field. I use the name of the misc field from the node. In most cases the title ends up self-explanatory (such as "saves.fortitude.misc"), but for the misc fields for all the skills, having a title like "skillist.id-00025.misc" isn't very descriptive. :-D Hopefully one remembers what field they were annotating in this case.

This is currently on github - under MIT license: https://github.com/MostTornBrain/MiscAnnotations
It is also freely available on the Forge: https://forge.fantasygrounds.com/shop/items/567/view

If someone else wants to repurpose this code into an existing extension or do something better with it, feel free.

Cheers,
Brian

bmos
March 20th, 2022, 22:05
This is a great idea!
You could even make the notes a list of notes and each one could have a bonus associated to it which add up to the value in the field iteself.
I had considered doing that last year for my Permanent Bonuses and Ability Drain extension for Pathfinder.

MostTornBrain
March 20th, 2022, 23:00
This is a great idea!
You could even make the notes a list of notes and each one could have a bonus associated to it which add up to the value in the field iteself.
I had considered doing that last year for my Permanent Bonuses and Ability Drain extension for Pathfinder.

Thanks! I'm happy you like it. I love your Permanent Bonuses and Ability Drain extension - I was originally writing custom effects for ability bonuses but didn't like how you don't see "at a glance" what the total is on the character sheet, then I discovered your extension a week or two ago. After seeing how helpful it was, your extension led me to reconsider the types of things that can be done to the character sheet. I missed being able to handwrite notes on a physical piece of paper, and was trying to think of how to add the ability to annotate some places unobtrusively, yet have the notes easily viewable.

There is the "Notes" tab on the character sheet already, of course, but for some reason I always forget it's there and just use it for more general campaign notes or character background info.

Cheers,
Brian

Zacchaeus
March 20th, 2022, 23:04
Nice one.

GKEnialb
March 22nd, 2022, 00:37
Well done! This will be really useful - I vote you put it on the Forge.

MostTornBrain
March 22nd, 2022, 17:48
I put this extension on the Forge.

https://forge.fantasygrounds.com/shop/items/567/view

Please let me know if you notice any issues. I tested with 3.5/PFRPG, 4E, and 5E and it appears to work with all of those character sheets. It should work with any ruleset where the character sheet has numeric fields with "misc" in the underlying name.

Also, as I mentioned previously, I have no issues with someone repurposing this into a larger extension if that makes more sense.

Cheers,
Brian

Morenu
June 7th, 2022, 12:37
This is EXACTLY what I needed! Thanks!

FYI your forge link says "unlisted Product" which makes this hard to find IMO, adding either core rpg or PF1e/3.5 (or whatever it works with) makes it easier to find in forge.

AND, I have a few more boxes that would be awesome to have the note option added to them. these are all boxes I have manually edited at one point for someone and then have to annotate why in the note tab.

53046

(the bottom part is the top of the Combat Tab, my label didn't save)

Thanks again!

rocketvaultgames
February 2nd, 2024, 22:47
The extension still seems to work fine, but I'm getting the following in chat whenever I CTRL-Click to change a note:

"anchor_bottom_utilitybox - DEPRECATED - 2023-05-30 - Contact ruleset/extension/forge author"

Jip
June 20th, 2024, 15:33
This mod still displays previously-added notes as popups, but any attempt to add new notes or edit old ones results in an error and no note additions/updates can be made. I removed/disabled all other mods and tested it, so I think the problem is with this one.

close_utilitybox - DEPRECATED - 2023-12-12 - Contact ruleset/extension/forge author

61107

Not the end of the world to lose this, but it is a super-useful tool. I figured I'd make a post in case others were having the same problem.

Morenu
June 20th, 2024, 18:08
I love this mod for tracking where bonuses and such are coming from. Hope mtb can fix it. Thx for the error report and for testing it by itself to confirm.

Trenloe
June 20th, 2024, 21:17
Unfortunately @MostTornBrain hasn't been on the forums since the posted on March 22nd. The extension is on the Forge, but is available in the FG extensions directory, so the code can be accessed and modified. It's probably worth PMing @MostTornBrain as they won't be getting new alerts for this thread if they haven't logged in for three months; otherwise, this might need a community member to update and make available here, but they won't be able to update the Forge code, so that might need SmiteWorks help if @MostTornBrain doesn't return to assist.

bmos
June 21st, 2024, 02:11
Fortunately Brian (MTB) is responsive on Discord and is willing to transfer the forge items to another dev if someone steps up to take over this extension as with DonE66 taking over Cohorts and Companions.

RobboNJ69
June 25th, 2024, 21:10
@bmos - That's excellent news. Is there any word on this moving forward?

bmos
June 25th, 2024, 23:52
My post wasn't quite clear enough. Someone needs to step up to maintain this before it will be fixed.

RobboNJ69
June 26th, 2024, 03:30
My post wasn't quite clear enough. Someone needs to step up to maintain this before it will be fixed.

My fault - I was to happy thinking it was getting updated and didn't read it carefully. Thanks for the information!

GKEnialb
June 27th, 2024, 04:01
Okay, I'll do it - can't say no to bmos telling someone to step up. :) I played with it a bit and think that I have it working correctly, so I'll find MTB on Discord and see about it being transferred over. One question, since it's been a while since I used this - did the top box (outlined in red below) used to be editable?

61151

In the meantime, you can try this out and let me know if it's behaving as expected.

RobboNJ69
June 27th, 2024, 16:16
Okay, I'll do it

@GKEnialb - Thank you very much for jumping on that! I will install it and give it a look. I hadn't used the previous version, so I can't make a comparison, but I can let you know what I find.

This community rocks!

Rob

RobboNJ69
June 27th, 2024, 16:44
I just tested it and it works! One thing I noticed is it doesn't show the information on a mouse over. I don't know that was supposed to happen, but I thought I read it somewhere.

The top box is not editable, but again, I didn't use it before so I can't say if that was supposed to be.

All in all, it is working. For further references, I'm using a bunch of extensions from bmos, Kelrugem, SoMax etc. I'm also using a designed custom theme/interface.

Great Job! Thank you again!

Jip
June 28th, 2024, 02:42
Hi Guys! Since I reported this problem in the first place, I figured I should jump in with some feedback.

- With this new ext in place and all my regular mods/exts turned on, all the errors are gone
- New notes can be added with no probs
- Old notes can be edited/removed with no probs
- Mouseover popups work just like they always did
- I have no memory of that top box being used for anything in the past, so no loss there

In short, it appears to be 100% fixed.

Thanks GKEnialb! And all who jumped in and helped on this. I'm just savvy enough to explain/test these issues, but I'd never have been able to fix it myself.

You guys are awesome.

GKEnialb
June 28th, 2024, 04:00
Thanks all for the quick testing. I talked with MostTornBrain and he's sending an email to get the Forge listed reassigned - hopefully I'll be able to get the update up there soon (which will just match what I posted here).

Morenu
June 29th, 2024, 03:11
Thanks a ton, this is a great mod that lets you edit your character sheet more like PnP for things that are "always on" but you don't want to see the effect on the CT and you want to see a more correct total on your character sheet.

I do know there are several places That would be great to notes as well but would most likely need to be done on a per box base. If I remember correctly this looks for "misc" and "Mod" boxes? but essentially, anywhere that has Bonuses could be useful.

Thanks again for taking it over. Hope MTB is doing OK.

GKEnialb
July 2nd, 2024, 03:03
Happy to do it - I hate to see a great extension fall by the wayside. MTB seems to be doing fine - just not using FGU at the moment, so hard to maintain an extension in that case.

This extension looks for "misc" in the name of any box. Would be easy to add other names as well, but could start to get messy with all of the rulesets. Totally open to adding new functionality, though.

Retch
July 3rd, 2024, 14:44
I am using the Advance Character sheet ext (https://forge.fantasygrounds.com/shop/items/861/view) for my screenshots below. This is a list of places I wish I could attach notes to BUT none are game changing:

Main Tab: 61182 I have not had reason to want the upper section with the ? but Movement and senses I have

Combat Tab: 61183 The ones across the top I can currently make a long list in the end Misc Box but broken out would be nice.SR and Speed have a Misc box and it can cover both as well. I believe BAB is your base and has no modifier boxes anywhere else, and I honestly am not sure if per rules there is a way to "permanently" increase it but if you don't want to see BAB: 1 on the CT I could see putting it here.

Action Tab:
Weapon Detail window: 61184 Of all the ones so far, this is by far the one I would love to see. I have Many places I would use this.
Spell Class Detail window : 61185 This one would be second on my list personally.
Spell Ability Detail window : 61186 There are a few here I have wished I had as well

I think that's it, I am only showing things I know I have said, I wish I could do that here too. no worries if you don't feel like it or if it is a lot more work, I just appreciate you took this ext. up and fixed it. thanks again.

Morenu
July 3rd, 2024, 16:54
I am using the Advance Character sheet ext (https://forge.fantasygrounds.com/shop/items/861/view) for my screenshots below. This is a list of places I wish I could attach notes to BUT none are game changing:

Main Tab: 61182 I have not had reason to want the upper section with the ? but Movement and senses I have

Combat Tab: 61183 The ones across the top I can currently make a long list in the end Misc Box but broken out would be nice.SR and Speed have a Misc box and it can cover both as well. I believe BAB is your base and has no modifier boxes anywhere else, and I honestly am not sure if per rules there is a way to "permanently" increase it but if you don't want to see BAB: 1 on the CT I could see putting it here.

Action Tab:
Weapon Detail window: 61184 Of all the ones so far, this is by far the one I would love to see. I have Many places I would use this.
Spell Class Detail window : 61185 This one would be second on my list personally.
Spell Ability Detail window : 61186 There are a few here I have wished I had as well

I think that's it, I am only showing things I know I have said, I wish I could do that here too. no worries if you don't feel like it or if it is a lot more work, I just appreciate you took this ext. up and fixed it. thanks again.

I agree with everything I just said there... sorry, was signed into my other account... Retch = Morenu... oops

RobboNJ69
July 3rd, 2024, 18:11
Retch = Morenu... oops
In my old life, we'd call that a breach of operational security...

I agree with Morenu, Retch made excellent suggestions. :D But really, we're so happy even the basic functionality has been restored, any more would be too good!

Thanks again, GKEnialb!

...and also, a big "thank you" to all the other Devs who make FG even better than it is out of the box: bmos, Kelrugem, SoxMax, darrenan, Zygmunt Molotch, Zarestia, rhagelstrom, daddyogreman, Lichtblitz, DonE66, Saagael, celestian, and others I'm probably forgetting.

Rob

GKEnialb
July 4th, 2024, 02:32
I'll take a look - should be pretty straightforward. Looks like Advanced Character Sheet ext if for 3.5 and PFRPG - hopefully they name their fields the same. @Morenu, based on your sig, it looks like you're a PFRPG player, so I'll start there.

GKEnialb
July 4th, 2024, 04:13
Okay, (mostly) good news and (some) bad news. Attached is an update (still waiting to have the Forge transferred over) for Morenu's requests. Just about everything was possible, but the 4 per attack bonuses don't have named fields, and neither do the speed or perception notes. Other than that, let me know (using whatever username you wish :)) if this works.

Morenu
August 19th, 2024, 02:14
Hey there, I am going to try it out (THANK YOU). It looks like it has not transferred or at least uploaded into forge yet?

GKEnialb
August 20th, 2024, 02:31
It hasn't been transferred yet. Let me drop him a line again (he was about to leave on vacation last we talked, so probably slipped his mind).

GKEnialb
August 23rd, 2024, 21:19
Okay, the latest is now live on the Forge (just the same as what was attached a few posts back).

RobboNJ69
April 27th, 2025, 19:13
Hello GKEnialb, do you have any plans on updating this extension for the latest release? It is working somewhat, but most of the field annotations are no longer showing. Thank you in advance for any update!

Rob

GKEnialb
April 28th, 2025, 00:55
Thanks for reporting - I'll take a look.

RobboNJ69
April 28th, 2025, 01:37
Thanks for reporting - I'll take a look.

Thank you!

GKEnialb
April 28th, 2025, 02:53
I think it's all fixed now, but forgot to up-rev the extension number and have to wait for it to process before I upload a new one. But hopefully it'll be all set tomorrow.

GKEnialb
April 28th, 2025, 22:59
The fix is now live. @RobboNJ69, let me know if it works for you.

RobboNJ69
May 22nd, 2025, 23:08
@GKEnialb sorry for just replying now - I don't know how I missed your reply.

Thank you for jumping on that. Unfortunately, it looks like it's still not working like it was. I opened up a fresh campaign with only this extension active.

On the main character tab it's not showing up on any of the fields.
On the combat tab it looks like it's showing everywhere. 64438
On the weapon record it's showing on the attack bonus but not the damage bonus.
On the skills tab it's not showing up in any of the fields or I believe it was showing in miscellaneous before.

I hope that helps.

Rob

GKEnialb
May 24th, 2025, 04:33
Darn, it looked like all that was working - I'll take a look.

Morenu
May 25th, 2025, 18:31
I assume this is the current extension, or is it under another name?

https://forge.fantasygrounds.com/shop/items/567/view

If so, The category is set to "Categories: Unlisted Product". It will search up better if you list the rulesets it works on.

GKEnialb
May 25th, 2025, 21:10
Thanks for that. I changed it to Core (it was set to all rulesets, which I guess maps to unlisted product).

Now the trick is overcoming a bunch of the fields disappearing. I know what happened (the fields in the rulesets changed so no longer are available in onFirstLayout, where the annotation was being added). I'll see if one of the devs has some words of wisdom for me.

GKEnialb
May 26th, 2025, 02:14
Moon Wizard for the win! Everything appears to be working now - I'll let you know when it's live on the Forge.

GKEnialb
May 26th, 2025, 04:39
And it's live. Let me know how it goes.

RobboNJ69
May 31st, 2025, 16:30
@GKEnialb, thanks for working on this. I just tested it in a 'test' campaign with no other extensions running. It still isn't showing in the skills misc modifer or the damage boxes on the action tab / weapons.

I thought it worked there before, but perhaps I'm wrong? Anyway, those are the two areas I noticed.

Thanks!

Rob

GKEnialb
May 31st, 2025, 18:14
Which ruleset are you using? It's definitely showing up for me with just this and with just this / advanced character sheet for 3.5, which I think uses the same names as PFTPG.

RobboNJ69
May 31st, 2025, 22:44
Hello,
I'm using Pathfinder, 1st Ed. No other extensions were loaded at the time. I also created a new character record to test with it.

Thank you for looking into it.

Rob

GKEnialb
June 1st, 2025, 00:27
Can you confirm you're seeing v2.0.5? I created a new campaign with Pathfinder, 1st Ed and see it working okay.

64506
64505

Or are you looking at a different area of the sheet?



Edit: I do see it's not on damage for PFRPG. I'll fix that.

Edit2: Fixed and live in the forge. v2.0.6

RobboNJ69
June 1st, 2025, 17:42
Thanks for jumping on that!

I was running 2.0.5, no other extensions and the core theme (unselected) and it wasn't showing on the Skills tab

64511

I switched to the Advanced Character Sheet and it worked.

I updated to the 2.0.6 and it is working with the core theme, with and without the Advanced Character Sheet - so it looks like everything is perfect!

Thank you, again!

Rob

GKEnialb
June 1st, 2025, 18:07
No worries and sorry for the couple of false starts. Let me know if you have any more fields you'd like to see the annotations on.

RobboNJ69
June 2nd, 2025, 00:23
No need to apologize! I appreciate you taking this over and maintaining it.

The fields that are included are pretty good. I think the only ones that could be added would be under the Spell/Ability use. It looks like there are general modifier boxes for Attack, CLC, and Saves. But if they don't get added, it's still a super useful extension.

Rob

GKEnialb
June 4th, 2025, 02:21
And 2.0.8 is live on the Forge, with annotations added to those three boxes. :)

RobboNJ69
June 16th, 2025, 20:21
And 2.0.8 is live on the Forge, with annotations added to those three boxes. :)

FANTASTIC! Thank you!