2.0.0 exploration

From Atropos in the mothership (in v10 Feedback)
Hello folks, for those of you testing V10 using the dnd5e system, we have a pre-release of dnd5e version 2.0.0, tagged version 2.0.0-alpha1 which adds V10 compatibility, cleaned file organization structure, a single built distributable JS file, and more. We'll be adding more features into 2.0.0 as we work towards V10 stable that integrate with new version 10 features. To test this dnd5e release you can install manually with the manifest URL: https://github.com/foundryvtt/dnd5e/releases/download/release-2.0.0-alpha1/system.json. Installing this release will put you on a testing update track that you'll need to - eventually - manually switch back off. I hope this helps your testing this weekend for those of you working on modules which are easier to test with an updated dnd5e system version. Happy weekend!
109 Replies
Calego
Calego3y ago
🧵
Daniel Thorp
Daniel Thorp3y ago
Source maps excitedsprout
Calego
Calego3y ago
The number 2.0.0 was chosen for this release because it is going to be a clean break from v9 and before compatibility, (including any pre-v10 shims), it restructures a lot at a pretty low level, and distributes with rollup now. So the big major number incremented to help devs and users both realize that this is a big release, not just another feature release. Please for the love of all things do not assume this means the 5e repo is adopting semver in a rigorous way, this version number is another tool at our disposal in the communication chain, naught more.
Daniel Thorp
Daniel Thorp3y ago
What can you do to salvage more-hooks-5e? It relies on importing stuff that will no longer be possible...
Calego
Calego3y ago
absolutely nothing lol
Daniel Thorp
Daniel Thorp3y ago
rip
Calego
Calego3y ago
If I have any time at all to work on things before v10 drops, I'll be trying to get the hooks into the system itself as part of this big hairy new version This also means that just about every custom sheet module is going to be toasted, there's apparently a more bulletproof way to extend the sheetclasses than importing the module file:
class CustomSheet extends dnd5e.applications.actor.ActorSheet5e {
class CustomSheet extends dnd5e.applications.actor.ActorSheet5e {
I haven't tried this but unless you're a library module, this should be available by the time your file is instanciated.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
2.0.0 === 1.7.0 so yeah, just know that it's not called 1.7.0 anymore And as usual, any and all testing you folks can to is immensely appreciated. The stuff raised in early v10 compat testing is excellent to have on the radar earlier than later
Calego
Calego3y ago
For those intersted, this is the branch for all v10 dev work (i.e. where 2.0.0 lives atm): https://github.com/foundryvtt/dnd5e/tree/v10-dev
GitHub
GitHub - foundryvtt/dnd5e at v10-dev
An implementation of the Dungeons & Dragons 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com). This work is permitted under the Open Gaming License: http://media....
Calego
Calego3y ago
oh perfect it's the same as when I pinged the 5e role.
Daniel Thorp
Daniel Thorp3y ago
Yeah. That seems to work great for Tidy5e Sheet! I don't know if it's possible to make it work across dnd5e 1.x.x. and 2.x.x though... Maybe with dynamic imports
Calego
Calego3y ago
the whole point of calling it 2.x.x is that things are 0% likely to be backwards compatible, and that's ok. 2.x is only going to work in v10, there's very little point IMO in maintaining a codebase with switches to work in both. If you want to support v9, don't support v10 yet. I personally am probably not going to be upgrading my own games to v10 and thus dnd5e 2.0 for a while, so my stuff is probably going to sit in 1.6.x compatible for a hot minute
Daniel Thorp
Daniel Thorp3y ago
Ok. I'm just preparing a small PR to get Tidy5e Sheet working to hopefully help Sdenec out Since they posted in #endangered-packages and all that
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
I never was able to get this to work before because game was always undefined before init but I was always trying to directly extend the class, not patch them (more-hooks-5e is a different case, I wanted to be first in line to the patching queue for that), and directly extending like this never worked for me:
class CustomSheet extends game..... // error: game is undefined
class CustomSheet extends game..... // error: game is undefined
with the new dnd5e object on global though, that should be defined by the time any module that isn't a library module has its files instanciated, so 🤞 it'll not suffer the same problem (looks like it according to arcanist above)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
Yeah I saw a snippet for that and was like "lol no i'm just gonna do the bad thing and not try to gaze into the eldritch mind of javascript on this"
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Zhell
Zhell3y ago
Seems to be any time the token document is updated.
TyphonJS (Michael)
A small note to the above discussing library modules. I do believe library modules load after the system and before the regular list of modules, so a library module likely still will have access to the new global dnd5e, etc. Additionally while Rollup is being used it should be possible to provide named exports from the bundle such that it can be imported and those named exports referenced vs the necessity of adding the global dnd5e. I don't have any skin in this game, so just spitballing.. Good luck to all working on this big upgrade!
Daniel Thorp
Daniel Thorp3y ago
Yeah, there's a few named exports at the bottom of the new dnd5e.mjs bundle
No description
TyphonJS (Michael)
Whether it makes sense to add a global for the system is certainly up to debate w/ what looks like the pertinent exports available for import. I haven't looked into it in regard to what the other properties of the dnd5e global reference contains. My only concern is that so many follow what DnD5e does, so other systems might follow that pattern and also put the system in global namespace, etc. No skin in game, so definitely going to duck out on discussion, but verifying if direct imports from the bundle works instead of the global for modules needing to reference the system could be worth at least exploring before promoting things to a new global reference.
BadIdeasBureau
BadIdeasBureauOP3y ago
Can someone sanity check what I'm seeing here? Editing token HP via the token HUD throws the following error, and also appears to prevent the updateActor hook from firing (though the actor does update, and this update persists on refresh)
No description
BadIdeasBureau
BadIdeasBureauOP3y ago
Mostly trying to figure out what mix of core bug/5e bug this is, as a) obviously the scrolling text shouldn't error out, but also b) the fact that there is a circumstance where an actor update can happen without updateActor firing seems like a core issue that this is exposing.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
arbron
arbron3y ago
Fixed already in the latest version on GitHub
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Leo The League Lion
@badgerwerks gave vote LeaguePoints™ to @arbron (#56 • 38)
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
u wanaaa open a pr for dis?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Calego
Calego3y ago
fair enough
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
arbron
arbron3y ago
Where is this invalid data coming from? And is it happening on the latest version from GitHub?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Zhell
Zhell3y ago
Anyone with the newest unreleased version of 5e wanna quickly test if a hilarious bug I found still exists? - Actor sheet: open tool proficiency config, then armors, then weapons, then conditions, damage vuln, damage res, damage imm, and languages. Don't close any of them until you get to Languages. - Close Languages (hit the X, don't save), and don't close the sheet. - Update hp. - All the configs explode in your face at once. 🤔
Calego
Calego3y ago
lol i bet i know why these do this, those are all extensions of ActorSheet, and I bet actorSheet wants to come to the front when the actor updates?
Zhell
Zhell3y ago
Yeah I noticed their "sheets" just pointed to the actor's which I thought was odd The funny thing is that they are all closed. They aren't in the back. They are gone. 😄
kaelad
kaelad3y ago
I finally started digging into the v10 preview of the system and man, Foundry did us dirty adding the border-bottom CSS to h3. It's adding extra borders on the character sheets and chat cards I'm trying to think of a suggestion to turn that off, what selector to use. Maybe div.dnd5e h3 Ahh, just saw that it's already fixed! I'm using the 2.0.0-alpha2 release instead of the live v10dev branch
Zhell
Zhell3y ago
Isn't there an issue for that already? I think it's been fixed. ... 🐌
Daniel Thorp
Daniel Thorp3y ago
Yeah, I reported that
Zhell
Zhell3y ago
Weapon, armor, and tool proficiency selectors trigger deprecation warnings.
Zhell
Zhell3y ago
Is this a known issue?
No description
Zhell
Zhell3y ago
Same deal with tools and weapons Probably related, the script I had that replaced weapons and tools is completely broken (no longer available to choose from in an item). Generally seems like items being grouped is completely borked.
arbron
arbron3y ago
Hmm, wasn't seeing that last time I opening that window on v10, let me check now Ooo fun
Zhell
Zhell3y ago
No description
Zhell
Zhell3y ago
Seems Ammo isn't localised. On both v9 and v10. 🤔
Zhell
Zhell3y ago
Posting here cus I don't know if it's a core or dnd5e bug, toggling the blinded condition gives this error. Doesn't seem to screw anything up.
No description
arbron
arbron3y ago
We haven’t touched any vision stuff in 5e yet, so I’m going to say core bug
Surge
Surge3y ago
seeing this on 2.0.0-alpha2 when clicking any PC owned item to display the summary info
No description
Zhell
Zhell3y ago
That's def been reported and fixed already in the next future update. It's cus getChatData is async now
Surge
Surge3y ago
probably poor search skills on my end 🙂
Lyra
Lyra3y ago
I just switched to MRE and the associated addons. I think that has more hooks as a dependency right? I hoped this was “the solution” to betterRolls5e being unmaintained. Any idea at all of when those modules are likely to get an update once v10 releases? Months? Weeks? V11?
Daniel Thorp
Daniel Thorp3y ago
The hooks from More Hooks 5e were merged into dnd5e 2.0.0 btw
Lyra
Lyra3y ago
As someone not too familiar with exactly how all the modules work I'd still be looking for some guidance on what that means for the availability of the modules I use. But broadly, that sounds 'positive' 👍
Daniel Thorp
Daniel Thorp3y ago
I think it just means that you don't need to install that dependency and that Calego's modules can be updated to work (once he updates them) without the less-than-ideal implementation of More Hooks that was needed previously.
Calego
Calego3y ago
as far as I know all of the hooks my mini modules need are now part of v2.0.0 with different names and maybe different payloads. I've got no timelines for when I personally will update them, but I am certainly open to someone taking a look at things and trying them out in the new hook schemas. I haven't even had time to install v10 yet.
Lyra
Lyra3y ago
That's fair enough, I'm definitely not someone with the capabilities to do that unfortunately so I'll have to hope someone more able really wants them on v10.
kaelad
kaelad3y ago
No promises, but I might take a look at the two of yours I use in my game.
Calego
Calego3y ago
fingers crossed it's just changing the hook names and making the minCompatibility 'v10'
kaelad
kaelad3y ago
most likely
Calego
Calego3y ago
but obviously haven't looked into if there's anything else that v10 messes with
arbron
arbron3y ago
Breaking changes in v10/2.0? What a ridiculous idea 😮
Zhell
Zhell3y ago
Are there plans for more alpha or beta releases of the system before v10 stable? What's the usual approach there before major versions?
Calego
Calego3y ago
There is talk of another alpha release happening soon™️ As far as usual goes, these alpha releases are new to the dnd5e team so I got no insights for you there
Zhell
Zhell3y ago
Thanks! 🙂
Leo The League Lion
@Zhell gave vote LeaguePoints™ to @calego (#1 • 1510)
Zhell
Zhell3y ago
I'm imagining MRE can take an enormous change with the use/rollAttack/rollDamage hooks, and not even require libwrapper anymore. Is someone looking at that module in particular?
Calego
Calego3y ago
On that front, I am considering sunsetting MRE in its current form in favor of two distinct modules: - One which handles "faster rolling by default" - One which handles "multiple damage groups"
Zhell
Zhell3y ago
Yes PLEASE
Calego
Calego3y ago
But yeah, I would expect those to not need to libwrap anymore at worst, they would return false from one pre- hook or another and take over from there. That'd also allow experimenting with the new ability to add multiple damage rolls to one chat card natively.
Zhell
Zhell3y ago
I assume the latter will have zero client-side options (or any settings at all) and just provides the damage groups?
Calego
Calego3y ago
youre god damn right it wont have any options
Zhell
Zhell3y ago
Heck yes
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Zhell
Zhell3y ago
Not that I have seen, but there are all the (closed) issues in the github milestone alpha3 is an absolute beauty btw
enso
enso3y ago
I cloned the repo and loaded up the v10-dev branch, which seems to have the pre-item/actor roll hooks in the code, but they don't seem to be popping up in the console. are they not fully implemented yet? or have i not set something up correctly? I'm able to see the "post" roll hooks, just not the corresponding pre hooks
Zhell
Zhell3y ago
Given that I have a module using them, they are definitely in
Zhell
Zhell3y ago
No description
enso
enso3y ago
hm, are you showing the hooks via CONFIG.debug.hooks ?
Zhell
Zhell3y ago
yep Did you add the prefix?
enso
enso3y ago
add the prefix to the Hook.on? yes i can attach a cb to the hook, im just not seeing it do anything
arbron
arbron3y ago
Hooks.on("dnd5e.preRollAttack", (item, config) => { console.log("YEAH"); }) Works for me when I click the "attack" button
Surge
Surge3y ago
on testing5/alpha3, no modules, import a starter hero, click biography, edit and get
No description
arbron
arbron3y ago
That's been noted and Kim is looking into it
enso
enso3y ago
the attack button in the roll config or chat card?
Zhell
Zhell3y ago
The hooks run off item.rollAttack() works with chat card, yes
enso
enso3y ago
ah okay i think i might have been looking for it to fire at the wrong time
arbron
arbron3y ago
Are you looking for one that fires when you click on the weapon on the actor before the chat card is created?
Zhell
Zhell3y ago
I suspect BR/MRE/Midi are gonna need some work to make any use of these.
enso
enso3y ago
no I was expecting one to fire after you click attack on the roll config window
Zhell
Zhell3y ago
The pre is before the config, then the post-hook after it's resolved
arbron
arbron3y ago
There is currently nothing between the completion of the roll configuration window and the actual roll being performed
Zhell
Zhell3y ago
Makes sense, since the pre-hook can be used to modify the formula displayed in the config 🙂
arbron
arbron3y ago
Though if you wanted to throw up an issue on GitHub asking for a dnd5e.configureD20Roll method so you could respond to changes in that dialog 😉
enso
enso3y ago
ah okay yes I'm seeing it now. preRollAttack fires right after you click the chat card attack button and then rollAttack fires once the attack roll chat card is created. I should still be able to leverage this somehow...
Zhell
Zhell3y ago
I use it in what I just submitted to the jam 🙂 (I was writing code without being able to test it until now lmao) rollDamage works the same Am I correct in understanding that it is not possible to pass a min or max to rollAbilitySave/AbilityTest? From what I gather, all modifiers are created in the d20Roll which comes much later than the hooks, and only takes the few static modifiers, like reliableTalent etc
arbron
arbron3y ago
At the moment that is correct. There is a PR to support minimums on rolls, nothing about maximums but it could probably be implemented in the same fashion if there was an issue about it
Calego
Calego3y ago
attack-roll-check-5e is v10/2.0.0 ready once I release. excitedsprout see how many others i can get done this weekend
Zhell
Zhell3y ago
What exactly is the first argument (item) in the roll hooks when the item no longer exists? I assume a clone of some sort made from embedded itemData in the ChatMessage when you use it to roll attack/damage/save?
arbron
arbron3y ago
It is just a temporary item created from the stored chat data
Zhell
Zhell3y ago
Perfection These are insanely useful and convenient hooks
TyphonJS (Michael)
Any chance we can get an alpha 4 soon for a little more testing before stable? Mostly curious to see that this is working https://github.com/foundryvtt/foundryvtt/issues/7962 before stable drops. I'm doing a solid couple of days of final testing before stable, so glad to report anything I see come up. Cheers.
Calego
Calego3y ago
Most sure fire way is to clone down the repo and test locally. Don't know that an alpha 4 will happen
TyphonJS (Michael)
Just going to fork it and do my own release.... I have an rc1 of FQL to be tested by the FQL community and also wanted something a bit more stable for dnd5e. Already some show stopper bugs in core that cause problems presently (permission./ ownership saving crash; yes fixed in unreleased "stable"), so just minimize folks reporting mistakes.
Calego
Calego3y ago
hope you'll be contributing some fixes to any showstoppers you find during this testing? 😉
TyphonJS (Michael)
The hope is that there are no showstoppers at all the "night before stable".. ;P but yes... See something say something; usually with the fix in an issue or can commit a patch if it makes sense.
Want results from more Discord servers?
Add your server