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.
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.