A Development Tutorial: Chapter 04: Difference between revisions

From FOnline: Reloaded Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
| image = AWikiEditor.gif
| image = AWikiEditor.gif
| description = Get the developer tools and try building new content for this game!
| description = Get the developer tools and try building new content for this game!
| status = wip
| status = Progress Stopped
| complete = 75%
| complete = 75%
| season = All Seasons
| authors = Slowhand
| authors = Slowhand
| chapter = 04: NPC Dialogues
| chapter = 04: NPC Dialogues
| chapters = [[A Development Tutorial|Title Page]]<br>[[A Development Tutorial: Chapter 01|Development Kit Setup]]<br>[[A Development Tutorial: Chapter 02|Making Maps]]<br>[[A Development Tutorial: Chapter 03|The World Map Editor]]<br>'''NPC Dialogues'''<br>[[A Development Tutorial: Chapter 05|Create a 2-Map Zone]]<br>[[A Development Tutorial: Chapter 06|Monsters, Loot, and Scripts]]<br>[[A Development Tutorial: Chapter 07|Tracking Quest Progress]]<br>[[A Development Tutorial: Chapter 08|Scenery Scripts]]<br>[[A Development Tutorial: Chapter 09|Dialogue-to-Quest Location]]<br>[[A Development Tutorial: Chapter 10|Locations: Public to Private]]<br>[[A Development Tutorial: Chapter 11|Setup of Scripting Environment]]<br>[[A Development Tutorial: Chapter 12|Understanding Quest Scripts]]<br>[[A Development Tutorial: Chapter 13|A Simple Quest]]<br>[[A Development Tutorial: Chapter 14|Dialogue: The "SAY" Menu]]<br>[[A Development Tutorial: Chapter 15|Basic Mechanics]]
| chapters = [[A Development Tutorial|Title Page]]<br>[[A Development Tutorial: Chapter 01|Development Kit Setup]]<br>[[A Development Tutorial: Chapter 02|Making Maps]]<br>[[A Development Tutorial: Chapter 03|The World Map Editor]]<br>'''NPC Dialogues'''<br>[[A Development Tutorial: Chapter 05|Create a 2-Map Zone]]<br>[[A Development Tutorial: Chapter 06|Monsters, Loot, and Scripts]]<br>[[A Development Tutorial: Chapter 07|Tracking Quest Progress]]<br>[[A Development Tutorial: Chapter 08|Scenery Scripts]]<br>[[A Development Tutorial: Chapter 09|Dialogue-to-Quest Location]]<br>Chapter 10<br>[[A Development Tutorial: Chapter 11|Setup of Scripting Environment]]<br>[[A Development Tutorial: Chapter 12|Understanding Quest Scripts]]<br>Chapter 13<br>[[A Development Tutorial: Chapter 14|Dialogue: The "SAY" Menu]]<br>Chapter 15<br>[[A Development Tutorial: Chapter 15.01|Lockpick Cooldown]]<br>[[A Development Tutorial: Chapter 16|Repeatable Locations]]<br>[[A Development Tutorial: Chapter 17|Floating FA Text]]<br>[[A Development Tutorial: Chapter 18|Roulette Game]]<br>[[A Development Tutorial: Chapter 19|Dialogues vs Scripts]]<br>[[A Development Tutorial: Chapter 20|Simple Kill Quest]]<br>Chapter 21<br>[[A Development Tutorial: Chapter 22|Mysterious Stranger Perk]]<br>[[A Development Tutorial: Chapter 23|Perk Installation]]<br>[[A Development Tutorial: Chapter 24|Black Jack Game]]<br>[[A Development Tutorial: Chapter 25|Black Jack Installation]]<br>[[A Development Tutorial: Chapter 26|Sound Effects]]<br>[[A Development Tutorial: Chapter 27|Pro Tips]]
}}
}}



Latest revision as of 21:12, 22 September 2018

A Development Tutorial: Chapter 4
Get the developer tools and try building new content for this game!
Season All Seasons
Status Progress Stopped
Completion 75%
Authors Slowhand
This Chapter 04: NPC Dialogues
More Chapters Title Page
Development Kit Setup
Making Maps
The World Map Editor
NPC Dialogues
Create a 2-Map Zone
Monsters, Loot, and Scripts
Tracking Quest Progress
Scenery Scripts
Dialogue-to-Quest Location
Chapter 10
Setup of Scripting Environment
Understanding Quest Scripts
Chapter 13
Dialogue: The "SAY" Menu
Chapter 15
Lockpick Cooldown
Repeatable Locations
Floating FA Text
Roulette Game
Dialogues vs Scripts
Simple Kill Quest
Chapter 21
Mysterious Stranger Perk
Perk Installation
Black Jack Game
Black Jack Installation
Sound Effects
Pro Tips
Notes {{{notes}}}


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)