kts.AddHint

Name

kts.AddHint – add quest requirement strings

Synopsis

kts.AddHint(message, order, group)

Here, message is a string, and order and group are integers.

Description

This function adds a new line to the "Quest Requirements" in-game display.

The message should be a quest requirement string, e.g. "Retrieve the wand" or "Place the book in the special pentagram".

The group value allows "either/or" quests to be set up. If all messages have the same group value then there is only one set of requirements, and all must be fulfilled to win the quest. If there are multiple groups, then the players only have to fulfil the requirements from one of the groups to win.

Within each group, the order value determines the order in which quest requirements will be shown (lower order values display first).

Please see below for some examples.

Return Value

This function does not return anything.

Notes

Note that if quest requirements are changed mid-game, then kts.ResendHints must be called in order to update the UI on player's screens.

Examples

A "retrieve wand and escape" quest (where the wand is not the wand of securing) could be set up as follows:

kts.AddHint("Escape via your entry point", 2, 1)
kts.AddHint("Retrieve the wand", 1, 1)

This would result in the following Quest Requirements being displayed:

Retrieve the wand
Escape via your entry point

This is because, first of all, we only have one group (group=1); and within group 1, "Retrieve the wand" has order=1 so it displays first, then "Escape via your entry point" has order=2 so it displays second.

If, instead, the wand was the wand of securing, then there would now be two ways to win: (1) escape the dungeon with the wand, or (2) use the wand to secure all exits and then kill all enemy knights. To represent this, we would use the group values to set up the two different ways of winning, as follows:

kts.AddHint("Escape via your entry point", 2, 1)
kts.AddHint("Secure all entry points using the Wand of Securing", 1, 2)
kts.AddHint("Retrieve the wand", 1, 1)
kts.AddHint("Destroy all enemy knights", 2, 2)

This results in the following Quest Requirements display:

Retrieve the wand
Escape via your entry point

--- OR ---

Secure all entry points using the Wand of Securing
Destroy all enemy knights

Note that the game has first displayed all requirements with group=1, then the string "--- OR ---", then all requirements with group=2. Moreover, within each group, the messages are sorted in order of the order values (this is why "Retrieve the wand" is first, even though it was added after "Escape via your entry point" in the code).

See Also

kts.ClearHints

kts.ResendHints