Patch: Russian town names
Moderator: OpenTTD Developers
Patch: Russian town names
I have hacked together a patch that adds a simple Russian town name generator to OpenTTD. It uses the Cyrillic alphabet, so you need to use a Unicode font to enjoy it.
I'm not Russian myself, so those of you who are may laugh at me and my ignorance now The generated names are indeed a bit monotonic; while reading my Атлас СССР I find lots and lots of names that do not fit my pattern. It might be interesting to expand the generator a bit…
It was pointed out in the IRC channel that Action F should be used instead, but I don't see how it would be possible to have adjectives agreeing with the gender of the noun.
Enjoy! (And if you do, please tell me. Maybe I'm the only twisted person who enjoys this kind of thing )
I'm not Russian myself, so those of you who are may laugh at me and my ignorance now The generated names are indeed a bit monotonic; while reading my Атлас СССР I find lots and lots of names that do not fit my pattern. It might be interesting to expand the generator a bit…
It was pointed out in the IRC channel that Action F should be used instead, but I don't see how it would be possible to have adjectives agreeing with the gender of the noun.
Enjoy! (And if you do, please tell me. Maybe I'm the only twisted person who enjoys this kind of thing )
- Attachments
-
- russian-town-names.patch
- (5.15 KiB) Downloaded 1260 times
Re: Patch: Russian town names
You can do anything you want with action F. If you want gender agreement:legoscia wrote:It was pointed out in the IRC channel that Action F should be used instead, but I don't see how it would be possible to have adjectives agreeing with the gender of the noun.
Code: Select all
//Final definition
2*0 0F 80 <style-names>
01 02 00 01
81 01
81 02
//masculine nouns
3*0 0F 01 02
<num-parts> 01 <bit-count>
//<num-parts> adjectives, masculine form
<num-parts> <first-bit> <bit-count>
//<num-parts> masculine nouns
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: Patch: Russian town names
Ah… thanks for the enlightenment! I'll try to hack something together…DaleStan wrote:You can do anything you want with action F.
Re: Patch: Russian town names
There, now I've converted my name generator to NewGRF format; see attachments.
I noticed that OpenTTD doesn't allow forward referencing chains; all chains that the current chain jumps to must be defined earlier in the file. Is that a bug or a feature?
I noticed that OpenTTD doesn't allow forward referencing chains; all chains that the current chain jumps to must be defined earlier in the file. Is that a bug or a feature?
- Attachments
-
- russian-town-names.grf
- Russian Town Names v0.1: NewGRF file
- (1.24 KiB) Downloaded 2483 times
-
- russian-town-names.nfo
- Russian Town Names v0.1: source NFO file
- (5.1 KiB) Downloaded 1344 times
Re: Patch: Russian town names
That is my understanding of "Specifying an ID that isn't defined yet results in an error and therefore disabling all town name definitions in the file" in action F spec on ttdpatch wikilegoscia wrote:I noticed that OpenTTD doesn't allow forward referencing chains; all chains that the current chain jumps to must be defined earlier in the file. Is that a bug or a feature?
Re: Patch: Russian town names
Argh! Indeed. I got the sprites backwards. Just about the entirety of NFO works that way; everything must be defined before it can be used. Sorry for the confusion. I need more NFO coding! Stat!
And it's a feature. It means you can define more than (1 << ID_WIDTH) entities of a given type. For action F that's not much of an issue, but you can easily end up with more action 2s than the 1-byte ids would otherwise allow.
And it's a feature. It means you can define more than (1 << ID_WIDTH) entities of a given type. For action F that's not much of an issue, but you can easily end up with more action 2s than the 1-byte ids would otherwise allow.
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
-
- Director
- Posts: 534
- Joined: 17 Mar 2007 16:36
Re: Patch: Russian town names
Wait. OTTD can do Action F now?
Yeah! I've been credited! (Thanks, Jezulkim)Jezulkim wrote:Credits:
- Johnny B Goode, for digging this thread up and giving me an idea for this update.
- Mr. Owen Rudge, for his TT website where I grabbed the names.
Winner of Most Annoying Member Award 2007 - Runner-up for Biggest Spammer 2007
My blog - Diary Of A Madman
Re: Patch: Russian town names
I've heard at least two different developers assert the truth of that, so I would presume so.
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
-
- Director
- Posts: 534
- Joined: 17 Mar 2007 16:36
Re: Patch: Russian town names
Thanks, didn't know.
Yeah! I've been credited! (Thanks, Jezulkim)Jezulkim wrote:Credits:
- Johnny B Goode, for digging this thread up and giving me an idea for this update.
- Mr. Owen Rudge, for his TT website where I grabbed the names.
Winner of Most Annoying Member Award 2007 - Runner-up for Biggest Spammer 2007
My blog - Diary Of A Madman
Re: Patch: Russian town names
Patch for russian_townnames is using over 2 years in russian builds of openttd. It use ~ 7500 real townnames of russian towns, villages, etc. It use 1 additional file (with townnames) and very small changes in original files.
Russian OpenTTD Community patchpack (2.0.0RC2) (in Russian) , (in English)
- Vaulter
- Traffic Manager
- Posts: 185
- Joined: 21 Dec 2004 05:35
- Skype: andrey-zaharov
- Location: St. Petersburg, Russia
- Contact:
Re: Patch: Russian town names
Here patch based on original algorithm works against r18645
- Attachments
-
- russian-town-names.patch
- r18645
- (5.31 KiB) Downloaded 598 times
- Vaulter
- Traffic Manager
- Posts: 185
- Joined: 21 Dec 2004 05:35
- Skype: andrey-zaharov
- Location: St. Petersburg, Russia
- Contact:
Re: Patch: Russian town names
Synced to the 1.0.0
Smoky's patch with static names (no need out-dated GRF )
Smoky's patch with static names (no need out-dated GRF )
- Attachments
-
- russian-town-names-smoky.patch
- (129.2 KiB) Downloaded 667 times
Re: Patch: Russian town names
legoscia, if you are still on this forum, your newgrf doesn't work on 1.0. I get an error "Unexpected end of grf". And patch is worse than newgrf of course because it's incompatible with non-patched openttd.
Re: Patch: Russian town names
you can try to use grfcodec and nforenum on the grf, that might show what's wrong with it. you can get both tools from www.openttd.org/development
Re: Patch: Russian town names
Code: Select all
#renum russian-town-names.nfo
NFORenum v3.4.6 r2309 - Copyright 2004-2009 Dale McCoy.
Processing file "russian-town-names.nfo".
Does not appear to be an NFO file.
Processing complete.
Code: Select all
#grfcodec -e russian-town-names.grf .
GRFCodec version 0.9.10 r2306 - Copyright (C) 2000-2005 by Josef Drexler
Encoding in temporary file russian-town-names.new
Re: Patch: Russian town names
the file doesn't respect the file format. replace the first lines with:
Code: Select all
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
Re: Patch: Russian town names
Well, it now gives LOTS of errors like this
It makes me think that this file totally doesn't respect NFO format.
But grfcodec makes the same grf an author posted. Maybe it works in TTDPatch?
I think about making my own grf for town names list (automated generation will never cover all kind of names) instead of patch. I searched this forum, but found no automated way to make NFO from a towns list. Is there any? If not I'll learn that newgrf format (but it's awful).
Code: Select all
//!!Warning (144): Offset 8: Control character 93 should not be used in this string.
//!!Warning (143): Offset 11: Using unspecified control character 9D.
//!!Warning (144): Offset 21: Control character 93 should not be used in this string.
//!!Error (187): Offset 25: Undefined extended format code D1.
//!!Error (161): Offset 31: Text ID D0 BD is not a valid text ID.
//!!Warning (144): Offset 38: Control character 93 should not be used in this string.
//!!Warning (144): Offset 53: Control character 93 should not be used in this string.
//!!Warning (147): Offset 60: Insufficient stack data for control character 82.
//!!Warning (144): Offset 68: Control character 93 should not be used in this string.
//!!Warning (144): Offset 71: Control character 94 should not be used in this string.
//!!Warning (147): Offset 79: Insufficient stack data for control character 80.
//!!Warning (144): Offset 85: Control character 93 should not be used in this string.
//!!Warning (144): Offset 88: Control character 92 should not be used in this string.
//!!Warning (144): Offset 100: Control character 93 should not be used in this string.
//!!Warning (147): Offset 109: Insufficient stack data for control character 82.
//!!Warning (144): Offset 117: Control character 93 should not be used in this string.
//!!Warning (147): Offset 128: Insufficient stack data for control character 80.
//!!Warning (144): Offset 134: Control character 93 should not be used in this string.
//!!Warning (144): Offset 147: Control character 93 should not be used in this string.
//!!Warning (143): Offset 150: Using unspecified control character 9B.
//!!Error (161): Offset 155: Text ID D0 BE is not a valid text ID.
But grfcodec makes the same grf an author posted. Maybe it works in TTDPatch?
I think about making my own grf for town names list (automated generation will never cover all kind of names) instead of patch. I searched this forum, but found no automated way to make NFO from a towns list. Is there any? If not I'll learn that newgrf format (but it's awful).
Re: Patch: Russian town names
these errors probably can be fixed with a few tweaks, but i haven't looked into it.
there was a script like that discussed recently, it belonged to the swiss towns set, i believe.
there was a script like that discussed recently, it belonged to the swiss towns set, i believe.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patch: Russian town names
It seems that the amount of defined strings was wrongly stated within the grf. Also I silenced the warning about colour codes in action8 as they can be savely ignored.
Attached the fixed NFO file and the compiled grf which work for me.
Attached the fixed NFO file and the compiled grf which work for me.
- Attachments
-
- russtown.nfo
- NFO which works for me
- (5.77 KiB) Downloaded 646 times
-
- russtown.grf
- compiled grf
- (1.24 KiB) Downloaded 727 times
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: Patch: Russian town names
Thanks! It works now. But names it creates don't really look as any kind of russian names. So I think a list woul be the best decision. And maybe some generator but made by russian personplanetmaker wrote: Attached the fixed NFO file and the compiled grf which work for me.
I think I'll make that Newgrf. And thanks Eddi, Swiss town names source really has a script. Hope it works for me.
Who is online
Users browsing this forum: No registered users and 4 guests