Difference between revisions of "Quests"

From Open Surge Engine Wiki
Jump to: navigation, search
m
Line 1: Line 1:
 +
== Overview ==
 
Quests are lists of levels. More precisely, quests are human-readable .qst files, located at the ''quests/'' folder, which contain a list of levels which will be played in the specified order by the game engine. They are used when you want to provide your end-user with a customized experience without forcing them to go to the level selector, making the whole affair a more continuous one.
 
Quests are lists of levels. More precisely, quests are human-readable .qst files, located at the ''quests/'' folder, which contain a list of levels which will be played in the specified order by the game engine. They are used when you want to provide your end-user with a customized experience without forcing them to go to the level selector, making the whole affair a more continuous one.
  
 
Facts:
 
Facts:
 +
* when the engine starts, the ''Introduction Quest'', located at ''quest/intro.qst'', is started.
 
* whenever you select '''START GAME''' at the main menu, the ''Default Quest'', located at ''quests/default.qst'', is executed;
 
* whenever you select '''START GAME''' at the main menu, the ''Default Quest'', located at ''quests/default.qst'', is executed;
* before the main menu, the ''Introduction Quest'', located at ''quest/intro.qst'', is started. You may use it to make cutscenes.
 
  
 
== Loading an arbitrary quest ==
 
== Loading an arbitrary quest ==
  
 
What if, as a player, you want to load an arbitrary quest? Older versions of the engine featured an "EXTRAS" option at the main menu. That is no longer the case. You may still access the list of available quests by going at the options screen, highlighting the "Stage select" option and then pressing LEFT three times. You will hear a sound effect. Then you press ENTER.
 
What if, as a player, you want to load an arbitrary quest? Older versions of the engine featured an "EXTRAS" option at the main menu. That is no longer the case. You may still access the list of available quests by going at the options screen, highlighting the "Stage select" option and then pressing LEFT three times. You will hear a sound effect. Then you press ENTER.
 +
 +
Alternatively, you may use the command line to load a quest of your choice. In a terminal, type
 +
opensurge --help
 +
for more details.
  
 
If you're script-savvy, you can load a quest through scripting. See: [[API Reference]].
 
If you're script-savvy, you can load a quest through scripting. See: [[API Reference]].
Line 45: Line 50:
  
 
The word '''hidden''' may be included, if you don't want your quest to appear in the quest selection screen.
 
The word '''hidden''' may be included, if you don't want your quest to appear in the quest selection screen.
 +
 +
== Extra keywords ==
 +
 +
This is an optional section.
 +
 +
There are some extra keywords that allow users to call some built-in screens of the engine. You may use those in your quest file. They are:
 +
 +
* <options>
 +
* <language_select>
 +
* <quest_select>
 +
* <stage_select>
 +
* <stage_select_debug>
 +
* <credits>
  
 
[[Category:MODs]]
 
[[Category:MODs]]
 
[[Category:Quests]]
 
[[Category:Quests]]

Revision as of 00:40, 11 February 2013

Overview

Quests are lists of levels. More precisely, quests are human-readable .qst files, located at the quests/ folder, which contain a list of levels which will be played in the specified order by the game engine. They are used when you want to provide your end-user with a customized experience without forcing them to go to the level selector, making the whole affair a more continuous one.

Facts:

  • when the engine starts, the Introduction Quest, located at quest/intro.qst, is started.
  • whenever you select START GAME at the main menu, the Default Quest, located at quests/default.qst, is executed;

Loading an arbitrary quest

What if, as a player, you want to load an arbitrary quest? Older versions of the engine featured an "EXTRAS" option at the main menu. That is no longer the case. You may still access the list of available quests by going at the options screen, highlighting the "Stage select" option and then pressing LEFT three times. You will hear a sound effect. Then you press ENTER.

Alternatively, you may use the command line to load a quest of your choice. In a terminal, type

opensurge --help

for more details.

If you're script-savvy, you can load a quest through scripting. See: API Reference.

Case Study: Examining a quest file

In this example, we will be examining a quest file to determine what the game engine reads from it. Note: This is not a true quest file, it is one which was written as an example. If you wish to examine quest files which are currently in use in the game, please look in the quests folder of your opensurge directory.

// -----------------------------------------------------
// example.qst
// Originally designed for: Open Surge Lunar Mod
// Version 1.0
// Author: lunarrush
// -----------------------------------------------------

// quest properties
name            "Example Quest"
author          "lunarrush"
version         "1.0"
description     "An example of a quest"
image           "images/null.png" // because we don't have any specific image

// level list (in order of appearance)
level           "levels/level1.lev"
level           "levels/cutscene1.lev"
level           "levels/level2.lev"
// ... these can go on to the n-th level

Some things you may note:

  • comments: All lines which begin with // are ignored by the engine.
  • name: This is the name of the quest.
  • author: This is the place where the authors of the levels should receive recognition. (Note that in the above example there are two author lines, one which is commented and one which isn't. As a convention, the one which isn't should display the name of the level designer and the commented one should display the name of the person who wrote the quest file.)
  • version: The version of the quest.
  • description: When people scroll over your quest within the game this will be the flavour text they see.
  • image: This will be the image which is displayed when people scroll over your quest. Its size must be 100x75 pixels.
  • level: These are the defined levels. They are placed in the order in which they will appear.

In the above example, we have defined the list of levels as "level1", "cutscene1", and "level2"; that means that the engine will load those levels in that order. Remember, one mistake in the quest will change the order in which the user will see your levels, so ensure that you have them in the order in which you wish them to be displayed.

The word hidden may be included, if you don't want your quest to appear in the quest selection screen.

Extra keywords

This is an optional section.

There are some extra keywords that allow users to call some built-in screens of the engine. You may use those in your quest file. They are:

  • <options>
  • <language_select>
  • <quest_select>
  • <stage_select>
  • <stage_select_debug>
  • <credits>