A Development Tutorial: Chapter 07: Difference between revisions
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 = | | status = Progress Stopped | ||
| complete = 75% | | complete = 75% | ||
| season = All Seasons | |||
| authors = Slowhand | | authors = Slowhand | ||
| chapter = 07: Tracking Quest Progress | | chapter = 07: Tracking Quest Progress | ||
| 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>[[A Development Tutorial: Chapter 04|NPC Dialogues]]<br>[[A Development Tutorial: Chapter 05|Create a 2-Map Zone]]<br>[[A Development Tutorial: Chapter 06|Monsters, Loot, and Scripts]]<br>'''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 | | 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>[[A Development Tutorial: Chapter 04|NPC Dialogues]]<br>[[A Development Tutorial: Chapter 05|Create a 2-Map Zone]]<br>[[A Development Tutorial: Chapter 06|Monsters, Loot, and Scripts]]<br>'''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:15, 22 September 2018
A Development Tutorial: Chapter 7 | |
---|---|
Get the developer tools and try building new content for this game! | |
Season | All Seasons |
Status | Progress Stopped |
Completion | 75% |
Authors | Slowhand |
This Chapter | 07: Tracking Quest Progress |
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}}} |
The next important thing with dialogues is to track the progress of a given quests. For this, we will need to create a game variable, track it through the dialog and through other actions of the player as well.
Step by Step:
- Make a quest variable:
- Launch DialogEditor, use the Vars editor tabpage on the top.
- Enter a fitting name, (like "q_tut1" - q for quest, tut1 for tutorial1)
- Enter a unique number for Num, one that is not used, for easy access I used 3, but a number in higher range should be used.
- Set the radio box to Local, leave the checkboxes unchecked.
- Click Add.
- If it fails, this is how you can make it the harder way:
- Open for edit the variable text-file list in your server's script forlder: Server\scripts\_vars.fos
- Add the following lines at their respective places (use your unique Num, not mine which was 3):
- Add the header lines somewhere at the start of the text file, keeping the ordering by Num:
- #define LVAR_q_turo (3)
- Add the body lines somewhere where similar lines are, exact place depending on your Num:
- $ 3 1 q_turo 0 0 1000 0
- **********
- TuRo progress.
- **********
- Create or modify your dialog to support the new quest variable:
- Add a new Dialog with an Answer, which will end the dialog.
- To the Answer add a Result, which will set the new quest variable to 10.
- Add a new Answer to Predialogue Installations, which will lead to a dialog, that will be the progress of the quest.
- Add a Demand to this answer, that requires the quest variable to be 10.
This is how it looks at my end:
(image soon)
On the above picture, the tutorial robot will check if the quest variable (q_turo_prog) is 10, which means that the player has reached a point in the conversation with the robot, where the robot will ask him, to gather some flint and use his Fix-Boy to make a primitive tool.
(image soon)
On the above picture, the tutorial robot will ask the player to make a primitive tool and to mark the progress so far, will set the quest variable to 10, and exit the dialog. Next time when the player talks to the robot, it will jump to dialog 9 where the robot asks if the task is done. Here the robot checks if the player has a primitive tool on him, and will progress further if so.
This was only a part of the Tutor Robot quest, but enough to point out the example, how to progress using a quest variable. Of course, other dialogues would lead to incrementing or setting back to quest variable to other values, and because of the Predialogue installation Answer Demands, the right dialog will be selected for the current progress of the quest.