What I would like to do is add stuff like "shivering" letters (wherein they're moving back and forth quickly -- a little like the character select screen in Undertale), letters that change colour, and more complex stuff like glitching letters, or other more complicated, possibly variable dependent effects. The actual specifics of making each effect is, I recognize, at least partly covered by the ATL language (except for things like changing colour, as far as I can tell; I'm not really sure if there is a way to make ATL affect style properties, but I'm leaving that for later), which isn't the problem at the moment. The actual problem, however, has been trying to have this affect individual letters rather than an entire block of text.
Here has been what I've accomplished so far. In order to make sure I can apply a transform to dialogue, I went off the code figured out in the thread here: viewtopic.php?t=48419. Here was my version of it, adjusted so that instead, I was adding the what_transform argument instead of the window_transform one.
Code: Select all
# Within screens.rpy
...
transform Null_Transform:
pass
screen say(who, what, what_Transform = Null_Transform):
style_prefix "say"
window:
id "window"
if who is not None:
window:
id "namebox"
style "namebox"
text who id "who"
text what at what_Transform:
id "what"
...
Code: Select all
define c = Character("Chara", show_what_transform=fancy_text_effect)
The closest I can figure is trying to edit the say screen definition. I was thinking that if i could take the what object (which, from what i understand, is a string or a list of strings and displayables), unpack it into a list of characters, and then use the resulting list in place of "text what at what_Transform:" might be part of the way there, but I worry that this would either do nothing, or would return an error.
I do know that Ren'Py itself uses separate transforms on individual characters a little further in the screens.rpy file. The code for the skip indicator is as follows:
Code: Select all
...
text "▸" at delayed_blink(0.0, 1.0) style "skip_triangle"
text "▸" at delayed_blink(0.2, 1.0) style "skip_triangle"
text "▸" at delayed_blink(0.4, 1.0) style "skip_triangle"
## This transform is used to blink the arrows one after another.
transform delayed_blink(delay, cycle):
alpha .5
pause delay
block:
linear .2 alpha 1.0
pause .2
linear .2 alpha 0.5
pause (cycle - .4)
repeat
...
So my question is, specifically: Is there a way I could chain together separate text files consisting of single characters, each with their own separate transforms, so that they can share a single ID in the say screen? Or is there some other far easier way to do ATL effects on individual letters that I've just entirely missed?
I hope this all makes enough sense, and thanks for reading this far and for offering any help you can!