Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 23 and Version 24 of code/doc/Questsystem


Ignore:
Timestamp:
Mar 20, 2010, 9:46:58 AM (14 years ago)
Author:
dafrick
Comment:

spelling…

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Questsystem

    v23 v24  
    1616
    1717== More details ==
    18 The project essentially consists of the Quest entity which is the quest itself (and sub- or helper-entities, such as QuestHint (hints for quests) or QuestDescription (descriptions for quests and hints, to separate content from function)) and the QuestEffect and QuestListener entities which are the only tools for quests to have any influence on the gameworld. By enabling quests to have QuestEffects their are able to (for example) fail or complete other quests, activate hints give rewards or even add a quest to a player. QuestListeners on the other hand can be used by any objetc to react to a status change of a Quest.
     18The project essentially consists of the Quest entity which is the quest itself (and sub- or helper-entities, such as QuestHint (hints for quests) or QuestDescription (descriptions for quests and hints, to separate content from function)) and the QuestEffect and QuestListener entities which are the only tools for quests to have any influence on the game world. By enabling quests to have QuestEffects their are able to (for example) fail or complete other quests, activate hints give rewards or even add a quest to a player. QuestListeners on the other hand can be used by any object to react to a status change of a Quest.
    1919The QuestEffectBeacon is the physical entity which finally makes quests available for the player in the game, by being able to invoke a QuestEffect on a player (under some conditions).
    2020
     
    2626
    2727==== LocalQuest ====
    28 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.
     28A 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 in parallel.
    2929For generating the questId you can [http://www.google.com/search?q=guid+generator google] or you can use this [http://www.famkruithof.net/uuid/uuidgen generator].
    3030
     
    9595
    9696==== QuestHint ====
    97 QuestHints can be used to give a player useful (or just funnily unuseful) information for Quests he is working on completing. The cannot have any sideeffects but also have an identifier which follows the same form as in the Quests.
     97QuestHints can be used to give a player useful information for Quests he is working on completing. The cannot have any side effects but also have an identifier which follows the same form as in the Quests.
    9898
    9999
     
    113113}}}
    114114
    115 === Creating Sideeffects ===
    116 Quests can have sideeffects, this means that they can have an influence on the game world. Quests can do that through two distinct devices, QuestEffects and QuestListeners (active and passive).
     115=== Creating side effects ===
     116Quests can have side effects, this means that they can have an influence on the game world. Quests can do that through two distinct devices, QuestEffects and QuestListeners (active and passive).
    117117
    118118==== QuestEffect ====
    119 A QuestEffect is the first (and probably most important) device for Quests to have sideeffects. There are two entities that can have QuestEffects: Quests and QuestEffectBeacons (which will be explained later on).
     119A QuestEffect is the first (and probably most important) device for Quests to have side effects. There are two entities that can have QuestEffects: Quests and QuestEffectBeacons (which will be explained later on).
    120120QuestEffects, for example, start a Quest for a player, complete/fail Quests for a player, add a QuestHint or a Reward to a player.
    121121
     
    162162
    163163==== QuestListener ====
    164 The QuestListener is the second device you can use to create sideeffects. But other than QuestEffects (that are executed (or invoked) eighter as a result of failing or completing a Quest or by a QuestEffectBeacon) QuestListeners are passive. QuestListeners have a certain mode (all, start, complete or fail) and a Quest to which they belong to (resp. to which they react). You then can use QuestListeners to make basically any object aware of when the status of the given Quest changes (the way you defined through the mode) and take any action you may think of.
     164The QuestListener is the second device you can use to create side effects. But other than QuestEffects (that are executed (or invoked) eighter as a result of failing or completing a Quest or by a QuestEffectBeacon) QuestListeners are passive. QuestListeners have a certain mode (all, start, complete or fail) and a Quest to which they belong to (resp. to which they react). You then can use QuestListeners to make basically any object aware of when the status of the given Quest changes (the way you defined through the mode) and take any action you may think of.
    165165
    166166{{{
     
    174174}}}
    175175
    176 I hope this example has made the QuestListener a little clearer. The QuestListener actually reacts exactly as any Trigger or EventListener would (allthough the QuestListener is really neighter the one nor the other) whcih means you can use it in exactly the same as you would use one of the above, it just reacts to a different thing. Namely to the change ina Quests status.
     176I hope this example has made the QuestListener a little clearer. The QuestListener actually reacts exactly as any Trigger or EventListener would (although the QuestListener is really neighter the one nor the other) which means you can use it in exactly the same as you would use one of the above, it just reacts to a different thing. Namely to the change in a Quests status.
    177177
    178178=== Putting the Quests in the game world ===
     
    202202
    203203The QuestEffectBeacon can only be executed a defined number of times (where -1 times stands for an infinite number of times) and the QuestEffects are invoked whenever the method 'execute' is called, which is (indirectly through an EventListener, because I wanted to attach the PlayerTrigger so that his position is always relative to the QuestEffectBeacons position) done by the PlayerTrigger.
    204 A PlayerTrigger is a special sort of Trigger that knows the player that triggered the Trigger and therefore can be asked who triggered him and that way allows theQuestEffects to be executed on the right player. So far only DistanceTrigger is a PlayerTrigger and the target of the DistanceTrigger is a ControllableEntity (or an object that is derived form the ControllableEntity).
     204A PlayerTrigger is a special sort of Trigger that knows the player that triggered the Trigger and therefore can be asked who triggered him and that way allows the QuestEffects to be executed on the right player. So far only DistanceTrigger is a PlayerTrigger and the target of the DistanceTrigger is a ControllableEntity (or an object that is derived form the ControllableEntity).
    205205
    206206== Example Quest ==
    207 To get your head around all of this and see some of the things mentiond here in action you might want to check out the "The Tale Princess Aeryn"-Quest (Levelfile: princessaeryn.oxw) in the level-folder of the media repository.
     207To get your head around all of this and see some of the things mentioned here in action you might want to check out the "The Tale Princess Aeryn"-Quest (Levelfile: princessaeryn.oxw) in the level-folder of the media repository.