Oh sorry, I have the glitch tag and gradient tags in different files from the original set. Didn't want that original file becoming so fat with tags that it became too daunting for ppl just getting into coding to read through.
Just copy over the glitch_tag.rpy and gradient_tags.rpy if you want those as well and you should be good. Sorry for any confusion. And if you have any further issues, feel free to ask! I'm always happy to help.
I do have one question, however. I'm still kind of inexperienced with Renpy, but I'm starting to grasp the basics. Your documentation is thorough, but I'm still kind of confused on one thing. The {color} tag doesn't seem to work when using your tags, and I kind of understand why when reading about how this actually works. However, making a style with a defined color still doesn't seem to change the color of the text for me. I tried to copy the example from the script.rpy included with the download, but text colors still don't seem to work.
EDIT: I figured I should include what I did so this seems like a less abstract question
At the top:
style blood:
color "#730707"
What I'm trying to do several lines later
"{=blood}{sc=3}the text{/=blood}{/sc}"
This only adds the scare text effect. Trying to use {color} yields similar results.
You have to have the style tag within the scare tag. So you instead need to have it be.
"{sc=3}{=blood}the text{/=blood}{/sc}"
And I believe it should work. Though of course let me know if it doesn't.
The reason it has to be like that is that the text tag isn't sent the tags started outside of it. So styling you have applied on the text has to be specified inside the tag in order for it to be aware of that. Because technically speaking, the letters that will displayed inside the tag are wrapped inside Displayables and separate from the surrounding text. Which allows us to move them independently of it. But means we don't get that style information the rest of the text will get.
The DispTextStyle class I made is there to help handle that. So that if you define other tags inside the text tag, it can automatically remember them and store that formatting inside the Text displayable inside our Displayable wrapper. But if that style tag is outside of the kinetic text tag, then we don't know that tag exists. I know it's less than convenient though and I apologize for that. I couldn't find a better workaround. But if one comes along I'll be sure to update it to be more convenient.
And again, if that doesn't solve the issue let me know~
I still can't believe I registered on this page just to ask you and thank you for what you have done. I don't know if you'll see this or not, but here go.
Thank you so much for doing something so cool, I can tell you put a lot of effort into it and that shows how cool you are!
Well, here's the question, how does it work? I'm new in Ren'py, so could you explain it to me in a simple way?
Not sure how simply you want me to explain it. But if all you're looking to do is to use the basic ones I provided, you use them like any other renpy text tag. Just drop the kinetic_text_tags.rpy into your project's 'game' folder with your other .rpy files. And to use a tag like the bounce tag in your script, just type "{bt}" where you want it to start and "{/bt}" where you want it to end. So like "Here's some {bt}wavy text{/bt}". And some of them allow for modifiers as well. Such as doing "{bt=30}" will increase the amplitude of the waves.
I maybe should've documentated the parameters I set better, but for the bounce, rotate and scare tags, it's mostly just affects how extreme the effect is and is just an integer. The fade in takes how many characters into the line it is and a float representing how long the fade in should last for each character, the parameters separated by a '-'. Swap takes two strings of equal length separated by an '@' as well as how quickly to swap between them. And the gradient ones... you'll probably want to study up on hex color codes before using that one. xP
Going over how they work might be more advanced. But I provided a lot of comments in the kinetic_text_tags.rpy file to help explain what's going on. And if you have any specific questions about how it works or how to change something to your liking, feel free to ask!
Hi, again. I just did what you told me about dragging kinetic_text_tags.rpy into my folder called game, well, I tried to test if it worked, but Renpy identifies it as something that doesn't exist, I think I didn't identify it because I did something wrong, but I don't know what exactly I did wrong.
What should I do? Here is the error: I'm sorry, but an uncaught exception occurred. While processing text tag {bt=30} in u'{bt=30} {bt}Pfff-{/bt}'..: File "game/script.rpy", line 135, in script. a"{bt=30} {bt}Pfff-{/bt}" Exception: Unknown text tag u'bt=30'.
Oh, I think it's because you forgot to end the first tag before starting a new one. You have a "{bt=30}text {bt=30}" When you should do a "{bt=30}text{/bt}" The `{/ bt}` Will end the previous instance of the tag and doesn't require the =30 or whatever to signal it. But with all my text tags, you must include the {/} at some point.
Least that's what I think it happening. If I saw your script I'd probably have a better idea on what's going wrong.
this is pretty awesome! I was wondering if you could explain how to make an option for disabling animated text in general? I'm not proficient enough with code to understand how to edit the Chaos Text On/Off option to include more types of text.
I will admit that is one area where I buried the lead a little bit. So I actually went back and rewrote it a bit, which is why it's now 1.1! Hopefully should make it more clear how it's being done. So feel free to download that and look at it for yourself.
But in case you might need some more help, I'll explain it a little more here. One way you can solve it is to define a field in preferences, gui, or your persistent data called "disable_text" or whatever you'd want to call it. Then in your preferences screen, in screens.rpy, have something that can turn it True or False like I'm doing for the chaos text. And then in your text effects, make sure they have a check for if that field is True or False or whatever your setup is. And have them react accordingly. As long as your wrapper knows when to be disabled, then it should be fine.
Another approach you could try is updating the say screen to do something similar to what the history screen does and have something like
$ what = renpy.filter_text_tags(h.what, allow=[gui.history_allow_tags])
in there. Just update and modify your own version of gui.history_allow_tags to include whatever tags should be disabled. That way the tags will automatically be removed from the string. Hopefully that gives you some ideas on what approach might work best for you. Feel free to ask if you have any further questions!
If you'd like a more updated version of my explanation (or moreover anyone who finds this comment in the future). I did another similar explanation recently on the lemmasoft forums that has a bit more code and is probably more versatile. Can check it out here if you want. https://lemmasoft.renai.us/forums/viewtopic.php?p=541961#p541961
The method is different because I think filter_text_tags might throw an error now due to the what not display what it is supplied or something. But I know this other method should work if my previous solution isn't working out.
← Return to asset pack
Comments
Log in with itch.io to leave a comment.
I just want to say thank you sm for this, this code is awesome and really useful!!
Also, I don't want to bother but I have a problem, I moved the kinetic_text_tags.rpy file to my game folder, but when playing it I get this error
I don't know what I'm doing wrong
¯\_(ツ)_/¯
Oh sorry, I have the glitch tag and gradient tags in different files from the original set. Didn't want that original file becoming so fat with tags that it became too daunting for ppl just getting into coding to read through.
Just copy over the glitch_tag.rpy and gradient_tags.rpy if you want those as well and you should be good. Sorry for any confusion. And if you have any further issues, feel free to ask! I'm always happy to help.
It worked!! thanks!! <3
Thank you so much for making this! It's amazing.
I do have one question, however. I'm still kind of inexperienced with Renpy, but I'm starting to grasp the basics. Your documentation is thorough, but I'm still kind of confused on one thing. The {color} tag doesn't seem to work when using your tags, and I kind of understand why when reading about how this actually works. However, making a style with a defined color still doesn't seem to change the color of the text for me. I tried to copy the example from the script.rpy included with the download, but text colors still don't seem to work.
EDIT: I figured I should include what I did so this seems like a less abstract question
At the top:
style blood:
color "#730707"
What I'm trying to do several lines later
"{=blood}{sc=3}the text{/=blood}{/sc}"
This only adds the scare text effect. Trying to use {color} yields similar results.
You have to have the style tag within the scare tag. So you instead need to have it be.
"{sc=3}{=blood}the text{/=blood}{/sc}"
And I believe it should work. Though of course let me know if it doesn't.
The reason it has to be like that is that the text tag isn't sent the tags started outside of it. So styling you have applied on the text has to be specified inside the tag in order for it to be aware of that. Because technically speaking, the letters that will displayed inside the tag are wrapped inside Displayables and separate from the surrounding text. Which allows us to move them independently of it. But means we don't get that style information the rest of the text will get.
The DispTextStyle class I made is there to help handle that. So that if you define other tags inside the text tag, it can automatically remember them and store that formatting inside the Text displayable inside our Displayable wrapper. But if that style tag is outside of the kinetic text tag, then we don't know that tag exists. I know it's less than convenient though and I apologize for that. I couldn't find a better workaround. But if one comes along I'll be sure to update it to be more convenient.
And again, if that doesn't solve the issue let me know~
It worked out! Thanks so much for the help and the quick response. You are awesome. : )
I still can't believe I registered on this page just to ask you and thank you for what you have done. I don't know if you'll see this or not, but here go.
Thank you so much for doing something so cool, I can tell you put a lot of effort into it and that shows how cool you are!
Well, here's the question, how does it work?
I'm new in Ren'py, so could you explain it to me in a simple way?
Thanks! I really appreciate the feedback.
Not sure how simply you want me to explain it. But if all you're looking to do is to use the basic ones I provided, you use them like any other renpy text tag. Just drop the kinetic_text_tags.rpy into your project's 'game' folder with your other .rpy files. And to use a tag like the bounce tag in your script, just type "{bt}" where you want it to start and "{/bt}" where you want it to end. So like "Here's some {bt}wavy text{/bt}". And some of them allow for modifiers as well. Such as doing "{bt=30}" will increase the amplitude of the waves.
I maybe should've documentated the parameters I set better, but for the bounce, rotate and scare tags, it's mostly just affects how extreme the effect is and is just an integer. The fade in takes how many characters into the line it is and a float representing how long the fade in should last for each character, the parameters separated by a '-'. Swap takes two strings of equal length separated by an '@' as well as how quickly to swap between them. And the gradient ones... you'll probably want to study up on hex color codes before using that one. xP
Going over how they work might be more advanced. But I provided a lot of comments in the kinetic_text_tags.rpy file to help explain what's going on. And if you have any specific questions about how it works or how to change something to your liking, feel free to ask!
Thank you for responding!
Hi, again.
I just did what you told me about dragging kinetic_text_tags.rpy into my folder called game, well, I tried to test if it worked, but Renpy identifies it as something that doesn't exist, I think I didn't identify it because I did something wrong, but I don't know what exactly I did wrong.
What should I do? Here is the error:
I'm sorry, but an uncaught exception occurred.
While processing text tag {bt=30} in u'{bt=30} {bt}Pfff-{/bt}'..:
File "game/script.rpy", line 135, in script.
a"{bt=30} {bt}Pfff-{/bt}"
Exception: Unknown text tag u'bt=30'.
Oh, I think it's because you forgot to end the first tag before starting a new one. You have a "{bt=30}text {bt=30}" When you should do a "{bt=30}text{/bt}" The `{/ bt}` Will end the previous instance of the tag and doesn't require the =30 or whatever to signal it. But with all my text tags, you must include the {/} at some point.
Least that's what I think it happening. If I saw your script I'd probably have a better idea on what's going wrong.
this is pretty awesome! I was wondering if you could explain how to make an option for disabling animated text in general? I'm not proficient enough with code to understand how to edit the Chaos Text On/Off option to include more types of text.
I will admit that is one area where I buried the lead a little bit. So I actually went back and rewrote it a bit, which is why it's now 1.1! Hopefully should make it more clear how it's being done. So feel free to download that and look at it for yourself.
But in case you might need some more help, I'll explain it a little more here. One way you can solve it is to define a field in preferences, gui, or your persistent data called "disable_text" or whatever you'd want to call it. Then in your preferences screen, in screens.rpy, have something that can turn it True or False like I'm doing for the chaos text. And then in your text effects, make sure they have a check for if that field is True or False or whatever your setup is. And have them react accordingly. As long as your wrapper knows when to be disabled, then it should be fine.
Another approach you could try is updating the say screen to do something similar to what the history screen does and have something like
in there. Just update and modify your own version of gui.history_allow_tags to include whatever tags should be disabled. That way the tags will automatically be removed from the string. Hopefully that gives you some ideas on what approach might work best for you. Feel free to ask if you have any further questions!
If you'd like a more updated version of my explanation (or moreover anyone who finds this comment in the future). I did another similar explanation recently on the lemmasoft forums that has a bit more code and is probably more versatile. Can check it out here if you want. https://lemmasoft.renai.us/forums/viewtopic.php?p=541961#p541961
The method is different because I think filter_text_tags might throw an error now due to the what not display what it is supplied or something. But I know this other method should work if my previous solution isn't working out.