From WorldForgeWiki
Jump to: navigation, search

Main page: Quest_Generation_Algorithm

Quest generation

Thoughts and hopefully implementable ideas on quest generation.

Factions and Plots

At least two factions (protagonist or antagonist) are needed to create a plot and thus quests for either side. What characteristics must a faction have and how can a plot be generated out of them? Some observations that might be of interest:

  • Factions have an attitude towards other factions. In the simplest case, this can be a float, with more positive values corresponding to a more friendly attitude.
  • Factions have access to assets, which have a total value relating roughly to the power of the faction.
  • Factions intend to do something (an action) to other factions. This is a manipulation of any of the parameters of the other faction, at the (possibly temporary) expense of assets. Actions may have a positive or negative effect on the parameter in question. The effect desired for a particular faction can be derived from the attitude toward that faction. For example, a strongly negative attitude towards faction B would result in a faction A desiring actions which reduce parameters that benefit faction B. Such actions could be:
    • reducing assets of the opposing faction (the obvious thing to do)
    • reducing attitudes of factions which have positive attitudes towards the opposing faction
    • increasing attitudes of factions towards that faction which have a negative attitude to the opposing faction (now it gets more complicated)
    • and so on... all a matter of desired complexity, but the first point will suffice for a simple implementation.
  • A faction may have a head which can be disabled in a special way (through fulfilling a special quest, to be defined), thereby affecting the faction in a profoundly negative way (obliterating it in the simplest case, throwing it severely back in its efforts in more complex cases). The head is an abstract concept, it might be an actual individual, composed of several individuals or even some entirely different entity. This will make for the possibility of "epic" quests at a later stage of implementation.


So in this model, a quest is something that the faction wants to be done to implement an action in accordance with its attitude towards another faction. In the simplest case, a quest results from carrying out some action for some faction.


Faction A:

The Good People (attitude towards B: -1.0, assets: 1.0)

Faction B:

Evil Overlord's Minions (attitude towards A: -1.0, assets: 1.5)

Actions for A:

Reduce assets of B (-0.1)

Actions for B:

Reduce assets of A (-0.1)


The quest is derived from possible implementations of a required action. Intermediate stages may be required to allow for more possibilities, for example something like a metaquest.

Metaquests for A:

  • kill evil minions
  • free slaves from factories

Metaquests for B:

  • kill good people
  • sabotage trade


Now, with some of the metaquests defined, it should be possible to generate the actual quests. These consist, in the simplest case, of checkpoints and a reward.

A checkpoint is something that has to be completed by using actual game mechanics in order to complete the quest, for example:

  • get a particular information (by talking to a npc)
  • get an item
  • kill character of other faction
  • reach some point in space (with or without an item)

This may require some randomizing. However, in the end, it is guaranteed that the actions will fit in with the goals of the faction for which the quest is carried out.

Open questions, current work and TODO

These are things that need to be thought through in more detail and possibilities for enhancements of the model in the next steps.

Predefined elements required

The method still requires a lot of predefined elements, especially in the form of checkpoints and, to some extent, metaquests. Most work will lie with creating the checkpoints, which can then combined into quests using the system which has been outlined.

Actions which influence attitudes

Influencing attitudes may make for more interesting quests in the long run (in fact, the majority of quests may be of this sort in a more advanced implementation. Arbitrary complexity could be reached. If other actions than changing assets are possible, there needs to be a system for factions to evaluate which action promises the most benefit to its goals.

Special properties of factions

Factions may have other properties which define their preference towards certain types of actions, or the effect a successful quest against their head has. This may be part of a system (not described here) to generate factions, which could influence the dynamics of quest generation to a great extent.

Attitudes towards characters

Factions could have attitudes not only towards other factions, but also towards characters, thus leading to a new class of actions and quests to implement those actions. Just as well, npcs could have attitudes towards factions and other characters. The attitude effect may become strong enough to make quests involving a certain character more important than quests relating to other factions. (This may be a generalization of the "head" concept.)

Prototype implementation

A simple implementation in Python with some checkpoints and metaquests in place could probably be done in not too much time.