A downloadable tool

Download NowName your own price

This is Caption Tool, a simple tool for adding image and sound captions to your Ren'Py game. (For an example of a game using this tool, take a look at last day of spring.) It was made in Ren'Py 7.2.2.491 and updated to support up to Ren'Py 7.4.6.1693. (It should work with newer versions of Ren'Py as well, but it has not been tested in them.)

Features:

  • Image captions that work with Ren'Py's self-voicing option
  • Sound captions for describing music and sound effects
  • Dialogue on first run asking if users want to turn on captions
  • Button to Ren'Py's built-in accessibility menu, which has options to change the font, font size and line spacing
  • Guide to show how these functions work in-game

To use this tool, follow these steps:

  1. Copy the file named captiontool.rpy from the game folder into the game folder of your own game.
  2. Add the following textbutton a screen somewhere in your game, such as the Preferences screen in your game's screens.rpy file. (You can look at the screens.rpy file of this tool for an example.)
    textbutton _("Accessibility") action ShowMenu("accessibility")
  3. Edit captiontool.rpy to add your own sound/music and sound/music captions and make any other changes as necessary.

You can also play the guide by launching the tool through Ren'Py if you put the folder into your Ren'Py project directory. It gives examples of how image and sound captions can be used.

The code in this tool can be used in any way you like! If you use this tool, I would appreciate it if you credit Caption Tool or npckc (https://npckc.site or https://npckc.itch.io) in some way, but it isn't required.

~

Want to see more stuff like this? Sign up for my newsletter!

Join my Patreon for secret updates, a monthly digital postcard & early access to my games!

~

Updates:

  • 2021/08/30 Added support for queueing audio files & Ren'Py 7.4 relative volume
  • 2021/08/29 Removed {fast} tag from captiontool.rpy & added explanation for config.descriptive_text_character
  • 2021/03/07 Fixed issue where captions would sometimes show the caption for the previous music file when the stop music command was used with fadeout
  • 2020/12/09 Added support for custom sound/music channels
  • 2019/09/17 Added more support for sound captions
  • 2019/07/07 Updated to ren'py 7.3.2 which includes new descriptive text options
  • 2019/05/22 Full release with updated music, font & choice UI
  • 2019/05/21 Early access for patrons with placeholder music

Download

Download NowName your own price

Click download now to get access to the following files:

captiontool.zip 1 MB

Development log

Comments

Log in with itch.io to leave a comment.

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