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.
C
Calego957d ago
This is absurdly simple and that's got me squint ing
UU
Unknown User957d ago
LTL
Leo The League Lion957d ago
@ghost gave vote LeaguePoints™ to @wyrmisis (#104 • 10)
W
wyrmisis957d 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.
C
Calego957d 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?
UU
Unknown User957d ago
C
Calego957d ago
oh true
W
wyrmisis957d 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.
UU
Unknown User957d ago
C
Calego957d ago
This is really cool. It's delightfully elegant and I really hope it 'just works'
UU
Unknown User957d ago
W
wyrmisis957d 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.
UU
Unknown User957d ago
W
wyrmisis957d ago
Or even make the specific character an option.
C
Calego957d 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"?
UU
Unknown User957d ago
W
wyrmisis957d ago
That's what I saw in my testing, yeah.
UU
Unknown User957d ago
W
wyrmisis957d ago
Owner was an Actor whenever I ran it, whether the effect was from an actor directly or inherited from an item.
C
Calego957d ago
Oh that makes sense! well played @wyrmisis and @ghost , thanks!
LTL
Leo The League Lion957d ago
@calego gave vote LeaguePoints™ to @wyrmisis (#96 • 11) and @ghost (#4 • 286)
C
Calego957d 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
UU
Unknown User957d ago
C
Calego957d 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.
UU
Unknown User957d ago
C
Calego957d ago
I think you're right
W
wyrmisis957d ago
On the value side, I don't think I had luck with doing data.whateverProp But I could've been doing something dumb
UU
Unknown User957d ago
C
Calego957d ago
data.attributes.movement.walk is what I have to enter for dnd5e to affect an actor's walk speed
DT
Daniel Thorp957d ago
I also use @ as a shorthand reference to the ActorData in "Export Sheet to PDF"
UU
Unknown User957d ago
DT
Daniel Thorp957d ago
Yep
C
Calego957d ago
ah the ol data.data trap
DT
Daniel Thorp957d ago
No, it's just one data @name also works
UU
Unknown User957d ago
W
wyrmisis957d 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?
UU
Unknown User957d ago
DT
Daniel Thorp957d ago
Yeah
UU
Unknown User957d ago
W
wyrmisis957d 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?
DT
Daniel Thorp957d ago
Well, you are assumed to be inputting a string, not a dynamic key, without it...
W
wyrmisis957d ago
Oh, sorry. I meant on the key side, not the value side.
DT
Daniel Thorp957d ago
What's the distinction?
UU
Unknown User957d ago
W
wyrmisis957d 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.
UU
Unknown User957d ago
W
wyrmisis957d 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.
UU
Unknown User957d ago
Want results from more Discord servers?
Add your server
More Posts
devMode json changed warningI checked the module repo and I honestly can't figure out where I would plug in my code. I'd be guesS3 File Picker SettingsCan someone with an S3 configuration give me a test of the FilePicker settings api and tell me if a item preCreate@sol.folango @mrprimate (pinging you two in particular because you do import stuff involving existinItem Macro Compendium WorkflowOkay, here's a long one that's a bit of a doozy. I'm looking at setting up some sort of tooling/workItem Specific Crit DetailsOh that critical hit thing is gonna hit MRE too isn't it... hrm...1.5.x 72%@dnd5e No action required (but suggested 🙂 ) The 1.5.0 milestone is ~72% complete. It has a due daV9 Tabs IssueIf you never figured this out, here's why this happened: A small change in `Tabs` during v9 causes sDeck Creation MacroI created a macro to fill out a 52-card deck, you set the ID of the deck and the base URL of the foldevmode-issues@arcanist figured out, the flex layout elements have `pointer-events: none`, so anything injected wifunction vs methodAnyone know of a good guide that explains the difference between a function and a method? I don't reActive Effect HelpAnd it should be the actual ActiveEffect document for the effect, not just the id. I don't have theTOL JEs@badgerwerks I haven't had a chance to poke around in TOB/BoL yet, but I wanted to ask how you did tCI 2 minute windowAlright, I've got a Gitlab CI pipeline I'm reasonably pleased with as a result of yesterday's effortGitLab CI PipelinesToday's project is Gitlab CI. Wow me with your pipelines if you got em.Storybook Shennanegins@wyrmisis I have a headcannon for you, one who also uses Storybook. _What if_ we could load foundryjsxDammit I want this...react librarySo far I've seen Vue 2, Vue 3, Alpine, and Svelte pulled into Foundry. No one has yet been crazy enoweb componentsA comment @n1xx1 made over in #development-basics (https://discord.com/channels/732325252788387980/7UI element JS Classeshttps://discord.com/channels/732325252788387980/734922093967310910/882979923483037696 @wyrmisis > Imid-milestone ping feedback@dnd5e **No Action Required** Wanted to ping you to make you aware that the 1.5.0 milestone is >50%