Page 1 of 1

[SOLVED] Starting a quest two ways - different quest log text

Posted: Wed Dec 19, 2018 6:44 pm
by DeadlyAccurate
I want to be able to start a quest two different ways, such as talking to an NPC ("Hey, go find my MacGuffin,") or finding the quest item ("You found a MacGuffin. You should find out who it belongs to.")

I've figured out how to branch the conversation text depending on how you start the quest, but I can't figure out how to change the quest log text.

Re: Starting a quest two ways - different quest log text

Posted: Wed Dec 19, 2018 7:29 pm
by Tony Li
Hi,

Here are two different suggestions:

1. Use quest entries. In the screenshot below, I defined two quest entries. If the player gets the quest by talking to the NPC, activate Entry 1. If the player gets the quest by finding the item, activate Entry 2.

Image

(Remember to set the quest's main state to active, too.)

Only active and success/failure quest entries will be shown in the quest log window and quest tracker HUD.

In your conversation, you can use the Conditions field to check which quest entry is active. In the screenshot below, the Conditions are configured to check if Entry 2 is active -- that is, if the player got the quest by finding the item.

Image


2. Or, if you don't want to use quest entries, at runtime store the text of how the quest started in a variable or a custom field in the quest itself.

The screenshot below shows an example of using a variable and the [var=varName] markup tag inside the Description text.

Image

The screenshot below shows an example of defining a custom field named "Origin" and using the [lua(code)] tag inside the Description text.

Image

Variables are always saved in saved games. If you use a custom field in your quest instead, tick the Dialogue Manager's Persistent Data Settings > Include All Item & Quest Data checkbox to include the field in saved games.

Re: Starting a quest two ways - different quest log text

Posted: Thu Dec 20, 2018 11:26 am
by DeadlyAccurate
It's working perfectly! Thanks so much.

Re: [SOLVED] Starting a quest two ways - different quest log text

Posted: Thu Dec 20, 2018 2:25 pm
by Tony Li
Happy to help!