Skip to content

Commit

Permalink
[Docs] Grammar changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marten-Mrfc committed Dec 14, 2024
1 parent e8613dc commit 4d15a95
Show file tree
Hide file tree
Showing 2 changed files with 227 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,30 @@ import EntrySearch from "@site/src/components/EntrySearch";

# Random Dialogue
:::info[Before starting]
This tutorial builds opon the [first interaction](./index.mdx) tutorial. It is also best to first read the [Facts](../03-facts/index.mdx) documentation.
This tutorial builds upon the [first interaction](./index.mdx) tutorial. It is also best to first read the [Facts](../03-facts/index.mdx) documentation.
:::

In this tutorial you will learn how to use dynamic variables and create a random spoken using them.
In this tutorial, you will learn how to use dynamic variables and create a random spoken using them.

## Creating random dialogue
First you need to open the inspector of the spoken you created from the [first interaction](./index.mdx) tutorial. Then click on the <ActionButton button='dynamic-variable'/> just above the Text field and click on `Add random Variable`.
First, you need to open the inspector of the spoken you created from the [first interaction](./index.mdx) tutorial. Then click on the <ActionButton button='dynamic-variable'/> just above the Text field and click on `Add random Variable`.

<EntrySearch entryName='random_variable' />

This will create a random variable inside a static page.

## Configuring the random variable
After creating the random variable open the inspector of the random variable. Here you can add multiple values to the random variable. Now every time a spoken is triggered a different message will be displayed from that random variable.\
For this tutorial we chose to add the following lines but this can be anything you want:\
After creating the random variable, open the inspector of the random variable. Here, you can add multiple values to the random variable. Now, every time a spoken is triggered, a different message will be displayed from that random variable.\
For this tutorial, we chose to add the following lines, but this can be anything you want:\
`Hello! I am a flower.`, `Wow, you found me.`, `Hey you!`\
Your dynamic variable should now look like:
<Image img={require("../../assets/interactions/random-variable.png")} alt="Random Variable Example" width={400}/>

## Removing the random variable
To remove a dynamic variable just click on the <ActionButton button='remove'/> icon next to the dynamic variable.
To remove a dynamic variable, just click on the <ActionButton button='remove'/> icon next to the dynamic variable.

## Result
:::info[Result]
Result will be later added.
TODO: Add result video
:::
215 changes: 215 additions & 0 deletions documentation/src/libs/adapters.json
Original file line number Diff line number Diff line change
Expand Up @@ -26059,6 +26059,221 @@
"color": "#F44336",
"icon": "mdi:skip-next",
"tags": ["cinematic", "skip"]
},
{
"name": "completable_objective",
"description": "An objective that can show a completed stage",
"adapter": "Basic",
"fields": {
"kind": "object",
"fields": {
"id": {
"kind": "primitive",
"type": "string",
"modifiers": []
},
"name": {
"kind": "primitive",
"type": "string",
"modifiers": []
},
"quest": {
"kind": "custom",
"editor": "entryReference",
"default": "",
"modifiers": [
{
"name": "entry",
"data": "quest"
},
{
"name": "help",
"data": "The quest that the objective is a part of."
}
]
},
"children": {
"kind": "list",
"type": {
"kind": "custom",
"editor": "entryReference",
"default": "",
"modifiers": [
{
"name": "entry",
"data": "audience"
}
]
},
"modifiers": []
},
"showCriteria": {
"kind": "list",
"type": {
"kind": "object",
"fields": {
"fact": {
"kind": "custom",
"editor": "entryReference",
"default": "",
"modifiers": [
{
"name": "entry",
"data": "readable-fact"
},
{
"name": "help",
"data": "The fact to check before showing the objective."
}
]
},
"operator": {
"kind": "enum",
"values": [
"==",
"<",
">",
"<=",
">=",
"!="
],
"modifiers": [
{
"name": "help",
"data": "The operator to use when comparing the fact value to the criteria value."
}
]
},
"value": {
"kind": "primitive",
"type": "integer",
"modifiers": [
{
"name": "help",
"data": "The value to compare the fact value to."
},
{
"name": "negative"
}
]
}
},
"modifiers": []
},
"modifiers": [
{
"name": "help",
"data": "The criteria need to be met for the objective to be shown."
}
]
},
"completedCriteria": {
"kind": "list",
"type": {
"kind": "object",
"fields": {
"fact": {
"kind": "custom",
"editor": "entryReference",
"default": "",
"modifiers": [
{
"name": "entry",
"data": "readable-fact"
},
{
"name": "help",
"data": "The fact to check before marking the objective as completed."
}
]
},
"operator": {
"kind": "enum",
"values": [
"==",
"<",
">",
"<=",
">=",
"!="
],
"modifiers": [
{
"name": "help",
"data": "The operator to use when comparing the fact value to the criteria value."
}
]
},
"value": {
"kind": "primitive",
"type": "integer",
"modifiers": [
{
"name": "help",
"data": "The value to compare the fact value to."
},
{
"name": "negative"
}
]
}
},
"modifiers": []
},
"modifiers": [
{
"name": "help",
"data": "The criteria to display the objective as completed."
}
]
},
"display": {
"kind": "primitive",
"type": "string",
"modifiers": [
{
"name": "help",
"data": "The name to display to the player."
},
{
"name": "placeholder"
},
{
"name": "colored"
}
]
},
"priorityOverride": {
"kind": "custom",
"editor": "optional",
"fieldInfo": {
"kind": "primitive",
"type": "integer",
"modifiers": []
},
"default": {
"enabled": false,
"value": 0
},
"modifiers": [
{
"name": "help",
"data": "The priority of the entry. If not set, the priority of the page will be used."
}
]
}
},
"modifiers": []
},
"color": "#8A2BE2",
"icon": "fluent:clipboard-checkmark-16-filled",
"tags": [
"completable_objective",
"quest",
"objective",
"completed",
"placeholder"
]
}
]
}
Expand Down

0 comments on commit 4d15a95

Please sign in to comment.