Sly 2:Game state: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Created page for game mechanic)
 
(→‎Tasks: Improved format and layout)
Line 2: Line 2:


== Tasks ==
== Tasks ==
The DAG is a directed graph of nodes, where each node is called a "task". For instance, 't1_follow_dmitri_on_streets' is the task of tailing Dimitri in the "Follow Dimitri" job (the prefix t1 indicates that it is a task in Episode 1, and `follow` is the codename for the "Follow Dimitri" job).
The DAG is a directed graph of nodes, where each node is called a "task". For instance, <code>t1_follow_dmitri_on_streets</code> is the task of tailing Dimitri in the "Follow Dimitri" job (the prefix <code>t1</code> indicates that it is a task in Episode 1, and <code>follow</code> is the codename for the "Follow Dimitri" job).


=== Task States ===
=== Task States ===
Each task has a ''state'', which is one of the following:
Each task has a ''state'', which is one of the following:


* Unavailable
* {{color|red|Unavailable}}
* Available
* {{color|dodgerblue|Available}}
* Complete
* {{color|limegreen|Complete}}
* Final
* {{color|gray|Final}}


All tasks in the DAG start off as Unavailable. A task becomes Available once all of its predecessors are Complete. Tasks become Complete through conditions being met in the level scripts, and tasks become Final through missions.
All tasks in the DAG start off as {{color|red|Unavailable}}. A task becomes {{color|dodgerblue|Available}} once all of its predecessors are {{color|limegreen|Complete}}. Tasks become {{color|limegreen|Complete}} through conditions being met in the level scripts, and tasks become {{color|gray|Final}} through missions.


=== State Forcing ===
At all times, every ''before'' an Available task must be Complete or Final. Additionally, every task ''after'' an Available task must be unavailable. It is possible to "force" a task to a particular state, which propagates throughout the DAG to ensure those conditions are always met.
At all times, every ''before'' an Available task must be Complete or Final. Additionally, every task ''after'' an Available task must be unavailable. It is possible to "force" a task to a particular state, which propagates throughout the DAG to ensure those conditions are always met.


=== Missions ===
== Missions ==
Tasks in the node can be grouped into ''missions''. These missions usually refer to particular jobs in the game's story. For instance, `m1_follow_dmitri` is the job "Follow Dmitri" (the prefix m1 indicates that it is a mission in Episode 1).
Tasks in the node can be grouped into ''missions''. These missions usually refer to particular jobs in the game's story. For instance, <code>m1_follow</code> is the job "Follow Dmitri" (the prefix <code>m1</code> indicates that it is a mission in Episode 1).


If a task belongs to a mission and the "exit" task in that mission is Completed, then all the tasks in that job become Final.
If a task belongs to a mission and the "exit" task in that mission is Completed, then all the tasks in that job become Final.