Tools:Questedit:Contents: Difference between revisions

From Adonthell
Jump to navigation Jump to search
m Reverted edits by ErnodElbos (Talk); changed back to last version by Ksterker
 
No edit summary
Line 1: Line 1:
----
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
----
=[http://ukusypumi.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
----
=[http://ukusypumi.co.cc CLICK HERE]=
----
</div>
''(Preliminary)''
''(Preliminary)''


== Overview ==
== Overview ==


<tt>Questedit</tt> is used to create the quest tree that represents all the quests available in the game and the steps required to complete them. The quest tree is necessary for:
&lt;tt>Questedit&lt;/tt> is used to create the quest tree that represents all the quests available in the game and the steps required to complete them. The quest tree is necessary for:


* keeping track of the player's progress in the game
* keeping track of the player's progress in the game
Line 16: Line 24:
==  Creating Quest Data File ==
==  Creating Quest Data File ==


Until the completion of the graphical quest editor (of which so far only the user interface designed with [http://glade.gnome.org/ glade] exists), a little Python script exists to create the quest tree from an XML file. The script is called <tt>convert_quests.py</tt> and is located in the ''test/'' directory [http://cvs.savannah.nongnu.org/viewcvs/adonthell/test/convert_quests.py?root=adonthell&only_with_tag=HEAD&view=markup]. To use it, run
Until the completion of the graphical quest editor (of which so far only the user interface designed with [http://glade.gnome.org/ glade] exists), a little Python script exists to create the quest tree from an XML file. The script is called &lt;tt>convert_quests.py&lt;/tt> and is located in the ''test/'' directory [http://cvs.savannah.nongnu.org/viewcvs/adonthell/test/convert_quests.py?root=adonthell&amp;only_with_tag=HEAD&amp;view=markup]. To use it, run


   python convert_quests.py <quest_tree.xml>
   python convert_quests.py &lt;quest_tree.xml>


The syntax of the XML file is the following:
The syntax of the XML file is the following:


   <quests>
   &lt;quests>
       <quest name="Quest_1">
       &lt;quest name="Quest_1">
           &lt;code>Part_1 and (Step_1 or Step_2)</code&gt;
           &amp;lt;code>Part_1 and (Step_1 or Step_2)&lt;/code&amp;gt;
           <log>
           &lt;log>
               <on_start>
               &lt;on_start>
                   <topic>Quest 1</topic>
                   &lt;topic>Quest 1&lt;/topic>
                   <text>Quest 1 Started</text>
                   &lt;text>Quest 1 Started&lt;/text>
                   <id>logbook.quest_1a</id>
                   &lt;id>logbook.quest_1a&lt;/id>
               </on_start>
               &lt;/on_start>
               <on_completion>
               &lt;on_completion>
                   <topic>Quest 1</topic>
                   &lt;topic>Quest 1&lt;/topic>
                   <text>Quest 1 Completed</text>
                   &lt;text>Quest 1 Completed&lt;/text>
                   <id>logbook.quest_1b</id>
                   &lt;id>logbook.quest_1b&lt;/id>
               </on_completion>
               &lt;/on_completion>
           </log>
           &lt;/log>
           <parts>
           &lt;parts>
               <quest name="Part_1">
               &lt;quest name="Part_1">
                   &lt;code>(Step_3 and Step_4) or (Step_4 and Step_5)</code&gt;
                   &amp;lt;code>(Step_3 and Step_4) or (Step_4 and Step_5)&lt;/code&amp;gt;
                   <parts>
                   &lt;parts>
                       <quest name="Step_3"/>
                       &lt;quest name="Step_3"/>
                       <quest name="Step_4"/>
                       &lt;quest name="Step_4"/>
                       <quest name="Step_5"/>
                       &lt;quest name="Step_5"/>
                   </parts>
                   &lt;/parts>
               </quest>
               &lt;/quest>
               <quest name="Step_1"/>
               &lt;quest name="Step_1"/>
               <quest name="Step_2"/>
               &lt;quest name="Step_2"/>
           </parts>
           &lt;/parts>
       </quest>
       &lt;/quest>
   </quests>
   &lt;/quests>


* '''quests''' is the root of the quest tree. It can contain ''1'' to ''n'' <tt>quest</tt> nodes as its only children.
* '''quests''' is the root of the quest tree. It can contain ''1'' to ''n'' &lt;tt>quest&lt;/tt> nodes as its only children.
* '''quest''' nodes represent a single node in the quest tree. They can have one <tt>code</tt>, <tt>log</tt> and <tt>parts</tt> element, either of which is optional. If no <tt>parts</tt> element is given, the node is a leaf of the quest tree. The <tt>name</tt> attribute is the name used to address the quest node from within the engine.
* '''quest''' nodes represent a single node in the quest tree. They can have one &lt;tt>code&lt;/tt>, &lt;tt>log&lt;/tt> and &lt;tt>parts&lt;/tt> element, either of which is optional. If no &lt;tt>parts&lt;/tt> element is given, the node is a leaf of the quest tree. The &lt;tt>name&lt;/tt> attribute is the name used to address the quest node from within the engine.
* '''code''', if present, will contain the [[Scripting:Quest Completion Rule|completion rule]], i.e. which combination of child nodes need to be completed in order to complete the quest step represented by this node. It is not allowed in leaf nodes.
* '''code''', if present, will contain the [[Scripting:Quest Completion Rule|completion rule]], i.e. which combination of child nodes need to be completed in order to complete the quest step represented by this node. It is not allowed in leaf nodes.
* '''log''', if present, can be used to specify automatic entries into a log book. It can contain the elements <tt>on_start</tt> and <tt>on_completion</tt>.
* '''log''', if present, can be used to specify automatic entries into a log book. It can contain the elements &lt;tt>on_start&lt;/tt> and &lt;tt>on_completion&lt;/tt>.
* '''on_start''' contains the log entry that is added to the log book when this quest step is started, i.e. when at least one of it's direct childs is completed. Mandatory elements are <tt>topic</tt>, <tt>text</tt> and <tt>id</tt>.
* '''on_start''' contains the log entry that is added to the log book when this quest step is started, i.e. when at least one of it's direct childs is completed. Mandatory elements are &lt;tt>topic&lt;/tt>, &lt;tt>text&lt;/tt> and &lt;tt>id&lt;/tt>.
* '''on_completion''' contains the log entry that is added to the log book when this quest is completed, i.e. when either all child quests or those denoted by the completion rule are completed. Mandatory elements are <tt>topic</tt>, <tt>text</tt> and <tt>id</tt>.
* '''on_completion''' contains the log entry that is added to the log book when this quest is completed, i.e. when either all child quests or those denoted by the completion rule are completed. Mandatory elements are &lt;tt>topic&lt;/tt>, &lt;tt>text&lt;/tt> and &lt;tt>id&lt;/tt>.
* '''topic''' is the heading that is displayed in the log book above each entry.
* '''topic''' is the heading that is displayed in the log book above each entry.
* '''text''' is the actual text for the log entry.
* '''text''' is the actual text for the log entry.
* '''id''' is a unique identifier for each log book entry.
* '''id''' is a unique identifier for each log book entry.
* '''parts''', if present contains ''1'' to ''n'' <tt>quest</tt> nodes, which further divide the current quest part into more steps.
* '''parts''', if present contains ''1'' to ''n'' &lt;tt>quest&lt;/tt> nodes, which further divide the current quest part into more steps.


[[Category:Questedit]]
[[Category:Questedit]]

Revision as of 01:13, 24 November 2010



UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY


CLICK HERE


(Preliminary)

Overview

<tt>Questedit</tt> is used to create the quest tree that represents all the quests available in the game and the steps required to complete them. The quest tree is necessary for:

  • keeping track of the player's progress in the game
  • conditionals in dialogues, based on quest completion
  • automatic entry creation in the log book.
  • triggering quest-related events

Contents

  1. Understanding the Quest Engine

Creating Quest Data File

Until the completion of the graphical quest editor (of which so far only the user interface designed with glade exists), a little Python script exists to create the quest tree from an XML file. The script is called <tt>convert_quests.py</tt> and is located in the test/ directory [1]. To use it, run

 python convert_quests.py <quest_tree.xml>

The syntax of the XML file is the following:

 <quests>
     <quest name="Quest_1">
         &lt;code>Part_1 and (Step_1 or Step_2)</code&gt;
         <log>
             <on_start>
                 <topic>Quest 1</topic>
                 <text>Quest 1 Started</text>
                 <id>logbook.quest_1a</id>
             </on_start>
             <on_completion>
                 <topic>Quest 1</topic>
                 <text>Quest 1 Completed</text>
                 <id>logbook.quest_1b</id>
             </on_completion>
         </log>
         <parts>
             <quest name="Part_1">
                 &lt;code>(Step_3 and Step_4) or (Step_4 and Step_5)</code&gt;
                 <parts>
                      <quest name="Step_3"/>
                      <quest name="Step_4"/>
                      <quest name="Step_5"/>
                  </parts>
              </quest>
              <quest name="Step_1"/>
              <quest name="Step_2"/>
         </parts>
     </quest>
 </quests>
  • quests is the root of the quest tree. It can contain 1 to n <tt>quest</tt> nodes as its only children.
  • quest nodes represent a single node in the quest tree. They can have one <tt>code</tt>, <tt>log</tt> and <tt>parts</tt> element, either of which is optional. If no <tt>parts</tt> element is given, the node is a leaf of the quest tree. The <tt>name</tt> attribute is the name used to address the quest node from within the engine.
  • code, if present, will contain the completion rule, i.e. which combination of child nodes need to be completed in order to complete the quest step represented by this node. It is not allowed in leaf nodes.
  • log, if present, can be used to specify automatic entries into a log book. It can contain the elements <tt>on_start</tt> and <tt>on_completion</tt>.
  • on_start contains the log entry that is added to the log book when this quest step is started, i.e. when at least one of it's direct childs is completed. Mandatory elements are <tt>topic</tt>, <tt>text</tt> and <tt>id</tt>.
  • on_completion contains the log entry that is added to the log book when this quest is completed, i.e. when either all child quests or those denoted by the completion rule are completed. Mandatory elements are <tt>topic</tt>, <tt>text</tt> and <tt>id</tt>.
  • topic is the heading that is displayed in the log book above each entry.
  • text is the actual text for the log entry.
  • id is a unique identifier for each log book entry.
  • parts, if present contains 1 to n <tt>quest</tt> nodes, which further divide the current quest part into more steps.