Skip to content

Quests and Bounties

b5635 edited this page Jul 12, 2022 · 2 revisions

Adding a quest in this module is mainly based around variables. No scripting knowledge is required! There's two types of quests: Regular quests and bounties. Basically, quests can only be done once while bounties are repeatable and reset after some time they are completed.

Journal Editor

For this tutorial we will begin by taking a look at the "Rescuing Balinda" quest, which you pick up from Bethany in the lower half of the city core (peninsula).

Here's a screenshot from the journal editor:

The most important thing to here is the quest tag and the corresponding journal entries. The stages are determined like this: {Tag}{first two digits of the quest stage} - this means that there are three quest stages here, which is the following: 01_q_rescue, 02_q_rescue, and 03_q_rescue. Keep this formatting in mind because this will be important later.

If it is a bounty, then the tag should start with b_. All others should start with q_

Setting up the Quest Giver

We will first need to add some variables to the quest giver. Let's open up the area Neverwinter - City Core and find Bethany.

You can do this in the area, or on the left pane of the toolset. Once you've found her, right click on her and select Variables.

Variables

Here are it's variables. The # directly corresponds to the script target in the conversations. The following are important:

  • heartbeat_script: The script with this name will be triggered on the creature's heartbeat. We almost always use this script - hb_q_talktome to play a voice emote to notify players if they have a quest stage eligible and/or a quest that is ready to be started.
  • quest#: The quest stage that can be targeted on this NPC (more on this later)
  • quest#_reward_item: Upon reaching this quest stage, the player will be rewarded with an item with the specified ResRef.
  • quest#_reward_xp_level: The target level for this quest. If a player is lower than the target level, more XP will be rewarded and vice versa.
  • quest#_reward_xp_tier: The tier of XP to be awarded. See here.
  • quest#_script: This stage, when advanced, activates a script on the NPC speaker.
  • quest#_pc_script: This stage, when advanced, activates a script on the PC. Typically used for special rewards.

As you can see, you can put multiple quest stages. This is mainly used during the dialogue.

Quest Conversation

Here are a few scripts that work directly with the quest system. All of the # corresponds with the variable targets. For example, dlg_q_chk_atc2 will use quest2's values. In the above example with Bethany's variables, using dlg_q_chk_atc2 with "Text Appears When" will only make this dialogue topic appear when the player is on stage 3 of the quest (03_q_rescue).

Text Appears When

  • dlg_q_chk_atc#: Only show this branch if you are CURRENTLY at this given quest stage
  • dlg_q_chk_atp#: Only show this branch if you are CURRENTLY at this given quest stage or PAST IT
  • dlg_q_chk_eli#: Only show this branch if you are ONE quest stage BEHIND and ELIGIBLE (meaning you meet the pre-requisite stages, if any). For example, given 03_q_rescue, you must be at 02_q_rescue (or the second quest stage)
  • dlg_q_chk_advb#: This one is special, it does a bluff check to see if you can SKIP TWO stages ahead, i.e. go from 01_q_rescue to 03_q_rescue. Uses quest#_bluff_dc for the bluff DC. If the check is a success, it will advance the quest immediately two stages. If it isn't, then it fall down to the next branch.

Actions Taken

  • dlg_q_adv#: Advances the quest to this stage if it hasn't already. Must be within one quest stage.

NOTE: Script numbers will be deprecated one day when I get around to doing a pass. NWN:EE has added script params that you can pass in through dialogue. You can just use dlg_q_chk_atp and pass in quest_target: 1. It's much cleaner.

Now, let's go over the basic dialogues that Bethany has.

In this example, "Balinda is resting at home..." will be the only dialogue showing IF the player is on stage 3 of the rescue quest 03_q_rescue. Look at the "Text Appears When" part and link it with the variables above. Basically, the quest is finished and already turned in.

In this example, "I'm glad to see you are safe!..." will show IF the player is on stage 2 of the rescue quest 02_q_rescue. This is the stage where the quest is turned in. Look at the "Text Appears When" part, same deal with the variables. Which is continued below in the dialogue chain...

As you can see, something happens when this dialogue is spoken. Look at the "Actions Taken" part. This will advance the quest from stage two to stage 3 (quest complete), give the player XP dependent on the level and tier, as well as reward them with an item with the resref nw_aarcl004 (or in other words, chainmail!)

Here, we check if the player has picked up the quest but hasn't rescued her sister yet. Moving on...

Hey, look. There aren't any quest condtions to check. That's because this is chain where we can pick up a quest.

Finally, we give the player the quest here.

The dialogue doesn't have to flow or match the exact skeleton as shown here. Play around with the script conditions to match it best for you :D

Kill Quests

You can make two kinds of kill quests - one where you gain quest credit immediately for killing something, or by picking up a quest item.

You can add these quest stages as variables on a creature:

  • quest_kill: Active if set to 1. Killing this creature will give credit to all nearby players. Only works for quest1.
  • quest1: This quest stage will be awarded to nearby players. Requires quest_kill to be set to 1, and it only works if the player is eligible for this stage (i.e. 1 stage behind or it is the starting stage)

For retrieving an item from a creature:

  • quest_item: The resref of an item that will drop for each player when killed. Requires quest1.
  • quest1: This quest stage is required for quest_item to drop. Like the kill quest, this only works if the player is eligible for this stage (i.e. 1 stage behind or it is the starting stage)