#Wasp's Resting Module Testing-Preview

1 messages ยท Page 1 of 1 (latest)

thin dome
#

@thick sapphire

thick sapphire
#

thanks, this could get long so probably best to put in a thread

hybrid prawn
hybrid prawn
#

courtesy of yoooooou

#

Spelling is hard yo

thin dome
#

its so nice, i love it so

thick sapphire
#

Huh, never thought to name a branch next. I typically camel-case a feature name as the branch name

hybrid prawn
#

Honeybadger has this really neat workflow that makes any pre-release deployment update the next branch's manifest

thick sapphire
#

Do you have a preference if these are manually-created PCs or ones imported from D&D Beyond?

hybrid prawn
#

I hope it'll work either way

#

I only check feature names such as "Bard", "Wizard", or "Periapt of Wound Closure" kinda deal

thin dome
thick sapphire
#

I agree, should work for either way. Wasn't sure if you tested with one or the other. Figured I'd offer to test the one you didn't already try

thin dome
nocturne oak
hybrid prawn
#

Neat, I'm checking for type and name at the moment

thick sapphire
#

Short rest test:

  • no special recharges (a barbarian)
  • I put him down 1/2 HP and started the short rest
#

It wasn't obvious at first, but when I rolled a hit die I realized that the red slider bar at the bottom of the dialog was showing his hit points

#

kind of like how you can show them on the token

hybrid prawn
#

perhaps I could hide it until you roll?

#

Hmm, nah I would want it to be visible I think

thick sapphire
#

I don't know how, but it would be nice to somehow label or otherwise indicate what that slider is for

#

If the colors followed those used on the token, that might be enough of an indicator

hybrid prawn
#

Make it thicker, less red and put a big ol "HP" text in there

#

like HP: [curr]/[max]

thick sapphire
#

sure, that could work

thin dome
#

I did a similar thing with the symbaroum 5e module releasing publicly soon

thick sapphire
#

