abstract
| - To start with, let’s create a conversation for Siegfried. In fact, there will be several different conversations, but which one will be displayed will depend on the situation. Siegfried will have a quest for Geralt (the player) to kill the bandit leader. To create a conversation file we must select New -> Conversation (.dlg) from the File menu: The new conversation window will open: Display only the properties window. Select Utility Windows -> Properties from the View menu: The Properties window will open on the right side of the screen: Now add the first node of the conversation. To do this, select new conversation and right-click: If we save our conversation, the file name displayed will be siegfried_conversation, for example, instead of new conversation. We will save the conversation later. Now select Create Quest Node from the menu: This is how you create a quest conversation. The first empty node appears here: Remember that each conversation, regardless of its type (e.g. quest, dialog or cutscene), is always initiated by another character. It is never started by Geralt, i.e. the player. That is why the node we have just added will be for Siegfried. To create the text that Siegfriedwill say, double-click on EMPTY: This opens a window: Write "Hello Geralt” and hit ENTER. The first node is ready for Siegfried: Now Geralt (the player) must reply. To do this, select the “Hello Geralt” node and right-click: Select Create Quest Reply from the menu: This creates another empty node: Note that this node is blue. This means that Geralt (the player) will use it. Characters speak in turns – first one character speaks, then the other and so on. To create Geralt’s response, double-click on the new node and a window will open. Write “Hello Siegfried. Do you have any quests for me?” in the window and hit ENTER: Let’s add another node for Geralt. Select the “Hello Geralt” node and right-click: Select Create Quest Reply from the menu again: This adds another empty node for Geralt: Double-click on the new node and write “Farewell”. Then hit ENTER: Note that the “Farewell” node is a second option available during the quest conversation – the player can choose whether to say “Hello Siegfried. Do you have any quests for me?”) or “Farewell”. Left-click on the “Farewell” node: Now, in the properties window, click the right-hand column opposite the Conv Type attribute. Select Accompanying from the list: Now the “Farewell” node is a second choice during a quest conversation. Its changed status is visible in the new icon which appears to the left of the node: What we have done so far can be described in the following way: when the conversation starts, Siegfried says “Hello Geralt.” After this, Geralt can ask Siegfried if he has any quest, saying “Hello Siegfried. Do you have any quests for me?” or simply end the conversation by saying “Farewell.” Now we will add a new node to allow Siegfried to respond to Geralt’s question about quests. To do this, select the ”Hello Siegfried. Do you have any quests for me” node and right-click: Select Create Quest Entry from the menu: This creates an empty node for Siegfried’s response: Double-click on the node and add the following text: “I do. You must deal with the bandit leader. I cannot do this”. Then hit ENTER: Now we have to add a reply. Select the “I do. You must deal with the bandit leader. I cannot do this” node and right-click. Select Create Quest Reply from the menu: This adds a new node: Double-click on it and write “Done”. Then hit ENTER: Since Geralt is not obligated to accept the quest, we must add a node so that he can decline. When Geralt, or the player, does not want to accept the quest offered by Siegfried, he can reply “Farewell”. But since this response already exists, we don’t have to go to the trouble of writing it again. Instead we can use a trick. Select the existing “Farewell” node and right-click: Select Copy from the menu: Now select the “I do. You must deal with the bandit leader. I cannot do this” node and right-click: Select Paste as link from the menu: This adds a node which is really a link to another node: Thanks to this trick we can avoid doubling up entries and the player will see the usual “Farewell” reply on the screen. However, we need to move the new link under the “Done” node. To do this, left-click and hold on the “Farewell” link: Then drag it down to the “Done” node and let go of the left mouse button: This is an simple and useful way to move nodes around. This is what we have done so far: at the beginning of the conversation Siegfried says “Hello Geralt.” In response, Geralt (the player) can ask Siegfried if he has any quests, saying “Hello Siegfried. Do you have any quests for me?”, or simply exit the conversation by saying “Farewell.” If the player chooses the first response, Siegfried will reply “I do. You must deal with the bandit leader. I cannot do this.” Here the player can decide whether or not to accept the quest. The player will then select “Done” or can reject the quest by selecting “Farewell.” As you may have noted, the “Done” node determines that the player has accepted Siegfried’s quest. That’s why we need to assign a quest id to this node. Click on the “Done” node: In the Properties window, click the right-hand column opposite the Quest Id attribute and write siegfried_task : Note that the icon next to the “Done” node has changed: Important: After a quest node (one that contains a quest id), the next node in a given conversation branch cannot be another quest node. In our case this isn’t a problem, since our link leads to the “Farewell” node and is an Accompanying type node. We’ve finished the node with Siegfried’s quest for Geralt. If the player already has this quest, however, the conversation we have prepared will not be displayed. We need to create a new conversation in which Siegfried will ask Geralt if he has completed the quest yet. If the answer is yes, then we need another conversation in which Siegfried will praise Geralt for completing the quest. If there are three conversations, how does the game know which one to display? We have to take care of that ourselves by adding a flag system. Click on the “Hello Geralt” node: In the Properties window, click on the small yellow icon in the right-hand column opposite the Add Flag attribute in the After Flags section: This opens the Flags window: Right-click on the field in the Flags window and select Create Name from the menu: This opens the Enter name window: Write orders_received in the window: Then click on OK. The flag will appear in the Flags window: If you want to delete a particular flag, right-click on it and select Delete Name from the menu: We don’t want to delete this flag, though, so after adding it just click on OK in the Flags window: Now we’ll add a second flag called leader_killed. This flag will have the value 0 (false) if the bandit leader is alive. Once Geralt (the player) kills the bandit leader the value of the flag will change to 1 (true). This flag, however, must a global flag. So far we have created local flags, i.e. ones that are only relevant during conversations. Global flags are relevant throughout the game, thus they can be used when creating quests, for example. This is described in another chapter of this manual. Global flags are saved in the globaldlgflags.2da file. We need to create one now. To do this, select New -> 2DA file (.2da) from the File menu: The new 2da editor window will open: The Witcher’s .2da files are simple databases which contain text written in 2D tables. A .2da file may be composed of any number of columns and rows, but each new .2da file contains only two columns and two rows. The first row of a .2da file is a heading and the following row is a record. The first column is always a record key by which the database is addressed. In our globaldlgflags.2da file we only need one column. To remove the other one, right-click on either row: Select Remove Column from the menu: A window called Removing columns… will appear: Click on Yes: This removes the column. If you want to insert a new column, right-click on the spot where this column should be inserted and select Insert Column from the menu: To add a column on the end, select Add Column from the menu: Our .2da file now has one column. For the time being we need only one row but we cannot remove any. Note that rows are numbered from 0, starting from the second row. Why? As mentioned before, the first column and the first row may serve to create a heading. This is not necessary in our case, so right-click on the first row: Select **** from the menu: This highlights that our file .2da does not have a column heading: Now double-click on the second row: Write leader_killed in the field: Then hit ENTER. That’s it. If you want to add other rows to this file in the future, right-click on the place where you want to insert another row and select Insert Row from the menu: To add a new row at the end, select Add Row from the menu: If we wanted our.2da file to contain column and row headings, we would have to select Fix / Unfix from the menu before saving the file: This would change the first column and the first row into headings. Later, to modify the file we would have to select Fix / Unfix from the menu, otherwise new columns or rows couldn’t be added. Our .2da file does not need any headings so we’ll leave it as it is. We need only save the file. To do this, select Save As… from the File menu: This opens the standard Windows window used for saving files. The Witcher’s .2da files are found in the Data\2DA folder. Open this folder, enter the name globaldlgflags and click on Save. Note that this file must be saved in the .2da format: If a different type of file is listed instead, it probably means that you’re trying to save the content in another open window by accident. Before saving the file, make sure that the new 2da editor window is active. If this window is inactive, the title bar will be grey: A different color means that the window is active: The asterisk before the window name means that the file has not been saved since the last change was introduced. Just as when saving templates, instead of choosing Save as… from the File menu, we can select Save new 2da editor. This will save the file directly in the module. Don’t do this now, however. Let’s go back to our conversation. Click the right-hand column opposite the Add Flags attribute in the After Flags section and select orders_received from the list: The list is arranged alphabetically. Now we’ve added the orders_received flag: Flags are characterized by two states – either the flag is true (numerical value 1) or false (value 0). When Geralt begins his conversation with Siegfried, he does not have a quest from him yet. Therefore the flag should be set to 0. To change the value, click the right-hand column opposite the orders_received flag and write 0. Then hit ENTER: If you want to delete a flag from the After Flags section (don’t confuse this with deleting flags in the Flags window), click the right-hand column opposite the flag and delete the existing value: Then hit ENTER. The flag will be automatically deleted from the After Flags section: If you have deleted a flag you can add it to the list again by selecting it and setting the appropriate value, i.e. 0. Now click on the “Done” node: In the Properties window, click the right-hand column opposite the Add Flags attribute in the After Flags section. Select orders_received from the list: Because the flag is automatically set on 1 (true), we do not need to change anything: Click the right-hand column opposite the Add Flags attribute again and select leader_killed from the list: This adds the leader_killed flag: However, we need to set the flag’s value to 0 because the bandit leader (Bandit leader) hasn’t been killed yet. Click the right-hand column opposite the leader_killed flag and enter the value 0. Then hit ENTER: These flags tell the game which conversation it should display and when. The conversation we will add in a minute will be only displayed when the orders_received flag’s value is 1 (true). We already know that the flag will have that value only after Geralt accepts Siegfried’s quest, i.e. after choosing the "Done” node. Finally, two important remarks. Quest conversations’ flag properties are only modifiable in the After Flags section. Their values will be set after selecting a particular node. Also, when a player selects a quest node, i.e. one with a quest id, the conversation contained in this node will not be displayed during the next conversation.
|