Item Macro Compendium Workflow

Okay, here's a long one that's a bit of a doozy. I'm looking at setting up some sort of tooling/workflow that would allow me to store macros outside of Foundry in a way that I don't have to copy paste them over. This is further complicated by the fact that I really want to use the Item Macro module to attach these macros to specific items that then get interpreted for active effects. I've been inspired by the work of the 5e system for compendia and ghost's efforts for their own system to think that this is at least possible, but I have no id where to even begin. Any suggestions?
DT
Daniel Thorp960d ago
I see two approaches: - A Foundry module which updates the contents of all script macros using Filepicker.browse on ready - Something more similar to the script 5e uses where it parses your macro db files and updates the content fields with JS. Obviously the first option is better practice, since it uses the official API You could perhaps have a folder with JS files named by the associated Foundry DocumentId, in order to have something for the module to use to link the two This would definitely be more accessible as a module I don't know how Item Macro works. Where are the macros used stored? Does it just store the ID of the macro to run on the item or the entire macro?
E
Ethck960d ago
So Item Macro seems to store the entire macro data inside of the item via flags.item-macro.macro. My problem with the 1st approach is how to tie in the specific macros to specific names/ids or whatever. Would I just have to maintain everything by like a name basis? Wait, that could easily be done with file names... 1 macro per file or something of the like.
DT
Daniel Thorp960d ago
Yeah That doesn't sound like best practice to store the entire macro. It should just be ID. It would make this easier lol
E
Ethck960d ago
Well so the entire point of Item Macro is that the macro doesn't exist in the Macro Directory, so you can have hundreds of macros attached to items for use in active effects and not have to sort through them all in the Macro Directory.
DT
Daniel Thorp960d ago
Hmm, okay. It's not really very different, except now your accessing and setting that flag instead of the contents property. Either method described above should still work. I don't see the advantage of method #2 though
Want results from more Discord servers?
Add your server
More Posts
Item 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%Hot ReloadingIs there a way to do something like hot module reloading/live reloading on change for Foundry?Tagger Code ReviewWould anyone be keen to code review Tagger? I'd like to git better 😄 https://github.com/Haxxer/Founsocket woesnot the socket firingpreUpdateSo for some reason ItemPF#_preUpdate changes aren't sticking.. what is PF1 doing that prevents this?