A Development Tutorial: Chapter 19
|A Development Tutorial: Chapter 19|
|Get the developer tools and try building new content for this game!|
|This Chapter||19: Dialogues vs Scripts|
|More Chapters||Title Page|
Development Kit Setup
The World Map Editor
Create a 2-Map Zone
Monsters, Loot, and Scripts
Tracking Quest Progress
The 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
Dialogues vs Scripts: Russian Roulette.
In this tutorial I will present two ways to write a Russian roulette game. The mechanic of the game is simple, the player can play Russian roulette with an NPC: A player puts a bet, a revolver has only 1 (in our example 2) bullet inside, the cylinder is rolled and the player pulls the trigger. If the player survives, he wins double, if not then... re-spawn time.
This example is used to illustrate how to solve the task in two different ways, one being without writing scripts (will use only pre-written scripts from dialogue.fos) the other with our own scripts.
Using only dialogues and the pre-written scripts from "dialogs.fos":
- Save this dialogue file: russian_roulette_onlydiag.fodlg to "Server\dialogs"
- Add the following line to "Server\dialogs\dialogs.lst": "$ 2250 russian_roulette_onlydiag"
- Add the dialogue number (2050) to an NPC in a map or on your usual test map.
Here is how it looks: