Strings in two languages
In my module, I have a script file called "strings" with nothing but a series of strings. These strings are used in several instances, specially cutscenes (in which "strings" is added as an include file). I've been trying to devise a system in which these strings will appear in one of two languages, depending on the PC's intelligence. How could I do that in a solid and economic way?
0
Comments
Or use a custom tlk: read string n at position 2n for high int and at position 2n+1 for low int.
pseudo code:
string GetText(int intel, int index) { if(intl > threshhold) { switch(index) { case 1: return "Cool words."; } } else { switch(index) { case 1: return "Plabras suaves."; } } }To me I feel like this will be about the same amount of work as the 2da file approach.
The next idea that comes to mind is using a database, but unless you already know how you can populate and maintain it, it's going to take a lot more work to get up and running. (And again, it is not as easily shared.)