New Town Names (Silly)
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 6
- Joined: 03 Aug 2009 15:21
New Town Names (Silly)
Hello tt-forums!
I'm a member of a small community that plays a wide variety of multiplayer games. I'd like OpenTTD to be the next game in our rotation. Because we have our own off-brand of humor, I think a great way to encourage participation would be creating our own set of town names.
The IRC #openttd people were helpful in pointing me toward resources on NewGRF development, but it looks rather complicated. How much work would it be for an experienced developer to create a NewGRF with our name list?
Does OpenTTD generate names from the list in two parts? If so I can split our names into halves (most are already two parts).
How many names are allowed in a NewGRF? We have a list of 960 names. Most of them are just silly, some obscene, many are inside-jokes. Perhaps, once finished, the NewGRF may be released back to the community as an optional replacement for the "silly" name set.
I'm a member of a small community that plays a wide variety of multiplayer games. I'd like OpenTTD to be the next game in our rotation. Because we have our own off-brand of humor, I think a great way to encourage participation would be creating our own set of town names.
The IRC #openttd people were helpful in pointing me toward resources on NewGRF development, but it looks rather complicated. How much work would it be for an experienced developer to create a NewGRF with our name list?
Does OpenTTD generate names from the list in two parts? If so I can split our names into halves (most are already two parts).
How many names are allowed in a NewGRF? We have a list of 960 names. Most of them are just silly, some obscene, many are inside-jokes. Perhaps, once finished, the NewGRF may be released back to the community as an optional replacement for the "silly" name set.
Re: New Town Names (Silly)
You can change the code yourselves, at namegen.h and namegen.cpp
I speak Chinglish...
Re: New Town Names (Silly)
Infinite, if you don't post the list.azerbaijani wrote:The IRC #openttd people were helpful in pointing me toward resources on NewGRF development, but it looks rather complicated. How much work would it be for an experienced developer to create a NewGRF with our name list?
If you do post the list, rather difficult unless you're OK with everything having almost exactly the same probability.
If everything has the same probability, I'm guessing about two hours.
It can. Or it can use three parts, or five parts, or one part, or just about any number of parts up to and probably exceeding INT_MAX. (Most of those parts would have to be non-random empty strings, though.)azerbaijani wrote:Does OpenTTD generate names from the list in two parts?
The limit is somewhere between 16645636 and 4294967296, inclusive.azerbaijani wrote:How many names are allowed in a NewGRF?
And then you, and everyone else who wanted to use your changes, would have to recompile.acabin wrote:You can change the code yourselves, at namegen.h and namegen.cpp
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 6
- Joined: 03 Aug 2009 15:21
Re: New Town Names (Silly)
Thank you for your time, DaleStan.
I'm ok with even probabilities.
The list has some course language, and very long names, and other outliers. I'd like to clean it up before posting here.DaleStan wrote:Infinite, if you don't post the list.azerbaijani wrote:The IRC #openttd people were helpful in pointing me toward resources on NewGRF development, but it looks rather complicated. How much work would it be for an experienced developer to create a NewGRF with our name list?
If you do post the list, rather difficult unless you're OK with everything having almost exactly the same probability.
If everything has the same probability, I'm guessing about two hours.
I'm ok with even probabilities.
Can you tell me more about how these are arranged? The vast majority of the list is two-part names, with a handful of one and three part. I'd be ok with the patch being all one or two part names if that makes things easier.DaleStan wrote:It can. Or it can use three parts, or five parts, or one part, or just about any number of parts up to and probably exceeding INT_MAX. (Most of those parts would have to be non-random empty strings, though.)azerbaijani wrote:Does OpenTTD generate names from the list in two parts?
Re: New Town Names (Silly)
Maximum name length is the shorter of 31 characters or 130 pixels.
TTD's English name generator uses five parts. For the name "Little Bafingford", the parts are "Little " (note trailing space), "Ba", "fing", "ford", and "". For the name "Suwood City", the parts are "", "Su", "", "wood", and " City" (note leading space).
The vast majority of newgrfs use one-part names: "Little Bafingford" is "Little Bafingford", and "Suwood City" is "Suwood City".
I think you're misusing the word "part".azerbaijani wrote:Can you tell me more about how these are arranged? The vast majority of the list is two-part names,
TTD's English name generator uses five parts. For the name "Little Bafingford", the parts are "Little " (note trailing space), "Ba", "fing", "ford", and "". For the name "Suwood City", the parts are "", "Su", "", "wood", and " City" (note leading space).
The vast majority of newgrfs use one-part names: "Little Bafingford" is "Little Bafingford", and "Suwood City" is "Suwood City".
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 6
- Joined: 03 Aug 2009 15:21
Re: New Town Names (Silly)
Thank you for the explanation and examples. And yeah that's p much what I meant.DaleStan wrote:I think you're misusing the word "part".azerbaijani wrote:Can you tell me more about how these are arranged? The vast majority of the list is two-part names,
TTD's English name generator uses five parts. For the name "Little Bafingford", the parts are "Little " (note trailing space), "Ba", "fing", "ford", and "". For the name "Suwood City", the parts are "", "Su", "", "wood", and " City" (note leading space).
The vast majority of newgrfs use one-part names: "Little Bafingford" is "Little Bafingford", and "Suwood City" is "Suwood City".
Here's an example of the few names that really succeed as a single whole, atomic part:
Code: Select all
POKEY FUDGEPIPE
DOG THE COUNTY BUTLER
HOARY MARMOT
PENNY POUNDPUNCHER
FLUORESCENT GREEN NIGHTCRAWLER
HENRY FJORD
FREEHIPPY DIRTYLOADER
WALT THE BOY WHO CAN'T SPELL
MURPH THE CLOWN WITH HEART OF ALUMINUM
JERKY BEEFHUFFER
JESUS OF BACON LAKE
THE AXIS OF KNEIVEL
Code: Select all
HUFF GLASSMONT
CONT MILKSTUMP
DRIP FISTMIX
GLAK FUNDBOAT
ROBOGOAT
FUDGEMONT GARGLEDRAWERS
SPLINCH GRIFTSMITH
GRANDPA BIBLESMILE
WINT "KNEES" THUNDERCHURCH
KROT GASBLISTER
PINE HOUSELOAD
BANGALANG "TENDERSNOT" WONDERLORD
MONDAY Von HOWARDSEN
HAMF Al-Bin FALAFELLATIO
"TOOLS" GRUNDY
ALBERTSON VON WALGREENS
"BEVERAGES" McDINGLE
COL. POPCORN SHINMODE
SHEIK YERBEWTIE
BOON CRANKPINCH
DORP O'HANDLEBAG
MELMAN ROWSDOWER
MARMALADE El WOBBLE
SLICK McDURPER
Are there character set restrictions?
So if it's not too much trouble, I'd like to see some of the long names stand on their own, and others be generated from two or three parts. I'm willing to parse the text in any way that would be helpful for a developer.
BUT if that's too much trouble, then I'd be happy to just use all 900-some names as they are now, that's cool.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: New Town Names (Silly)
ASCII or UTF-8azerbaijani wrote:Are there character set restrictions?
Applying a proper capitalization would actually allow me to read them beyond the first line of names
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: New Town Names (Silly)
Then code those as one part.azerbaijani wrote:Here's an example of the few names that really succeed as a single whole, atomic part:
And code those as two parts. Or three parts, for if you want the option of names with three of those random words.azerbaijani wrote:But there are many more nonsensical words that could be broken into first and last parts and mixed up:
NFO is powerful like that.
Basic Multilingual Plane. But if you can keep it to seven-bit ASCII, things are a whole lot simpler.azerbaijani wrote:Are there character set restrictions?
For me, the best format would be something like:azerbaijani wrote:So if it's not too much trouble, I'd like to see some of the long names stand on their own, and others be generated from two or three parts. I'm willing to parse the text in any way that would be helpful for a developer.
Code: Select all
# One part names
POKEY FUDGEPIPE
DOG THE COUNTY BUTLER
HOARY MARMOT
# Two-part names, first part
HUFF
CONT
DRIP
GLAK
# Two-part names, second part
GLASSMONT
MILKSTUMP
FISTMIX
FUNDBOAT
The easiest, of course, is to just use the names as-is.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: New Town Names (Silly)
Does that mean you're creating the NewGrf for him, DaleStan? Just like that?
Wow, you must be in a good mood today.
Wow, you must be in a good mood today.
-
- Engineer
- Posts: 6
- Joined: 03 Aug 2009 15:21
Re: New Town Names (Silly)
Ok, let's keep this simple for the first version. I'll provide the list of whole names, and from that we may separate the multi-part names for a future version.DaleStan wrote:Unless you mention otherwise, I'll make each option for a given part the same probability, but "All names have the same probability " is probably not what you want if there are 300 one-part names, 1.4 million two-part names, and 1.8 billion 3-part names.
The easiest, of course, is to just use the names as-is.
This evening I'll massage the .txt into a list with the following criteria:
- 7-bit ASCII (I think it already is)
- Proper capitalization (I'm sure there's a GNU tool perfect for this)
- < 30ish characters per line
- no obcenity or obvious double entendres (this will take a while )
- probably 800-900 lines
- Anything else I'm forgetting?
Once a NewGRF is created and installed, how would it be implemented? Would it add an additional option to the town_names directive, or would it replace 'silly'? I'm ok with either. Hopefully I can handle installing this on my dedicated server myself (I'm a sysadmin by day.)
The title for this project, where needed, should be "TAN BLATCHMAN", after the first name in the list.
Re: New Town Names (Silly)
Please don't inline 50+ lines of code. Anything bigger than that should be attached in some way.azerbaijani wrote:Should I deliver this as a 'Code' block in a forum post, or attach a .txt, or another preferred method?
-
- Engineer
- Posts: 6
- Joined: 03 Aug 2009 15:21
Re: New Town Names (Silly)
Of course.Yexo wrote:Please don't inline 50+ lines of code. Anything bigger than that should be attached in some way.
The .txt file is attached to this post.
- Attachments
-
- tanblatchman.txt
- A big pile of silly names.
- (15.79 KiB) Downloaded 219 times
Re: New Town Names (Silly)
Mostly because this is something that can be barfed out of a very small Perl script. (445 bytes, not counting extraneous whitespace.)Roujin wrote:Wow, you must be in a good mood today.
If I did my math correctly, no two probabilities differ by more than 1.12 chances per million. (Relative difference less than 1‰.)
I didn't test it, but NFORenum doesn't object.
- Attachments
-
- TAN_BLATCHMAN.grf
- (16.79 KiB) Downloaded 183 times
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
-
- Engineer
- Posts: 6
- Joined: 03 Aug 2009 15:21
Re: New Town Names (Silly)
You, sir, are my hero for the day.DaleStan wrote:Mostly because this is something that can be barfed out of a very small Perl script. (445 bytes, not counting extraneous whitespace.)Roujin wrote:Wow, you must be in a good mood today.
If I did my math correctly, no two probabilities differ by more than 1.12 chances per million. (Relative difference less than 1‰.)
I didn't test it, but NFORenum doesn't object.
I'll post here again once I have it running on my dedicated server.
Would you mind sharing said Perl script? Would I need a lot of other tools to compile these myself?
- Attachments
-
- Screenshot of TAN BLATCHMAN town names
- tanblatchman.png (271.48 KiB) Viewed 5315 times
Re: New Town Names (Silly)
Which community is this, may I ask?
Re: New Town Names (Silly)
Feed it a list of 825 names on standard input and get an almost-NFO on standard out. Edit the "TAN BLATCHMAN" strings, if desired, and fix the GRFID. Pass the mess to NFORenum, and then encode with grfcodec. (The reason it's hardcoded to 825 is not because I typed an 825 -- in fact, there's no instance of a literal 825 anywhere in the script -- but because I didn't feel like writing code to factor arbitrary integers. It's hardcoded to 5 groups of 165 names.)azerbaijani wrote:Would you mind sharing said Perl script?
If you have a different number of names, you'll need to edit the Perl script.
If the perl script dies, see the comment on that line, and update the mentioned variables accordingly.
If NFORenum complains, then either you edited $name inappropriately, or one at least one of $lbits and $sbits is too small.
NFORenum and GRFCodec, as mentioned.azerbaijani wrote:Would I need a lot of other tools to compile these myself?
- Attachments
-
- townnames.txt
- (553 Bytes) Downloaded 234 times
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Who is online
Users browsing this forum: Quinch and 23 guests