Cities: Skylines

Cities: Skylines

40 ratings
Custom Namelists
 
Rate  
Favorite
Favorited
Unfavorite
Mod
File Size
Posted
Updated
0.013 MB
Dec 15, 2017 @ 2:32am
Dec 19, 2017 @ 4:34pm
4 Change Notes ( view )

Subscribe to download
Custom Namelists

Subscribed
Unsubscribe
Description
Are you bored of building beautiful towns, only to have their districts named "Elm Hills", "Lake Square", "Pine Park" or other generic hogwash? Are you too lazy to go through each road, each building, each cim even, to give them more exciting names?

Then this mod is for you!

Description
The data the game uses to generate the various names for districts, streets, cims and so on are stored in the game's locale files, in which all text that you see in-game is stored together with a certain key. One of these data points is then called a localized string, as in a string of characters localized for a certain language. This is done so that when you want to change the game's language, the developer's only have to add another locale file for the new language, instead of modifying the code of the application itself. Pretty intelligent, huh? But unfortunately it also means, if you want to add your own names for the game to use, when creating new streets and districts, you would have to alter the game files, which is a big no-no for various reasons (breaking stuff, having it overwritten the next time the game is updated or game files are verified ...).

This is where my mod enters the spotlight: It provides a framework for adding custom namelists, XML files that are loaded together with your savegame. The contents of these files are then dynamically added to the loaded locale in-memory, without ever touching the physical locale file.

How to use
On its own, this mod does nothing. To have your names actually appear in game you have to create a namelist: Simply open up a text editor, write your namelist (be careful to adhere to correct XML syntax) and save it in your local mod directory, found in "C:\Users\<username>\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods\YourLocalModNameHere" under Windows. Replace the "YourLocalModNameHere" part with the name of your local mod.

The actual contents of the namelist look like a normal XML file with the following structure:

<?xml version="1.0" encoding="utf-8"?>
<NameList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Namelist Name">
<strings>
<LocalizedString identifier="IDENTIFIER" key="key">String</LocalizedString>
</strings>
</NameList>

Of note are the identifier and key attributes of the LocalizedString tag: They identifiy what text in the locale they should replace. The streetnames, for example, are generated through a pattern that may use person names, which are generated from other locale strings themselves. To add more street name patterns, simply add a localized string to the namelist:

<LocalizedString identifier="STREET_NAME_PATTERN" key="">Fifth Avenue</LocalizedString>

Some streets will now be called "Fifth Avenue" when they are created. Note that not all localized strings need a key; keys serve to further identify a subgroup of an identifier as seen in the following example:

<LocalizedString identifier="BUILDING_NAME" key="Eco Commercial 1x1 02">Ye Olde Eco Shoppe</LocalizedString>

This localized string adds the building name "Ye Olde Eco Shoppe", given to eco commercial buildings.

Blacklists
You may have noticed I only talked about adding names so far. I have done so, since, as per default, the in-memory locale is not overwritten, because the way Cities Skyline's locale works is that if there already is a localized string with the same identifier and key, any strings you add are given a numerical index and used in conjuction with other's sharing the same identifier and key. Whenever the game then needs a string, it fetches one of these at random, making it possible to have different road naming patterns, example given.

So if you want only your own street names to appear, you'll have to create a blacklist. A blacklist simply lists the identifier-key combinations that are removed from the in-memory locale, before strings from custom namelists are added. I have not simply blacklisted all these combinations preemptively, as this would lead to your game displaying no (meaningful) text whatsoever!

Example Namelist
Download the Vienna Namelist for a practical example how to make your own namelists! Simply subscribe to it and then search for ".namelist" and ".blacklist" in your Cities Skylines steamapp directory.

See the github repo[github.com] for source code and example files. EDIT: After a longer hiatus, I want to add that if somebody wants to improve upon the mod, they are free to fork the repo and publish their mod - I might come back to see if I can make any improvements myself, but since I play CS pretty irregulary, I can't make any promises ;)

Mods using this Framework
Besides the earlier mentioned Vienna Namelist I made myself, some other people have created their own namelists:
Custom Names Lists by Ilion (special thanks to him, btw. for being so helpful in the comments)
Bayreuther Straßen- und Stadtteilliste by Viss Valdyr
CNL Blank Road Name by stmSantana
Central Asian Names by alborzka
Popular Discussions View All (1)
4
Feb 8 @ 5:10am
a little help with distring naming?
Snakitch
< >
26 Comments
lurki2 May 22 @ 1:19am 
2/2.... Cause i tried to use them, by adding them under a template namelist where my street,district and residence names are listed, did the same under the blacklist adapting always the sheme so it fits the template which i downloaded. It seems to not working for the strings mentioned above, when iam right what they are named for and are the city preset names when u start a new game, the names are not replaced by my custom ones, the vanilla city names are still there. Or iam wrong and those strings are represent something else, like written in the second question part above, if is that so then everything is fine. Just need some clarification, little bit more information if you can provide or help to fix the problem under my assumption if iam not wrong :D. Maybe someone else have tried to modify them as well and had or have the same problem/question. Thank you very much in advance!
lurki2 May 22 @ 1:19am 
Hi, thanks for this amazing mod you have created. I downloaded some templates, especially the Japanese namelist is really nice, edited the files and could change or add name types i wanted. Except to one point reading also through a guide where recommended language string codes are listed (also found them in the exportet vanilla/default namelist) , the point to or question i have is, what does CONNECTIONS_NAME and CONNECTIONS_PATTERN excactly represent in game? The city names, which are preset also in the game menue when you want start a new game for example? Or just the connection or city names a vehicle come from or travel to when you check for them under vehicle/citizens info tab? 1/2.....
Markus  [author] May 18 @ 6:43am 
Hey, thanks for the positive feedback and sorry for my lack of support - playing CS pretty irregularly. I'll have to dig through the code a bit, before I understand it again and see if I can make any improvements.

@Sotrax and @Raytruth, I don't know enough about your situation to help immediately, but I would try the following: If the Vienna Namelist works as intended, then first try to modify those files. If this has the desired effect, then you can try to move them, rename them, et cetera.
LogOutGames Apr 22 @ 8:55am 
Waaaaaaaaait, did I see "Annagasse"? XD
Raytruth Mar 19 @ 10:23am 
I have Sotrax' problem too, i followed instructions, i copied my files in the correct path, i used this files: http://steamcommunity.com/sharedfiles/filedetails/?id=1249641304
I loaded up a couple of times but my lanes are always named "street" (the new ones, of course).
Any help please?
Sotrax Mar 6 @ 6:55pm 
I don't get this to work. Downloaded the Vienna Nameslist and made one by myself. Placed the Namelist and the blacklist in a file in the Mods file of my game. Doesn't work.
Do I have a possibility to let someone watch over my file? I am not a programmer and I am a little overwhelmed what to do
Gun Feb 18 @ 1:35pm 
Oh, regarding your last comment: what about starting a discussion?
Gun Feb 18 @ 1:32pm 
@Ilion Thank you for your explanation on how to get the names/values of the strings by myself. However, a comprehensive list of all possible identifiers would be much appreciated. (preferably here in the description of the source mod - maybe Markus could copy your findings to his description afterwards?) Thanks again!!!:hardhat:
Ilion Feb 18 @ 1:32pm 
Apparently, there is a character limit not only on individual posts, but also on the content of the description page for a mod/asset, and my attempt to list the LocalizedString values I have found exceeds that limit.