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.
.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.