Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[speed], input & text separation update #1718

Merged
merged 8 commits into from
Sep 19, 2023
Merged

[speed], input & text separation update #1718

merged 8 commits into from
Sep 19, 2023

Conversation

Jowan-Spooner
Copy link
Collaborator

@Jowan-Spooner Jowan-Spooner commented Sep 12, 2023

This update contains a number of smaller and bigger changes to the text event+subsystem.

Speed multiplier and letter speed

As outlined in #1614 I have split the [speed] effect into

  • a speed multiplier that can be set with [speed] that affects both pauses and letter speed
  • the letter speed that can be changed with [lspeed].
  • As before both of these are per-event
  • [lspeed] and [pause] can specify absolute values with =x!

Settings.text_speed is new user speed multiplier

Dialogic.Settings.text_speed now acts as a text_speed multiplier. It is applied for any non-absolute pause or speed command.
It also will live-update any currently revealing text. This is done by a new way of listening to settings changes with Dialogic.Settings.connect_to_change(setting:StringName, callable:Callable).

2023-09-15-22-52-19.webm
func _on_speed_value_changed(value):
    Dialogic.Settings.text_speed = 10-value

New text splitting

The text event now supports splitting text events into seeminly multiple events (fixes #1691).
The syntax is [n].

The text node and subsystem now also allow to "append" text instead of always clearing the text. This can be done by having [n+] inside text.
New settings also allow to automatically split text at new lines, effectively fixing the last item on #963. It can be set, whether these lines should be treated as [n] or [n+]
grafik

Input stuff

I have decided that as only VERY few events want to wait for input, they will have to define that manually. So continue_at_end is now always true and thus removed. Dialogic will always only continue when finish() is called. The text event will handle this automatically as does the wait input event.

A new [input] effect waits for input before continuing text. This effect is a bit different from [n+] as it will be skipped if text is skipped before.

Other things

  • better error for wrong backgrounds scene
  • implement base character highlight functionality
  • text editor auto-complete will now put quotes around character names with spaces in them
  • text editor auto-complete will now correctly suggest portraits for characters with spaces in them
  • enabled autowrap on text editor

There is currently no highlight on the default portrait. Should be added in a follow-up PR.
Events can now be split into "multiple" text events (faked, still on event, but shown one at a time) with [n] (for [new]).

This should fix #1691
[speed] is now a multiplier, both for letter speed and pauses (including autopauses).
[lspeed] is the letter speed as previously. Both for [lspeed] and [pauses] absolute values can be given with =x!
[input] will await any input before continuing the text.
[n] will split the text into seemingly multiple events
[n+ will split the text into another "event" but keep the previous text visible too.
- show indicators during [input] effect
- add option to auto-split text events at new lines
- add option to auto-split text events at new lines in "addition"-mode
- fix character portrait suggestions (text editor) for characters with space in their name
- add/fix new text settings
- fix characters with spaces in names being added in quotes in text editor suggestions
Default letter speed is saved differently again (dialogic/text/letter_speed). This might need some adjusting when updating.

Settings subsystem allows connecting to settings changes now (with Settings.connect_to_change(@setting, @callable))

Added Dialogic.Text.update_text_speed() method. Also made sure any changes to the user speed (Settings.text_speed) are instantly applied to all text nodes, allowing for live-adjustments.

Enabled wrap on text editor.

Fixed autoadvance.
broken leftover from long ago.
@Jowan-Spooner Jowan-Spooner merged commit e8feb08 into main Sep 19, 2023
@Jowan-Spooner Jowan-Spooner deleted the speed-update branch October 7, 2023 13:12
imberny added a commit to imberny/dialogic that referenced this pull request Oct 29, 2023
* this "install" method can be safely used by subsystems which rely on other subsystems
* fixes dialogic-godot#1819 which was caused by a subsystem fetching another subsytem not yet in the tree (introduced by dialogic-godot#1718)

Since the subsystems are loaded by parsing the directory, I assume the order might vary by OS (I'm on Linux and could reproduce dialogic-godot#1819).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text effect to split text into multiple "events"
1 participant