Next, if I apply healing outside rolling hit die (e.g. manually adding some HP on the token HUD or right-clicking a die roll like a Bard's Song of Rest to Apply Healing), the HP bar in the short rest dialog does not update

thin dome
#

not nearly as fancy, but displays that status relatively clearly

thick sapphire
#

Nice touch disabling the Roll button when they're at max HP

#

I didn't have a Bard to test Song of Rest with, so I dragged it (from the Class Features SRD compendium) onto a Paladin and it didn't show up when I short rested him. Is it also checking for the class in addition to the feature?

hybrid prawn
#

How's this?

hybrid prawn
#

It's based on the bard's level

thin dome
#

50/40? ๐Ÿ˜…

thick sapphire
hybrid prawn
#

Uhhh

#

I swear i switched it around

#

Must have refreshed just before the build

#

Aye

thin dome
#

very nice

thick sapphire
hybrid prawn
#

I default to RAW, but I could check the item's damage formula

#

See, dis is why I test things

thin dome
#

custom classes will mess with that too

#

you know how dnd5e players LOVE to smash things together, lolol

thick sapphire
#

The benefit of the module doing it is that the module can handle the auto-scaling based on the Bard's level. The benefit of keying off the feature is that if a player has the feature from some homebrew stuff or changed the formula because of some homebrew stuff, it'll work

hybrid prawn
#

Yeah - I might just default to item behavior

#

if it doesn't have a damage roll, fall back to RAW rolls

#

if it can find the bard class

thick sapphire
#

sure, that's a reasonable fallback

hybrid prawn
#

if it can't, default to full class level?

#

lotta fallbacks

thin dome
#

yea...and confusing to describe

thick sapphire
#

true, could be fine to just document that it looks for the feature and will roll the "damage" so you get a roll chat card to Apply Healing with

thin dome
#

and then people will also change its feature name to match with some flavor they applied

#

so its a can of worms if you allow any fallbacks

thick sapphire
#

I see... someone wants to rename it to Lullaby... you can't account for everything

#

sometimes you just have to put your foot down

thin dome
#

lets see...lets see....there is also the idea of Special Traits -- 5e Helpers uses that instead of checking feature names (wild magic surge)

#

so, you could have a "rest features" config dialog that allows you to set how your features are scaled?

thick sapphire
#

sure, a flag is nice but that just sounds too complicated for this

thin dome
#

the reason i went that direction is because no matter WHAT i described, or tossed as warnings, it was a 50/50 chance that someone would realize the FEATURE name has to match the name entered in the options

thick sapphire
#

my two cents: just key off feature/item names, I think it's fine

#

if you get enough feedback b/c people localize them or rename them for flavor, you can always revisit that

thin dome
#

ohhhh, here we go, here we go

#

i homebrew the shit out of a class and give it a rest feature of some sort. I go to rest, the dialog comes up and the list of detected features it shows, doesnt include my particular rest feature. Fortunately, the dialog has a "configure rest features" button, which allows you to manually mark what features you have and what class it ties to

#

its a bit much, but it would make the UX make much more sense

#

(and no, i havent been thinking about this because i want to automate more class features in 5e helpers, not at all, why do you ask?)

thick sapphire
#

I imported a PC from DDB that had a Periapt of Would Closure (equipped & attuned). I short rested but it didn't double the HP

#

do you need an exported JSON of that character?

hybrid prawn
#

Hmmm, interesting, yes please

thick sapphire
#

On that PC, when I clicked on the Roll button to roll a hit die, the "X Close" button in the upper-right corner of the dialog disappeared.

#

I can still press the Esc key to close it without finishing the rest, but odd

hybrid prawn
#

Yeah that was intentional - I wanted to remove it so that you can't cancel the rest once you've started it

#

But I might just keep it but make it finish the rest anyway

thick sapphire
#

Durable: I added a new feature directly on that same barbarian. I clicked on the "+" sign in the Passive Abilities section then named it "Durable" and copy/pasted the description over, just because. I short rested and rolled a hit die and the formula didn't change. It was still rolling 1d12 + 4 instead of something like 1d12min8 + 4

hybrid prawn
#

Found the reason why, I wasn't localizing the durable and periapt

#

All good now

#

and I see it should be 8, yeah

#

Fixed, nice

hybrid prawn
thick sapphire
#

I'd recommend using the min modifier instead of a dice pool with kh. I know they both do the same thing but min is a lot easier to understand

hybrid prawn
#

Shouldn't it be max?

thick sapphire
#

confirming ...

hybrid prawn
#

ie, if you roll a 2+4, and the durable makes that 8

#

ie, max(6,8)

thick sapphire
#

It would be min (had to roll 6 times, kept rolling high)

hybrid prawn
#

I'm confused, min takes the lower of the two

#

max takes the higher of the two

thick sapphire
#

The normal Math.max and Math.min work that way

#

but not the dice roll modifiers

hybrid prawn
thick sapphire
#

1d6min2 means roll a d6 with a minimum result of 2

hybrid prawn
#

ohhh

#

I see.

#

1d10+4min8 won't work in any case

#

So in either case I'd have to encapsulate it

#

and max() seems me to be pretty readable

thick sapphire
#

ohhh, right. It's not a minimum on the die roll, it's a minimum on the total number of HP gained

hybrid prawn
#

Correct.

thick sapphire
#

so periapt + durable on Krall would be:
1d12+4, multiply that by two, or 8 (whichever is higher)

hybrid prawn
#

Nah, I think it would be durable first

#

then periapt

#

durable caps the base roll

#

periapt doubles the end result

thick sapphire
#

okay

hybrid prawn
#

Hmmmm

#

One could argue that the rules say to double the roll

#

So max((1d10*2)+4, 8)

#

One definitely is more powerful than the other :u

thick sapphire
#

I think that looks right

hybrid prawn
#

Durable:
When you roll a Hit Die to regain hit points, the minimum number of hit points you regain from the roll equals twice your Constitution modifier (minimum of 2).
Ie, the total number of hit points, it caps the end result

thick sapphire
#

well...

hybrid prawn
#

Periapt:
In addition, whenever you roll a Hit Die to regain Hit Points, double the number of Hit Points it restores.

#

The roll itself

#

the number of Hit Points it restores

#

the roll itself?

#

or the total result?

#

who knows??

thin dome
#

I think it refers to the die itself

thick sapphire
#

that sounds right, but it is confusing

#

some cases "the roll" is just the die roll and in others "the roll" is the entire thing w/ modifiers

thin dome
#

The argument can be helped by saying that there are very few instances of doubling an entire roles damage apart from resistances and such. Like a crit roll

#

I feel like the intention is the die value itself. When you roll a hit die to regain hit points, you then regain hit points from the die Plus your con modifier

hybrid prawn
#

Makes sense to me

thick sapphire
#

Just tested a multiclass caster (cleric 1, wizard 16). Looks like arcane recovery works there. It only accounted for their wizard levels when computing the number of spell levels they can recover

#

I might play around with the text though...

You have 8 worth of spell slots left to recover.

#

it's the "8 worth" part that's throwing me off

#

maybe change to "You have 8 levels of spell slots left to recover."

nocturne oak
hybrid prawn
#

Just submitted a new version, you should be able to just update straight from Foundry

thick sapphire
#

The Arcane Recovery feature I had on that character was also linked to the 3rd resource. When I short rested and checked boxes to regain spell slots, it consumed the limited use of the feature but not the resource.

hybrid prawn
#

Fixes durable and periapt, and fixes their rolls

nocturne oak
#

@hybrid prawn I don't see your MR anymore, did you close it?

hybrid prawn
nocturne oak
#

gotchya

hybrid prawn
#

the roll hit die doesn't really use the same methods as any of the other pre hooks, so it wasn't really Foundry-esque

#

hence, scrapped

hybrid prawn
#

Should I reduce both? One? None?

#

It gets confusing. Uses is at least limited to existing in just one place.

thick sapphire
#

If I use the feature manually, it asks for both

#

I would do the same

hybrid prawn
#

But which one should determine whether it has uses or not?

#

That's the crux

#

If it has limited uses AND resource consumption, which one should I prioritize?

nocturne oak
#

why not both if both exist?

#

You could even roll the item and let the core logic do it for you I think

hybrid prawn
#

Core logic? Arcane Recovery is a choice based thing?

#

Oh you mean like that

#

I see.

#

Still, determining whether it has uses or not is important

#

as the UI won't show the tickboxes if it has no uses

thick sapphire
#

Ran a test to use the feature manually:

  • With 1 limited use and 1 resource available, it works fine
  • With 0 limited use and 1 resource available, it gives me a warning that "Arcane Recovery has no available uses remaining"
  • With 1 limited use and 0 resource available, it gives me a warning that "Arcane Recovery has run out of its designated Attribute"
#

that's leaving both boxes (consume available usage & resource) checked

#

long way of saying it requires both

hybrid prawn
#

I'll try to account for both I guess

#

It doesn't though

nocturne oak
#

I believe there's a getter on the item which can help

#

trying to find it

hybrid prawn
#

If you clear the primary thing

#

And leave just uses

#

It will work fine

nocturne oak
#

(bonus points if you use link item to resources module to fill in the gap afterwards ๐Ÿ˜› )

thick sapphire
nocturne oak
#

Item5e.hasLimitedUses might only tell you if it is expected to use things, not if it currently does have charges

nocturne oak
thick sapphire
#

if you try it, might have to play around with checking if usage/resource is configured on the item... it doesn't appear to guard for that

nocturne oak
#

thaaaat's where hasLimitedUses comes in

thick sapphire
#

as in, if you pass consumeResource = true but it's not configured for a resource, it might not check for that

nocturne oak
#

oh gotchya

thick sapphire
#

@hybrid prawn I tried updating the module and it didn't work (said it was Current). I uninstalled then installed from the link again but it had the same version number. Just tried rolling hit die and didn't see a change so I don't think I got a new version

hybrid prawn
#

sec

#

Try again in 30 seconds

thick sapphire
#

I updated and got a new version this time. When I restarted the world I was testing with, it immediately popped up a Short Rest dialog for Kral (the barbarian I shared)

#

I didn't click anything, as far as I know

hybrid prawn
#

Yeah that was my mistake

#

Just rename him for now lol

thick sapphire
#

was that just a testing thing to save you from having to click Short Rest after making a code change?

#

if it is, no big deal... just remember to remove it later

hybrid prawn
#

Yeah

thick sapphire
#

I rolled a hit die and just got 20 as the roll formula. I'm sure the math is right, just can't see it.

hybrid prawn
#

Yeah that's a problem with the max thing

#

It basically breaks the formula

#

I might revert to the old formula

thick sapphire
#

yeah, I know I knocked the dice pool w/ keep highest (but that was before I realized min wouldn't work)

#

but it's probably better to "show your work", as it were

#

I assume you're module is applying the healing when rolling hit dice. Either with a regular update or applyDamage w/ a negative number. It would be cool if the scrolling text appeared when rolling hit dice.

#

gonna check your code myself, take a peek ๐Ÿ‘€

#

ohh, I don't even think the dnd5e system does this

hybrid prawn
#

Does what? ๐Ÿ˜„

thick sapphire
#

let me see if I can make a video of it

#

I'm referring to the green +7 text that scrolls up because he healed 7 hp

hybrid prawn
#

That's core

thick sapphire
#

It shows up when I apply healing from a roll, it would be nice if rolling/applying hit dice triggered that as well

#

But I don't think the basic dnd5e system does that either (after I poked around in the code)

hybrid prawn
#

Eh, stretch goals

thick sapphire
#

Sure... file this for later then. Sending the healing amount in the second argument as dhp is what triggers the scrolling text

actor.update({ "data.attributes.hp.value": 42 }, { dhp: 1 })
hybrid prawn
#

Cool

thick sapphire
#

And I'll write a myself a note to file an issue with the dnd5e system to make the change (assuming nobody beat me to it)

#

Other than the formula change so we can see it, looks good

#

Oh, Song of Rest... was that still keyed off the Bard class or feature? Can't remember what you ended up going with

hybrid prawn
#

Yeah feature and class

thick sapphire
#

I imported the sample heroes bard, leveled him up to level 2 which added Song of Rest. I triggered a Short Rest (was at full HP) and it didn't roll anything

#

I know the bard may not be spending HD since they're at full HP, but their companions might so I would have expected it to roll (or prompt me, however it works)

hybrid prawn
#

Are they owned by a player?

thick sapphire
#

nope

hybrid prawn
#

Try that

#

Otherwise all NPC could trigger it

thick sapphire
#

huh, wouldn't have expected that

#

If you don't want it to trigger on an NPC, then why not check the actor type instead of player ownership?

hybrid prawn
#

Good point, might revisit it

#

Right it was a request

#

Because you might have multiple players in separate groups in the same world

#

Hence, active player characters

thick sapphire
#

So short resting the bard doesn't trigger the Song of Rest die roll?

hybrid prawn
#

I'll think about it

thick sapphire
#

I think I see how it's working. I assigned the bard to a player then logged out as the player. Back as the GM, I triggered a short rest on Kral and rolled a hit die and it rolled the bard's Song of Rest die for him

#

Not the way I would have done it. We usually have the Bard roll their song of rest once and everyone gets the same number

hybrid prawn
#

Yeah that's a conscious choice

#

Otherwise it's hard to know who's having a short rest or not

#

In fact, that's impossible unless you can somehow keep a state of every active players

thick sapphire
#

If the bard is busy doing something else, not participating in a short rest, then rolling it with the other PCs wouldn't be right

hybrid prawn
#

You can just undo it I guess

thick sapphire
#

But if the bard is short resting, they can trigger Song of Rest and everyone can "Apply Healing" if they spent a hit die

#

but in any case

hybrid prawn
#

Well, if you want to do it manually

#

Then i can just add a feature to disable the song of rest.

thick sapphire
#

with it rolling when my barbarian short rested... I couldn't tell but does it auto-apply that Song of Rest die as healing?

hybrid prawn
#

Yes, every player gets their own roll

#

Does the numbers not add up in the final message?

thick sapphire
#

I didn't notice, cleared chat

#

tested again and yes, it does add it

hybrid prawn
#

So, feature to disable it?

thick sapphire
#

I would prefer the Song of Rest to trigger when the PC with the feature short rests... it would require PCs who do spend hit dice to Apply Healing on the chat card, but I think that's okay.
However, it's your module and if you're not doing it that way, then the way it's working now is good

#

My main point of the test was that since it rolls Song of Rest when a PC spends a hit die, it should automatically apply that as healing and it does

hybrid prawn
#

I can just make the feature not roll if you make the name blank in the settings

thick sapphire
#

no, don't think that's necessary

#

I think that's all from me, unless you have something new for me to check. Too bad I don't have a wizard, bard, or a PC with any of the other things in my game or I'd use this!

#

I like these QOL mods... we could do it manually but it's so nice for it to be handled for you

hybrid prawn