Quests

From Open Surge Wiki
Revision as of 17:59, 20 January 2011 by Lunarrush (Talk | contribs) (Created page with '= Quests = Quests are files which contain a list of levels and quests which will be played in the specified order by the game engine. They are used when you want to provide your…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Quests

Quests are files which contain a list of levels and quests 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 customised experience without forcing them to go to the level selector, making the whole affair a more continuous one.

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 I wrote 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
// This is a selection object for Open Surge
// Originally designed for: Open Surge Lunar Mod
// Version 1.0
// Author: lunarrush
// -----------------------------------------------------
// quest properties
name            "Example Quest"
author          "lunarrush"
version         "0.2.0"
description     "An example of a quest"
image           "images/null.png" //because we don't have any specific image
show_ending     FALSE
// 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. 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: This is the version of the game required to play the quest. (Note: the commented version should state 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.
  • show_ending: This determines if you want the game to play it's built in ending after the player finishes your quest.
  • 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 when the next_level command is given to it. 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.