Author Topic: [Tutorial] Create your own quests!  (Read 866 times)

0 Members and 1 Guest are viewing this topic.

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 614
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
[Tutorial] Create your own quests!
« on: 04 April 2020, 19:36:42 »
↜ Create your own quests! by WNG ↝

Introduction

In this tutorial, you will learn how to make and play your own quests and include them in your custom maps. Quests can be logged into your journal or used to control some events in the world every session, making them very powerful tools to make your world interactive.

I may assume you have some basic knowledge and overlook some manipulations. Feel free to tell me if anything is unclear.

Without further ado, let's get started.

I. Create a .qst file

This step will require:
  • Quest Editor
    Located in your game installation file, this tool is necessary to create quest files, manage triggers and whatnot.

Procedure:

I. Have a functioning mod (optional but recommended):
Prepare a mod that will include in its database all the new entries that will be used for your quests. If you need custom monsters or new rewards, you should prepare them before using the Quest Editor.

II. Load your mod in the Quest Editor:
Locate the Quest Editor in your game folder and open it. It might take a while to open. It may prompt you to select a mod; this allows the Quest Editor to use your mod's database and use any new ressources you've added. If you aren't prompted, you can still proceed by selecting File > Select Mod...

III. Create a .qst file:
You can now simply press on File > New Quest Document or the Two-pages icon to create a new quest document!

II. Understanding the quest components

I. Quest Steps:

Quest steps are the big sections of your quest. You can name them by clicking on them and leave comments on them too. Their only use is to contain triggers. Quest steps can contain multiple triggers at once, although I suggest you stick to using one trigger per quest step.

II. Triggers:

Triggers represent the events that can occur. You can name them by clicking on them and leave comments on them too. Triggers contain conditions and actions.

III. Conditions:

Self-explanatory; conditions are criterias that need to be met to trigger the action below. All conditions must be fulfilled before proceeding.

IV. Actions:

Self-explanatory; actions are events that will occur once the conditions are fulfilled.

V. Tokens:

Tokens are switches that can be used to keep track of the progress of the player's quests, enemies defeated, who it has talked to or not and a lot more. Unlike switches, however, tokens are not exactly booleans; they are granted to the player which means you can either own a token or miss a token (the difference is very subtle.)
You must create your own tokens; they are not generated automatically. Simply press on the wrench icon on the top bar and on the Create Token button.
!! If the window says the Tokens.bin file is not editable, make sure 1) the file exists in your mod directory, 2) the file itself (and its parent directories) are not set on Read-only. !!

III. Analyzing a quest example

To build a quest from scratch, it is necessary to understand how each action and condition operates, but we will get to that later. For now, let's make sure that you understand how a quest is built by looking at an example quest from one of my old custom maps.

The Broodmother : To complete this simple quest, the player must find a kill a huge spider. Here is the structure as seen in its .qst file.
Spoiler for Hiden:

Step 1: Initialization
Spoiler for Hiden:
Conditions
  • When the game loads
  • If the player does NOT own the token "sq1_complete" (which will be granted later upon finishing the quest)
Actions
  • Add the "!" indicator on the top of the head of the NPC "shanzung_qg1"

Step 2: Receive quest
Spoiler for Hiden:
Conditions
  • When the player discusses with the NPC "shanzung_qg1"
  • If the player does NOT own the token "sq1_spiderkilled" (which will be granted later upon killing the spider)
Actions
  • Adds/updates the quest to the player's journal

Step 3: Defeat spider
Spoiler for Hiden:
Conditions
  • Upon killing the creature "giantwidow_1"
Actions
  • Adds/updates the quest to the player's journal (with new information)
  • Grant the token "sq1_spiderkilled" to the player
  • Add the "!" indicator on the top of the head of the NPC "shanzung_qg1" anew
  • Changes the dialog package of the NPC "shanzung_qg1"

Step 4: Report back
Spoiler for Hiden:
Conditions
  • When the player discusses with the NPC "shanzung_qg1"
  • If the player does owns the token "sq1_spiderkilled" (which has been granted at step 3)
Actions
  • Updates the quest to the player's journal (with new information) and now tags it as completed
  • Give the player one instance of a random item from the referenced loot table (in this case, a relic shard)
  • Grant the player some experience points
  • Give the player the token "sq1_spiderkilled"
  • Changes the dialog package of the NPC "shanzung_qg1" once more
  • Completes the quest (the .qst file is now sealed)

IV. Implement a quest in your mod

