To simulate real speech, I always add short pauses after punctuation marks in my game's dialogue. This makes the text more natural to read in slow text mode, but causes it to be a bit choppy if the text is set to display instantly. That's not very good, so I want to give the player the option to decide how long the pauses should be (or turn them off entirely).
I got to the point where I created the following custom text tag:
Code: Select all
def c_tag(tag, argument):
if persistent.speechpause:
return [(renpy.TEXT_TAG, "w="+str(persistent.speechpause_length))]
else:
return [(renpy.TEXT_TAG, "w=0")]
config.self_closing_custom_text_tags["c"] = c_tag
So that explained why it wasn't working.The dialogue text tags {p}, {w}, {nw}, and {fast} are processed before custom text tags, and should either be not included inside a custom text tag, or passed through unchanged.
I also came across RENPY_LESS_PAUSES, but that's not really what I need. I only want the player to be able to turn off specific pauses (those designated with the {c} tag), not all of them.
Does anyone have an idea for how to solve this? Or would customizing pauses be a worthwhile feature request?