-
June 2nd, 2023, 11:17 #1
Q: Output to chat format for items
Hi there,
I'm struggling for some time with the way dice rolls are presented. They seem very "unstructured" with mainly a string to declare the action in comparison to other VTT. I just had a look at the "Output to chat" button for items, which gives a very nicly structure table as an output. Is it possible to do something like that for dice rolls as well? Maybe even put in links to ask for save rolls and such?
-
June 2nd, 2023, 11:58 #2
In your handler you can use ActionsManager.createActionMessage(rSource, rRoll). Then use Comm.deliverChatMessage () to deliver to chat. You send the table created by createActionMessage to deliverChatMessage .
This will return a table with loads of info. Are you using ActionsManager.performAction(dragInfo, rActor, rRoll) to perform the roll?
edit: Easiest way to save a roll is to create a hidden string or number field and output to that. When I setup a push roll that's what I do. Another way is to call the subsequent roll in the handler from the first roll. I use this method for damage reduction rolls after a damage roll is made.(for example)Last edited by bayne7400; June 2nd, 2023 at 12:06.
https://forge.fantasygrounds.com/shop/items/199/view
Old School Essentials Ruleset
https://www.dmsguild.com/product/352...eon-Builder-5E
5e Random Dungeon Generator!
-
June 2nd, 2023, 21:39 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 19,847
As with most software, all the various pieces are evolving over time as ideas flow, features are released, coding is generalized, and other changes.
Since chat messages do not support multiple separate fields nor any ability to drill into detail, the thinking behind rolls is to make them as streamlined in the chat window as possible to avoid the chat window being filled with overly lengthy roll details. This most rolls use some sort of bracketing to indicate "modifications" or "attributes" of rolls.
For the new text sharing, the records are literally converted to a single multi-line text field, and sent to the chat window. There is no concept of fields in the chat window.
Regards,
JPGFG Wish List - https://fgapp.idea.informer.com/
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks