Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CakeVR committed May 3, 2024
2 parents 4d850e5 + d16b777 commit decab22
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 33 deletions.
2 changes: 1 addition & 1 deletion documentation/creating-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Be aware, you have to:
- **orig_pos** = the position you started at

## Naming animations
Importantly the name of your animation file will determine if it is a Join, Leave or Update animation! If it ends with `_in` it is a join animation, ending in `_out` makes it a leave animation, while all other names are concidered update animations (often called attention seekers in other software).
Importantly the name of your animation file will determine if it is a Join, Leave or Update animation! If it ends with `_in` or contains `_in_` it is a Join animation, ending in `_out` or containing `_out_` makes it a Leave animation, while all other names are considered Update animations (often called attention seekers in other software).

---

Expand Down
12 changes: 8 additions & 4 deletions documentation/dialogic-nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ Usually, this means Dialogic will add a **layout scene** made of `DialogicNodes`

This topic is closely related to [Styles and Layouts](styles-and-layouts.md), so take a look at that page if you haven't done so yet.

You can find all Dialogic nodes in our [Node Class Reference Index](node_class_index.md).

---

## 2. What is a dialogic node?
## 2. What is a Dialogic Node?

Many events have nodes that you need if you want them to actually affect the game:

Expand All @@ -30,7 +32,9 @@ Many events have nodes that you need if you want them to actually affect the gam

- **Text Input event:** `TextInput`

Here are some things to know about dialogic nodes:
If you want to find all Dialogic nodes, check out the [Node Class Reference Index](node_class_index.md).

Here are some things to know about Dialogic nodes:

- Dialogic Nodes provide very different functionality. Hence, they have very different properties. Learn more about each Dialogic Node by adding it to your scene and taking a look at the inspector.

Expand All @@ -39,10 +43,10 @@ Here are some things to know about dialogic nodes:

---

## 3. Using dialogic nodes
## 3. Using Dialogic nodes

You can add these nodes with the usual `Add Node` window.

It's not relevant where they are placed in the tree, as they will be recognized by the group they are automatically added to.

Some dialogic nodes require a somewhat special setup. For example, the `TypingSound` node expects to be the child of a `DialogText` node.
Some Dialogic nodes require a special setup. For example, the `TypingSound` node expects to be the child of a `DialogText` node.
4 changes: 1 addition & 3 deletions documentation/dialogic-signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,4 @@ Dialogic subsystems have many useful signals. Here is a selection of them:
- signal `variable_changed(info:Dictionary)`
- signal `variable_was_set(info:Dictionary)` # only on set variable events

And many more. If you want to react to something particular happening, take a look to see if the responsible subsystem has a signal for that.

If you need help, please open an issue or reach out to us.
If you want to find all signals, head over to the [Subsystem Index](subsystem_class_index.md), select a subsystem and take a look at the related **Signals** category.
33 changes: 29 additions & 4 deletions documentation/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ I see numerous people saying that the plugin should come with Godot, but I belie

Use a `Music` event to set a resource and then cancel it with a `Music` event with no resource.

![header_faq](/media/faq/background_music_toggling.png)
![header_faq](./media/faq/background_music_toggling.png)

This example will fade in the music over 4 seconds and then fade it out over 5 seconds.

Expand Down Expand Up @@ -67,12 +67,11 @@ Disabling the translation until you are done with most of the text is recommende
The following code allows you to check if the text box is visible and then act based on its state.
```gdscript
if Dialogic.Text.is_textbox_visible():
Dialogic.Text.hide_text_boxes()
Dialogic.Text.hide_text_boxes()
else:
Dialogic.Text.show_text_boxes()
Dialogic.Text.show_text_boxes()
```


## I encounter a small lag or freeze when starting the dialogue!

Preloading a style can be very useful using its `prepare` method.\
Expand All @@ -85,3 +84,29 @@ style.prepare()

Last, be aware that Godot's shader compiler runs on demand; whenever new shaders need to be loaded in a style (or any resource), it will compile, causing a freeze.\
Hence, it's recommended to compile these ahead of time if you run into problems still.

## How to transition from dialog to gameplay?

When your dialog ends and you want to switch to a different context (e.g. gameplay) you will have to decide how to deal with the current dialog layout. In `Settings/General` you will find the `Layout Node Behaviour` setting, which you can switch between **Delete**, **Hide** and **Keep**.

If you plan to have a transition that is managed outside of dialogic, you might have to use **Hide** and then manually show it again and hide it later. E.g.:

