Version 7 (modified by dafrick, 16 years ago) (diff) |
---|
Questsystem
Author
Description
This project aims at implementing a system capable of handling quests.
Timetable
Date | What |
15. oct. 2008 | Project design |
22. oct. 2008 | Start implementation |
29. oct. 2008 | continue implementation |
5. nov. 2008 | Tidying and testing, starting implementation of QuestEffectBeacon |
12. nov. 2008 | Finishing Quests and Effects |
19. nov. 2008 | Finishing QuestEffectBeacon |
26. nov. 2008 | Testing, documenting, fail proofing… |
3. dec. 2008 | Project finished, thinking about something to do… |
10. dec. 2008 | Buffer, preparing presentation. |
17. dec. 2008 | Orxonox Presentation |
Classtree
More details
The project essentially consists of the Quest entity which is the quest itself (and sub- or helper-entities, such as QuestHint (hints for quest) or QuestDescription (descriptions for quests and hints, to separate content from function)) and the QuestEffect entity which is is the only tool for quests to have an influence on the world. By enabling quests to have QuestEffects their are able to (for example) fail or complete other quests, activate hints give rewards or even trigger quests. The QuestEffectBeacon is the physical entity which finally makes quests available fot the player in the game, by being able to activate a QuestEffect on a player (under some conditions).
Creating Quests
Creating the Quest-Hierarchy
You firstly have to create a Quest-Hierarchy in the XML-Levelfile by nesting many quests. There are two types of Quests you can use, the LocalQuest and the GlobalQuest.
LocalQuest
A 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.
Creating a LocalQuest in XML goes as follows:
<LocalQuest id="questId"> //Where questId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information <QuestDescription title="Title" description="Description." /> //The description of the quest. <subquests> <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. ... <Quest id="questIdn" /> </subquests> <hints> <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those. ... <QuestHint id="hintIdn" /> </hints> <fail-effects> <QuestEffect /> //A list of QuestEffects, invoked when the Quest is failed, see QuestEffect for the full XML representation. ... <QuestEffect /> </fail-effects> <complete-effects> <QuestEffect /> //A list of QuestEffects, invoked when the Quest is completed, see QuestEffect for the full XML representation. ... <QuestEffect /> </complete-effects> </LocalQuest>
GlobalQuest
GlobalQUests are different, they can be obtained by every player but the changes made to the Quest (i.e. completion of the Quest) 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.
Creating a GlobalQuest in XML goes as follows:
<GlobalQuest id="questId"> //Where questId is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information <QuestDescription title="Title" description="Description." /> //The description of the quest. <subquests> <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. ... <Quest id="questIdn" /> </subquests> <hints> <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those. ... <QuestHint id="hintIdn" /> </hints> <fail-effects> <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is failed, see QuestEffect for the full XML representation. ... <QuestEffect /> </fail-effects> <complete-effects> <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is completed, see QuestEffect for the full XML representation. ... <QuestEffect /> </complete-effects> <reward-effects> <QuestEffect /> //A list of QuestEffects, invoked on the player completing this quest. See QuestEffect for the full XML representation. ... <QuestEffect /> </reward-effects> </GlobalQuest>
As 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.
Attachments (5)
- questsystem.png (65.7 KB) - added by dafrick 16 years ago.
-
questsystem2.png
(71.1 KB) -
added by dafrick 16 years ago.
Classtree of the Questsystem project
-
questsystem3.png
(73.0 KB) -
added by dafrick 16 years ago.
Classtree of the Questsystem project
- questsystem4.png (104.1 KB) - added by dafrick 16 years ago.
-
questsystem5.png
(175.1 KB) -
added by dafrick 14 years ago.
Classtree of questsystem module
Download all attachments as: .zip