I've implemented a custom text tag that selects random choices from lists of options within the text, allowing for some generative/procedural text lines. Unfortunately, when self-voicing (TTS) is on, the tag doesn't actually seem to get applied for the purposes of the voice, resulting in every option being read out in sequence.
Self-voicing seems to use the original text of a Text object instead of the tokenized version that's had custom text tags applied. This is a problem when the custom text tag modifies the text itself instead of just styling it, as is the case with two of the examples in the docs: https://www.renpy.org/doc/html/custom_text_tags.html
Hit "A" to open the accessibility menu and select Self-Voicing: "Debug"
Hover over the produced dialogue and note that the text being voiced does not match the text being displayed.
Proposed Solution
Ideally, the custom tags would only be applied once, and the results of that application used for both visual display and self-voicing. This is useful for if there is any randomness in the custom tag logic or similar complex cases.
Workaround
As a workaround, I'm currently using the following monkeypatch, which is obviously not ideal:
PhanesDionysos commentedMar 2, 2022
Issue
I've implemented a custom text tag that selects random choices from lists of options within the text, allowing for some generative/procedural text lines. Unfortunately, when self-voicing (TTS) is on, the tag doesn't actually seem to get applied for the purposes of the voice, resulting in every option being read out in sequence.
Self-voicing seems to use the original text of a Text object instead of the tokenized version that's had custom text tags applied. This is a problem when the custom text tag modifies the text itself instead of just styling it, as is the case with two of the examples in the docs: https://www.renpy.org/doc/html/custom_text_tags.html
Reproduction Steps
rot13orbangexamples from: https://www.renpy.org/doc/html/custom_text_tags.htmlProposed Solution
Ideally, the custom tags would only be applied once, and the results of that application used for both visual display and self-voicing. This is useful for if there is any randomness in the custom tag logic or similar complex cases.
Workaround
As a workaround, I'm currently using the following monkeypatch, which is obviously not ideal:
The text was updated successfully, but these errors were encountered: