Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add: smart town name first steps - #7037 #7068
This adds structure for some basic town naming rules based on location.
When towns are generated, a mask is read for the random name, to see if
This adds structure for some basic town naming rules based on location. When towns are generated, a mask is read for the random name, to see if it's a suitable name for this town tile. Currently it just prevents towns from being named with "Puerto" or "havn" if they're not near the water, and will only do anything on Latin-American, Danish, or Norwegian town names.
planetmaker left a comment
I like the idea a lot to choose town names more sensibly wrt location on the map.
However I do not like the idea to go by actual string matching as it is tied to specific strings. There's a LOT of townname NewGRFs out there who could profit from an approach which gives them the same info - or alternatively allows them to provide flags for like "near sea| near river | on mountain | between mountains | near woods | in desert" or similar.
My suggestion as such is to modify the string lists that each string can be accompanied by flags which makes them either favour or avoid certain conditions - and use those flags to decide applicability of the name to a location (maybe introduce one flag 'not generic' which indicates special location recommendation for a name - 'not generic' so that a list without anything set will treat anything as generic name)