-
-
Notifications
You must be signed in to change notification settings - Fork 33
quests
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 loaded.
- whenever you select START GAME at the main menu, the Default Quest, located at quests/default.qst, is loaded;
What if, as a player, you want to load an arbitrary quest? Go to the options screen, highlight Stage select and then press RIGHT three times. You will hear a sound effect. Next, enter the developer mode.
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 also load a quest via scripting.
In this example, we will be examining a quest file to determine what the game engine reads from it. 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"
// 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:
- All lines beginning with
//
are comments and are ignored by the engine. -
name
: this is the name of the 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. 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.