Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 4 and Version 5 of code/doc/Questsystem


Ignore:
Timestamp:
Nov 26, 2008, 9:17:36 AM (15 years ago)
Author:
dafrick
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Questsystem

    v4 v5  
    3030== Creating Quests ==
    3131
     32=== Creating the Quest-Hierarchy ===
     33You firstly have to create a Quest-Hierarchy in the XML-Levelfile by nesting many quests.
     34There are two types of Quests you can use, the LocalQuest and the GlobalQuest.
     35
     36==== LocalQuest ====
     37A LocalQuest is a Quest which has different states for each player, that means each LocalQuest can be obtained and completed (or failed) by each player parallely.
     38
     39Creating a LocalQuest in XML goes as follows:
     40{{{
     41<LocalQuest id="questId"> //Where questId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
     42    <QuestDescription title="Title" description="Description." /> //The description of the quest.
     43    <subquests>
     44        <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
     45        ...
     46        <Quest id="questIdn" />
     47    </subquests>
     48    <hints>
     49        <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
     50        ...
     51        <QuestHint id="hintIdn" />
     52    </hints>
     53    <fail-effects>
     54        <QuestEffect /> //A list of QuestEffects, invoked when the Quest is failed, see QuestEffect for the full XML representation.
     55        ...
     56        <QuestEffect />
     57    </fail-effects>
     58    <complete-effects>
     59        <QuestEffect /> //A list of QuestEffects, invoked when the Quest is completed, see QuestEffect for the full XML representation.
     60        ...
     61        <QuestEffect />
     62    </complete-effects>
     63</LocalQuest>
     64}}}
     65
     66==== GlobalQuest ====
     67GlobalQUests are different, they can be obtained by every player but the changes made to the Quest (i.e. completion of the Quest)
     68 affect all owners of the Quest. In short. There are 3 Players, A, B and C. Player A obtains the Quest, a while later player B obtains the Quest and completes it. Since it is a GlobalQuest it is completed for all Players having obtained the Quest which means it is also completed for player A. Player C though, never having obtained the Quest, can now never complete this Quest.
     69
     70Creating a GlobalQuest in XML goes as follows:
     71{{{
     72<GlobalQuest id="questId"> //Where questId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information
     73    <QuestDescription title="Title" description="Description." /> //The description of the quest.
     74    <subquests>
     75        <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
     76        ...
     77        <Quest id="questIdn" />
     78    </subquests>
     79    <hints>
     80        <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
     81        ...
     82        <QuestHint id="hintIdn" />
     83    </hints>
     84    <fail-effects>
     85        <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is failed, see QuestEffect for the full XML representation.
     86        ...
     87        <QuestEffect />
     88    </fail-effects>
     89    <complete-effects>
     90        <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is completed, see QuestEffect for the full XML representation.
     91        ...
     92        <QuestEffect />
     93    </complete-effects>
     94    <reward-effects>
     95        <QuestEffect /> //A list of QuestEffects, invoked on the player completing this quest. See QuestEffect for the full XML representation.
     96        ...
     97        <QuestEffect />
     98    </reward-effects>
     99</GlobalQuest>
     100}}}
     101
     102As you may see, the difference between a GlobalQuest also lies in the fact of the GlobalQuest having RewardEffects. RewardEffects are only executed on the completing player, while CompleteEffects are executed on all player having obtained the Quest before it is completed, when it is completed.