What is a "Quest"?

Source: Modmaker's Guide to the Galaxy
The name Quest system is somewhat misleading, as the system ended up being used for a lot of scripting that has nothing to do with "quests" (as in "missions"). However, that's what the thing's called in code and filenames so we're calling it that hereā€¦

To put it simply, the Weird Worlds Quest System is a text-based file format that allows you to make simple scripts to display text and images, as well as affect the gameplay in a variety of ways. You can use it to set up conditions that trigger an event, or different events depending on player actions. Even simple "programming" and communication between different quests is possible with user-defined variables. All quests are .ini files located in gamedata/quests under the default or a mod folder.

Typical Quest Structure:

  • FLAG
  • KEYS
  • STAR (up to 4 star blocks per quest, numbered 0 to 3)
  • CONDITION (up to 10 condition blocks per quest, numbered 0 to 9)
  • PAGE (up to 10 pages per quest, numbered 0 to 9)
  • END

Start with a FLAG

Quest .ini files always have to start with the FLAG entry. This FLAG line tells the computer / game when to run that particular quest. Without a flag, it'll just never happen. The following flags can be entered on the FLAG line.

  • always - The quest is always activated at the beginning of each and every game, never randomized.
  • event - The quest may appear as a "random event".
  • ally - The quest is chosen randomly, and can add an allied ship to your flotilla.
  • mainquest - A single mainquest (chosen randomly) is loaded once every 5 games.
  • tutorial - The "quest" is used for tutorial messages.
  • gamemsg - The "quest" is used for miscellaneous game messages.
  • never - The quest can only be activated by the mission settings, not by any other random or always method.

In general, you should only have one flag per quest. There can be exceptions, but you should proceed carefully, as combinations haven't been documented well. Within the game, there are only 3 quests that use two flags, and none that use more. The Damocles quest uses "ally mainquest". The game_brass and game_pirate quests use "never gamemsg". Anything beyond those two combos is uncharted territory, and may crash or behave unexpectedly.1

KEYS are optional

After the FLAG line, many quests use a KEYS line. This works like KEYS anywhere else in the game - once one quest with a particular key has loaded, no other quests with that same key will be selected.

In the case of randomly selected quests like those with the flag ally or event, you'll get one quest with that key, chosen at random. There's also a chance you won't get any quests with that key, if your total number of quests without that key is equal to or greater than the ALLY or EVNT line in distribution.ini.

In the case of quests with the flag always, they load in the order they appear on the list in your game.ini file. This means that only the first one with a particular key will load, and it will load every time. Any subsequent quests with the same key will never load. If you have two quests with the same key, one of which is set for always and the other for event, the always quest will always load first, and the event will never trigger.

Command List:

To the best of my knowledge, this is a complete list of commands available for each part of a quest. Most of this data came from the Modmaker's Guide To The Galaxy, but some of it was supplemented with information from !gamedata_files.txt and similar files.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License