Quest scripts syntax for AI
This is the syntax to create a quest script.
Any line starting with # is a comment. We add at the start of the file the name and prerequisites as comments.
The quest script is divided in steps. Each one being separated with this line:
... NoRepeat
This line tells the engine to create a new step. Only the first step does not have the ... line
Every step starting from the second one, start with a comment stating the step number, this is important for readability. Example:
- Step 2
Each step can have a prerequisite step to be executed, example step 3 will require step 2 to be executed. If you have parallel steps, then the requirement for step 3 and step 4 can all point to step 2.
Requiments are expressed like this, where we substitute <quest name> with the name of the quest:
Require completion of <quest name> step 2.
Every step must have a P: line with the questid plus a progressive number, which corresponds to the step. Example, assuming our quest number is 1500, and step is 2:
P: 15002
Every step must have a Menu: line . This is what the player will select from the possible speak options. Example:
Menu: Hello, who are you?
Every step must have a line with the answer from the NPC, which starts with the name of the NPC, example:
Harnquist: I'm the local blacksmith!
Every step must have a quest note that goes into the player journal summarizing what he accomplished or learned in that step. Example:
QuestNote You met Harnquist the local blacksmith.
- Quest name