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
Description: Guide to making dialogue in New Horizons
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:
```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"
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>
<Name>Start</Name>
<EntryCondition>DEFAULT</EntryCondition>
<Dialogue>
<Page>Start</Page>
<Page>Start Part 2</Page>
</Dialogue>
<DialogueNode> <!-- A dialogue node is a set of pages displayed to the player optionally followed by options -->
<Name>Start</Name> <!-- The name of this node, used to go to this node from another node -->
<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> <!-- The actual dialogue we want to show the player -->
<Page>Start</Page> <!-- A single page of the dialogue -->
<Page>Start Part 2</Page> <!-- Another page -->
</Dialogue>
<DialogueOptionsList>
<DialogueOption>
<Text>Goto 1</Text>
<DialogueTarget>1</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto 2</Text>
<DialogueTarget>2</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget>
</DialogueOption>
</DialogueOptionsList>
</DialogueNode>
<DialogueNode>
<Name>1</Name>
<Dialogue>
<Page>This is 1</Page>
</Dialogue>
<DialogueOptionsList>
<DialogueOption>
<Text>Goto 2</Text>
<DialogueTarget>2</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget>
</DialogueOption>
</DialogueOptionsList>
</DialogueNode>
<DialogueOptionsList> <!-- Show options the player can choose from when the character is done talking -->
<DialogueOption> <!-- A single option the player can pick -->
<Text>Goto 1</Text> <!-- The text to display for the option -->
<DialogueTarget>1</DialogueTarget> <!-- The name of the node to jump to -->
</DialogueOption>
<!-- A few more options... -->
<DialogueOption>
<Text>Goto 2</Text>
<DialogueTarget>2</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget>
</DialogueOption>
</DialogueOptionsList>
</DialogueNode>
<DialogueNode> <!-- Another node -->
<Name>1</Name> <!-- Name of the node -->
<!-- (Note the lack of an EntryCondition) -->
<Dialogue>
<Page>This is 1</Page>
</Dialogue>
<DialogueOptionsList>
<DialogueOption>
<Text>Goto 2</Text>
<DialogueTarget>2</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget>
</DialogueOption>
</DialogueOptionsList>
</DialogueNode>
<DialogueNode>
<Name>2</Name>
<Dialogue>
<Page>This is 2</Page>
</Dialogue>
<DialogueOptionsList>
<DialogueOption>
<Text>Goto 1</Text>
<DialogueTarget>1</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget>
</DialogueOption>
</DialogueOptionsList>
</DialogueNode>
<DialogueNode>
<Name>End</Name>
<Dialogue>
<Page>This is the end</Page>
</Dialogue>
</DialogueNode>
<DialogueNode> <!-- Another node why not -->
<Name>2</Name>
<Dialogue>
<Page>This is 2</Page>
</Dialogue>
<DialogueOptionsList>
<DialogueOption>
<Text>Goto 1</Text>
<DialogueTarget>1</DialogueTarget>
</DialogueOption>
<DialogueOption>
<Text>Goto End</Text>
<DialogueTarget>End</DialogueTarget>
</DialogueOption>
</DialogueOptionsList>
</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>
```
# 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

@ -1,17 +1,20 @@
Title: Ship Log
Description: A guide to editing the ship log in New Horizons
Title: Ship Log
Description: A guide to editing the ship log in New Horizons
Sort_Priority: 70
# Intro
___
Welcome! this page outlines how to create a custom ship log.
# Understanding Ship Logs
___
First thing's first, I'll define some terminology regarding ship logs in the game, and how ship logs are structured.
## 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
@ -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*
## Rumor Facts
___
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 }})
## Explore Facts
___
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 }})
# The XML
___
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.
## Example File
___
```xml
@ -139,6 +146,7 @@ ___
```
## Using The Schema
___
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.
## Loading The File
___
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
## 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
@ -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*
## Images
___
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`.
## 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:
@ -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*
# Map Mode Options
___
## 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
@ -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
# 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?
## Initial Reveal
___
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
___
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
___
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 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
___
Entry locations are the "Mark On HUD" option you see when in map mode, this allows the player to go back to where they