Rough draft dialogue guide

This commit is contained in:
Ben C 2022-05-05 08:55:11 -04:00 committed by GitHub
parent a15afdb02d
commit 7a89be8427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 198 additions and 68 deletions

View File

@ -1,82 +1,192 @@
Title: Dialogue Title: Dialogue
Description: Guide to making dialogue in New Horizons
Sort_Priority: 50 Sort_Priority: 50
## Dialogue # Dialogue
___
This page goes over how to use dialogue in New Horizons.
# Understanding Dialogue
___
## Dialogue Tree
___
A dialogue tree is an entire conversation, it's made up of dialogue nodes.
## Dialogue Node
___
A node is a set of pages shown to the player followed by options the player can choose from to change the flow of the conversation.
## Condition
___
A condition is a yes/no value stored **for this loop and this loop only**. It can be used to show new dialogue options, stop someone from talking to you (looking at you Slate), and more.
## Persistent Condition
___
A persistent condition is similar to a condition, except it *persists* through loops, and is saved on the player's save file.
## Remote Trigger
___
A remote trigger is used to have an NPC talk to you from a distance; ex: Slate stopping you for the umpteenth time to tell you information you already knew.
# Example XML
___ ___
Here's an example dialogue XML: Here's an example dialogue XML:
```xml ```xml
<!-- Example Dialogue -->
<!-- All files must have `DialogueTree` as the root element, the xmlns:xsi=... and xsi:noNamespaceSchemaLocation=... is optional but provides improved error checking if your editor supports it -->
<DialogueTree xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <DialogueTree xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/master/NewHorizons/dialogue_schema.xsd"> xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/master/NewHorizons/dialogue_schema.xsd">
<NameField>EXAMPLE NPC</NameField> <NameField>EXAMPLE NPC</NameField> <!-- The name of this character -->
<DialogueNode> <DialogueNode> <!-- A dialogue node is a set of pages displayed to the player optionally followed by options -->
<Name>Start</Name> <Name>Start</Name> <!-- The name of this node, used to go to this node from another node -->
<EntryCondition>DEFAULT</EntryCondition> <EntryCondition>DEFAULT</EntryCondition> <!-- The condition that must be met for this node to be reached; A file should always have a node with "DEFAULT" -->
<Dialogue> <Dialogue> <!-- The actual dialogue we want to show the player -->
<Page>Start</Page> <Page>Start</Page> <!-- A single page of the dialogue -->
<Page>Start Part 2</Page> <Page>Start Part 2</Page> <!-- Another page -->
</Dialogue> </Dialogue>
<DialogueOptionsList> <DialogueOptionsList> <!-- Show options the player can choose from when the character is done talking -->
<DialogueOption> <DialogueOption> <!-- A single option the player can pick -->
<Text>Goto 1</Text> <Text>Goto 1</Text> <!-- The text to display for the option -->
<DialogueTarget>1</DialogueTarget> <DialogueTarget>1</DialogueTarget> <!-- The name of the node to jump to -->
</DialogueOption> </DialogueOption>
<DialogueOption> <!-- A few more options... -->
<Text>Goto 2</Text> <DialogueOption>
<DialogueTarget>2</DialogueTarget> <Text>Goto 2</Text>
</DialogueOption> <DialogueTarget>2</DialogueTarget>
<DialogueOption> </DialogueOption>
<Text>Goto End</Text> <DialogueOption>
<DialogueTarget>End</DialogueTarget> <Text>Goto End</Text>
</DialogueOption> <DialogueTarget>End</DialogueTarget>
</DialogueOptionsList> </DialogueOption>
</DialogueNode> </DialogueOptionsList>
</DialogueNode>
<DialogueNode> <DialogueNode> <!-- Another node -->
<Name>1</Name> <Name>1</Name> <!-- Name of the node -->
<Dialogue> <!-- (Note the lack of an EntryCondition) -->
<Page>This is 1</Page> <Dialogue>
</Dialogue> <Page>This is 1</Page>
</Dialogue>
<DialogueOptionsList> <DialogueOptionsList>
<DialogueOption> <DialogueOption>
<Text>Goto 2</Text> <Text>Goto 2</Text>
<DialogueTarget>2</DialogueTarget> <DialogueTarget>2</DialogueTarget>
</DialogueOption> </DialogueOption>
<DialogueOption> <DialogueOption>
<Text>Goto End</Text> <Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget> <DialogueTarget>End</DialogueTarget>
</DialogueOption> </DialogueOption>
</DialogueOptionsList> </DialogueOptionsList>
</DialogueNode> </DialogueNode>
<DialogueNode> <DialogueNode> <!-- Another node why not -->
<Name>2</Name> <Name>2</Name>
<Dialogue> <Dialogue>
<Page>This is 2</Page> <Page>This is 2</Page>
</Dialogue> </Dialogue>
<DialogueOptionsList> <DialogueOptionsList>
<DialogueOption> <DialogueOption>
<Text>Goto 1</Text> <Text>Goto 1</Text>
<DialogueTarget>1</DialogueTarget> <DialogueTarget>1</DialogueTarget>
</DialogueOption> </DialogueOption>
<DialogueOption> <DialogueOption>
<Text>Goto End</Text> <Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget> <DialogueTarget>End</DialogueTarget>
</DialogueOption> </DialogueOption>
</DialogueOptionsList> </DialogueOptionsList>
</DialogueNode> </DialogueNode>
<DialogueNode>
<Name>End</Name>
<Dialogue>
<Page>This is the end</Page>
</Dialogue>
</DialogueNode>
<DialogueNode> <!-- The end node -->
<Name>End</Name>
<Dialogue>
<Page>This is the end</Page>
</Dialogue>
<!-- When a node doesn't have any options defined the dialogue box will close once the pages have been read -->
</DialogueNode>
</DialogueTree> </DialogueTree>
``` ```
# Using the XML
___
To use the dialogue XML you have created, you simply need to reference it in the `dialogue` prop
```json
{
"Props": {
"dialogue": [
{
"position": {"x": 5, "y": 10, "z": 0},
"xmlFile": "planets/path/to/your_file.xml"
}
]
}
}
```
# Dialogue Config
___
To view the options for the dialogue prop, check [the schema]({{ "Celestial Body Schema"|route }}#Props_dialogue)
# Controlling Conditions
___
You can set condition in dialogue with the `<SetCondition>` and `<SetPersistentCondition>` tags
```xml
<DialogueNode>
<!-- ... -->
<SetCondition>EXAMPLE_CONDITION</SetCondition>
<SetPersistentCondition>EXAMPLE_P_CONDITION</SetPersistentCondition>
<!-- ... -->
</DialogueNode>
```
# Dialogue Options
___
There are many control structures for dialogue options to hide/reveal them if conditions are met. Take a look at [the DialogueOption schema]({{ "Dialogue Schema"|route }}#DialogueTree-DialogueNode-DialogueOptionsList-DialogueOption-DialogueTarget) for more info.
# Controlling Flow
___
In addition to `<DialogueOptions>`, there are other ways to control the flow of the conversation.
## DialogueTarget
___
Defining `<DialogueTarget>` in the `<DialogueNode>` tag instead of a `<DialogueOption>` will make the conversation go directly to that target after the character is done talking.
## DialogueTargetShipLogCondition
___
Used in tandum with `DialogueTarget`, makes it so you must have a [ship log fact]({{ "Ship Log"|route }}#explore-facts) to go to the next node.

View File

@ -3,15 +3,18 @@ Description: A guide to editing the ship log in New Horizons
Sort_Priority: 70 Sort_Priority: 70
# Intro # Intro
___ ___
Welcome! this page outlines how to create a custom ship log. Welcome! this page outlines how to create a custom ship log.
# Understanding Ship Logs # Understanding Ship Logs
___ ___
First thing's first, I'll define some terminology regarding ship logs in the game, and how ship logs are structured. First thing's first, I'll define some terminology regarding ship logs in the game, and how ship logs are structured.
## Entries ## Entries
___ ___
An entry is a card you see in rumor mode, it represents a specific area or concept in the game, such as Timber Hearth's An entry is a card you see in rumor mode, it represents a specific area or concept in the game, such as Timber Hearth's
@ -38,6 +41,7 @@ Entries can be children of other entries, meaning they'll be smaller.
*The murals at the old settlement on Brittle Hollow are examples of child entries* *The murals at the old settlement on Brittle Hollow are examples of child entries*
## Rumor Facts ## Rumor Facts
___ ___
A rumor fact represents the information you might hear about a specific area or concept, usually, you get these through A rumor fact represents the information you might hear about a specific area or concept, usually, you get these through
@ -46,6 +50,7 @@ dialogue or maybe by observing a faraway planet.
![rumorFactExample]({{ "images/ship_log/rumor_example.webp"|static }}) ![rumorFactExample]({{ "images/ship_log/rumor_example.webp"|static }})
## Explore Facts ## Explore Facts
___ ___
Explore facts represent the information you learn about a specific area or concept. Explore facts represent the information you learn about a specific area or concept.
@ -53,6 +58,7 @@ Explore facts represent the information you learn about a specific area or conce
![exploreFactExample]({{ "images/ship_log/explore_example.webp"|static }}) ![exploreFactExample]({{ "images/ship_log/explore_example.webp"|static }})
# The XML # The XML
___ ___
Now that we know some terminology, let's get into how the XML works. Now that we know some terminology, let's get into how the XML works.
@ -60,6 +66,7 @@ Every planet in the ship log is represented by a single XML file, you can see th
navigate to ShipLogManager. navigate to ShipLogManager.
## Example File ## Example File
___ ___
```xml ```xml
@ -139,6 +146,7 @@ ___
``` ```
## Using The Schema ## Using The Schema
___ ___
In the example XML, you may notice something like `xsi:noNamespaceSchemaLocation` at the top, this tells whatever editor In the example XML, you may notice something like `xsi:noNamespaceSchemaLocation` at the top, this tells whatever editor
@ -148,6 +156,7 @@ Some editors may require you to [Trust](https://code.visualstudio.com/docs/edito
the schema file. Doing this varies per-editor, and you may also have to right-click the link and click download. the schema file. Doing this varies per-editor, and you may also have to right-click the link and click download.
## Loading The File ## Loading The File
___ ___
You can load your XML file to your planet by doing adding the following to your planet's config You can load your XML file to your planet by doing adding the following to your planet's config
@ -163,6 +172,7 @@ You can load your XML file to your planet by doing adding the following to your
# Rumor Mode Options # Rumor Mode Options
## Entry Layout ## Entry Layout
___ ___
By default, entries in rumor mode are laid out by rows, where each row is one planet. This will not make for a perfect By default, entries in rumor mode are laid out by rows, where each row is one planet. This will not make for a perfect
@ -197,6 +207,7 @@ For example, if I want to change an entry with the ID of `EXAMPLE_ENTRY` and ano
*A set of entries laid out with auto mode* *A set of entries laid out with auto mode*
## Images ## Images
___ ___
Custom entry images are a bit different from other custom images, instead of pointing to each file for each entry, you Custom entry images are a bit different from other custom images, instead of pointing to each file for each entry, you
@ -217,6 +228,7 @@ you set alternate sprites by making a file with the entry's ID and `_ALT` at the
would be `EXAMPLE_ENTRY_ALT.png`. would be `EXAMPLE_ENTRY_ALT.png`.
## Curiosity Colors ## Curiosity Colors
___ ___
Colors for each curiosity is given in a list, so if I wanted the curiosity `EXAMPLE_ENTRY` to have a color of blue: Colors for each curiosity is given in a list, so if I wanted the curiosity `EXAMPLE_ENTRY` to have a color of blue:
@ -250,9 +262,11 @@ Colors for each curiosity is given in a list, so if I wanted the curiosity `EXAM
*The curiosity's color is changed to blue* *The curiosity's color is changed to blue*
# Map Mode Options # Map Mode Options
___ ___
## Layout ## Layout
___ ___
Layout in map mode can be handled in two different ways, either manual or automatic, if you try to mix them you'll get Layout in map mode can be handled in two different ways, either manual or automatic, if you try to mix them you'll get
@ -420,11 +434,13 @@ between Ash Twin and Ember Twin)
As you can see, they have similar properties to planets, with the addition of rotation As you can see, they have similar properties to planets, with the addition of rotation
# Revealing Facts # Revealing Facts
___ ___
Of course, having a custom ship log is neat and all, but what use is it if the player can't unlock it? Of course, having a custom ship log is neat and all, but what use is it if the player can't unlock it?
## Initial Reveal ## Initial Reveal
___ ___
You can set facts to reveal as soon as the player enters the system by adding the `initialReveal` property You can set facts to reveal as soon as the player enters the system by adding the `initialReveal` property
@ -441,6 +457,7 @@ You can set facts to reveal as soon as the player enters the system by adding th
``` ```
## Signal Discovery ## Signal Discovery
___ ___
You can set a fact to reveal as soon as a signal is identified by editing the signal's `Reveals` attribute You can set a fact to reveal as soon as a signal is identified by editing the signal's `Reveals` attribute
@ -462,6 +479,7 @@ You can set a fact to reveal as soon as a signal is identified by editing the si
``` ```
## Dialogue ## Dialogue
___ ___
You can set a fact to reveal in dialogue with the `<RevealFacts>` tag You can set a fact to reveal in dialogue with the `<RevealFacts>` tag
@ -484,6 +502,7 @@ You can set a fact to reveal in dialogue with the `<RevealFacts>` tag
``` ```
## Reveal Volumes ## Reveal Volumes
___ ___
Reveal volumes are triggers/colliders in the world that can unlock facts from a variety of actions. Reveal volumes are triggers/colliders in the world that can unlock facts from a variety of actions.
@ -552,6 +571,7 @@ trigger the reveal
``` ```
# Setting Entry Locations # Setting Entry Locations
___ ___
Entry locations are the "Mark On HUD" option you see when in map mode, this allows the player to go back to where they Entry locations are the "Mark On HUD" option you see when in map mode, this allows the player to go back to where they