Kangband Quests
- UNDER CONSTRUCTION (as of 6/29/98)
How to Design a Quest (as well as an entire plot):
Plots are new to Kangband as of version 2.8.2e. They involve a wilderness map and a file of quests. When a character is born, they are randomly assigned a plot number. This number determines which wilderness and quest file they use throughout the rest of their game. Right now, the game supports ten plots but this can be easily changed. Also, note that plots 3-10 are just duplicates of plot 1 until I become more creative. Modify these existing plots before you create more.
The files in LIB\EDIT are labeled as w_info#.txt and q_info#.txt where the '#' is replaced by an actual number. These files match each other based on number. For example, q_info2.txt has quests dealing with a kidnapping and w_info2.txt has the wilderness to support q_info2.txt.
Technical Note: To change the number of plots in Kangband, you must change the value in "defines.h" for MAX_PLOTS. Then, you need to create the files for the wilderness and quests in the LIB\EDIT folder. Recompile the game, and that's all you need to do. For each plot, there must be a q_info#.txt and w_info#.txt where the '#' is replaced with plot number.
To alter any given plot, you will have to modify the q_info#.txt files and the w_info#.txt files located in the LIB\EDIT folder.
Step 1:
=======
The first place to start would be with the quests. You are allowed a maximum of 20 quests and it is recommended, though not necessary, that Morgoth be the last quest.
Edit the q_info#.txt file you wish to change. I am going to use the following example to explain what each value means:
N:31:Thieves Hideout
T1:There are thieves robbing my people! They live in a small
T2:burrow outside the city walls robbing people as they pass
T3:on the roads. They even sneak inside the town to mug and
T4:pillage! Your task is to go to the burrow and kill these
T5:ruffians.
Q:5:3:0:0:0:0:0:28:137:0:1
Y:36:0:0:0:0:0:0:0:0:0:0:0:0:0:0
X:99:0:10:15
D:XXXXXXXXXXXXXXX
D:XT...a....X..TX
D:XT........D..TX
D:X.........Xa..X
D:XXXXX.....XXXXX
D:XT..D.........X
D:XTa.X.........X
D:XXXXX.........X
D:X<P.D.........X
D:XXXXXXXXXXXXXXX
After the N: is the quest number - this needs to be a value from 100-119. The description is what will show when you check your quest status in the game. There can be nine text lines (T1: through T9:) and each line can be up to 80 characters long. This is the description you will see when getting this quest from the Lord of the Castle.
Now for the fun part, the Q: line is all the details and configuration of the quest level. The first number is the quest type where 1 = kill monster [x] on level [y]. The only quests that use this currently are the Tarrasque, Sauron and Morgoth. A type of 2 means kill [#] monster(s) [x] on any level. Currently, this is only used when you want the standard quest to kill a monster or two... Example:
N:32:Random Monster
Q:2:0:0:0:1:0:0:0:0:0:0
A quest of type 3 is to get a special artifact. The vault quest from q_info1.txt uses this style. The artifact must be included in the v_info.txt file or the quest will obviously not work. Type 4 quests = find the exit. The volcano quest is an example. In v_info.txt, the quest exit (E) must be placed somewhere. A type 5 quest is to kill [x] monsters regardless of type on the level. This is used in the sewer quest. And, finally, the type 6 is to kill all monsters in level (regardless of breeders, summoned monsters, etc.).
Ok, that was the first value, the rest are: nummon, curnum, maxnum, level, r_idx, k_idx, y, x, revert, vaultused. Nummon is the number of monsters to kill and only currently applies to quest type 5. Curnum is the current number killed and is used to initialize values for the quests - always keep this zero. Maxnum is the maximum number to be killed and this is used when facing one creature such as the Tarrasque. Level is for quest types 1 and only currently applies to Sauron and Morgoth. R_idx is the monster index that must be killed for quest type 1. K_idx is the artifact index for quest type 3 that must be found. The values of y and x are for the placement of the quest entrance. Revert is the character you want to quest to be after it is complete (i.e. rubble, water, etc.). This value corresponds to the numeric number of any item in the f_info.txt file.
The values following Y: are for ten specific monsters and five artifacts. The monster numbers relate to the values in r_info.txt and the item numbers relate to the values in a_info.txt. When placing monsters in the quest level description, use the letters 'a' through 'j'. The items are placed with '1' through '5'.
The X: line denotes the type of vault (99 being quest types), the rating of the level, the height, and the width of the description.
The D: lines are for the quest layout. There need to be as many D: lines as defined in the height. The characters must go the length of the width. So, in the above example, there are ten D: lines since the height is 10 and there are 15 'X' going across the first line as the width is 15.
When putting in characters on the D: lines, the following symbols apply:
X - permanent wall
|
- < - stair up
|
- E - quest exit
|
- . - floor
|
- D - door
|
- P - player position
|
- % - granite (outer wall)
|
- E - quest exit
|
- w - shallow water
|
- # - granite (inner wall)
|
- W - deep water
|
- l - shallow lava
|
- L - deep lava
|
- * - treasure/trap
|
- T - treasure
|
- + - secret door
|
- ^ - trap
|
- > - special quest exit
|
- a - monster 1
|
- b - monster 2, etc.
|
- up to letter j
|
- 1 - artifact 1
|
- 2 - artifact 2, etc.
|
- up to number 5
|
- & - monster
|
- @ - meaner monster
|
|
- 9 - meaner monster + tres.
|
- 8 - nasty monster + treas.
|
|
- , - monster and/or object
|
- R - random quest exit
|
|
Note: there cannot be any spaces at the end of the D: lines.
- Ok, I think that is it. You do not need to worry about any "raw" files in the LIB\DATA directory. These are regenerated per player since the plots change. So, just ignore that directory when adding quests, plots, or even just vaults. Feel free to change any of the existing quests - perhaps less random monsters and more special levels. If you design anything that you think would make a great addition to Kangband, send me the file - I may include it in the official game and will credit you in the q_info and w_info files.
-
- Step 2:
- ======
-
- The other piece of the quest/plot line is the wilderness area. This file must be a text file and contain characters in a ### wide by ### high rectangle. The contains all the buildings, stores, doors, trees, etc. on the wilderness or town level. It also contains any roads, lakes, mountains you may desire.

Main Page | To-Do list | Download Area