The International Simutrans Forum


Author Topic: Climate and positional Citynames  (Read 1518 times)

0 Members and 1 Guest are viewing this topic.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
    • Facebook Profile
  • Languages: EN
Climate and positional Citynames
« on: May 10, 2009, 09:27:50 PM »
Is there any way to take the stop-naming code (or idea, at least) and apply it to city names?

Perhaps a citylist like this:

Sand City
Briar Gulch

Lush Gardens
Tree City



Arctic City

Big River City

Port Townsend
Port Apathy

That is, be able to define optional sections of the city file that would be chosen at random chance if a city was in a particular climate or by a land feature (rivers and ocean are all I can think of to detect).

How I think I'd do it (although config in would be awesome):
- If city is detected X tiles away from water or river, 50% chance of name from one of those lists (if both, chances are 25% and 25%)
- Otherwise, city has 50% chance being named climate-specific name
- Otherwise, random from general list

I don't know if there is such code, but it would be also nice if Simutrans tracked which citynames it had used, and when it used up a particular category, didn't re-use them. I think it does this now and falls back on the generated ones? But just in case not...

So in, the 'cadillac' solution would be to have:
cityname_desert_chance = 50
cityname_tropical_chance = 50
cityname_mediterranean_chance = 50
cityname_temperate_chance = 50
cityname_tundra_chance = 50
cityname_alpine_chance = 50
cityname_ocean_chance = 50
cityname_river_chance = 50

Failing that, perhaps something like... 33% chances across the board? But I think it'd be better to let players/pakmakers specify chances...

Also, I think I saw somewhere that the climate names can change... Perhaps the internal name that Simutrans uses, or even numbers (0-5 or 1-6 or whatever) would work fine... :)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Climate and positional Citynames
« Reply #1 on: May 11, 2009, 12:13:07 PM »
wow, nice idea! some work for translators, but definitely nice for games...