C7-Game / Prototype

An early-stage, open-source 4X strategy game
https://c7-game.github.io/
MIT License
33 stars 9 forks source link

Load labels from labels.txt and use in-game #342

Open QuintillusCFC opened 2 years ago

QuintillusCFC commented 2 years ago

labels.txt is the legacy Civ3 file that contains labels, and is modified for each international version.

By loading and using its labels, we can get compatible internationalization relatively easily. We probably should not use this as our long-term format, but in "legacy" mode and as a start, it serves a purpose. Many Civ3 mods also modify this file to have their own flavor among the labels.

One obvious downside is the labels are listed in one big list that goes down to line 494. Part of this card should be converting those into our own data structures that are grouped by area, or something of that sort. Also, we'll have to detect if we're working with a Steam labels.txt, which has an extra line, and handle that.

There are another 500 lines after the main labels, which are somewhat grouped. My guess is the initial work for the labels will be enough for its own PR, and will inform how we want to handle the latter half, so I suggest only looking at that first big group for this one.

WildWeazel commented 2 years ago

This is sort of tangentially relevant to some work I'm doing with text files. Not assigning myself, but let me before you start working on it.