No, I've never directly made an effect like that, but with my setup, it wouldn't be hard to make one if you know what you want and have some coding experience. Could maybe make one if you need though, but currently busy with another project so can't promise anything for a bit if you need it right now.
I do have coding experience. Mostly Java though. Haven’t really worked with Ren’Py, until now. I did make a function that randomizes text. Not sure how I would go about integrating that into your code to randomize the characters to do the revealing text animation.
Mostly just would be having it so the letters keep some kind timer, randomly going through characters until the timer hits zero and then just shows the actual letter. Though if you do need me to do it I'll note it down and let you know when I can get to it later.
Hihi, new renpy user here, I was wondering if there is a way to adjust the speed of the effects? I'm currently using the glitching text but it goes a bit fast for the atmosphere I want it in... is there any way to make the glitching slower, not just the cps?
You can probably have the glitch go slower but changing the redraw time. Maybe something like 1./30 instead of 0 if you just want it at 30 fps or just .2 or something if you need it slower. It'll be the renpy.redraw(self,[new number here]) bit.
These text effects are fantastic, they've been a game changer for my VN work this year and have helped me capture a lot more fun expressiveness, so thanks so much for your work on this.
I'm actually wondering about the last example GIF you post, showing dripping text -- the way it's bouncing is unlike anything I've replicated so far, do you happen to know how to achieve that type of bounce?
# Example shader for vertical gradients
init python:
renpy.register_shader("example.gradient", variables="""
uniform vec4 u_gradient_color_1;
uniform vec4 u_gradient_color_2;
uniform vec2 u_model_size;
varying float v_gradient_done;
attribute vec4 a_position;
""", vertex_300="""
v_gradient_done = a_position.y / u_model_size.y;
""", fragment_300="""
float gradient_done = v_gradient_done;
gl_FragColor *= mix(u_gradient_color_1, u_gradient_color_2, gradient_done);
""")
# Transform that applies the gradient
transform gradientTransform:
shader "example.gradient"
u_gradient_color_1 (1.0, 1.0, 1.0, 1.0) # Formatted rgba (1.0 is equivalent to 255)
u_gradient_color_2 (1.0, 1.0, 0.0, 1.0) # The two colors in the example are white and yellow
# Color is applied manually meaning you cannot change it in text tags sadly
# This block creates the tag and applies it to text
init python:
def gradient_tag(tag, argument, contents):
return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientTransform())) for _,text in contents]
config.custom_text_tags["Vgradient"] = gradient_tag
# script.rpy
label start:
show eileen happy
e "This text is normal. {Vgradient}This text is yellow.{/Vgradient}"
show elieen happy at gradientTransform
e "You can also apply the gradient over sprites!"
the result should look something like this
there are some draw backs to this approach such as text outlines not working and requiring predetermined gradients rather than defining them in the text tag
if you have multiple vertical gradients you need displayed, you can always try this:
# Well create two custom transforms for different colors
transform gradientRedBlue:
shader "example.gradient"
u_gradient_color_1 (1.0, 0.0, 0.0, 1.0) # Red
u_gradient_color_2 (0.0, 0.0, 1.0, 1.0) # Blue
transform gradientPinkWhite:
shader "example.gradient"
u_gradient_color_1 (1.0, 0.5, 0.7, 1.0) # Pink
u_gradient_color_2 (1.0, 1.0, 1.0, 1.0) # White
# This block creates the tag and applies it to text
init python:
def red_blue_gradient(tag, argument, contents):
return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientRedBlue())) for _,text in contents]
def pink_white_gradient(tag, argument, contents):
return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientPinkWhite())) for _,text in contents]
config.custom_text_tags["RedBlueGradient"] = pink_white_gradient
config.custom_text_tags["PinkWhiteGradient"] = pink_white_gradient
# Please note i have not tested this so it might not work
Sorry for the late reply. But yeah you need to have the base kinetic_text_tags.rpy in there as well since it contains the DispTextStyle class which helps the text tag function handle other text tags. That or you can copy it from there into that file if it's the only thing you need.
Heyyy I have a little problem, I haven't tried with other functions, but with {sc} happens that the letter "q" appear in the game as "r", I have to use Upcase Q instead
I really appreciate your hard work and responsiveness on this project! I just have two quick questions- 1. Is there a way to combine the glitch and swap tags? Everything I've tried so far has only allowed one of the effects to pass through 2. What should I change for swap to have an arbitrary number of arguments?
1. You'll probably need to add the glitch tag to the DispTextStyle class as part of the custom tags. That way it'll try and add it to every letter more or less.
2. Depends on what you want to do with the swap text. You'll probably want to update the SwapText class at least to take a list of texts to do. And then tell it to keep track of which one is being shown and increment it when you want it to go to the next one. But yeah the details from there are up to how you want to do it.
I'm really new to this code language, and I've checked the files but get a bit overwhelmed looking for what you've changed. I saw the devlog changes but since I'm so ADHD I was struggling to get a definite picture of all of the new tag names you made.
Do you think you could do a write up on the itch page with what the tags are specifically? Ie "rotat" "sc", etc?
I know it's in the script itself, but it has a lot of comments and redactions it's mildly confusing for absolute beginners. It was only after going crazy that I realized your code mentioned you had discontinued some effects and tags. (AND I can see why! You streamlined so much, thank youu)
I LOVE this script, it would just be cool if all the tags you added were in a single doc with JUST the tags, and a tutorial on how to install it (I eventually figured it out, but I wasnt the only one confused on how to do it properly). AGAIN that's 900% on me. But even though I got some tags to work, I was still confused as to why glitch, rotate, and some other animations were in different files, and how I would properly install those again without messing up my game. (FYI Im working on a Mac)
Sure I'll see what I can do about that. The main reason I split them up was originally to make it more modular. So if you didn't need every tag, you could pick and choose which you want, without it becoming a 1000+ line script file to go through. But given how many of my custom tags use the DispTextStyle class to handle other tags, probably makes sense to just lump them into one. So ppl just need to download one file even if they don't use all of them. I've just been pretty busy lately with my actual job and life stuff, so I'll see about when I get around to updating it. Probably when I have enough free time to work on another tool I've been meaning to release for a while.
OF COURSE and thanks so much for your reply. Your script is awesome and approachable even for beginners and I hope my suggestion wasnt rude!!! I just spent way too long trying to figure it out (which is ON ME).
You're awesome and this script is literally everythinggggg. Thanks so much
These are FANTASTIC. I've been recently re-editing all of my text so far to integrate these in and the results are really fun! Thanks so much for putting this together. (and of course I credit this pack in the game) DownRight Fierce by Destiny-Smasher (itch.io)
thanks so much for making these text tags!! going to be updating our game with them! https://90percentstudios.itch.io/cool-kid-cody and we'll link back to this page in the credits if that works best! ^v^
Hello, I have uploaded your code. it's very good but I have a problem which is I can't use :) I have also included "glitch_tag.rpy and kinetic_text_tags.rpy" files in my game folders but I don't know why it doesn't know. here is a screenshot of error and my folders. Any help will be appricated :)
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
Hi. Does this tool include a revealing text animation like this one? (like it shows in the first few seconds of the video)
No, I've never directly made an effect like that, but with my setup, it wouldn't be hard to make one if you know what you want and have some coding experience. Could maybe make one if you need though, but currently busy with another project so can't promise anything for a bit if you need it right now.
I do have coding experience. Mostly Java though. Haven’t really worked with Ren’Py, until now. I did make a function that randomizes text. Not sure how I would go about integrating that into your code to randomize the characters to do the revealing text animation.
Mostly just would be having it so the letters keep some kind timer, randomly going through characters until the timer hits zero and then just shows the actual letter. Though if you do need me to do it I'll note it down and let you know when I can get to it later.
Yes. If you have an idea of how to do it, I’d appreciate it if you update this library with that new effect
Hihi, new renpy user here, I was wondering if there is a way to adjust the speed of the effects? I'm currently using the glitching text but it goes a bit fast for the atmosphere I want it in... is there any way to make the glitching slower, not just the cps?
You can probably have the glitch go slower but changing the redraw time. Maybe something like 1./30 instead of 0 if you just want it at 30 fps or just .2 or something if you need it slower. It'll be the renpy.redraw(self,[new number here]) bit.
These text effects are fantastic, they've been a game changer for my VN work this year and have helped me capture a lot more fun expressiveness, so thanks so much for your work on this.
I'm actually wondering about the last example GIF you post, showing dripping text -- the way it's bouncing is unlike anything I've replicated so far, do you happen to know how to achieve that type of bounce?
Hi, is possible make the gradiant be vertical instead of horizontal?
you could always try shaders, heres an example:
# Example shader for vertical gradients init python: renpy.register_shader("example.gradient", variables=""" uniform vec4 u_gradient_color_1; uniform vec4 u_gradient_color_2; uniform vec2 u_model_size; varying float v_gradient_done; attribute vec4 a_position; """, vertex_300=""" v_gradient_done = a_position.y / u_model_size.y; """, fragment_300=""" float gradient_done = v_gradient_done; gl_FragColor *= mix(u_gradient_color_1, u_gradient_color_2, gradient_done); """) # Transform that applies the gradient transform gradientTransform: shader "example.gradient" u_gradient_color_1 (1.0, 1.0, 1.0, 1.0) # Formatted rgba (1.0 is equivalent to 255) u_gradient_color_2 (1.0, 1.0, 0.0, 1.0) # The two colors in the example are white and yellow # Color is applied manually meaning you cannot change it in text tags sadly # This block creates the tag and applies it to text init python: def gradient_tag(tag, argument, contents): return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientTransform())) for _,text in contents] config.custom_text_tags["Vgradient"] = gradient_tag # script.rpy label start: show eileen happy e "This text is normal. {Vgradient}This text is yellow.{/Vgradient}" show elieen happy at gradientTransform e "You can also apply the gradient over sprites!"the result should look something like this
there are some draw backs to this approach such as text outlines not working and requiring predetermined gradients rather than defining them in the text tag
if you have multiple vertical gradients you need displayed, you can always try this:
# Well create two custom transforms for different colors transform gradientRedBlue: shader "example.gradient" u_gradient_color_1 (1.0, 0.0, 0.0, 1.0) # Red u_gradient_color_2 (0.0, 0.0, 1.0, 1.0) # Blue transform gradientPinkWhite: shader "example.gradient" u_gradient_color_1 (1.0, 0.5, 0.7, 1.0) # Pink u_gradient_color_2 (1.0, 1.0, 1.0, 1.0) # White # This block creates the tag and applies it to text init python: def red_blue_gradient(tag, argument, contents): return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientRedBlue())) for _,text in contents] def pink_white_gradient(tag, argument, contents): return [(renpy.TEXT_DISPLAYABLE, At(Text(text), gradientPinkWhite())) for _,text in contents] config.custom_text_tags["RedBlueGradient"] = pink_white_gradient config.custom_text_tags["PinkWhiteGradient"] = pink_white_gradient # Please note i have not tested this so it might not workhope this helps!
Hey! First of all, great work! :)
I really appreciate the hard work and the responsiveness you put on this project!
I have a small question regarding the glitch text. Might be silly, but everytime I try to use it, I get the same error:
my_style = DispTextStyle()
NameError: name 'DispTextStyle' is not defined.
How can I resolve this?
Thank you in advance! :) Have a great day!
Sorry for the late reply. But yeah you need to have the base kinetic_text_tags.rpy in there as well since it contains the DispTextStyle class which helps the text tag function handle other text tags. That or you can copy it from there into that file if it's the only thing you need.
Heyyy I have a little problem, I haven't tried with other functions, but with {sc} happens that the letter "q" appear in the game as "r", I have to use Upcase Q instead
I really appreciate your hard work and responsiveness on this project! I just have two quick questions-
1. Is there a way to combine the glitch and swap tags? Everything I've tried so far has only allowed one of the effects to pass through
2. What should I change for swap to have an arbitrary number of arguments?
Thank you!
1. You'll probably need to add the glitch tag to the DispTextStyle class as part of the custom tags. That way it'll try and add it to every letter more or less.
2. Depends on what you want to do with the swap text. You'll probably want to update the SwapText class at least to take a list of texts to do. And then tell it to keep track of which one is being shown and increment it when you want it to go to the next one. But yeah the details from there are up to how you want to do it.
I'm really new to this code language, and I've checked the files but get a bit overwhelmed looking for what you've changed. I saw the devlog changes but since I'm so ADHD I was struggling to get a definite picture of all of the new tag names you made.
Do you think you could do a write up on the itch page with what the tags are specifically? Ie "rotat" "sc", etc?
I know it's in the script itself, but it has a lot of comments and redactions it's mildly confusing for absolute beginners. It was only after going crazy that I realized your code mentioned you had discontinued some effects and tags. (AND I can see why! You streamlined so much, thank youu)
I LOVE this script, it would just be cool if all the tags you added were in a single doc with JUST the tags, and a tutorial on how to install it (I eventually figured it out, but I wasnt the only one confused on how to do it properly). AGAIN that's 900% on me. But even though I got some tags to work, I was still confused as to why glitch, rotate, and some other animations were in different files, and how I would properly install those again without messing up my game. (FYI Im working on a Mac)
I was following along with this video, and you'll probs notice you cant use some of these tags with your current version!
Sure I'll see what I can do about that. The main reason I split them up was originally to make it more modular. So if you didn't need every tag, you could pick and choose which you want, without it becoming a 1000+ line script file to go through. But given how many of my custom tags use the DispTextStyle class to handle other tags, probably makes sense to just lump them into one. So ppl just need to download one file even if they don't use all of them. I've just been pretty busy lately with my actual job and life stuff, so I'll see about when I get around to updating it. Probably when I have enough free time to work on another tool I've been meaning to release for a while.
OF COURSE and thanks so much for your reply. Your script is awesome and approachable even for beginners and I hope my suggestion wasnt rude!!! I just spent way too long trying to figure it out (which is ON ME).
You're awesome and this script is literally everythinggggg. Thanks so much
These are FANTASTIC.
I've been recently re-editing all of my text so far to integrate these in and the results are really fun! Thanks so much for putting this together.
(and of course I credit this pack in the game)
DownRight Fierce by Destiny-Smasher (itch.io)
Duuuuude! This is so OP!!!! You're the GOAT!!!!!
thanks so much for making these text tags!! going to be updating our game with them! https://90percentstudios.itch.io/cool-kid-cody and we'll link back to this page in the credits if that works best! ^v^
Hey Wattson, can you hit me up in pms on twitter, or anywhere? I want to ask a few questions in private.
Eheh, I used the scary effect (just a bit less shaky) in my last jam entry: https://synstoria.itch.io/autumn-spirit
It works really well when the angry ghost is speaking eheh
Thanks again for sharing!
Hello, I have uploaded your code. it's very good but I have a problem which is I can't use :) I have also included "glitch_tag.rpy and kinetic_text_tags.rpy" files in my game folders but I don't know why it doesn't know. here is a screenshot of error and my folders. Any help will be appricated :)