-
-
Notifications
You must be signed in to change notification settings - Fork 957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smarter random town names #7037
Comments
I suppose you could try to determine some "feature bits" for town construction by sampling the terrain in a radius around the site. If sufficient samples are water you get a water-feature bit, if there's sufficient elevation differences you might get a hill/mountain feature bit. However I can't really think of any more useful features to test for, since many landscape features would be hard to detect (lake vs. coast vs. fjord), many aren't well modeled by the game (like natural resources), and some (like industries) are dependent on the town already existing. |
I see, thanks for the insight. I just thought it would be kind of a fun feature to try and implement. Maybe I'll put a PR together this weekend. We could also use the water distance to infer things like, "okay, never put Paris on a coast, because in real life it's not on a coast". Maybe that's a bit much though.. since if you're interested in realism like that you can just use a custom France heightmap or something. |
The obvious features I could think of:
Not sure enough town names sets would take advantage of it to be worthwhile, but it's a nice idea :) |
I imagine having two bit-fields per name (part), a mask and a value. The location bits calculated for the new town site would be AND-masked by the mask, then compared to the value. If equal, the name (part) is a candidate. This will allow specifying locations where the name would be valid and locations where it would never be valid, and locations that would be required for it. Pseudocode:
|
I found a bunch of minor grammar problems when reading the town name generation code related to OpenTTD#7037.
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.
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.
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.
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.
Just came across this - I suggest looking at the Wesnoth placename generator a) for inspiration as to the types of features you could base naming on and b) because Wesnoth also names [some of] the features. You can have a River Tal, and then a Talford, and a Talmouth. Rivers, Hills, Valleys, Peaks, Fords, Bridges, Castles, Marshes, Moors, Deserts, Woods, Plains, Lakes, Seas, Bays, Harbours, Springs etc. Seeing how the placename generation is hooked in to the terrain generator may also be of use. And you don't need many towns to take advantage for it to become a worthwhile addition, because even if only a few do, the fact that some do still adds verisimilitude to the map as a whole. |
This issue has been automatically marked as stale because it has not had any activity in the last two months. |
I would like a feature that attempts to name towns appropriately. For example, when random names are chosen, only towns that are near water will be chosen to be named things like "Puerto Ayacucho" (in Spanish), or something like "Vandhavn" (in Danish).
The text was updated successfully, but these errors were encountered: