adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Quests and Logs


From: ksterker
Subject: [Adonthell-devel] Quests and Logs
Date: Tue, 13 Jul 2004 14:57:01 +0200

I had some thoughts about our quest system that keeps track of the player's 
progress in the game. For v0.3, it was possible to just set arbitrary flags and 
check them at need. This worked, since v0.3 wasn't very complex. But for v0.4, 
with its many different ways to solve a quest, we should use something more 
sophisticated. Also, we need to be able to record the players progress in the 
log book.

So the idea is to define the quests in advance, with help of a small graphical 
editor. That way, all flags and counters that belong to a quest are available 
in one central place. They can then be accessed from dialogues, event or 
schedule scripts. If scripts try to access a non-existant flag an error will be 
raised. That means a bit more planning in advance, but will help to make things 
simpler in the end.

All quests consist of several steps, where each step contains a flag indicating 
that something has happened, just like the old approach. Furthermore, each step 
would have a log entry attached to it. Upon completion, this will be copied 
into the log book.

The steps of a quest would be arranged as a hierarchical model, i.e. a tree. 
The leaves would be the individual steps that can be directly triggered from 
events and dialogues. That means, those can be set to 'completed'. Steps can 
also be grouped into larger tasks. Whether a task is completed can be 
calculated from the state of the individual steps. For example, a task might 
require (step 1 and step 2) or step 3 in order to be completed. That way, 
scripts that are only interested in the completion of the task, can query that 
task and need not deal with the different ways the task can be completed. 
Several tasks can again be grouped together to larger tasks, until we reach the 
root, which represents the whole quest. A quest could then look as follows:

Quest xyz
   Task 1
      Task 1a
        Step 1
        Step 2
        Step 3
      Task 1b
        Step 4
        Step 5
      Task 1c
        ...
   Task 2
     ...

Individual steps could represent various things: getting special information 
from an NPC, finding a certain item or anything else that can be achieved with 
some python script.


The order in which steps must be completed is irrelevant for the quest 
'storage'. The different scripts that implement the plot must make sure that 
things that require a task or step to be completed will not happen before that 
task or step isn't complete.

Kai





reply via email to

[Prev in Thread] Current Thread [Next in Thread]