[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:cavesomething:guide_to_quest_dialogs

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Sun May 30 20:18:11 CDT 2010


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2010/05/30 20:18
User        : cavehippo
Edit Summary: document setwhen

@@ -567,11 +567,17 @@
  A quest step looks like this:
  
  <code>
  step 40
+ finishes_quest
  description
- I have spoken to Mork, and he has given me the key to Mork's treasure room
+ I have found another way through the gate.
  end_description
+ setwhen
+ scorn/PortGate finished
+ scorn/CityGate finished
+ scorn/ScornHero <=10
+ end_setwhen
  end_step
  </code>
  
  entries are as follows:
@@ -583,8 +589,85 @@
  === finishes_quest ===
  
  If this line is present in the quest step, then being advanced to this step causes the quest to be marked as 'complete.'
  
+ 
+ === setwhen ===
+ This is used in a block, until 'end_setwhen' appears
+ every line in between contains a condition in the form of a quest and a stage requirement.
+ 
+ Every time a quest is updated, all other quests are checked to see if the conditions to advance are met.
+ 
+ A condition can take one of the following forms:
+ 
+ questcode n (the quest questcode must be at step n)
+ questcode <=n (the quest questcode must not be beyond step n)
+ questcode m-n (the quest questcode must be between steps m and n)
+ questcode finished (the quest questcode must have been completed)
+ 
+ Where m and n are positive integers.           
+ 
+ From the example above:
+ <code>
+ setwhen
+ scorn/PortGate finished
+ scorn/CityGate finished
+ scorn/ScornHero <=10
+ end_setwhen
+ </code>
+ 
+ This will trigger when the quest scorn/PortGate is finished, and when scorn/CityGate is finished, and when scorn/ScornHero is at step 10 or earlier.
+ 
+ If these conditions are never met at the same time (if the player were beyond step 10 in scorn/ScornHero before completing the other two quests, say) then the player will not advance to step 40 through meeting the conditions. (it is, however, still possible to advance to this stage by some other means, such as a script triggered on a map).
+ 
+ Quests will not go to an earlier step than the one they are on currently as a result of conditions, and when several steps meet the conditions to advance at the same time, then they will only advance once, to the latest (biggest numbered) step where all conditions match.
+ 
+ ==Warning==
+ 
+ Advancing a quest may trigger further quests to advance, in this way it can be possible to have one quest be advanced to several steps sequentially. - However you should be careful with very complex dependancies.
+ 
+ Consider the following example:
+ 
+ <code>
+ quest foo
+ step 10
+ finishes_quest
+ end_step
+ end_quest
+ 
+ quest bar
+ step 10
+ finishes_quest
+ setwhen
+ foo finished
+ end_setwhen
+ end_step
+ end_quest
+ 
+ quest baz
+ step 10
+ setwhen
+ foo finished
+ end_setwhen
+ end_step
+ step 20
+ setwhen
+ bar finished
+ end_setwhen
+ end_step
+ step 30
+ setwhen
+ bar finished
+ baz 10
+ end_setwhen
+ end_step
+ end_quest
+ </code>
+ 
+ Here quests bar and baz update in response to quest foo, if quest foo is finished, then bar and baz will update, but it is **Not Defined** which order they will update in. 
+   * If bar is updated first, then quest baz will go straight to step 20, 
+   * If baz is updated first, then it will go to step 10, then bar will update, then baz will go to step 30. 
+ ie; The end result will depend on the order in which the quests update, you have no way to know what this will be.
  
  === link_region ===
  
  ** TODO **


IP-Address  : 81.141.60.236
Old Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs?rev=1273914103
New Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:guide_to_quest_dialogs

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list