We now know how a quest file looks like and how it is built. I will explain in the posts below the function of some conditions and actions, but before that, let's look how we include a new quest to our mod.

This step will require:
  • Art Manager
    Also located in your game installation file, this tool manages your mod's assets and database. Here, it is required to build your quest into your mod and make it usable.
  • Editor
    Also located in your game installation file, this powerful tool is used to make maps. It will be necessary later to include your quest in your map.

Procedure:

I. Make an asset of your .qst:
Once you have finished and saved your .qst file, open the ArtManager with your mod selected. In the Source tab, select the folder you want to store your quests in (every mod starts with a Quests folder by default.) Right-click on the window on the right and click Import... From there, find your quest. Once it's imported, right-click on it and press Auto-Create Asset.

II. Build the asset:
Visit the Assets tab and locate your quest file in the same folder you left it in Sources. Right click on it and click on Build. Once it's done (should display "added: ./_questname_.qst" in the console), press F7 to build your mod. The quest is now incorporated in your mod, but remains unused...

III. Add the quest in your map:
Launch your custom map. On the top bar, press on Quest > Selected Files... You will see the entirety of the quest files used by this map. Press Add and locate your quest. Once it's added, make sure to save your map (no need to rebuild pathing or maps.) For changes to take effect, you may need to rebuild your map and your mod with the Art Manager.

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 614
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
Re: [Tutorial] Create your own quests!
« Reply #1 on: 04 April 2020, 19:36:52 »
↜ Annex I : Function of basic conditions ↝

Here's the function of some conditions used in the Quest Editor. To my experience, not all of them work (or I don't know how they function?) but I will list down below the basic/essential conditions for starters.
  • Animation completed: The unit "CharacterDatabaseRecord" is finished playing the animation "IdTag" referenced in its Animation pack.
  • Got Token X: The player owns the token X, and the action will be fired immediately when it is received.
  • Has Item X: The player owns a specified item in its inventory.
  • Kill all creatures from proxy X: All the creatures from the proxy "ProxyDatabaseRecord" are now eliminated.
  • Monster X Health == N%: The monster "CharacterDatabaseRecord" has Health or Energy "Mode" to the "Value".
  • On Conversation with X: The NPC X has been discussed with.
  • Owns Token X: The player owns the token X, and the action will be activated when another active condition is fired.
  • Picks Up Item X: The player picks up the item X.
  • Player Enter Bounding Volume: The unit "EntityDatabaseRecord" steps in the range of the bounding volume "BaseDatabaseRecord". If "EntityDatabaseRecord" is left empty, it will be treated as the player. (Bounding Volumes are invisible spherical objects that cover an area and detect which units step in and out.)

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 614
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
Re: [Tutorial] Create your own quests!
« Reply #2 on: 04 April 2020, 19:37:01 »
↜ Annex II : Function of basic actions ↝

Here's the function of some actions used in the Quest Editor. To my experience, not all of them work (or I don't know how they function?) but I will list down below the basic/essential actions for starters.
  • Add Journal Entry in Region: Update the quest log. In "RegionNumber" (1= Greece, 2=Egypt, etc.), in the category "LocationTag" (Helos, Sparta, etc.), add/update/complete the entry "TitleTag" with the description "FullTextTag".
  • Boat Dialog X with target N,N,N: The NPC will prompt the player with a window "Tag" to travel to the coordinates X, Y, Z in the world.
  • Clear X's Dialog: The NPC will return to its default dialog pack.
  • Close door X: Closes the door X.
  • Complete Quest Now: Completes a quest file.
  • Disable proxy X: Deactivates the proxy X.
  • Drop Item X,X,X from X: The NPC will drop the item X, X, X (depending on difficulty.)
  • Give Player Item X(xN), X(xN), X(xN): Gives the player the item X in quantity N (depending on difficulty.)
  • Give Player N, N, N attribute points: Gives the player N attribute points (depending on difficulty.)
  • Give Player N, N, N Experience: Gives the player N experience points (depending on difficulty.)
  • Give Player N, N, N gold: Gives the player N gold (depending on difficulty.)
  • Give Player N, N, N skill points: Gives the player N skill points (depending on difficulty.)
  • Give Token X: Grants the player the token X.
  • Hide X: Renders the NPC invisible.
  • Illuminate X as Primary: Renders an icon on the top of the NPC. (1 or Primary = Exclamation mark, 2 or Secondary = Diamond, 3 or Tertiary = ???, 4 or more = Nothing)
  • Initiate Conversation with X: Automatically initiates a dialog with the NPC.
  • Lock Fixed Item X: Locks certain items such as doors or chests.
  • Make X invincible: The NPC or monster X becomes invincible.
  • Remove Item X From Inventory: Removes the item X from the player's inventory.
  • Remove Token X: Removes the token X from the player.
  • Show X: Makes the NPC visible (often used with Hide X action.)
  • Spawn X at X: Make "Entity" appear at the "Location" (which must be a .dbr with the template "questlocation.tpl".)
  • Update X's Dialog to X: Overwrites the NPC's dialog pack with a new one, referenced in "DialogPak".

