Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

repulsionlabs/godot-dynamic-subtitles

 
 

Repository files navigation

Warning

This addon will no longer be in development and no support will be provided.

I recommended to use something else that has better support.

godot-dynamic-subtitles

icon

An addon for easily implementing subtitles using the built-in audio system in the Godot Engine.

For more helpful information and details refer to the wiki

Really fast install & go

If you already have some AudioStreamPlayer nodes in existing scene trees, it is super easy to get them all set up for subtitles.

  1. Open the scene that contains the AudioStreamPlayer nodes that you want subtitles on
  2. Go to Project -> Tools -> "Generate SubtitleData in Scene"
    • This will add a SubtitleData node as a child to all AudioStreamPlayer nodes in the scene tree
  3. The subtitle text/id is automatically populated with the name of your AudioStreamPlayer node, feel free to go through and change them to whatever you like
    • If you want to tweak more settings, refer to the SubtitleData Node page for more information
  4. Go to Project -> Tools -> "Attach Event Scripts in Scene"
    • This will attach a script to all AudioStreamPlayer nodes in your scene tree that do not otherwise have a script attached. These scripts will allow the subtitles to work event-driven which greatly reduces the processing time for inactive subtitles (to roughly 0ms)
  5. Play your AudioStreamPlayer nodes as you normally would, and the subtitle with the subtitle text you set should display.

tool scripts preview


Features

Subtitle System

  • Dialogue Subtitles
    • Subtitles stack and snap to bottom of screen.
  • 3D spatial subtitles
    • Subtitles reposition to track the 3D node's position

Helpful tool:

There is a tool script for automatically converting an existing scene tree to one compatible with the subtitles system. Every AudioStreamPlayer node is given a SubtitleData child node which is what handles the passing of subtitle data

Translations!

Because all subtitles use Godot's built-in Label, they are all automatically translated using Godot's built-in Translation & Localization System

Customization

Every SubtitleData node has an option to have an overriding Theme asset to affect the subtitle. They also allow for padding subtitle duration, changing what spatial position is used for the playing of audio. etc... More details here at the Wiki page for the SubtitleData node

About

An Godot 4.x version of Dynamic Subtitles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • GDScript 100.0%