Difference between revisions of "WH Flow Graph Documentation"

From Nexus Mods Wiki
Jump to: navigation, search
(Created page with " Quest Flow Graph This page documents the Quest Flow Graph extension to the standard CryEngine Flow Graph. Consult CE documentation if you wish to learn more about standard...")
 
Line 10: Line 10:
 
Flow Graphs consist of a set of nodes and edges. Nodes define states and some implicit logic, or provide additional values from other systems (e.g. references to assets from the game level). Edges define relationship between nodes and the rest of the logic.
 
Flow Graphs consist of a set of nodes and edges. Nodes define states and some implicit logic, or provide additional values from other systems (e.g. references to assets from the game level). Edges define relationship between nodes and the rest of the logic.
  
[[File:|623x266px]]
+
[[File:Quest System Documentation Image1.png|623x266px]]
  
 
= New Quest Flow Graph =
 
= New Quest Flow Graph =
Line 34: Line 34:
 
== Move FG to non-default folder ==
 
== Move FG to non-default folder ==
  
This folder view is exclusively meant to store XML backups. However your Quest FG must be stored in DB so you should move the newly created reference to another sister folder. You can choose any folder you wish or create a new one. Creating a new [[idea]][[#_msocom_1|[AG1]]] named after your mod is a good idea.
+
This folder view is exclusively meant to store XML backups. However your Quest FG must be stored in DB so you should move the newly created reference to another sister folder. You can choose any folder you wish or create a new one. Creating a new [[Idea|idea]][[#_msocom_1|[AG1]]] named after your mod is a good idea.
  
 
You move the file this way:
 
You move the file this way:
Line 95: Line 95:
  
 
*<ul style="list-style-type:circle">
 
*<ul style="list-style-type:circle">
<li>AssetTracked</li>
+
</ul> </ul>
<li>AssetItem</li>
+
 
<li>AssetNPC</li>
+
*AssetTracked
<li>AssetPlace</li>
+
*AssetItem  
<li>AssetStatistics</li>
+
*AssetNPC  
</ul>  <li>QuestRewards</li>
+
*AssetPlace  
 +
*AssetStatistics  
 +
 
 +
*QuestRewards  
 +
 
 
</ul>
 
</ul>
  
Line 106: Line 110:
  
 
*<ul style="list-style-type:circle">
 
*<ul style="list-style-type:circle">
<li>RewardAchievement</li>
 
<li>RewardExp</li>
 
<li>RewardItem</li>
 
<li>RewardMoney</li>
 
<li>RewardPerk</li>
 
<li>RewardReputation</li>
 
<li>RewardScript</li>
 
 
</ul>  </ul>
 
</ul>  </ul>
  
 +
*RewardAchievement
 +
*RewardExp
 +
*RewardItem
 +
*RewardMoney
 +
*RewardPerk
 +
*RewardReputation
 +
*RewardScript
 +
</ul>
 
For more details on Node relationships and settings see Quest Systems documentation.
 
For more details on Node relationships and settings see Quest Systems documentation.
  
Line 144: Line 149:
 
<div>
 
<div>
 
----
 
----
<div><div class="msocomtxt" id="_com_1" language="JavaScript" onmouseout="msoCommentHide('_com_1')" onmouseover="msoCommentShow('_anchor_1','_com_1')">  
+
<div><div class="msocomtxt" id="_com_1">
asi "folder"? :) [[#_msoanchor_1|[AG1]]]
+
asi "folder"?&nbsp;:) [[#_msoanchor_1|[AG1]]]
 
</div> </div> </div>   
 
</div> </div> </div>   
 
[[Category:Documentation]]
 
[[Category:Documentation]]

Revision as of 15:01, 2 October 2019

Quest Flow Graph

This page documents the Quest Flow Graph extension to the standard CryEngine Flow Graph.

Consult CE documentation if you wish to learn more about standard Flow Graph.

Since Quest Flow Graph operates atop the Quest System, most of the documentation of this tool is in Quest System documentation. This page covers only basic controls and elements of this tool.

Flow Graphs consist of a set of nodes and edges. Nodes define states and some implicit logic, or provide additional values from other systems (e.g. references to assets from the game level). Edges define relationship between nodes and the rest of the logic.

Quest System Documentation Image1.png

New Quest Flow Graph

The first step is to create a new quest smart object in Swift. Follow the naming conventions. Copy or remember that name (hereinafter questName).

Click this option

[[File:|228x340px]]

You will be prompted to save a XML file. Name it questName.xml.
It should be stored under ..\Data\Libs\quests\flowgraphs

An empty Quest FG will be created

[[File:|610x309px]]

The comment that now states “Not in DB” indicates when was the FG last committed to DB.

The FG can now be found under XML folder.

[[File:|321x827px]]

Move FG to non-default folder

This folder view is exclusively meant to store XML backups. However your Quest FG must be stored in DB so you should move the newly created reference to another sister folder. You can choose any folder you wish or create a new one. Creating a new idea[AG1] named after your mod is a good idea.

You move the file this way:

[[File:|311x190px]]

[[File:|313x134px]]

Result:

[[File:|313x834px]]

As a result our new quest is now under new folder but it is still not stored in DB.

Commit quest to DB

A quest needs to contain at least one Objective node to be committable to DB.

Fire up the quicksearch utility by pressing Q anywhere in the Graph space, and type in objective.

[[File:|242x90px]]

Confirm with Enter. A node of the type Objective is inserted.

[[File:|578x392px]]

Now the quest is valid and you can press the “Export Button”.

[[File:|486x135px]]

A confirmation window will pop-up after a while and the comment will signalize the time of last commit and username of the last committer.

[[File:|623x372px]]

Every time you make a change you do it locally. Only after Exporting the quest is the Quest FG stored in DB.
Errors

Should your export to DB fail, you will find error messages in the console.
Common errors:

  • Clashing names
  • Some orphaned nodes
  • Incomplete AssetTracked cascade
  • Exclusive properties set at once (e.g. item category vs item type)
  • Clashing IDs

Nodes

List of nodes available in the Quest FG

There are 3 quest-state nodes

  • Begin – Mandatory. Created automatically. Only one per FG is permitted.
  • End - Mandatory. Created automatically. Only one per FG is permitted.
  • Objective – Having at least one is mandatory.

All other nodes belong to 2 groups

  • Asset tracking

These nodes are plugged via an interface AssetTracked node into “Tracked” port of an Objective node. Add additional asset-related conditions for Objective completion. Examples: if an X number of Y items is picked, or if an NPC dies, or if and NPC enters and Area etc.  See the asset tracking part of the Quest System documentation for more details

    </ul>
    • AssetTracked
    • AssetItem
    • AssetNPC
    • AssetPlace
    • AssetStatistics
    • QuestRewards

    </ul>

    These nodes are plugged directly into “Reward” port of an Objective. They give the player the defined reward upon Objective completion.

      </ul>
      • RewardAchievement
      • RewardExp
      • RewardItem
      • RewardMoney
      • RewardPerk
      • RewardReputation
      • RewardScript

      </ul> For more details on Node relationships and settings see Quest Systems documentation.

      Edges

      An edge, visually an arrowed connection, defines the relationships between nodes. Edges can carry signals or define a value for another node port which requires a value.

      Example:

      [[File:|623x331px]]

      A hidden Objective1 is started immediately after the quest is started. Objective1 tracks if soul rat_bernard has at least 5 apples in inventory. When Objective1 is completed, player is immediately rewarded with 1 apple and the visible Objective2 is started.

      An edge can be disabled in context menu when you right-click the dot in its middle. Disabled edges are rendered dashed lines. Disabled edges do nothing. Good for debugging purposes where you want to disable part of the logic without losing the relationship and having to remember it.

      Debugging

      By pressing this button

      [[File:|334x104px]]

      you turn on/off live visual debugging of FG. If you jump into Game Mode you can see the states of all the nodes, which signal edges have already fired, and in what states the tracking is.

      Result may look like this:

      [[File:|623x373px]]

      Note: If you think you are not being shown the correct state of the flowgraph, which sometimes happen, click on another one and click back. This will force refresh of the entire FG debug info.


      asi "folder"? :) [AG1]