PDA

View Full Version : Need help to automate Display Sum



Archlyte
March 30th, 2015, 03:19
I'm converting the Classic Traveller Ruleset and I am trying to get the dice rolls that are displayed in the chat to automatically display the sum in the same bubble as the dice box. In the attached example the bottom result is what I would like it to do automatically instead of having to choose that from the UI

9450

Archlyte
March 30th, 2015, 03:47
I should say that I have looked for a way to do this but the preference to auto-total for the ruleset merely puts the total in the text in the chat versus the bubble

Trenloe
March 30th, 2015, 03:50
You should be able to set <Msg>.dicedisplay = 1 in the Comm message used to display the result. Info in the "Message Data Structure" here: https://www.fantasygrounds.com/refdoc/Comm.xcp

Archlyte
March 30th, 2015, 07:03
You should be able to set <Msg>.dicedisplay = 1 in the Comm message used to display the result. Info in the "Message Data Structure" here: https://www.fantasygrounds.com/refdoc/Comm.xcp

Thanks for this :) Unfortunately I cannot locate the file that has those controls for the ruleset. Any hints of where it would typically be? Im checking every file but nothing so far

Trenloe
March 30th, 2015, 15:29
The ruleset is not necessarily using the Comm package, but the link I gave above provides the "Message Data Structure" that is used when constructing what will be displayed in the chat window.

In the Classic Traveller ruleset this is primarily done in the chat_chat.lua file - in the deliverDieResults function. The message being created here is entry, so if you add a line: entry.dicedisplay = 1; to this function then the total will be displayed when the "entry" message is delivered to the chat window.

Archlyte
March 30th, 2015, 22:37
Trenloe I thank you! This is great! How do I up-vote you ? lol. Thank you again

Nylanfs
March 31st, 2015, 01:41
Lower left corner of that post "Add to user's reputation"