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
Calego
Calego4y ago
This is absurdly simple and that's got me squint ing
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Leo The League Lion
@ghost gave vote LeaguePoints™ to @wyrmisis (#104 • 10)
wyrmisis
wyrmisisOP4y ago
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.
Calego
Calego4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego4y ago
oh true
wyrmisis
wyrmisisOP4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego4y ago
This is really cool. It's delightfully elegant and I really hope it 'just works'
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
Or even make the specific character an option.
Calego
Calego4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
That's what I saw in my testing, yeah.
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
Owner was an Actor whenever I ran it, whether the effect was from an actor directly or inherited from an item.
Calego
Calego4y ago
Oh that makes sense! well played @wyrmisis and @ghost , thanks!
Leo The League Lion
@calego gave vote LeaguePoints™ to @wyrmisis (#96 • 11) and @ghost (#4 • 286)
Calego
Calego4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego4y ago
I think you're right
wyrmisis
wyrmisisOP4y ago
On the value side, I don't think I had luck with doing data.whateverProp But I could've been doing something dumb
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego4y ago
data.attributes.movement.walk is what I have to enter for dnd5e to affect an actor's walk speed
Daniel Thorp
Daniel Thorp4y ago
I also use @ as a shorthand reference to the ActorData in "Export Sheet to PDF"
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Daniel Thorp
Daniel Thorp4y ago
Yep
Calego
Calego4y ago
ah the ol data.data trap
Daniel Thorp
Daniel Thorp4y ago
No, it's just one data @name also works
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
I think I get what you're saying -- as of now, using @hp is targeting here:
...
data: {
data: {
hp: ... <---
},
hp: ...
}
...
data: {
data: {
hp: ... <---
},
hp: ...
}
But expected behavior is that it'd target here:
...
data: {
data: {
hp: ...
},
hp: ... <--
}
...
data: {
data: {
hp: ...
},
hp: ... <--
}
Yeah?
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Daniel Thorp
Daniel Thorp4y ago
Yeah
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
That makes sense! Thinking about it that way, does the at-sign even make sense, outside of standardizing the input between the two fields?
Daniel Thorp
Daniel Thorp4y ago
Well, you are assumed to be inputting a string, not a dynamic key, without it...
wyrmisis
wyrmisisOP4y ago
Oh, sorry. I meant on the key side, not the value side.
Daniel Thorp
Daniel Thorp4y ago
What's the distinction?
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
wyrmisis
wyrmisisOP4y ago
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
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server