PDA

View Full Version : gmdie_icon.png Triggering Condition



dulux-oz
December 7th, 2012, 06:20
Hi Guys,

You know the Question Mark Icon (gmdie_icon.png) that appears in the die results when you roll dice via the Dice Tower - how does the chat window know when to display this (ie what is the triggering condition)?

I'm trying to get that icon to appear for another die control and I can't seem to find the triggering code/condition in the existing Dice Tower/Actions Manager code.

Thanks in advance

Valarian
December 7th, 2012, 07:15
Don't know for sure but the normal hidden GM rolls also show this icon. I would imagine that tower rolls are rolling a passed die code on the GM/server side and hence using the hidden roll mechanism. (chat_chat.lua IIRC)

Moon Wizard
December 7th, 2012, 10:38
You can find information in the online reference for which fields are read from the message table structure passed to FG via the API.
https://www.fantasygrounds.com/refdoc/Comm.xcp

The name of the field in this case is "dicesecret", and is a boolean value.

Regards,
JPG

dulux-oz
December 7th, 2012, 12:08
Thanks moon_wizard & Valarian,

Yes, that's what I thought the setting was - however, I'm still not getting the icon show up (there's a space for it, but the die are shifted left so the space appreas at the end).

OK, so the name of the icon (within the code) should be gmdieicon (as in:
<icon name="gmdieicon" file="graphics/icons/gmdie_icon.png" /> with the code:
<die name="gmdie"> <icon>gmdieicon</icon> </die>) - right?
Are there any other settings that need to be made?

Thanks again for the help.

Moon Wizard
December 7th, 2012, 19:12
To make the secret icon appear, these are the things that need to be in place:
* The "secreticon" value for the "diebox" tag needs to be specified.
* The die specified for the secreticon needs to be defined in the ruleset.
* The icon specified for the die model needs to be defined in the ruleset.
* The graphics file needs to exist at the path specified for the icon.
* The message table structure submitted to the API needs to have the dicesecret value set to true.

If you are having trouble, you can post the specific code you are adding (preferably as an extension) for us to review and test.

Regards,
JPG