DICE PACKS BUNDLE
Page 1 of 2 12 Last
  1. #1

    5E - Expending Spell Slots

    This extension is fully superseded my other extension "5E - Spell Automation"
    https://www.fantasygrounds.com/forum...405#post544405



    Hi all,

    this is my first take on writing FG extension, so please be kind.


    Main Feature: Expending spell slots on cast

    This extension will automatically expend appropriate spell slot when you click on a star button ("use power" button).
    If the character has both spell slots and pact magic slots the priority will be pact magic -> spell slots.
    Upcasting spells is possible by first entering intended cast level. However, you will need to adjust the effect of the spell manually (in many cases as easy as right-clicking to add additional damage die).





    Additional feature: Delay hiding spells / powers without suitable slots

    In "Combat Mode", the default behavior is to hide spells / powers without available slots immediately.
    This is problematic if you (like me) prefer to first announce the spell (and expend the slot), and than apply its effects, since the spell may be hidden by that time.
    You can switch to "Delayed Hide" mode by double-clicking "Upcast" field. In this mode powers will not be hidden until last action of the power is clicked or next power is cast or until the next power is cast. You can also refresh the view by clicking the "Upcast" field.
    You can always switch back to "Normal" mode by double-clicking the "Upcast" field again. This setting should also be persistent between sessions.





    Additional feature: Pinning powers in Combat Mode

    For some powers / spells it is useful to keep them always "pinned" in Combat Mode, even without available slots.
    Good examples are Spiritual Weapon, Flaming Sphere, Hex and pretty much any spell with delayed effect / over-time effect / duration.
    With this extension active you can "pin" any spell / power by adding "●" ("Black Circle" U+25CF Symbol) or "·" ("Middle Dot" U+00B7 Symbol) to its name.
    Just copy paste the symbol and put it anywhere in the power name.
    Since FG Classic does not support Unicode characters you can only use "·" ("Middle Dot") for pinning spells





    The extension was developed and tested for Fantasy Grounds Unity (but probably will work for Classic as well).
    If you find any bugs please kindly let me know.

    Versions:
    1.0: Initial release
    1.1: Updated compatibility with FG Classic
    1.2: Further compatibility improvement with FG Classic (support for spell pinning)
    Attached Images Attached Images
    • File Type: gif 1.gif (1.85 MB, 1296 views)
    • File Type: gif 2.gif (1.22 MB, 1287 views)
    • File Type: gif 3.gif (797.0 KB, 1283 views)
    Attached Files Attached Files
    Last edited by xelab; September 24th, 2020 at 16:53.

  2. #2

  3. #3
    That sounds really good Xelab, nice work

  4. #4
    Looking very nice! Do you know if there are any conflicts with other extensions at this point?

  5. #5
    Unfortunately not, I do not use many extensions myself, but I would like to ask you to try and let me know!

  6. #6
    Sadly at work presently and have a session tonight after I get out of work, so won't have a chance to tonight myself.

  7. #7
    I have quite a few extensions, so I will try it this week and let you know of anything I find! Thank you!

  8. #8
    Testing in classic with my usual extensions... its giving me some console errors starting from the initial load, although it seems to be working fine.

    Code:
    Script Error: [string "actions_iedit"]:1: 'end' expected near '<eof>'
    Script Error: [string "spell_upcast"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Script Error: [string "button"]:1: 'end' expected near '<eof>'
    Last edited by Alanrockid; September 16th, 2020 at 01:05.
    "A saint does what is right. A leader does what is necessary."

  9. #9
    Thanks a lot for reporting, it seems FG Classic does not correctly handle comments in Lua script nested in XML.
    I have removed them and I do not get any error anymore in my testing.

  10. #10
    And now I have also added support for "pinning" spells in FG Classic.
    Extension should have feature parity in both version of FG.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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 Character Create Playlist

Log in

Log in