A Development Tutorial: Chapter 04
|A Development Tutorial: Chapter 4|
|Get the developer tools and try building new content for this game!|
|This Chapter||04: NPC Dialogues|
|More Chapters||Title Page|
Development Kit Setup
The World Map Editor
Create a 2-Map Zone
Monsters, Loot, and Scripts
Tracking Quest Progress
Setup of Scripting Environment
Understanding Quest Scripts
Dialogue: The "SAY" Menu
Floating FA Text
Dialogues vs Scripts
Simple Kill Quest
Mysterious Stranger Perk
Black Jack Game
Black Jack Installation
Okay, let's continue from Chapter 3, developing our new in-game player tutorial. This robot shall give useful information for new players who never played any FOnline games and are used to the original Fallout1/2/3/New Vegas etc games. So, our robot shall teach the new players how to be self sufficient, how to gather resources, harvest, make tents etc. It should introduce the old quality of questing/talking to NPC's where the NPC reacted to the character's stats, actions etc.
Step by step:
- Launch the Dialog Editor (Tools\DialogEditor)
- Create a new dialog by pressing the Add Tree. Name your dialog engl. (This isn't actually it's name, but it's language type, it should be "engl" always, unless you want the dialog in a different language, but don't ask me about it)
- You will get a node named Predialogue Installations. This node is responsible for the initial reaction of the NPC to the player.
- For now let's make a new dialog. On the botton, select Dialog tabpage. For text enter the text the NPC will say, for example: "The robot scans you briefly then greets you. Hi. I'm TuRo MKI.". Edit the dialog number to a unique number, this time 200, and Add Dialog.
- This dialog will need answers as well, from which the player can choose from. Select the newly added dialog, on the bottom select answer tabpage, and add two answers:
- First answer with text: "Hi yourself, Robot.", set the radio button to Other->Close dialog. This will make your robot interactive, but NPC's only have one option, to leave the conversation at first answer.
- Second answer with text: "Hi. I'm lost.", set the radio button to On dialog and leave the number at default value or set it to 200. This answer might generate an infinite loop, bc it will always get the player back to where the Robot says Hi. In order to advance the dialog we need more dialogues, but for presentation purposes this should do.
- Now set the predialogue installations. Add an answer to it: "I don't know you" and link it so, that the answer takes the player to the first dialog (200). This will make the Robot react to the players by always saying Hi.
- To give a meaning to the "I don't know you" answer, we can introduce a demand constraint. Go to Demands,select Var: "name_mem_npc_player", set the equation sign to "==" and enter the value "0".
- Add a Result to this answer as well: Var "name_mem_npc_player", set the equation sign to "=" and enter "1" for value. Also select NPC from the radio box and add the Result.
- This way we made our Robot to interact with each NPC only once.
- Other requirements can be included as well, like required Strength, or Intelligence, or simply make the robot talk at a different level of language if the player has low Intelligence. The example below shows this.
- Save the dialog with a name you remember, for example: tut_dialog1.fodlg
- For next step, we need to link the dialog with the Robot.
- First, you need to edit the file named dialogs.lst in Server\Dialogs to include the new dialog. Just copy a line and give a unique ID for the dialog file, I used 2100. Try to keep the order and structure of this dialogs list file.
- Use the Mapper to add this dialog to the Robot. Simply select the robot, and at dialogs enter this number.
- Save the map, delete world save files, launch server, try.
I made a little bit more complex dialog for my robot - feel free to understand it and try it. Basically the robot detect the players Intelligence and greets him accordingly. The player can gather some extra information if he has high Perception. The successful scenario ends in the robot giving the player a task to gather flint, so the robot can teach him how to craft a tool.
Here is how it looks. (click on images for normal size)