Quests

From Open Surge Wiki
Jump to: navigation, search

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-users 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 quests/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

Basic

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.

Advanced

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

opensurge --quest quests/my_quest.qst

If you're script-savvy, you can load a quest through scripting.

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.