raae
After some discussion yesterday in #active-effects , I decided to try to create a system-agnostic module for using rolldata in Active Effects. Here's my first pass, if anyone wants to kick the tires:
https://github.com/wyrmisis/fvtt-rolldata-aware-active-effects
GitHub
GitHub - wyrmisis/fvtt-rolldata-aware-active-effects: Use an Actor'...
Use an Actor's rolldata in your Active Effects. Contribute to wyrmisis/fvtt-rolldata-aware-active-effects development by creating an account on GitHub.
48 Replies
This is absurdly simple and that's got me ing
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
@ghost gave LeaguePoints™ to @wyrmisis (#104 • 10)
Hence the request for tire-kicking. 😛 I'm newish to this ecosystem, and I can only imagine that I'm risking something if something this easy isn't in core.
I do wonder about doing this in such a way that doesn't nuke the system's implementation of Active Effects, if possible.
Maybe a proxy or something that would let you dynamically extend whatever
CONFIG.ActiveEffect.documentClass
is already?Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
oh true
I should (finally) read up on libWrapper. It would make a lot of stuff I'm hoping to do in my system work easier.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
This is really cool. It's delightfully elegant and I really hope it 'just works'
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Oh hey, the concern about the
@
thing -- I could try using another character, unless @
is something that's just really familiar for people. It just seemed weird to me to have the value use a shortcut to get to data, but not the key.Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Or even make the specific character an option.
I have very little experience with AEs, but my understanding of them is that they transfer from Item to Actor when the item is added to the Actor.
Does that pose a problem in the idea that
owner
could be either item
or actor
arbitrarily?
Is that something that a system developer would have to be careful of when making the getRollData
method? "This method works best when it has the same return signature for both items and actors"?Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
That's what I saw in my testing, yeah.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Owner was an Actor whenever I ran it, whether the effect was from an actor directly or inherited from an item.
Oh that makes sense!
well played @wyrmisis and @ghost , thanks!
@calego gave LeaguePoints™ to @wyrmisis (#96 • 11) and @ghost (#4 • 286)
I'm inevitably going to try to write some docs about AEs, I'm sure you'll be answering questions as I finally try to tackle this hole in my knowledge
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Yeah AEs were definitely made as "v1". That's how Atro likes to work. "v1" of a feature, then iterate and add over time. Lets him bounce around inside the core improving it bit by bit.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
I think you're right
On the value side, I don't think I had luck with doing
data.whateverProp
But I could've been doing something dumbUnknown User•4y ago
Message Not Public
Sign In & Join Server To View
data.attributes.movement.walk
is what I have to enter for dnd5e to affect an actor's walk speedI also use
@
as a shorthand reference to the ActorData in "Export Sheet to PDF"Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Yep
ah the ol
data.data
trapNo, it's just one
data
@name
also worksUnknown User•4y ago
Message Not Public
Sign In & Join Server To View
I think I get what you're saying -- as of now, using
@hp
is targeting here:
But expected behavior is that it'd target here:
Yeah?Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
Yeah
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
That makes sense! Thinking about it that way, does the at-sign even make sense, outside of standardizing the input between the two fields?
Well, you are assumed to be inputting a string, not a dynamic key, without it...
Oh, sorry. I meant on the key side, not the value side.
What's the distinction?
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
And making it a different character just feels arbitrary, unless "which character" is offered as a setting, or I check for if AIP is installed/activated and change the expected character if it is.
Unknown User•4y ago
Message Not Public
Sign In & Join Server To View
I think that's fair -- the at sign on the key side is ultimately just sugar. If something else uses it for something more "productive", it's not the end of the world.
I think I'll remove the replacement of
@ -> data.
and just strip the @
off, just to hopefully make things less confusing for less technical people.Unknown User•4y ago
Message Not Public
Sign In & Join Server To View