Garry's Mod

Garry's Mod

BattleBeats | Dynamic Music System
 Toto téma bylo přilepeno, takže je nejspíš důležité
Adding Subtitles


First things first, BattleBeats only supports subtitles in the .srt format (it’s the same format used by YouTube and many other platforms). You can download subtitles from a YouTube video using various online sites

Since this requires only minor Lua knowledge (really just copy and paste), I recommend downloading the pack template from the link below to skip part of the process, though I still suggest reading the rest:

Pack Template[github.com]



If you want to do it manually, here’s where it gets a little trickier:
  1. In your main addon folder, create a new directory next to the sound folder named lua
  2. Inside it, create autorun, then client, and inside that folder make a new file named cl_subtitles.lua (you can name it whatever you want as long as it’s a .lua file)

Now open that file (Notepad++ works, but I recommend something like Visual Studio Code) and paste this:

BATTLEBEATS = BATTLEBEATS or {} BATTLEBEATS.subtitles = BATTLEBEATS.subtitles or {} BATTLEBEATS.subtitles["song title"] = { raw = [[ ]] }

If you pasted it, change "song title" to the actual song title from your pack (lowercase only!)



Now, between the [[ and ]], paste your SRT file contents (you can open the .srt file with Notepad)
It should look like this:

BATTLEBEATS.subtitles["my song"] = { raw = [[ 1 00:00:54,731 --> 00:00:59,122 Immortal temptation 2 00:00:59,122 --> 00:01:03,088 Takes over my mind 3 00:01:03,088 --> 00:01:07,958 Condemned 4 00:01:07,958 --> 00:01:12,066 Falling weak on my knees ]] }

For each song, you just make a new table, for example:

BATTLEBEATS.subtitles["my song 2"] = { raw = [[ srt content here ]] }

If everything is correct, you should see a comment bubble icon next to the track in the BattleBeats UI, this means the track has subtitles
Naposledy upravil ricky dicky doo dah grimes; 9. lis. v 14.12
< >
Zobrazuje se 12 z 2 komentářů
will there be support for 16th note lyrics?
Pan Mann původně napsal:
will there be support for 16th note lyrics?
it will be added in the next update
< >
Zobrazuje se 12 z 2 komentářů
Na stránku: 1530 50