Not Yet Rated!

Offline Bumbleguppy

  • Forum Moderator
  • Full Member
  • *
  • Posts: 606
  • Country: us
  • Karma: +24/-0
    • View Profile
    • Awards
Re: [Tutorial] Create your own quests!
« Reply #3 on: 29 November 2020, 23:59:58 »
Excellent tutorial as always WNG. Good job.

Dirty cheats for hacker types like me:

It's possible to copy a quest step/trigger/condition, even though the QuestEditor interface doesn't have a selection for "copy" or "paste" in the menus. Select a quest step and hit Ctrl+C. Deselect or in the case of triggers, select the quest step you want it to appear under and hit Ctrl+V. Saved me a lot of time when I had similar quest steps with only a couple different conditions to differentiate them.

If you don't want to use the game map to add new quest files to your mod, simply commandeer an existing vanilla quest file, especially triggered scenes as these aren't game breaking if you screw up. For example, take one triggered scene's quest file and add it to your mod and create an asset of it. Open it in QuestEditor, select each quest step and ctrl+c/ctrl+v into another triggered scene quest file you add the same way to your mod and append the entire quest code at the bottom of the second quest file. Since triggered scenes use the "token you can never get" mechanic, they will not stop each other from firing. Delete the original quest file quest steps in QuestEditor and you now have a blank quest file that is already registered with the game map.

Not Yet Rated!

Offline rakshir

  • Member
  • *
  • Posts: 47
  • Country: us
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -5
Re: [Tutorial] Create your own quests!
« Reply #4 on: 06 January 2021, 18:22:06 »
Hey Bumbleguppy or anyone who can help. I gather from your post that we can edit existing quest files without using the game map. I've been trying to do this and failing. All I'm trying to do is simply change some quest rewards and stuff like that using Quest Editor, but I can't seem to get the game to read my files. If I simply put the originally named, modded quest files into Sources/Quests, create asset, build asset, and build mod, is the modded game supposed to read those files? That's what I've been doing, trying different variations of how I import, when I use the quest editor, etc. to no avail. Anyone know what I might be doing wrong? Thanks for any help!

Not Yet Rated!

Offline Bumbleguppy

  • Forum Moderator
  • Full Member
  • *
  • Posts: 606
  • Country: us
  • Karma: +24/-0
    • View Profile
    • Awards
Re: [Tutorial] Create your own quests!
« Reply #5 on: 06 January 2021, 18:49:02 »
Have you tested it with a fresh new character? Quests and their tags are in the character save file so changing a quest for an existing character can give weird results.

EDIT: Also check the QUestEditor.ini in Documents/My Games/Titan Quest - Immortal Throne folder. THe first entry is "tokenFile".
Make sure that points to your mod's Tokens.bin I think.
« Last Edit: 06 January 2021, 19:05:12 by Bumbleguppy »

Not Yet Rated!

Offline rakshir

  • Member
  • *
  • Posts: 47
  • Country: us
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -5
Re: [Tutorial] Create your own quests!
« Reply #6 on: 06 January 2021, 21:35:21 »
@Bumbleguppy Thanks for responding! After hours of frustration I finally got my first quest to be read. I'd love to share what worked but I'm honestly not one hundred percent sure. One of the actions I was looking for I had put in the wrong place in the file. Also, I had copied my Sources/Quests folder and an unused Token.bin from another mod because for some reason mine didn't have them. So I made my mod new and added the files. Anyway, something worked. Your response helped me to keep plugging away at it!

Not Yet Rated!

Offline Bumbleguppy

  • Forum Moderator
  • Full Member
  • *
  • Posts: 606
  • Country: us
  • Karma: +24/-0
    • View Profile
    • Awards
Re: [Tutorial] Create your own quests!
« Reply #7 on: 06 January 2021, 22:38:46 »
The best advice is that which yields results and not necessarily what you would always expect I suppose.

