#Freeform Sheet refresh on item update
1 messages · Page 1 of 1 (latest)
I will need to check the conditions for the sheet refresh. I would have thought it would update on an item update since I think I am only filtering out freeform sheet flag updates, but apparently that is not the case.
If you want, I can provide the code that I've used. I'm fairly new to macro creation. So, it may be that there is some defect in my code
It does update correctly and instantly on the Simple Worldbuilding side, exchanging the item image as expected without a manual refresh
not necessary, I am refreshing the sheet on updateActor hook, and I am not sure updating an embedded item calls that hook. The solution might just be to call the hook in your macro. Let me do some testing
Alright. I sincerely appreciate it!
My guess was correct, updateItem does not trigger updateActor
Is there a way to call that explicitly from within the script?
can you post the script here?
add await before the update and add this line after: ```js
Hooks.call('updateActor', kc.parent, {}, {}, {})
That worked! I really appreciate your help.
While I have you, if I could ask one more question. Is there a way to edit the values of a parameter on the freeform sheet?
As in, can you edit the value of a parameter through the @ driven reference field?
This is my character sheet
Most of the numbers are references to the sheet the freeform template is overshadowing. Right now, to edit these numbers, I have to swap the template back to the other side, edit it there, and then switch the template again
and you cannot double click them?
Double-clicking them doesn't appear to do anything
Right clicking pulls up the reference field
do you have this option checked?
no, that isn't the issue. I am testing SWB in v10 now, it might have changed in v11
since I do not recognize SPECIAL
Oh, that's an attribute category on the sheet
So, the shorthand becomes @attributes.grouping.attribute
oh, put attributes. before SPECIAL. And use the @Data thing in the header menu to get the correct references
I see. I just have to pull from the @ menu, and that solves it
Again, you've saved me a lot of time
That said, do you have a ko-fi or similar? I'd be willing to toss a couple of bucks your way for the help.
no need, and about losing access to the items, I never really planned the module around using items. I could possibly give some thought to how to fix that, but it will likely come down to a dialog to display a list of items that could be dragged to the sheet
I think my use case is rather unique
unfortunately, how that looks is going to be a bit grating depending on the system, so I might just make it and give it to you
That said, I think I have what I need in the fix you provided
Basically, my players wanted to try a fallout system
The system uses Karma caps, which you flip over and then flip back up at various points to use advantage
It seemed like it'd be a neat flourish to have the caps on the sheet and be able to flip them with a macro as a means of visual tracking
sounds doable, the primary use case for this module is implementing unsupported systems, which leads most of my support for it being hacking in ways of doing stuff like that
The only thing I could think that would be a handy general feature is something like a checkbox option, since it isn't clear from the existing documents how you setup those hearts on your example character sheet or if they can be toggled
so the number of caps get used in a roll formula?
So, I had to do a really dumb workaround. Basically, the item in the character sheet cannot be accessed from the @Data operator. So, I had to track down the item's UUID and then do "@UUID[item's UUID]"
Otherwise, I'm not sure how you access an image-based representation of the item on the character sheet
I do a very bad job of explaining the heart thing here: https://discord.com/channels/170995199584108546/1155851620907761707
that is what I use for the hearts
meant for things with a max and min value
like health
Gotcha
Well, I think I should be good for the moment. Again, I really appreciate your help!
makes a dialog with all item content links that can be dragged to the freeform sheet ```js
new Dialog({
title: actor.name + " Items",
buttons:{},
content: TextEditor.enrichHTML(actor.items.reduce((acc, item)=>acc+= item.link+"<br>",""), {async:false}),
}).render(true)