#Title Inline rolls from text editor
1 messages ยท Page 1 of 1 (latest)
Only really need to pass the flavor through Roll.replaceFormulaData as well, which _onClickInlineRoll does not do currently
though in this particular instance, the name of the actor would be the speaker on the chat message
That would be awesome! Let me know if I can help
I already have it working. I am just trying to imagine a use case other than what you mentioned
which I already mentioned is slightly pointless because the speaker on the message is set to actor.name already
So it titles it "Gamemaster" in the chat but I want it to use the name of the actor who's sheet it was on, in the same way that if the attack roll has "+ @bab" it pulls in it's stat for bab
Melee [[/r 1d20+5 #@actor.name makes a Halbred Attack]] halberd +5
apologies if I described anything incorrectly ๐
the click event does not know the app it comes from. It uses the selected token's information
[[/r 1d20+5 +@bab]] properly pulls in the actor's 4 bab, with no token selected
token isn't even spawned, doing this from the character sheet opened from the "Actors Directory"
nevermind, you are right. let me fiddle with this for a sec
thanks! Appreciate the interest
question, would you want item data in any case?
not that I can think of for my uses cases no
that's awesome
took it a step further with a bit that I had in there for someone else's request
looks solid
ignore the name, try this
Sorry do I just unzip and toss that into \FoundryVTT\Data\modules ? Tried that and its not showing up for me. I've never installed a module manually before
yeah, you have to return to the setup page and relaunch the world after you do that with a new module though
oh I found it. I think because I haven't updated foundry itself in a while
I was planning on updating though, so might as well do that now
core version shouldnt matter, I just put in in version 9 from habit
oh okay, I;ll try updating that file then. I'm only on 0.8.9
or just drop this in the module folder over the other one
version 9 is pretty dope though
hmm it showed up, I enabled it, and I still got the same result. Maybe I do need to be on version 9?
do you have libwrapper installed?
I didn't list it as a dependency, but it is necessary to overwrite the function
oh yeah, but not enabled. Will enable and try again
[Detected 2 packages: inline-adv-dis-crit, lib-wrapper]
at HTMLAnchorElement.:gift:TextEditor._onClickInlineRoll#inline-adv-dis-crit (module.js:39)
at B.:gift:call_wrapper [as call_wrapper] (libWrapper-wrapper.js:551)
at HTMLAnchorElement.:gift:TextEditor._onClickInlineRoll#0 (libWrapper-wrapper.js:164)
at HTMLBodyElement.dispatch (jquery.min.js:2)
at HTMLBodyElement.v.handle (jquery.min.js:2)```
what the heck
I'm happy to upgrade to version 9 if you want ๐
I didn't think that was a v9 thing, but you can try it
updated lib wrapper as well, and one of those two updated fixed it!
BTW, supporting inline rolls in text editors in actor/item sheets is up to game systems/modules to do. Foundry doesn't enforce inline roll support on them.
Or rather, Foundry can't enforce the product of said thing will have inline rolls parsed. The editor itself needs to display them unprocessed.
TextEditor is not enforced on character sheets as far as I know, but inline rolls are parsed by TextEditor by Foundy
Yes, though only if inline roll conversion is enabled with a parameter.