Difference between revisions of "WH Flow Graph Documentation"

From Nexus Mods Wiki
Jump to: navigation, search
m
 
Line 83: Line 83:
 
*Exclusive properties set at once (e.g. item category vs item type)  
 
*Exclusive properties set at once (e.g. item category vs item type)  
 
*Clashing IDs  
 
*Clashing IDs  
 +
  
  
Line 120: Line 121:
 
*RewardScript  
 
*RewardScript  
  
For more details on Node relationships and settings see Quest System documentation.
+
For more details on Node relationships and settings see [[Quest_System_Documentation|Quest System documentation]].
 
 
 
 
  
 
= Edges =
 
= Edges =

Latest revision as of 13:44, 13 February 2020


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


FlowGraph Documentation Image2.png

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

FlowGraph Documentation Image3.png

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.

FlowGraph Documentation Image4.png

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 folder named after your mod is a good idea.

You move the file this way:

FlowGraph Documentation Image5.png

FlowGraph Documentation Image6.png

Result:

FlowGraph Documentation Image7.png

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.


FlowGraph Documentation Image8.png

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

FlowGraph Documentation Image9.png

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

FlowGraph Documentation Image10.png

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.

FlowGraph Documentation Image11.png

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

  • AssetTracked
  • AssetItem
  • AssetNPC
  • AssetPlace
  • AssetStatistics

QuestRewards

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

  • RewardAchievement
  • RewardExp
  • RewardItem
  • RewardMoney
  • RewardPerk
  • RewardReputation
  • RewardScript

For more details on Node relationships and settings see Quest System 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:

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

RTENOTITLE

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:

RTENOTITLE

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.

Kingdom Come: Deliverance: Forum | Before you start | Tutorials & Instructions | Basic Mods | Tools | Documentation | Glossary | EULA