Dungeon Siege 2 has a new content-driven journal system. The journal data is stored in a number of .gas files in the info file for the ds2_world map. Each of the journal's five tabs has a different content file, which we will discuss below. We'll also go over the various template, UI, and art files associated with the tabs.
The Quest Log contains information on quests that the player has activated or completed. The content for the Quest Log tab is found in questbook_info.gas
. This file contains two types of blocks: Act blocks and Quest blocks.
An act block looks like this:
tab_text = "Act I";
title_text = "Greilyn Isle and the Azunite Desert";
num_quests = 24; // total quests in this act ( primary and secondary )
// Primary quests
quest_1 = a0_p_tutorial_main;
quest_2 = a1_p_warden_task;
quest_3 = a1_p_morden_towers;
quest_4 = a1_p_quest_for_cure;
quest_5 = a1_p_colony;
quest_6 = a1_p_shard;
quest_7 = a1_p_the_skath;
quest_8 = a1_p_elven_artifact;
quest_9 = a1_p_go_to_petra;
quest_10 = a1_p_shard_boss;
// Secondary quests
quest_11 = a1_s_recipe;
quest_12 = a1_s_lumillas_salve;
quest_13 = a1_s_scavenger_hunt;
quest_14 = a1_s_watchtower_secrets;
quest_15 = a1_s_insect_mini_boss; //old
quest_16 = a1_s_haku_part_1;
quest_17 = a1_s_haku_part_2;
quest_18 = a1_s_dire_wolf;
quest_19 = pm_taar_quest;
quest_20 = a1_s_blacksmith;
quest_21 = a1_s_family_heirloom;
quest_22 = a1_s_free_sartan;
quest_23 = a1_s_lost_squadron;
quest_24 = a1_s_xeria_temple;
The act blocks dictate which quests show up under which act, and in what order the quests appear. The tab_text field is the text that will show up in the journal for that tab. The title_text is not used in game.
Each quest must have a quest block. Here is an example, the second quest in the game:
title_text = "Prisoner of War";
desc_text = "After securing the Temple of the Coast at Greilyn beach, Valdis, rather than giving a reward for his success, savagely attacked all of the mercenaries.\n\nYou were knocked unconscious and, had it not been for your best friend Drevin stepping in front of you at the last moment, you probably wouldn't even be alive.\n\nYou were discovered by the Dryads who took you back to the treetop village of Eirulan as a prisoner where you overheard an Elf known as Amren asking your warden to treat you kindly, but you do not know why.";
quest_image = b_gui_ig_m_i_jnl_prisoner;
mercenary_level = 3;
veteran_level = 40;
elite_level = 64;
name = get_amber;
speaker = "Warden Celia";
title_text = "Go to the <c:0xFFFFA812>merchant shops</c> and ask for the <c:0xFFFFFF00>basket of sharpening stones</c>.";
desc_text = "Find the merchant shops and ask Weaponsmith Duma or her apprentice for the basket of sharpening stones. This will show Warden Celia that you can be trusted and can make yourself useful, which will hopefully earn you some amount of freedom.";
radar_icon = a1_blacksmith_apprentice;
name = go_to_outpost;
radar_icon = a1_q3_outpost;
speaker = "Warden Celia";
title_text = "Bring the <c:0xFFFFFF00>sharpening stones</c> to the <c:0xFFFFA812>Dryad outpost</c>.";
desc_text = "Take the sharpening stones you received from Apprentice Telinu to the outpost north of Eirulan. They are needed by the Dryad soldiers defending there. To reach it, take the lift at Eirulan's north gate. A guard will escort you to the outpost.";
name = release_Dryads;
quest_item = key_Dryad_cage;
quest_item_index = 3;
radar_icon = a1_q3_outpost;
speaker = "Warden Celia";
title_text = "Kill all of the <c:0xFF00FF00>Morden attackers</c> and release the <c:0xFF00FF00>captured Dryads</c>.";
desc_text = "The Morden have overrun the Dryad outpost and captured the soldiers stationed there. Since you used to fight as a mercenary in Valdis' army alongside the Morden, Warden Celia will probably blame you for this if you don't work to free them.";
name = outpost_return_to_town;
radar_icon = a1_q3_outpost;
speaker = "Warden Celia";
title_text = "Speak with <c:0xFF00FF00>Warden Celia</c> at the <c:0xFFFFA812>Dryad outpost</c>.";
desc_text = "After Valdis turned on the mercenaries and killed your best friend Drevin, you had no qualms dispatching your former employer's minions. By saving the Dryads from the Morden, you have done them a favor. Hopefully, Warden Celia will agree.";
This quest has four tasks. Each task must have a name unique to the map. The radar_icon field allows you to enter the name of a radar icon (see the Compass Map Radar
entry) that will be visible only when this task is active.
The quest will show up in game like this:
Secondary quests are set up just like primary quests, except that they have 'is_secondary = true;' in their quest blocks. We also use silver radar icon stars instead of gold ones for secondary quests, and orange NPC quest icons instead of gold. (See Quest Indicators
for more info.)
Each quest needs an icon; these icons are 64x64 pixels, but they have an alpha mask that makes them appear 44x54. New icons can be made using art\Bitmaps\GUI\In_Game\Main\icons\b_gui_ig_m_i_jnl_q-ic-s-tbd01.psd as a template. These icons are specified in the quest blocks in the 'quest_image' field.
Quests and tasks are updated
in two ways: through an activation sent to a gizmo or through a talk flick.
An example of the gizmo can be found in the a0_01_01_tutbeach region. Look at the object with scid 0xFF0002CF (cmd_change_questbits). The questbook task 'train_melee_2' tells the player to break one of the combat training dummies. When any of the dummies is broken, it sends an activate message to the trigger with scid 0xFF0002D0. The trigger sends an activate message to the cmd_change_questbits gizmo. The gizmo is set to complete the 'train_melee_2' task and activate the 'train_ranged_2' task, the next task in the quest. These gizmos can also be used to activate or complete quests.
An example of a talk flick that updates a quest can be found in global\flick\sequences\ds2_world\act0_tutorial\a0_tutbeach_gate_guard_talk.flick. Look at lines 38 and 39:
ActivateTask a1_p_tutorial_main train_melee_2;
ActivateTask a1_p_tutorial_main report_after_training;
These lines will activate two tasks in the quest 'a1_p_tutorial_main'.
In questbook_info.gas, you will notice that some quest tasks include the line "parallel_task = true;". This allows the task to be active even if another task in the same quest is active. By default, only one task per quest can be active at a time. (Practically, this allows two silver or gold quest task stars to appear on the compass map for the same quest.)
The Map tab shows a map of Aranna, with icons representing areas in the world and clouds that obscure areas the player has not yet travelled to. It takes its data from two content files: clothmap_info.gas
contains the coordinates, art, and other information for the clouds, icons, and background images for the map, while world_locations.gas
contains the data for the locations themselves, and records which clouds should be hidden and which should be revealed when each location is entered by the player.
Here is a sample entry in world_locations.gas:
id = 1101;
screen_name = "Western Greilyn Beach";
clothmap_hide_group = group_a1_01_01_tutbeach;
clothmap_pos_x = 108;
clothmap_pos_y = 68;
clothmap_pos_z = 0;
clothmap_rollover = journal_map_location_a1_01_01_tutbeach;
clothmap_window = ":info:clothmap_info:location";
- To set the player's world location to this entry, you must set up a bounding box trigger with the action 'set_player_world_location' and the value 'a1_01_01_tutbeach'. After the player enters such a trigger, their world location will remain that value until they enter a trigger with a different world location value.
- The 'id' field doesn't have a practical purpose, but every world location must have a unique id or they won't work.
- 'clothmap_hide_group' indicates which cloud group (defined in clothmap_info.gas) will be hidden when the player enters this location. This is how the 'fog of war' is removed from the cloth map.
- The 'clothmap_pos' fields define where the indicator for this location will appear on the cloth map. This location will be 108 pixels from the left edge of the map, and 68 pixels from the bottom edge. The z field works, but we set all the z coordinates to 0 because we didn't have any reason to make any of the locations float off the map.
- The 'clothmap rollover' value points to an entry in ui/user_education_tooltips.gas. In this case, the entry in that file is:
journal_map_location_a1_01_01_tutbeach = "Western Greilyn Beach";
When the player mouses over the icon for this world location, a tooltip will appear that says 'Western Greilyn Beach'.
- 'clothmap_window' defines which icon to use to indicate this location on the map. The various icons are defined in clothmap_info.gas.
Here is a sample cloud block from clothmap_info.gas:
alpha = 1.000000;
draw_order = 0;
wrap_mode = clamp;
group = group_a1_01_01_tutbeach;
texture = b_gui_ig_m_journal_mapcloud128x64-04;
rect = 21,32,149,96;
visible = true;
enabled = true;
hit_detect = false;
onhide = alphaanimation(2.0,1.0,0.0); // nice cloud fade when hidden
The three fields that concern us are 'group', 'texture', and 'rect'. The 'group' value is what is pointed to by the world_locations.gas entry. There can be multiple clouds in the same group. The 'texture' indicates which bitmap to use for the cloud's texture. In this case, we're using a cloud that's 128 pixels wide and 64 pixels high. The 'rect' field indicates the dimensions and location of the cloud texture on the map; in this case, the cloud's left edge will be 21 pixels from the left edge of the map, its bottom edge will be 32 pixels from the bottom edge of the map, its right edge will be 149 pixels from the left edge of the map, and its top edge will be 96 pixels from the bottom edge of the map.
Lore content is specified in lorebook_info.gas
. There are four types of lore items: Quest items, Books, Maps, and Chants. Quest items, books, and maps are all very similar; there are only a few slight differences in their details interface. Chants, on the other hand, use special skrit to allow the player to get buffs from typing certain words at incantation shrines. All four types of lore item require two pieces of content: a template and a lore block in lorebook_info.gas. We will discuss examples of each type separately.
Here is a sample quest item block from lorebook_info.gas:
entry_type = quest_item;
template = medallion_drevin;
title = "Drevin's Medallion";
icon = "b_gui_ig_m_i_jnl_drevinmed";
summary = "An ornate medallion of unknown origin. It has been in Drevin's family for generations.";
description_0 = "Your best friend Drevin gave you this medallion during the Siege of Greilyn Beach.\n\nYou felt a pang of dread at the time; he was unusually insistent that you take it -- what could he foresee that you could not? He seems to value this object more than anything else, and is very concerned for its safety.\n\nPutting your objections aside, you promised him that you would keep it safe. If this ancient object is as powerful as Drevin seems to believe, you will probably need it.";
description_1 = "";
page_type = "page_book";
page_image_0 = b_gui_ig_m_i_jnl_drevinmed;
- entry_type determines which tab this item will be displayed on, and what kinds of properties it has.
- Each lore block needs an associated template; the template name is entered in the template field.
- The title appears on the main quest item tab page and at the top of the details page.
- The icon appears on the main tab and at the top of the details page.
- The summary appears in the lower section of the summary pane on the right in the journal.
- The quest item details page contains two text blocks, description_0 and description_1, for the left-hand page and right-hand page respectively. It's ok to leave one of them blank.
- page_type indicates which details page layout to use. Four page layouts are used in the journal:
- page_book is used for quest items.
- page_document is used for books. (Yeah, really intuitive, I know)
- page_map is used for maps.
- page_scroll is used for chants.
- page_image_0 may not be necessary (the page UI might just look at the icon field), but we entered the right info for it everywhere anyway. I should investigate this further.
Now let's look at the medallion_drevin template (found in contentdb/templates/journal/ds2_world_journal_quest_items.gas).
specializes = base_quest_item;
doc = "medallion_drevin";
model = m_i_glb_amulet-01;
textures:0 = b_i_glb_amulet-01;
screen_name = "Drevin's Medallion";
inventory_icon = b_gui_ig_i_it_amulet_039;
Most quest items (including this one) are given directly to the player without being dropped on the ground, so in this quest item template and most others the [aspect] and [gui] blocks are irrelevant. Only quest items that will be found in the world and not given directly to the player (the hair and letter from the servant's haunt quest, for example) need an [aspect] block. We usually add one anyway, so that we can test quest items by adding them in the game. (And, actually, we should just put a generic mesh and texture in the base_quest_item aspect block so that we don't need one in the leaf templates.)
The screen_name is seen in game when you receive the item, so it's important that it match the title field in the lore block.
Here's how the above quest item looks in the game:
Here's a sample lore block for a book:
//Lorebook 1: Tome of Smithing (in the trainer house in the act1 town)
entry_type = book;
template = a1_town_recipe_book;
title = "Tome of Smithing";
icon = "b_gui_ig_m_i_jnl_book_armor";
summary = "A book that appears to teach armor construction using ancient Dryad\nmethods.";
description_0 = "This book is lengthy and dry, but you do find two interesting passages:\n\n'Dryad Armor has been a staple of the Master Smith's repertoire for centuries. Its durability and fine appearance make it highly sought after, while its unusual craftsmanship displays the Master's skill to her advantage.\n\nThe creation process is surprisingly rapid: the smith begins with five squares of leather, the most supple available, and cuts them according to any traditional leather armor pattern. She then coats the leather with boiling wax -- three pots are usually sufficient. When the leather has cooled to the touch, twelve stoneshroom disks are pressed into the wax.";
description_1 = "The disks are much harder than leather or wood alone, and offer ample protection. Two basketfuls of leaves are then fastened to the armor to confuse the enemy and to offer warmth for night combat.\n\n... The most important thing to remember when cutting leather is this: always be sure your measurements are accurate before cutting, and be sure to use a very sharp blade for crisp edges. As Dreia the Elder said, new apprentices are easier to find than a good piece of Gila hide. Aspiring Smiths would do well to take this to heart.'";
page_type = "page_document";
Notice that the fields are very similar to the quest item block above, except that the entry_type and page_type use the lorebook formats.
Here is the template that goes with the above lore block (found in contentdb/templates/journal/ds2_world_journal_lorebook_items.gas):
specializes = base_lorebook_item;
doc = "Act 1 Recipe Book for Act1 Town Quest";
model = m_i_twn_book-red-01;
0 = b_i_twn_books-01;
screen_name = "Tome of Smithing";
Lore books don't need aspects, since they are all either given to the player by NPCs or are acquired from containers, and are thus never dropped in the world. Each lorebook has a specific container, found in contentdb/templates/journal/ds2_world_journal_nonlore_quest_items.gas. This is so that object labels for the placed lorebooks are not visible in game.
Here's the container object for this book:
specializes = base_lorebook_container;
model = m_i_twn_book-red-01;
screen_name = "Tome of Smithing";
_launch_event = we_req_use;
template_name = "a1_town_recipe_book";
The base_lorebook_container has a sparkle effect, and becomes invisible when it is used.
Here is what the above lorebook looks like in the game:
Maps are very similar to lorebooks; just the art and the page layout is different. Look at contentdb/templates/journal/ds2_world_journal_map_items.gas for examples of map object templates.
Chants are also very similar to lorebooks but with an added component: reciting the chant at an incantation shrine gives the player's party a temporary buff. These buffs are defined in the files found in global/incantations.
The Bestiary tab contains information on the monsters the player has defeated in the game. It gets its data from monsterbook_info.gas
. This file contains one monster block for each monster in the game. The monster blocks look like this:
screen_type = "Melee";
template = bracken_defender_stats;
icon = b_gui_ig_m_i_ecm-001;
beast_set = "act_1";
location = "Jungle";
summary = "Check out the beastie obj view!";
description = "These spindly creatures are composed entirely of bits of wood and leaves and are animated by magic. They are weak and fragile, but easy for Dryad Nature Mages to summon in great numbers. The Dryads use them as foot soldiers and bodyguards -- the first line of defense against their enemies.\n\nAs with any summoned creature, their power depends upon the strength of the mage that summoned them. Many adventurers have rushed into battle against a frail-looking Bracken Defender, only to be cut down by their claws.";
anim_chore = chore_fidget;
kill_requirement = 5;
- screen_type appears to be a legacy field; it doesn't seem to affect what's displayed in game.
- The template field contains the template name of the monster to be displayed; the bestiary code gets the screen name, mesh, animations, and stats from the template.
- The icon is a portrait for the monster. The icons are 64x64 and have an alpha mask that makes them appear 4x54. art\Bitmaps\GUI\In_Game\Main\icons\b_gui_ig_m_i_ecm-001.psd is a typical portrait icon.
- The beast_set field dictates which tab of the bestiary contains the monster.
- The location field doesn't appear to affect what's displayed in game; it may just be for internal documentation.
- The summary field doesn't appear in-game.
- The description appears in the 'Details' section for the monster.
- The anim_chore indicates which animation the monster should be playing in the view window.
- The kill_requirement field dictates how many of these monsters the player must kill before their information is displayed in the beastiary. For normal monsters, this is set to 5; for bosses, it is 1.
Here is how the Bracken Defender entry appears in game:
To view all the bestiary info, type 'journal killcount 10' in the console. This will set the bestiary killcounts for all monsters to 10.
The Handbook is an in-game manual containing useful gameplay tips for the player. The content for this tab can be found in handbook_info.gas
Here is a sample handbook entry block from handbook_info.gas:
//Given in the tutorial by Drevin
//screen_type = "Lesson 1";
title = "Lesson 1: Using the Camera";
icon = b_gui_ig_m_i_jnl_hb_01-camera;
summary = "Learn About:\n\n* Rotating the Camera\n\n* Zooming the Camera";
description_0 = "To rotate the camera side to side, move the mouse pointer to the right or left side of the screen. To rotate it up or down, move the pointer to the top or bottom of the screen.\n\nYou can also use the arrow keys to rotate the camera, or hold down the mouse wheel and then move the pointer.";
description_1 = "To zoom the camera in or out, rotate the mouse wheel forward or backward, or press the EQUAL SIGN (=) or MINUS SIGN (-).\n\nCamera Hotkeys:\n\n* Rotate Down: S\n* Rotate Left: A\n* Rotate Right: D\n* Rotate Up: W\n* Zoom In: EQUAL SIGN (=)\n* Zoom Out: MINUS SIGN (-)";
page_type = "page_handbook_3";
page_image_0 = b_gui_ig_m_i_jnl_hb_chap_01_01;
- The title appears on the main handbook page, at the top of the summary panel on the right, and at the top of the Details page.
- The icon appears on the main handbook page and at the top of the details page. It is a 64x64 pixel icon with an alpha mask to make it appear 44x54. art\Bitmaps\GUI\In_Game\Main\icons\b_gui_ig_m_i_jnl_hb_01-camera.psd is an example of a typical handbook icon.
- The summary appears in the lower part of the summary panel on the right.
- Depending on the page_type, there can be between one and three description fields. In this case, there are two: description_0 and description_1. description_0 appears on the left-hand side of the details page, and description_1 appears on the right-hand side.
- page_type indicates which handbook layout will be used for this entry. There are 5 layouts:
- page_handbook_1: No images, just two pages of text: two description fields
- page_handbook_2: One vertical image at the bottom of the first page, one horizontal image at the bottom of the second page: three description fields
- page_handbook_3: One horizontal image at the bottom of each page: two description fields
- page_handbook_4: One horizontal image at the bottom of the right-hand page: two description fields
- page_handbook_5: One vertical image at the bottom of the first page: three description fields
- Depending on the page_type, an entry can have between zero and two images. In this case, page_handbook_3 is being used, but only one image is being specified, page_image_0. Therefore, a horizontal image will appear at the bottom of the left-hand page, but the bottom of the right-hand page will be blank. If we used the page_image_1 field instead, the bottom of the left-hand page would be blank and the image would appear on the right-hand page. The page image icons are 256x128, with an alpha mask that makes them appear 204x128 in game. art\Bitmaps\GUI\In_Game\Main\icons\b_gui_ig_m_i_jnl_hb_chap_01_01.psd is an example of a typical handbook page image icon.
Here is what this entry looks like in game:
To see all the handbook entries, type 'journal handbook 44' in the console.