Thread: 5E - Expending Spell Slots
-
September 15th, 2020, 19:24 #1
- Join Date
- Aug 2020
- Posts
- 94
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)Last edited by xelab; September 24th, 2020 at 16:53.
-
September 15th, 2020, 20:27 #2
- Join Date
- Aug 2020
- Posts
- 94
[ Reserved ]
-
September 15th, 2020, 20:33 #3
That sounds really good Xelab, nice work
-
September 15th, 2020, 20:41 #4
- Join Date
- Apr 2020
- Posts
- 229
Looking very nice! Do you know if there are any conflicts with other extensions at this point?
-
September 15th, 2020, 20:44 #5
- Join Date
- Aug 2020
- Posts
- 94
Unfortunately not, I do not use many extensions myself, but I would like to ask you to try and let me know!
-
September 15th, 2020, 20:46 #6
- Join Date
- Apr 2020
- Posts
- 229
Sadly at work presently and have a session tonight after I get out of work, so won't have a chance to tonight myself.
-
September 15th, 2020, 23:18 #7
- Join Date
- Dec 2015
- Posts
- 194
I have quite a few extensions, so I will try it this week and let you know of anything I find! Thank you!
-
September 16th, 2020, 01:02 #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."
-
September 16th, 2020, 21:44 #9
- Join Date
- Aug 2020
- Posts
- 94
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.
-
September 17th, 2020, 07:13 #10
- Join Date
- Aug 2020
- Posts
- 94
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)
Bookmarks