Comments

Log in with itch.io to leave a comment.

I want to modify the code a little bit and use it... can I do that?

自分の実力によってコードを少し変形して使いたいですが、そうしてもいいですか?

Yes please feel free!

ty KC!

This is neat and straight-forward! Thanks for making it and making games more accessible :)

I just have a question... Is it possible to add this to button sounds somehow?

imagebutton idle "images/mag.png" action [Show("map_mag"), SetVariable("chaptermap", "mag")] focus_mask True activate_sound "sounds/magazine.ogg"

To confirm, you mean adding sound captions and not an image caption, correct? While it's not built in to Caption Tool, you can use sound captions in a button action with regular Ren'Py by using the function as an action in your button instead of using activate_sound.

Example:

imagebutton idle "images/mag.png" action [Show("map_mag"), SetVariable("chaptermap", "mag"), Function(play_sound, magazine)] focus_mask True

For this to work, you need to also have your magazine sound registered in your list of sounds.

Ah yes, this is what I meant! I just tested it and it works fine :) Thank you.

(1 edit)

Hi, I've come here to bring up an issue regarding the translation function for the captiontool. Whenever you change the language and change it back, the language captions remain the same...

For example, I selected the test language here. The captions change as intended, but when I change it back to English, they stay the same.

I'm on Ren'py 7.4.11.2266

(+1)

i think that's an issue with renpy not reinitialising language settings upon load. (you'll find the same issue if you play around with languages and try to load a language with font A from a language with font B, where A and B don't support the same characters.) 

it shouldn't be an issue if you start the game normally after changing the language & have the sound caption init as included in the sample project's start label. for safety you can add the init to renpy's after load label too. 

Seems like it's a better idea to tie it to a persistent value and have separate sets of captions for each language, rather than let Renpy's translation function do the work, the captiontool in my game is very buggy regarding the translation function. 

I'm taking a look into this myself and trying to find a way, but I'd like your word on it, thanks :D

textbutton "English" action Language(None), SetField(persistent, "lang", "english")
textbutton "日本語" action  Language("japanese"), SetField(persistent, "lang", "japanese")

i'm honestly not sure why yours is very buggy as i've published games with captions in multiple languages with no big issues, but please feel free to modify the code to fit your use!

Hello, I'm using your tool. I want to translate the text caption but I can't. I test it in your demo project but the text still not translated. Please help me, I don't understand with this...

When translating, you have to use Ren'Py's translation option to add a new language. The tool has an example language called "test" which you can look at to see how it works. 

For image captions, all you have to do is include the translation in the translation files generated by Ren'Py. 

For sound captions, see the example listed at the top of script.rpy.

I have seen the "test" language and try to change the language to other language. But in the game, its not change.

It is still "TEST Music: ..."

This is the translation script:


Do I have to change "soundtext = ("TEST Sound: ")" to "soundtext = _("TEST Sound: ")" so the language change?

(1 edit)

As stated in my previous comment, for sound captions, see the example listed at the top of script.rpy. You change the text in the translate python section for each language.

Also, you should be generating new translation files for your language instead of using the TEST language. Please take a look here for more info about translating Ren'Py: https://www.renpy.org/doc/html/translation.html

Thank you for helping me.