This guide assumes that you have just completed ‘2. The Test Reader’.
Nylon uses the concept of Scenes to represent ‘dialogues’. Though that is an understatement of their capabilities.
Specifically Nylon uses Scenes to define one running context of content. Scenes are composed of Sequences, which are themselves reusable building blocks for your dialogue. And both Scenes and Sequences are edited within the Godot editor. In fact, they are normal Godot Scenes comprising of Nodes and Resources.
You could imagine a Scene like a Chapter or Section of a book. And a Sequence as a Page or Paragraph, with the ability to be copied and rearranged at will.
If you are familiar with writing tools like Scrivener. Consider a Scene as a Folder, and the Sequences as the rearrangeable text files within.
If you are familiar with Twine. Consider a single Scene as an entire Twine game, and Sequences as groups of individual Nodes within your Twine hierarchy.
Creating a NylonScene
Since NylonScenes are ‘just’ Godot Scenes, you create them the same way.
- Create a new Scene in the Editor, with a NylonScene node as the root node. (The first and topmost, not having any parents.)
You can store this scene anywhere you want. If you installed the NylonContent/ directory, you may consider storing it in NylonContent/Scenes/, but this is not required. Name the file ‘MyFirstScene.tscn’.
This node has a number of properties you may configure, including Authorship credits, Variable storage, and Scene Context. More on those later.
- Add a NylonSequence Node as a Child of the NylonScene
All NylonScenes must contain at least one Sequence. And it is the first sequence child which will be used as the starting sequence.
You can rename these nodes for your convenience. For example you might wish to rename the NylonScene to the name of your Scene file, ‘MyFirstScene’, and the NylonSequence to ‘Start’
- Add a NylonText Node as a Child of the NylonSequence
NylonText is the fundamental Node for sending Text to a NylonReader to be displayed to your player.
If you have enabled the NylonEditorHelper plugin, selecting the NylonText node in the editor will open it. Here you can edit the text property of the node in a dedicated editor.
It is recommended you do the bulk of your writing in an external tool like Obsidian or Scrivener, and then move your text to Nylon, and use the plugin to add Godot specific formatting.
In the future, Nylon may support markdown formatting, but for now you are limited to Godots built in BBCode.
- Add some Text!
Try the classic “Hello world!”
- Load the Scene and run the Project
Return to the scrip you created in ‘2. The Test Reader’ and change the constant file path for the example scene to point at your new ‘MyFirstScene.tscn’ file.