item preCreate

@sol.folango @mrprimate (pinging you two in particular because you do import stuff involving existing actors) There was a change to the 5e logic around the _onCreateOwnedXXXX methods in Item5e during _preCreate to better support automatically setting the proficiency of said items. https://gitlab.com/foundrynet/dnd5e/-/blob/1.5.x/module/item/entity.js#L1474 This caused a problem for equipment (but probably other item types too, being investigated) which was just found and MRed: https://gitlab.com/foundrynet/dnd5e/-/merge_requests/422 I bring this up because it only affects cases where incomplete data is used to create the Item, which feels to me more likely with your use cases of programmatically creating/updating items. If you have a chance, it would be great to give your use cases a test in the 1.5.x branch and double check there wasn't an accidental breaking change.
19 Replies
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
It'll work on 0.8.9
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
<:chef_kiss:740293552965156935> thanks for checking
Leo The League Lion
@calego gave vote LeaguePoints™ to @mrprimate (#66 • 23)
Calego
CalegoOP4y ago
How's the odds these changes to applying prof for items make life easier for you?
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
This in particular might be useful for you https://gitlab.com/foundrynet/dnd5e/-/merge_requests/320
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
cool
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Calego
CalegoOP4y ago
I believe the theory is that adding new things to CONFIG.DND5E.(weapon|armor|etc..)Ids will "just work". Similarly, the compendium being used is configurable with CONFIG.DND5E.sourcePacks.ITEMS. @arbron can probably speak more to the theory of this, but my understanding is that it's meant to be expandable and localizable with these constants
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
arbron
arbron4y ago
This is to keep backwards compatibility with the old tool proficiencies for things like disguise kit which were available in the old proficiency selector Yeah, if you want to add new items you can either include just their id (e.g. gun: "hHdQmHFPgTLEwBfY") or the full UUID if it isn't in the default items compendium (e.g. gun: "mymodule.items.hHdQmHFPgTLEwBfY")
Calego
CalegoOP4y ago
Oooo shit full UUID supported too? niiiiice
arbron
arbron4y ago
Yeah, new in 1.5
Calego
CalegoOP4y ago
thanks @arbron
Leo The League Lion
@calego gave vote LeaguePoints™ to @arbron (#79 • 15)
Unknown User
Unknown User4y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server