PDA

View Full Version : 5E: Use Up Powers extension



Steeleyes
April 7th, 2018, 12:17
Here is a tiny and relatively trivial extension that I wrote to automatically mark off certain powers as they are used. It was written for my party's 5E Paladin "Lay on Hands" and Fighter's "Second Wind", but it should work on much more than that.

5E powers are complex and flexible and it's difficult to ensure the behaviour is correct in all cases, so I've limited the code to only come into play for simple powers (non-group powers that have a single action). If there is consensus on when it's useful (and when it isn't) to mark off one use then I will add more conditions to the code.

* Marks off 1 power use when the power's mini action button is clicked (or an icon-drag starts).
* Players can always return to 'Standard' or 'Preparation' mode to correct the number used if there is a mistake.
* In 'Combat' mode the power will vanish from the list after the last use (I didn't need code for this - it came for free)
* Currently limited to non-group powers with only one associated action.
* The code uses Minty23185Fresh's handy extension conflict mitigation (https://www.fantasygrounds.com/forums/showthread.php?39930-How-to-Avoid-or-Mitigate-Extension-Conflicts-(or-Collisions)) so thanks to him for his patience and that.

22899 This picture shows how it would work for a granular, 1 point, Lay on Hands power for a 2nd level Pally.

v0.1: Initial release.
v0.2: Fix bug caused by change in the way FGU store power info.

Zacchaeus
April 7th, 2018, 21:22
Nice work

Bonkon
April 10th, 2018, 20:08
Very nice :)
I will point my DM to this as our Paladin seems to think everything in FG is automated. At 6th level was laying on hands until he healed almost the entire party before it was seen in the chat window he healed about 80 points of damage and we yelled at him to stop :)
He said he thought the button would disappear when he ran out of healing :)
Poor DM had to go back and figure out our correct HPs and straighten it out :)

LordEntrails
April 11th, 2018, 01:27
Very nice :)
I will point my DM to this as our Paladin seems to think everything in FG is automated. At 6th level was laying on hands until he healed almost the entire party before it was seen in the chat window he healed about 80 points of damage and we yelled at him to stop :)
He said he thought the button would disappear when he ran out of healing :)
Poor DM had to go back and figure out our correct HPs and straighten it out :)
If he had set it up with a power with limited uses and was using Combat mode it would have.

Zacchaeus
April 11th, 2018, 03:08
If he had set it up with a power with limited uses and was using Combat mode it would have.
I think the point was that he thought when he used the power it would automatically tick off each time. It doesn’t of course, that has to be done manually. But, yes, if he had ticked sufficiently then it would disappear.

Bonkon
April 11th, 2018, 07:58
I think the point was that he thought when he used the power it would automatically tick off each time. It doesn’t of course, that has to be done manually. But, yes, if he had ticked sufficiently then it would disappear.

Exactly, it was set up to manually click, but the Paladin failed to realize it and just kept going :)

Steeleyes
April 11th, 2018, 13:12
Very nice :)
I will point my DM to this as our Paladin seems to think everything in FG is automated. At 6th level was laying on hands until he healed almost the entire party before it was seen in the chat window he healed about 80 points of damage and we yelled at him to stop :)
He said he thought the button would disappear when he ran out of healing :)
Poor DM had to go back and figure out our correct HPs and straighten it out :)

:) Yes that's right, so much is automated that it can catch us all out when something isn't. Hopefully your DM can use this extension to partially automate one more thing, but folk will always need to keep a close eye on things.

I can't see a good solution to the general case of powers that have multiple actions (which is probably why the 5E developers don't link the actions to uses - I can see the wisdom in this).

Bonkon
April 13th, 2018, 00:14
Hmm I loaded this and selected it when opening a test campaign. I verified it was loaded in the chat window.

I made a level 5 Paladin, loaded his Lay on Hands in the action tab, set the heals to Pal level (so it would be 5 instead of the default 25), then renamed the power to Lay on Hands and set it to 5 daily uses.

I placed the character on the CT, selected Combat and Actions, gave him some damage, targeted himself, and when I used the Lay on Hands it does not tick off the uses. Have I done something incorrect in my set-up?

Thanks :)

Steeleyes
April 13th, 2018, 09:53
Hmm I loaded this and selected it when opening a test campaign. I verified it was loaded in the chat window.

I made a level 5 Paladin, loaded his Lay on Hands in the action tab, set the heals to Pal level (so it would be 5 instead of the default 25), then renamed the power to Lay on Hands and set it to 5 daily uses.

I placed the character on the CT, selected Combat and Actions, gave him some damage, targeted himself, and when I used the Lay on Hands it does not tick off the uses. Have I done something incorrect in my set-up?

It sounds to me like your setup is fine. I ran a test just as you described and it worked. Let's work through it step by step.

It's a 5E test campaign? You already confirmed you saw the extension was loaded like this...
22973

It's a GM test or player test? I created a new Pally, I dropped Human, Noble and then Paladin 5 times on to the character sheet (all from the PHB).
I then opened Lay on Hands from abilities and dropped the upper left red dragon on to the actions tab.
I changed to 5 uses per day and tested the default 25pt heal (it worked), then I edited the heal to change it to 5 points and confirmed it still worked.

I didn't have to rename the power. What edit did you need to make to the name? I tried one row of 'lvl' or 'pal' both worked

22974

Do you see the heal in the chat window? Can you try with other extensions off?

22975