```gdscript
func _on_dialogic_timeline_ended() -> void:
var layout := Dialogic.Styles.get_layout_node()
layout.show()
# do my transiton
await transtion_finished
layout.hide()
```

Or you trigger the transition from within the timeline, so that the timeline only ends once the transition asks for it. Then you can use the **Hide** or **Delete** modes. Here is an example scene transition code snippet (on an autoload), that is then called from the timeline:

```gdscript
func change_scene(scene_path: String):
Transition.fade_out()
await Transition.fade_out_completed
get_tree().change_scene_to_file(scene_path)
```

![transition-call-event.jpg](./media/faq/transition-call-event.jpg)
4 changes: 2 additions & 2 deletions documentation/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Now, let's verify you have correctly installed Dialogic:
## 🚧 How to install the latest WIP Version 🚧

```admonish
*Dialogic is constantly evolving. Oftentimes fixes for bugs or new features might only be available on the main branch. This is especially true during the alpha and beta phase. If you are interested in using the main branch it's easy to do so.*
*Go to [the main page of the repository](https://github.com/dialogic-godot/dialogic) and click on the green `Code` button then presse the `Download ZIP` button. From there you can install that ZIP's content like a release.*
Dialogic is constantly evolving. Oftentimes, fixes for bugs or new features might only be available on the main branch. This is especially true during the alpha and beta phases. If you are interested in using the main branch, it's easy to do so.
Go to [the main page of the repository](https://github.com/dialogic-godot/dialogic) and click on the green `Code` button, then press the `Download ZIP` button. From there, you can install that ZIP's content like a release.
```

---
Expand Down
1 change: 0 additions & 1 deletion documentation/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ First, Dialogic 1 is exclusively for Godot 3, while Dialogic 2 requires Godot 4.
Hence, your project must work in Godot 4.1, it's a very different engine with plenty of changes.

If you have already made a lot of progress in your game, there is no reason to upgrade. We recommend you stick to Godot 3 and Dialogic 1.
However, if you want to give it a try, you can check out this [community-made converter-module](https://github.com/dialogic-godot/1to2-converter). Please feel invited to contribute to it if something doesn't work!
Binary file added documentation/media/faq/transition-call-event.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 18 additions & 18 deletions documentation/subsystem_class_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
*All subsystems from the Dialogic 2.*

- [Subsystem]()
- [Audio](classes/class_subsystem_audio.md)
- [Backgrounds](classes/class_subsystem_backgrounds.md)
- [Portraits](classes/class_subsystem_portraits.md)
- [Choices](classes/class_subsystem_choices.md)
- [Animation](classes/class_subsystem_animation.md)
- [Expression](classes/class_subsystem_expression.md)
- [Input](classes/class_subsystem_input.md)
- [Glossary](classes/class_subsystem_glossary.md)
- [History](classes/class_subsystem_history.md)
- [Jump](classes/class_subsystem_jump.md)
- [Save](classes/class_subsystem_save.md)
- [Settings](classes/class_subsystem_settings.md)
- [Styles](classes/class_subsystem_styles.md)
- [Text](classes/class_subsystem_text.md)
- [Text_input](classes/class_subsystem_text_input.md)
- [Variables.VariableFolder](classes/class_subsystem_variables.variablefolder.md)
- [Variables](classes/class_subsystem_variables.md)
- [Voice](classes/class_subsystem_voice.md)
- [Audio](classes/subsystem_audio.md)
- [Backgrounds](classes/subsystem_backgrounds.md)
- [Portraits](classes/subsystem_portraits.md)
- [Choices](classes/subsystem_choices.md)
- [Animation](classes/subsystem_animation.md)
- [Expression](classes/subsystem_expression.md)
- [Input](classes/subsystem_input.md)
- [Glossary](classes/subsystem_glossary.md)
- [History](classes/subsystem_history.md)
- [Jump](classes/subsystem_jump.md)
- [Save](classes/subsystem_save.md)
- [Settings](classes/subsystem_settings.md)
- [Styles](classes/subsystem_styles.md)
- [Text](classes/subsystem_text.md)
- [Text_input](classes/subsystem_text_input.md)
- [Variables.VariableFolder](classes/subsystem_variables.variablefolder.md)
- [Variables](classes/subsystem_variables.md)
- [Voice](classes/subsystem_voice.md)

0 comments on commit decab22

Please sign in to comment.