Glad things worked out.

BTW, welcome to the mod world lol

"It doesn't work and I don't know why" becomes "It worked and I don't know why" lol

Not Yet Rated!

Offline rakshir

  • Member
  • *
  • Posts: 47
  • Country: us
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -5
Re: [Tutorial] Create your own quests!
« Reply #8 on: 18 January 2021, 15:36:27 »
Hello again @Bumbleguppy or anyone else who might be able to help. After successfully modding several quests, I've hit a roadblock again. I've spent an entire day trying to figure out why the game isn't reading the last quest I'm working on. Not a fun way to spend a day :(. I should have thought of this sooner but I only recently began suspecting that the reason the game isn't reading my latest quest is that it's the only "Immortal Throne" quest. The game keeps those quests in a different arc file: "Resources/Xpack/quests.qst. instead of Resources/quests.qst. My thought was to create a new directory in the source tab of Art Manager. I've tried source/xpack/quests/quests.qst, source/xpack quests/quests.qst, source/quests/xpack/quests.qst. At this point I'm going out of my mind. Can anyone tell me how "Immortal Throne" quests should be set up in Art Manager? Any other suggestions on why the game isn't reading this particular quest?

As a side note, in my testing, I've seen that the game is reading from my new quest reward skill tree and yet somehow still giving me a reward that has been removed from the tree. What the heck!

Not Yet Rated!

Offline Bumbleguppy

  • Forum Moderator
  • Full Member
  • *
  • Posts: 606
  • Country: us
  • Karma: +24/-0
    • View Profile
    • Awards
Re: [Tutorial] Create your own quests!
« Reply #9 on: 18 January 2021, 21:19:26 »
For my mod, I placed
the XPack quests in source/XPack/Quests
the Ragnarok Quests in source/XPack2/Quests

XPack quests in modding have always been a problem, it's only one of the recent patches that made them available to mod at all without adding the game map, removing the quest reference and placing them in source/quests.

Haven't tried Atlantis.

As for the quest rewards, no idea.

Not Yet Rated!

Offline rakshir

  • Member
  • *
  • Posts: 47
  • Country: us
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -5
Re: [Tutorial] Create your own quests!
« Reply #10 on: 18 January 2021, 22:15:03 »
Thanks again for the reply. So with the most recent patch it should be possible to modify a quest by adding an "xpack" directory to the source tab, a "quests" directory in it and then placing the .qst file in it, create asset, build and build? Tried it again and  nothing. In your experience does it just not work for some quests? The Stygian Lurker side quest is the one I'm trying to mod and I can change my plans for it but later I really need to mod the end of the main Act 4 quest to accomplish one of my main goals.
« Last Edit: 18 January 2021, 22:33:00 by rakshir »

Not Yet Rated!

Offline Bumbleguppy

  • Forum Moderator
  • Full Member
  • *
  • Posts: 606
  • Country: us
  • Karma: +24/-0
    • View Profile
    • Awards
Re: [Tutorial] Create your own quests!
« Reply #11 on: 19 January 2021, 00:15:11 »
Sorry, that's all I know. I used the stygian lurker quest in my mod in the directory source/xpack/quests. I used to have problems, then I didn't and I don't remember any more than that.

The only other people I think may help is @WNG maybe. All the others that modded quests are years ago gone. Maybe @sauruz has crashed against the xpack quests? I don't know.

Not Yet Rated!

Offline sauruz

  • Maze Lord
  • Global Admin
  • Full Member
  • *
  • Posts: 1313
  • Country: pt
  • Karma: +21/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: [Tutorial] Create your own quests!
« Reply #12 on: 19 January 2021, 01:21:30 »
Sorry , im not able to help with quests, as the only i edited was the starting one in helos ( and isnt even a quest).

Speaking about that quest, idk but time to time, when i log with a character i still receive the pop up telling that i get the bonus from that quest, even after i complted from last play season.

I advice you to try on another xpac quest to see the results.
"Welcome to new home, be nice and strong ! "

Not Yet Rated!

Offline rakshir

  • Member
  • *
  • Posts: 47
  • Country: us
  • Karma: +1/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -5
Re: [Tutorial] Create your own quests!
« Reply #13 on: 19 January 2021, 02:12:32 »
Thanks @Bumbleguppy and @sauruz for responding. Hopefully I'll get it figured out when I've got some more time. I'll post it if I figure anything out.

Tags:
 


SimplePortal 2.3.7 © 2008-2021, SimplePortal