diff --git a/documentation/docs/docs/03-creating-stories/05-questing/02-full-quest.mdx b/documentation/docs/docs/03-creating-stories/05-questing/02-full-quest.mdx new file mode 100644 index 0000000000..e2f8d0ef09 --- /dev/null +++ b/documentation/docs/docs/03-creating-stories/05-questing/02-full-quest.mdx @@ -0,0 +1,103 @@ +--- +difficulty: Normal +--- + +import Player from "@site/src/components/Player"; +import Image from "@site/src/components/Image"; +import EntrySearch from "@site/src/components/EntrySearch"; +import EntryDisplay from "@site/src/components/EntryDisplay"; +import EntryNodeInspector from "@site/src/components/EntryInspector"; +import Tabs from '@theme/Tabs'; +export const questPages = [ + require("./assets/full_tutorial/manifest.json"), + require("./assets/full_tutorial/static.json"), + require("./assets/full_tutorial/sequence.json"), + +]; +import TabItem from '@theme/TabItem'; + +# Full Quest Tutorial +:::info[Before starting] +It is best to read the [Interactions](../01-interactions/index.mdx), [facts](../03-facts/index.mdx), and [Questing](./index.mdx) documentation before starting this tutorial. A sequence, static and manifest page should also be created already. +::: +:::warning[Complete tutorial] +This tutorial is made to showcase the complete use of TypeWriter, and it's system. To grasp the concept of this tutorial, make sure to thoroughly read it. +::: +In this tutorial, you will learn how to create a quest where the player needs to kill x amount of a certain mob. + +## Configuring the manifest page +:::info[Manifest] +This section of the tutorial already assumes you have created a manifest page. +::: +First we will need to create a quest. This can be done by doing the following steps: + +### Adding the quest entry +This can be done by going to the manifest page and clicking on the `+` icon in the top right corner of the panel. Search for `Add Quest` and add it to your page by clicking on the `+` icon. + + + +### Configuring the quest +After creating the quest open the inspector and follow the following steps + +#### Setting the display name +set the Display Name field to `Tutorial Quest`. This will be the name of the quest that will be displayed to the player. + +#### Configuring the criteria +Click on the `+` icon in the inspector next to the Active Criteria field. Then, you can select the fact you want to use. For this tutorial, we will use a permanent fact called `Tutorial Kill` with the group set to a player group.\ +* For the Active Criteria set the value to `<` and the value to `4`. Create another active criteria with the same fact but set the value to `!=` and the value to `0`. +* For the Completed Criteria set the value to `==` and the value to `4`. + +Your quest should now look like this: + + +### Adding the objective +Now we have created our quest we can begin with creating the objective. This can be done by clicking on the `+` icon in the top right corner of the panel and searching for `Add Completable Objective`. Add it to your page by clicking on the `+` icon. + + + +### Configuring the objective +After creating the objective create a new permanent fact and give it a name, for this tutorial we will be using a zombie so we will be using the name `killed_zombies` and link it with the player group. Now configure the objective as the following: + + +## Configuring the sequence page +:::info[First interaction] +This section of the tutorial already assumes you have created a sequence page with a trigger event. +::: +### Adding the quest track entry +Now we need to add a `Track Quest` entry to our sequence page. This can be done by clicking on the `+` icon in the top right corner of the panel and searching for `Track Quest`. Add it to your page by clicking on the `+` icon. + + + +After creating the quest track open the inspector and select the tutorial quest at the `Quest` field. Now your inspector should look like this: + + +### Adding the `On Player Kill Entity` event +Now we need to add a `On Player Kill Entity` event to our sequence page. This can be done by clicking on the `+` icon in the top right corner of the panel and searching for `On Player Kill Entity`. Add it to your page by clicking on the `+` icon. + + + +Now inside the inspector, you can configure the entity you want to use. For this tutorial we will be using a zombie. + +### Adding a simple action entry +Now right-click on the kill event and search for `Add Simple Action`. Add it to your page by clicking on the `+` icon. + + + +Now inside the inspector, create a new modifier and set the fields: +* Fact: `killed_zombies` +* Operator: `+` +* Value: `1` + +## full result +Now all your pages should look like this: + + +## Result +:::info[Result] +Result will be later added. +TODO: Add result video +::: \ No newline at end of file diff --git a/documentation/docs/docs/03-creating-stories/05-questing/01-dynamic-objectives.mdx b/documentation/docs/docs/03-creating-stories/05-questing/03-dynamic-objectives.mdx similarity index 100% rename from documentation/docs/docs/03-creating-stories/05-questing/01-dynamic-objectives.mdx rename to documentation/docs/docs/03-creating-stories/05-questing/03-dynamic-objectives.mdx diff --git a/documentation/docs/docs/03-creating-stories/05-questing/02-entity-objectives.mdx b/documentation/docs/docs/03-creating-stories/05-questing/04-entity-objectives.mdx similarity index 100% rename from documentation/docs/docs/03-creating-stories/05-questing/02-entity-objectives.mdx rename to documentation/docs/docs/03-creating-stories/05-questing/04-entity-objectives.mdx diff --git a/documentation/docs/docs/03-creating-stories/05-questing/assets/dynamic_objectives/quest_manifest.json b/documentation/docs/docs/03-creating-stories/05-questing/assets/dynamic_objectives/quest_manifest.json index c06d047f50..dec42e4e3d 100644 --- a/documentation/docs/docs/03-creating-stories/05-questing/assets/dynamic_objectives/quest_manifest.json +++ b/documentation/docs/docs/03-creating-stories/05-questing/assets/dynamic_objectives/quest_manifest.json @@ -1 +1,114 @@ -{"name":"quest_manifest","type":"manifest","entries":[{"id":"Pd5ZLgeKRhbylic","name":"great_chasm","children":["bPMuR8nqwrqipmv","Xjnqaoj38lvi6EY","bMNFap5GFd9qF7i"],"displayName":"Great Chasm","activeCriteria":[{"fact":"fTtB7yHVJ6Dkuha","operator":">=","value":1}],"completedCriteria":[{"fact":"fTtB7yHVJ6Dkuha","operator":"==","value":2}],"type":"quest"},{"id":"jE0Rv5oUP8kXNGV","name":"find_a_way_across","quest":"Pd5ZLgeKRhbylic","children":[],"criteria":[],"display":"Find a way across the chasm","priorityOverride":{"enabled":false,"value":0},"type":"objective"},{"id":"bPMuR8nqwrqipmv","name":"doesnt_have_boots_in_inv","children":["jE0Rv5oUP8kXNGV"],"item":{"material":{"enabled":true,"value":"IRON_BOOTS"},"amount":{"enabled":false,"value":0},"name":{"enabled":false,"value":""},"lore":{"enabled":false,"value":""},"flags":{"enabled":false,"value":[]},"nbt":{"enabled":false,"value":""}},"inverted":true,"type":"item_in_inventory_audience"},{"id":"WAPOjKPyl6pqXsu","name":"equip_boots","quest":"Pd5ZLgeKRhbylic","children":[],"criteria":[],"display":"Equip the Magnet Boots","priorityOverride":{"enabled":false,"value":0},"type":"objective"},{"id":"VHdXCXYVko3QtsY","name":"bridge_to_the_unkown","quest":"Pd5ZLgeKRhbylic","children":[],"criteria":[],"display":"Bridge to the Unknown","priorityOverride":{"enabled":false,"value":0},"type":"objective"},{"id":"Xjnqaoj38lvi6EY","name":"has_boots_equiped","children":["VHdXCXYVko3QtsY"],"item":{"material":{"enabled":true,"value":"IRON_BOOTS"},"amount":{"enabled":false,"value":0},"name":{"enabled":false,"value":""},"lore":{"enabled":false,"value":""},"flags":{"enabled":false,"value":[]},"nbt":{"enabled":false,"value":""}},"slot":36,"inverted":false,"type":"item_in_slot_audience"},{"id":"bMNFap5GFd9qF7i","name":"has_boots_in_inv","children":["PMoUaufdl0NLFPo"],"item":{"material":{"enabled":true,"value":"IRON_BOOTS"},"amount":{"enabled":false,"value":0},"name":{"enabled":false,"value":""},"lore":{"enabled":false,"value":""},"flags":{"enabled":false,"value":[]},"nbt":{"enabled":false,"value":""}},"inverted":false,"type":"item_in_inventory_audience"},{"id":"PMoUaufdl0NLFPo","name":"doesnt_have_boots_equiped","children":["WAPOjKPyl6pqXsu"],"item":{"material":{"enabled":true,"value":"IRON_BOOTS"},"amount":{"enabled":false,"value":0},"name":{"enabled":false,"value":""},"lore":{"enabled":false,"value":""},"flags":{"enabled":false,"value":[]},"nbt":{"enabled":false,"value":""}},"slot":36,"inverted":true,"type":"item_in_slot_audience"}],"chapter":"demo.quest","priority":0,"version":"0.5.0"} \ No newline at end of file +{ + "name": "quest_manifest", + "type": "manifest", + "entries": [ + { + "id": "Pd5ZLgeKRhbylic", + "name": "great_chasm", + "children": ["bPMuR8nqwrqipmv", "Xjnqaoj38lvi6EY", "bMNFap5GFd9qF7i"], + "displayName": "Great Chasm", + "activeCriteria": [ + { "fact": "fTtB7yHVJ6Dkuha", "operator": ">=", "value": 1 } + ], + "completedCriteria": [ + { "fact": "fTtB7yHVJ6Dkuha", "operator": "==", "value": 2 } + ], + "type": "quest" + }, + { + "id": "jE0Rv5oUP8kXNGV", + "name": "find_a_way_across", + "quest": "Pd5ZLgeKRhbylic", + "children": [], + "criteria": [], + "display": "Find a way across the chasm", + "priorityOverride": { "enabled": false, "value": 0 }, + "type": "objective" + }, + { + "id": "bPMuR8nqwrqipmv", + "name": "doesnt_have_boots_in_inv", + "children": ["jE0Rv5oUP8kXNGV"], + "item": { + "material": { "enabled": true, "value": "IRON_BOOTS" }, + "amount": { "enabled": false, "value": 0 }, + "name": { "enabled": false, "value": "" }, + "lore": { "enabled": false, "value": "" }, + "flags": { "enabled": false, "value": [] }, + "nbt": { "enabled": false, "value": "" } + }, + "inverted": true, + "type": "item_in_inventory_audience" + }, + { + "id": "WAPOjKPyl6pqXsu", + "name": "equip_boots", + "quest": "Pd5ZLgeKRhbylic", + "children": [], + "criteria": [], + "display": "Equip the Magnet Boots", + "priorityOverride": { "enabled": false, "value": 0 }, + "type": "objective" + }, + { + "id": "VHdXCXYVko3QtsY", + "name": "bridge_to_the_unkown", + "quest": "Pd5ZLgeKRhbylic", + "children": [], + "criteria": [], + "display": "Bridge to the Unknown", + "priorityOverride": { "enabled": false, "value": 0 }, + "type": "objective" + }, + { + "id": "Xjnqaoj38lvi6EY", + "name": "has_boots_equiped", + "children": ["VHdXCXYVko3QtsY"], + "item": { + "material": { "enabled": true, "value": "IRON_BOOTS" }, + "amount": { "enabled": false, "value": 0 }, + "name": { "enabled": false, "value": "" }, + "lore": { "enabled": false, "value": "" }, + "flags": { "enabled": false, "value": [] }, + "nbt": { "enabled": false, "value": "" } + }, + "slot": 36, + "inverted": false, + "type": "item_in_slot_audience" + }, + { + "id": "bMNFap5GFd9qF7i", + "name": "has_boots_in_inv", + "children": ["PMoUaufdl0NLFPo"], + "item": { + "material": { "enabled": true, "value": "IRON_BOOTS" }, + "amount": { "enabled": false, "value": 0 }, + "name": { "enabled": false, "value": "" }, + "lore": { "enabled": false, "value": "" }, + "flags": { "enabled": false, "value": [] }, + "nbt": { "enabled": false, "value": "" } + }, + "inverted": false, + "type": "item_in_inventory_audience" + }, + { + "id": "PMoUaufdl0NLFPo", + "name": "doesnt_have_boots_equiped", + "children": ["WAPOjKPyl6pqXsu"], + "item": { + "material": { "enabled": true, "value": "IRON_BOOTS" }, + "amount": { "enabled": false, "value": 0 }, + "name": { "enabled": false, "value": "" }, + "lore": { "enabled": false, "value": "" }, + "flags": { "enabled": false, "value": [] }, + "nbt": { "enabled": false, "value": "" } + }, + "slot": 36, + "inverted": true, + "type": "item_in_slot_audience" + } + ], + "chapter": "demo.quest", + "priority": 0, + "version": "0.5.0" +} diff --git a/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/manifest.json b/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/manifest.json new file mode 100644 index 0000000000..bedfbc21f9 --- /dev/null +++ b/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/manifest.json @@ -0,0 +1,36 @@ +{ + "id": "3PX6SGKqUA4lnpM", + "name": "manifest", + "type": "manifest", + "entries": [ + { + "id": "3JREccxRRKxn8UO", + "name": "tutorial_quest", + "children": [], + "displayName": "Tutorial Quest", + "activeCriteria": [ + { "fact": "X5BolmM0G8S4AOz", "operator": ">", "value": 0 } + ], + "completedCriteria": [ + { "fact": "X5BolmM0G8S4AOz", "operator": ">=", "value": 4 } + ], + "type": "quest" + }, + { + "id": "zWK21mcvT1HpoSu", + "name": "kill_10_zombies", + "quest": "3JREccxRRKxn8UO", + "children": [], + "showCriteria": [ + { "fact": "X5BolmM0G8S4AOz", "operator": "==", "value": 1 } + ], + "completedCriteria": [ + { "fact": "bXPTm2xnIgmohAl", "operator": ">=", "value": 2 } + ], + "display": "Kill 10 zombies", + "type": "completable_objective" + } + ], + "chapter": "tutorial", + "version": "0.7.0-beta-138" +} diff --git a/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/sequence.json b/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/sequence.json new file mode 100644 index 0000000000..72716cf354 --- /dev/null +++ b/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/sequence.json @@ -0,0 +1,49 @@ +{ + "id": "1PI8l1ck6bmkSnz", + "name": "tutorial", + "type": "sequence", + "entries": [ + { + "id": "hl3zjPDlyegcTNK", + "name": "new_on_player_kill_entity", + "triggers": ["9AGF9SN3fFREUvf"], + "entityType": { "enabled": true, "value": "ZOMBIE" }, + "type": "on_player_kill_entity" + }, + { + "id": "tUaei0LbNfz8acp", + "name": "new_track_quest", + "criteria": [], + "modifiers": [], + "triggers": [], + "quest": "3JREccxRRKxn8UO", + "type": "track_quest" + }, + { + "id": "9AGF9SN3fFREUvf", + "name": "new_simple_action", + "criteria": [], + "modifiers": [{ "fact": "bXPTm2xnIgmohAl", "operator": "+", "value": 1 }], + "triggers": [], + "type": "simple_action" + }, + { + "id": "Un4WExVOm2a9OSg", + "name": "new_on_player_near_location", + "triggers": ["tUaei0LbNfz8acp"], + "location": { + "world": "World", + "x": 10, + "y": 70, + "z": 13, + "yaw": 0, + "pitch": 0 + }, + "range": 2, + "type": "on_player_near_location" + } + ], + "chapter": "tutorial", + "priority": 0, + "version": "0.7.0-beta-138" +} diff --git a/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/static.json b/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/static.json new file mode 100644 index 0000000000..c0be930cd6 --- /dev/null +++ b/documentation/docs/docs/03-creating-stories/05-questing/assets/full_tutorial/static.json @@ -0,0 +1,29 @@ +{ + "id": "V1l70v98RyRUpbg", + "name": "static", + "type": "static", + "entries": [ + { + "id": "X5BolmM0G8S4AOz", + "name": "tutorial_kill", + "comment": "Tutorial Kill fact", + "group": "OQePwJGjQljZFQV", + "type": "permanent_fact" + }, + { + "id": "bXPTm2xnIgmohAl", + "name": "killed_zombies", + "comment": "How many zombies have been killed?", + "type": "permanent_fact", + "group": "OQePwJGjQljZFQV" + }, + { + "id": "OQePwJGjQljZFQV", + "name": "player_group", + "type": "player_group" + } + ], + "chapter": "tutorial", + "priority": 0, + "version": "0.7.0-beta-138" +}