-
Notifications
You must be signed in to change notification settings - Fork 205
Unused strings
Ríša Szlachta edited this page Jul 28, 2025
·
8 revisions
This article was written 28th of July 2025 and contains information valid at given time.
These strings with their respective STR_
number are not currently loaded by the game from localisation files.
Changing these in strings with numbers written below in existing translation or translating them into new localisation will have no visible effect for the players. In commented style are given hints pointing to the literal same strings with different number, that are used in the game.
STR_822 :Unable to access graphic data file
STR_823 :Missing or inaccessible data file
STR_1024 :{COMMA16} car per train
STR_1025 :{COMMA16} cars per train
STR_1332 :{VELOCITY}
STR_1349 :{WINDOW_COLOUR_2}Max. positive vertical Gs: {OUTLINE}{RED}{COMMA2DP32}g
STR_1845 :{MONTHYEAR}
STR_1958 :{COMMA16}
# STR_1958 has copy(s) that shows in the game at STR_5919
STR_1959 :Can’t change number of circuits…
STR_2251 :Can only be built on paths!
STR_2305 :Track design files
STR_2306 :Save track design
# STR_2306 has copy(s) that shows in the game at STR_3115
STR_2763 :???
STR_2849 :New scenario installed successfully
STR_2850 :New track design installed successfully
STR_2851 :Scenario already installed
STR_2852 :Track design already installed
STR_3054 :Loading…
# STR_3054 has copy(s) that shows in the game at STR_6631
STR_3163 :Installing new data:
STR_3283 :Select rides to be preserved
STR_3321 :New objects installed successfully
STR_3381 :File is not compatible or contains invalid data
STR_3382 :File copy failed
STR_5122 :Select rides by track type (like in RCT1)
STR_5155 :Allow testing of unfinished tracks
STR_5156 :Allows testing of most ride types even when the track is unfinished, does not apply to block sectioned modes
STR_5607 :Forcefully remove selected map element.
STR_5713 :Kick Player
# STR_5713 has copy(s) that shows in the game at STR_5659
STR_5932 :Corrupt element details
Running simple python script does the trick:
# OpenRCT2 translator's helper utility
# analyze what strings are currently not in use
import re
from pathlib import Path
p = Path('.')
ids_to_constants = {}
ids_to_texts = {}
with list(p.glob('**/en-GB.txt'))[0].open() as f: str_file = f.readlines()
for line in str_file:
search_result = re.match(r"^STR_([0-9]{4})\s+:(.*)", line)
if search_result:
ids_to_texts[int(search_result.group(1))] = search_result.group(2)
for h_files in list(
p.glob('**/StringIds.h'))\
+ list(p.glob('**/UiStringIds.h'))\
+ list(p.glob('**/RideStringIds.h')):
with h_files.open() as f: h_file = f.readlines()
for line in h_file:
# searches for
# DEFINITION = 1234
search_result = re.match(r"^\s*([0-9A-Z_]*)\s*=\s*([0-9]{1,4})", line)
if search_result:
ids_to_constants[
int(search_result.group(2))] = search_result.group(1)
else:
# searches for
# DEFINITION = ALLREADY_DEFINED + 1234
search_result = re.match(
r"^\s*([0-9A-Z_]*)\s*=\s*([0-9A-Z_]*)\s*\+\s*([0-9]{1,4})",
line)
if search_result:
id_to_add = [
k for k, v in ids_to_constants.items() if v == search_result.group(2)][0]
composed_id = id_to_add + int(search_result.group(3))
ids_to_constants[
composed_id] = search_result.group(
2) + " + " + search_result.group(3)
unused = {}
for id_ in ids_to_texts.keys():
if id_ not in ids_to_constants.keys() and len(ids_to_texts[id_]) > 0:
unused[id_] = ids_to_texts[id_]
duplas = {}
for id_, text in ids_to_texts.items():
if list(ids_to_texts.values()).count(text) > 1:
if text not in list(duplas.keys()):
duplas[text] = []
duplas[text].append(id_)
else:
duplas[text].append(id_)
for id_, text in unused.items():
if text not in list(duplas.keys()):
print(("STR_%i :%s")%(id_, ids_to_texts[id_]))
else:
print(("STR_%i :%s")%(id_, ids_to_texts[id_]))
dupla_id_readable_list = ""
for idx in list(duplas[text]):
if idx != id_:
dupla_id_readable_list += "STR_%i "%idx
print("# STR_"+str(id_)+" has copy(s) that shows in the game at "+dupla_id_readable_list)
Runs well in Python 3.13.3 (main, Jun 16 2025, 18:15:32) [GCC 14.2.0] on linux
.