Hi,
Thanks for using the Dialogue System! And good choice with Adventure Creator, too. It's a great asset.
This is unfortunately something that will require a bit of coding -- but perhaps not as much as you'd think. It should only require a small change to one line of the hover text script.
1. Add a field named "Hint" to your dialogue entry template, and tick the Main checkbox:

- convince1.png (43.1 KiB) Viewed 4517 times
2. In your player choice dialogue entries, set the Hint field to the text that will show when you hover the mouse over the answer. In the screenshot below, I used the [lua(
code)]
markup tag to include a Lua expression in the text. This Lua expression uses the
Conditional() Lua function to return text only if a condition is true. In this example, it checks if the DS variable "Called_Idiot" is true. If so, it returns the text "-5 you called this guy a big idiot":

- convince2.png (43.29 KiB) Viewed 4517 times
Use the hover text example code from the package on the Extras page. Show the Hint field's text -- but run the text through the FormattedText.Parse() method to parse those [lua(
code)] tags and any other tags your Hint might use, such as [em#] tags. So replace this:
Code: Select all
if (tooltip != null) tooltip.text = Field.LookupValue(response.destinationEntry.fields, "Description");
with this:
Code: Select all
if (tooltip != null) tooltip.text = FormattedText.Parse(Field.LookupValue(response.destinationEntry.fields, "Hint")).text;
The Lua expression to actually check the skill may be a little complex to read, but you don't need to do any extra C# coding if you don't want to. Say the player's Convince skill is in a DS variable named "Convince_Skill". The dialogue entry requires a skill roll of 11 or higher on a 20-sided die. Normally you could check it by setting the Conditions to:
- Conditions: (random(20) + Variable["Convince_Skill"]) >= 11
But if you want to factor in Variable["Called_Idiot"], the Lua expression will be a bit longer. It will make use of Lua syntax in this form:
condition and
true-value or
false-value
The above form evaluates to
true-value if
condition is true. Otherwise it evaluates to
false-value.
So, specifically for this example:
Variable["Called_Idiot"] and -5 or 0
If "Called_Idiot" is true, the value is -5. Otherwise the value is zero.
So the Conditions need to be:

- convince3.png (18.22 KiB) Viewed 4514 times