A simple quest system for EvAdventure.

A quest is represented by a quest-handler sitting as .quest on a Character. Individual Quests are objects that track the state and can have multiple steps, each of which are checked off during the quest’s progress.

The player can use the quest handler to track the progress of their quests.

A quest ending can mean a reward or the start of another quest.

class evennia.contrib.tutorials.evadventure.quests.EvAdventureQuest(quester, start_step=None)[source]

Bases: object

This represents a single questing unit of quest.


name (str): Main identifier for the quest. category (str, optional): This + name must be globally unique.

it ends - it then pauses after the last completed step.

Each step of the quest is represented by a .step_<stepname> method. This should check the status of the quest-step and update the .current_step or call .complete(). There are also .help_<stepname> which is either a class-level help string or a method returning a help text. All properties should be stored on the quester.

Example: py class MyQuest(EvAdventureQuest):

‘’’A quest with two steps that ar’’’

start_step = “A”

help_A = “You need a ‘_quest_A_flag’ on yourself to finish this step!” help_B = “Finally, you need more than 4 items in your inventory!”

def step_A(self, *args, **kwargs):
if self.quester.db._quest_A_flag == True:

self.quester.msg(“Completed the first step of the quest.”) self.current_step = “end” self.progress()

def step_end(self, *args, **kwargs):
if len(self.quester.contents) > 4:

self.quester.msg(“Quest complete!”) self.complete()

key = 'basequest'
desc = 'This is the base quest class'
start_step = 'start'
completed_text = 'This quest is completed!'
abandoned_text = 'This quest is abandoned.'
help_start = 'You need to start first'
help_end = 'You need to end the quest'
__init__(quester, start_step=None)[source]

Initialize self. See help(type(self)) for accurate signature.

property questhandler
property current_step

Call when quest is abandoned.


Call this to end the quest.

progress(*args, **kwargs)[source]

This is called whenever the environment expects a quest may need stepping. This will determine which quest-step we are on and run step_<stepname>, which in turn will figure out if the step is complete or not.

  • *args – Will be passed into the step method.

  • **kwargs

    Will be passed into the step method.


This is used to get help (or a reminder) of what needs to be done to complete the current quest-step.


str – The help text for the current step.

step_start(*args, **kwargs)[source]

Example step that completes immediately.


This is called both when completing the quest, or when it is abandoned prematurely. Make sure to cleanup any quest-related data stored when following the quest.

class evennia.contrib.tutorials.evadventure.quests.EvAdventureQuestHandler(obj)[source]

Bases: object

This sits on the Character, as .quests.

It’s initiated using a lazy property on the Character:

@lazy_property def quests(self):

return EvAdventureQuestHandler(self)

quest_storage_attribute_key = '_quests'
quest_storage_attribute_category = 'evadventure'

Initialize self. See help(type(self)) for accurate signature.


Check if a given quest is registered with the Character.

  • quest_key (str) – The name of the quest to check for.

  • quest_category (str, optional) – Quest category, if any.


bool – If the character is following this quest or not.


Get the quest stored on character, if any.


quest_key (str) – The name of the quest to check for.


EvAdventureQuest or None

The quest stored, or None if

Character is not on this quest.


Add a new quest


quest (EvAdventureQuest) – The quest class to start.


Remove a quest. If not complete, it will be abandoned.


quest_key (str) – The quest to remove.


Get help text for a quest or for all quests. The help text is a combination of the description of the quest and the help-text of the current step.


quest_key (str, optional) – The quest-key. If not given, get help for all quests in handler.


list – Help texts, one for each quest, or only one if quest_key is given.

progress(quest_key=None, *args, **kwargs)[source]

Check progress of a given quest or all quests.

  • quest_key (str, optional) – If given, check the progress of this quest (if we have it), otherwise check progress on all quests.

  • *args – Will be passed into each quest’s progress call.

  • **kwargs

    Will be passed into each quest’s progress call.