Yes, the way I was suggesting was like @Cecilia_Rosewood’s – although you wouldn’t need the goto italian/label italian bit, just a string of *ifs:
[b]Languages[/b]
*line_break
*if latin
Latin
*line_break
*if italian
Italian
*line_break
and so on. You’d end up with a vertical list of as many languages as you know.
I can understand why you wouldn’t want that for a character who knows seven languages. So give me a minute, and I’ll edit this post with an explanation of how to do it the way you want to do it (which is also how Jason does it in CoV).
EDIT: OK, you begin startup.txt with all the language Booleans you mention. When someone learns a language in the game, you set that stat to true:
#I spend a year learning Nahuatl!
*set nahuatl true
and so on. Meanwhile, here’s how I think you’d use concatenation CoV-style in your stats screen:
*temp languages ""
*temp comma false
*if latin
*set languages &"Latin"
*set comma true
*if italian
*if comma
*set languages &", "
*set languages &"Italian"
*set comma true
*if dutch
*if comma
*set languages &", "
*set languages &"Dutch"
*set comma true
*if danish
*if comma
*set languages &", "
*set languages &"Danish"
*set comma true
[and so on until you've got through demonese, at which point:]
Language(s): ${languages}.
What’s that all mean? (I’m going to bold-text all variable names below just for purposes of the explanation – they wouldn’t display as bold in the actual code or text).
Basically, you’ve created a variable languages whose sole purpose is to display in the stats screen the list of languages that you know, separated by commas. (If you wanted to display that list anywhere except the stats screen, you’d need to create languages in startup.txt, rather than make it a temp in the stats screen).
It starts as an empty string: “” Then you’ll use concatenation to add new information to the string. Because you want it to be grammatically correct, you’ll use the Boolean variable comma which becomes true as soon as you know more than one language.
So let’s say that your character only knows Dutch and Danish. The program will skim right past Latin and Italian, because the variables latin and italian are still set to false. Comma will also still be set to false, so when it gets to dutch the first thing it reads will be:
*set languages &"Dutch"
This means it will add the letters “Dutch” to the end of the variable languages, turning it from an empty string “” into “Dutch”. It will then set comma to true.
Because comma is now true, when it gets to danish the program will now read:
*set languages &", "
That turns languages from “Dutch” to (you guessed it) "Dutch, ". And when it continues to:
*set languages &"Danish"
you’ll have “Dutch, Danish”
After all that code has turned languages into a string of whatever languages you know, you end that section with the only piece of code that will actually be displayed to the reader of the stats screen:
Language(s): ${languages}.
Which in this case would display as:
Language(s): Dutch, Danish.
Clear as mud? ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/twitter/slight_smile.png?v=9)