Targeting shouldn't matter (I tried both ways). The heal should proceed as normal (I don't interfere with that). Being in the combat tracker shouldn't matter (I tried it both ways).

Make sure the Lay on Hands is a power (not a spell or cantrip). I notice some of the effect extensions bring powers in as cantrips rather than powers.

Bonkon
April 13th, 2018, 19:23
I got it now, Thanks Steeleyes :)
What I was doing was making a Powers category named "Lay on Hands" and setting the whole category to 5 times a day. This, obviously, does not work because if I added anything else to the category it would tick off uses as well. Just like you mentioned it not working for Multi Use powers.

Instead I went to the Preparation tab and set it to 5 times a day then to Combat and it worked like a charm :)

Very helpful extension when you have some players that are easily distracted by all the shiny things FG brings to the table :)

Thanks

Steeleyes
April 14th, 2018, 08:45
Bonkon, Yes that's right it's currently limited to non-group powers. Glad it's working now that you added power-specific daily uses. I suspect the code could be extended to include simple group powers too (like the one you describe).

A general solution still eludes me. It's something like... Mark off one use if a 'cast' roll fails and mark off a use when any of the other effects are used.

The down side of that would be that some complex powers have multiple effects and all need to be applied and some have multiple effects that are options. I guess I'd need to code extra info into the power so that users can control when it's marked off (and by that point it's simpler to keep the actions and uses independent).

Bonkon
April 14th, 2018, 17:25
What you have done with this is a huge help for players that are not, shall we say, deyail oriented :)

trigun27
September 1st, 2018, 19:43
Hello Steeleyes. Thank you for this extension, it's really save me a lot of hours)

st4lk3r87
September 2nd, 2018, 02:14
YES! Love this extension idea. I'm going to try it asap. :D

st4lk3r87
September 2nd, 2018, 02:18
Bonkon, Yes that's right it's currently limited to non-group powers. Glad it's working now that you added power-specific daily uses. I suspect the code could be extended to include simple group powers too (like the one you describe).

A general solution still eludes me. It's something like... Mark off one use if a 'cast' roll fails and mark off a use when any of the other effects are used.

The down side of that would be that some complex powers have multiple effects and all need to be applied and some have multiple effects that are options. I guess I'd need to code extra info into the power so that users can control when it's marked off (and by that point it's simpler to keep the actions and uses independent).

What you propose is a good workaround :)
The only way to fix this would be with an automatic spell/power system which apply all the effects or damage automatically. Definitely a complex approach. :)

WinterSoldier7
June 23rd, 2020, 14:00
Does this one work on FGU?

Majestik Moose
June 23rd, 2020, 14:03
I've been using it with no issues so far.

Steeleyes
June 23rd, 2020, 18:14
I've been using it with no issues so far.

That's a little surprising. Let's keep our fingers crossed it stays that way. :)

I'm not actively testing with FGU at present, at least until it gets a bit further. We had to drop back to classic for our weekly games.

Majestik Moose
June 23rd, 2020, 20:12
I'll do a little testing for you to see if it has full functionality. I'll let you know if I run into any issues.

vaughnlannister
October 20th, 2020, 21:10
Hi, I noticed that your extension doesn't mark of an power, if an effect has an added cast behind it?
Like for One Click Druid Wildshape?

Or if you simply add a cast behind Barbarian Rage.. it won't mark off the power.

40366

TXCBoy36
May 2nd, 2021, 22:29
Does this ext work with the most recent version of FGU as some extensions had an internal conflict and I had to remove them. Just wanted to check before utilizing this extension. thanks!

Bonkon
May 5th, 2021, 18:28
Does this ext work with the most recent version of FGU as some extensions had an internal conflict and I had to remove them. Just wanted to check before utilizing this extension. thanks!

Good Day TXCBoy :)
We use this in FGU and have not had any problems. :)

Vague
May 29th, 2023, 18:39
Aaaaaand it finally stopped working with 5e.

Maldev
August 26th, 2023, 05:48
G'day there.
Would it be possible to make this work in the d&d 4th edition ruleset? :)
It would be one less thing I would have to monitor from the DM's side. [Players forgetting to check off used powers]
Cheers

Steeleyes
September 4th, 2023, 19:57
It's been 5 years since I looked at the code for this extension so I'll need to remind myself how it works. My party is using Unity now so I may see if I can find time to take a look. No promises on 4e at this stage at least until it's fixed again for 5e.

Steeleyes
September 14th, 2023, 01:50
I fixed the problem with the 'Use Up Powers' extension. It was caused by a change in the way the number of powers used is stored in FGU. When you download the latest version of the extension you should see v0.2. I not sure if it helped with the 4E rule set.

dmbrown
September 14th, 2023, 16:55
Thanks for updating this. It works for me if there is one item on the power say a cast for example. But If I also add a damage option to the same power then it no longer works. I click one or the other and the circle is not filled in. This is for the 5e ruleset.

Steeleyes
September 15th, 2023, 12:03
Yes the code only marks off one power use if there is only one power action button. If there are multiple action buttons then it's not obvious to me which one should mark off a use. The code checks the number of action buttons and does nothing if there is more than one - the player is back to marking off uses themselves.

Steeleyes
September 15th, 2023, 12:06
I took a quick look at the 4E rule set. While there are only minor changes in the way uses are marked off in the database there are big changes in the 4E power activation code. Given this and the fact that I don't have any of the 4E rule sets to test with I won't be adding 4E support. Sorry.

dmbrown
September 15th, 2023, 18:07
Thanks for clarifying.