News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

City names

Started by Peterguard, June 09, 2013, 08:23:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Peterguard

My game appears to be using randomly generated city names, but I'd like to use one of the list of names in the pak/text directory. I have no idea how to do this.  I've searched the wiki and these forums for information, but found nothing.  I can find only scant documentation online, I've tried "docs.simutrans.com" and it says its currently offline.  There are a lot of other things I'm looking for help on and the lack of documentation is frustrating.

(The wiki appears to be broken, anyway, as when I search for anything I get pages listed which don't contain the text I'm looking for).

Help, please?

cy087

Salient info.

1) The list that is loaded for a particular pakset is in e.g. ?/pak128/text where ? will be the simutrans install location. This differs depending on O/S and whether you use "single-user" mode.  For example, here under linux in single user mode the names are loaded from ~/simutrans/pak128/text.
2) The list loaded depends on your user locale, but there are some gotya's! Here again under linux my locale is en_AU. But the list loaded is just based on the "en" part.  There may be others.
3) The filename loaded is "citylist_xx.txt" where xx is the language mnemonic in the locale.
4) There is (AFAIK) no way to set a config option to select an alternate citylist file.  You have to replace the default file with the list of your choice.

So , if your locale is en_AU and you are a linux user, and you want to use the Australian city names, then:
cd <simutrans>/pak<whatever>/text
mv citylist_en.txt citylist_en.SAVE
mv citylist_en_au.txt citylist_en.txt

5) You can also create your own list, as a simple line delimited text file. Just follow the basis of which file will be loaded.

6) Every time you do a complete update of the pakset, you will need to redo the file changes.

hth
CY

Ters

Quote from: cy087 on June 10, 2013, 01:47:46 AM
Here again under linux my locale is en_AU. But the list loaded is just based on the "en" part.

I have never noticed that Simutrans pays any attention to system locale. Language was instead selected from a list the first time the game was run. It makes more sense, since only a few languages have good translations, or even any translations at all.

Peterguard

Done it!  There were enough clues above to point me in the right direction.  The default pak (which is the one I was having problems with) has english city list files of the form citylist_en_xx.txt, where xx represents the country (e.g. "gb" for Great Britain), and no file named just citylist_en.txt.  I copied the _gb file to make a file with the default name and it now selects the names from that file.

It looks as though English is the only language which would have that problem, as it has no default file.  The only other language with multiple files is German, but the default german version is correctly named, and there are two others which look to be Austrian (_de_at) and Swiss (_de_ch).

Thanks!