5E Product Walkthrough Playlist
  1. #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?

  2. #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 11:06.

  3. #3
    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,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
DICE PACKS BUNDLE

Log in

Log in