PDA

View Full Version : Tweaking chat entries



ragamer
March 10th, 2010, 13:25
I'm investigating the chat entries on the chatwindow and as far as I have tested, there are a set of "hidden fields" that alter the way a chat entry behaves that are not specifically stated on the API reference:

.dice : An array of dice definitions {type,result} that will make the dice icons appear on the message.

.diemodifier: A straight number that will be shown as the BIG signed integer. This value will modify the sum of the dice results of the ".dice" field.

.diesecret: boolean value, if set to "true" will make this entry invisible for players and display the question mark to the GM.

.hasdice: boolean value, true if the chat entry has .dice defined.


But I'm struggling to realize how the numerical value of the chat entry (the one that it's assigned to the drag'n drop operations) is kept/manipulated (it's the value on grey that's shown when you apply any custom calculation with the menu).

The way the built-in menu operates on a chat entry is compatible with the following theoretical scenario:

- Each chat entry has a "hidden" value field (potentially numeric only). This must be present, as you can alter entries on the chat history and they keep whatever modification you create with the built-in menu.

- Each built-in menu operation takes the sum of the dice (plus the modifier), performs a calculation and adds the result to this "hidden value".

- Menu reset just makes this "hidden value" null and the chat entry numeric value is set to the default (dice sum + modifier).


So, Is there a way to access this "hidden value" from lua scripts? Is it numeric only?



EDIT: I have tried to search for strings into FG executable, but that's like finding the needle in the haystack.

Moon Wizard
March 10th, 2010, 22:36
Ragamer,

The number shown in gray for a chat entry with dice is simply a display mode for the chat entry, based on the total. There is no separate number tracked.

Currently, there is no mechanism to access the display mode within LUA. It is only accessible using the radial menu.

Cheers,
JPG

ragamer
March 11th, 2010, 13:09
Too bad then... Time for a suggestion so the Devs make more private properties of the chat entry available so we can tinker with them...

...It will be extremely usefull for rulesets with non-additive mechanics for group of dice and to make easier to change the drag type on already rolled results to customize which fields of the other panels/sheets/controls accept which type of roll results.