Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
vbox:
label _("Text Speed \n")
bar value Preference("text speed")
hbox:
text _("{color=#ff88ba}Character Per Second: {/color}")
text "{color=#ff88ba}[preferences.text_cps]{/color}"
That's in the preferences menu. I like how it shows the text speed in real time as you move the bar. My only problem is that it shows it as a float value meaning the number has way too many decimals. Preferrably, I'd not have it show any decimals whatsoever.
I tried defining a new value and then using that in the preferences menu like "txtspd = int(preferences.text_cps)"
But then, when I used this in the preferences menu, the number didn't update in real time. Or at all, for that matter. It just stayed in the number that it was set to when the game loaded (as is to be expected I suppose)
text "{color=#ff88ba}Character Per Second: {/color}"
$ val = int(round(preferences.text_cps))
$ val = '∞' if val == 0 else val
text "{color=#ff88ba}[val]{/color}"