Jump to content

Localizable.tsv: Difference between revisions

From Battle Cats Game Modding Wiki
No edit summary
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 2: Line 2:
| File name = localizable.tsv
| File name = localizable.tsv
| Pack name = [[ResLocal|resLocal]]
| Pack name = [[ResLocal|resLocal]]
| Short description = contains various text strings used by the game.
| Short description = contains various [[localized string|text strings]] used by the game.
| Structure = The file is a [[TSV file]] with 2 columns. The first column is the name of the key, and the second column is the value.
| Structure = The file is a [[TSV file]] file with 2 columns. The first column is the name of the key, and the second column is the value.
| Examples = <syntaxhighlight lang="text" line style="white-space:nowrap">
| Examples = <syntaxhighlight lang="text" line style="white-space:nowrap">
item_name_22 Catfood
item_name_22 Catfood
Line 11: Line 11:
color_example <color=255,0,0>RED</color>
color_example <color=255,0,0>RED</color>
</syntaxhighlight>
</syntaxhighlight>
[[Category:TSV files]]


Taking the first line, this says that if the game ever references <code>item_name_22</code> it will use the text "Catfood".
Taking the first line, this says that if the game ever references <code>item_name_22</code> it will use the text "Catfood".
Line 22: Line 24:
Taking the 5th line, in supported text fields you can  specify the color of the text in rgb form in the format <code><color=r,g,b>text</color></code>.
Taking the 5th line, in supported text fields you can  specify the color of the text in rgb form in the format <code><color=r,g,b>text</color></code>.
}}
}}
== Notes ==
If the game references text from the localizable.tsv file, but that key is not present, often it will fall back to just using the key name as the text. For example, if the game was looking for a key called "foobar" and it couldn't find it in localizable.tsv, it would simply render the text as "foobar". TODO: test with placeholders.


== Uses ==
== Uses ==

Latest revision as of 08:33, 6 September 2025

localizable.tsv is a file inside of resLocal which contains various text strings used by the game.

Structure

The file is a TSV file file with 2 columns. The first column is the name of the key, and the second column is the value.

Examples

item_name_22	Catfood
cool_text	<flash>This flashes!!!</flash>
message_text	Well done, you successfully "%@"
multiline_example	Line 1<br>Line 2
color_example	<color=255,0,0>RED</color>

Taking the first line, this says that if the game ever references item_name_22 it will use the text "Catfood".

Taking the second line, some text fields in the game support more formatting such as <flash>some text</flash>, this will cause the text to flash yellow and magenta.

Taking the third line, some text fields have placeholders (the %@) which are replaced with a string by the game before being rendered to the screen, these come in different forms. Some are named, e.g ${varName}, some use %@ and some use other format specifiers such as %d or %02d

Taking the 4th line, in supported text fields you can add line breaks by adding a <br> tag.

Taking the 5th line, in supported text fields you can specify the color of the text in rgb form in the format <color=r,g,b>text</color>.

Uses

The game uses this file in the code quite often to fetch strings to use, it's often menu text rather than text relating to cats or stages since that text is stored in other files.

References in other game files