5E Character Create Playlist
  1. #1

    Add Annotations to Any "misc" Fields on the Character Sheet

    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:
    Screen Shot 2022-03-20 at 1.52.57 PM.png
    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.
    Screen Shot 2022-03-20 at 1.52.38 PM.png

    Here's a screenshot showing the formatted-text editor (mostly styled after the MOTD windowclass).
    Screen Shot 2022-03-20 at 3.08.19 PM.png

    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
    Last edited by MostTornBrain; March 22nd, 2022 at 17:50.

  2. #2
    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.
    Last edited by bmos; March 20th, 2022 at 22:14.

  3. #3
    Quote Originally Posted by bmos View Post
    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

  4. #4
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,828
    Nice one.
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  5. #5
    GKEnialb's Avatar
    Join Date
    Jul 2017
    Location
    Castle Rock, CO
    Posts
    524
    Well done! This will be really useful - I vote you put it on the Forge.

  6. #6
    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

  7. #7
    Morenu's Avatar
    Join Date
    Mar 2020
    Location
    Pennsylvania, USA
    Posts
    552
    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.

    Misc Annotation request.JPG

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

    Thanks again!
    Last edited by Morenu; June 7th, 2022 at 12:40.
    My First Mod PFRPG - Feats Extended, focusing on PF1e Feats and Racial Traits automation. It is open to community assistance. Here is the forum Link.

    40+ PF1e Extensions & Modules I use, with links.

    PF1E Coding Effects - Spreadsheet

    Discord: Morenu

  8. #8
    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"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in