-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Extend Auto-Advance #1755
Merged
Jowan-Spooner
merged 57 commits into
dialogic-godot:main
from
CakeVR:extend-auto-advance
Oct 13, 2023
Merged
Extend Auto-Advance #1755
Jowan-Spooner
merged 57 commits into
dialogic-godot:main
from
CakeVR:extend-auto-advance
Oct 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This value will be used to extend the Auto-Advance delay.
Additionally, add Utility to transform a String to a Hash Set.
Set `ResetDelaysButton`'s icon.
The AutoAdvance delay offers many options now. Hence, it's recommended to invoke the related delay methods.
This ignores escaped BBCodes, because BBCodes cannot be escaped in Godot. However, in the future we may want to differentiate between real BBCodes and squared bracket text.
Add support for the new AutoAdvance delays. Add support for long voice lines overriding user-defined AutoAdvance delay. Add support for ignoring certain characters, if Per Character Delay gets calculated.
An old range input that has been moved out of my sight. It's no longer used and can be safely removed.
This feature has been unintentionally removed during the rework. Last but not least, the `effect_autoadvance` method no longer supports `v` prefixes. The prefix used to control whether the effect would await playing voices. However, the playing voice audio will always be respected on Auto-Advance now.
The calculation happens in the `input_handler` now, we can retrieve the time from there.
The method body has been cleared up.
If set, the `temp_wait_time` will be used instead of calculating a delay. Long voices will override `temp_wait_time`. Add `get_autoadvance_time`.
Removes `get` and `set` methods for extended Auto-Advance settings. The `get_autoadvance_info` method can be used to access the settings.
Updates the button's look if the `autoadvanced_enabled` look has been updated.
This was enabled before but that's rarely wanted.
This was not needed. The enabled state is now inside `Settings.autoadvance`.
Auto-Advance can be kept until next event or user input. If both are enabled, the next event must be reached first.
Add a signal for Auto-Advance changes. Add a variable to track Auto-Advance enable state. Add method to enable Auto-Advance by the system. The system can be Dialogic, if the Auto-Advance is always on via Project Settings or code. Refactor Auto-Advance Setter methods. Add `waiting_for_system` Auto-Advance state info. Fix default values for Auto-Advance state info for `await_playing_voice`. Replace `Dialogic.Settings.autoadvance_enabled`.
Includes - method renames - method merges - removing some unused stuff - adds Dialogic.current_state_info['text_parsed'] which has bbcode removed already Makes the UI in the settings a bit simpler at the cost of a little less flexibility.
The settings_text scene broke, I will look into it.
Note: The final PR works a bit differently from what is described in the initial comment. That is no problem as hopefully a good wiki page will be created soon. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The current Auto-Advance delay does not respect:
The developer cannot expose a UI setting the Auto-Advance speed to scale with their reading proficiency.
Solution
On the user-facing end, this Pull Request adds a new UI to the Text Settings, offering to select the specific scaling values for aforementioned ignored text properties.
Additionally, adds support to ignore specific characters, to prevent punctuation and whitespaces to be exempt from Per Character calculation.
The String input gets mapped into a Dictionary with
null
values, a Hash Set in disguise.The user-facing settings will be stored in the state info dictionary
autoadvance
, alongside the already added keystemp_enabled
andtemp_wait_time
.Voice lines playing longer than the calculated Auto-Advance delay will override the waiting time, to allow them playing until the very end.
The typewriter will now save their time taken to type out the entire text into a state info. This allows the Auto-Advance to respect the base and speed modifiers that may have taken place and changed the read time experience.
The player can change the delay modifier via
Dialogic.Settings.autoadvance_delay_modifier
.Problems
The Auto-Advance strips BBCodes via RegEx, however, it does not differentiate between
[text]
and official/custom BBCodes, for instance[b]
.Therefore, if the player wants to use these in their text, the Auto-Advance delay calculation will ignore the square bracketed text.
Related Issues
This Pull Requests closes: