Catalan Town Names
Moderator: OpenTTD Developers
Catalan Town Names
Hi,
It's been a while since I started playing Openttd but this is my first message.
The reason of this message is that I wanted to contribute a little bit with a Catalan town names generator.
I'm quite a newbie using patch files and SVN but I think that I managed to save my work in a patch for the main trunk.
I'd like my little job to be included in the next versions of Openttd 0.4.8, 0.5 or the version the "openttd Guru's" consider apropiate.
One last thing, there is one little bug I couldn't solve. The last town names option was Italian, being Catalan now the last one, but I couldn't manage to tell Openttd that now there is one more option. The problem is that if I select Catalan town names, the next time I run openttd Italian is selected.
Arnau
It's been a while since I started playing Openttd but this is my first message.
The reason of this message is that I wanted to contribute a little bit with a Catalan town names generator.
I'm quite a newbie using patch files and SVN but I think that I managed to save my work in a patch for the main trunk.
I'd like my little job to be included in the next versions of Openttd 0.4.8, 0.5 or the version the "openttd Guru's" consider apropiate.
One last thing, there is one little bug I couldn't solve. The last town names option was Italian, being Catalan now the last one, but I couldn't manage to tell Openttd that now there is one more option. The problem is that if I select Catalan town names, the next time I run openttd Italian is selected.
Arnau
- Attachments
-
- catalantownnames 280706.patch
- Patch tested with r5625 of the main trunk
- (6.61 KiB) Downloaded 393 times
Last edited by Arnau on 28 Jul 2006 14:36, edited 7 times in total.
Of course!
I followed this guide:
http://wiki.openttd.org/index.php/Town_Names
Basically there are two types of town names.
- Real names
- Fictional Computer generated names.
When you look at the sources you'll see that in some languages only Real names are used (because the author decided that way) and others use a list of words that combined with each other create some realistic names.
In my version, I used the Italian template with some modifications.
Hope it helps.
I followed this guide:
http://wiki.openttd.org/index.php/Town_Names
Basically there are two types of town names.
- Real names
- Fictional Computer generated names.
When you look at the sources you'll see that in some languages only Real names are used (because the author decided that way) and others use a list of words that combined with each other create some realistic names.
In my version, I used the Italian template with some modifications.
Hope it helps.
- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Re: Catalan Town Names
You missed the changes in settings.cArnau wrote:One last thing, there is one little bug I couldn't solve. The last town names option was Italian, being Catalan now the last one, but I couldn't manage to tell Openttd that now there is one more option.
This is what you need

By the way, maybe you could use a lot more names and parts.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Thanks for the fast reply but what do I have to change in the settings.c file?
What would you like to add? more real towns or more fictional options? both hehe?
Another question. I'm having little problems with the function SeedModChance. The problem is that I don't know how it works, and I'd like to improve this part as I want a better distribution of the words.
The parameters are Shift, Max and Seed. The only one I know is Max which is the maximum value.
Well, if someone can explain or tell me where is explained I'll be so grateful.
Bye!
What would you like to add? more real towns or more fictional options? both hehe?
Another question. I'm having little problems with the function SeedModChance. The problem is that I don't know how it works, and I'd like to improve this part as I want a better distribution of the words.
The parameters are Shift, Max and Seed. The only one I know is Max which is the maximum value.
Well, if someone can explain or tell me where is explained I'll be so grateful.
Bye!
As coder of Italian town generator (BTW I'm happy that you used my code a s schema for your generator), the setting thtat you look in setting.c is the lineArnau wrote:Thanks for the fast reply but what do I have to change in the settings.c file?
Code: Select all
SDT_OMANY(GameOptions, town_name, SLE_UINT8, 0, 0, 0, 19, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian", STR_NULL, NULL),
Code: Select all
SDT_OMANY(GameOptions, town_name, SLE_UINT8, 0, 0, 0, 20, "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovakish|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian!catalan", STR_NULL, NULL),
Sidewinder
Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
well, the Swiss town names had the same bug, but for some odd reason nobody noticed, so it got committed and after a long while, we got a bug report on it so I had to fix it (simple fixArnau wrote:Sidew thanks you very much. I feel a little bit idiot it wasn't that difficult...

Odds are that if you do something stupid, you aren't the first one to do so and you aren't the last either

- belugas
- OpenTTD Developer
- Posts: 1507
- Joined: 05 Apr 2005 01:48
- Location: Deep down the deepest blue
- Contact:
Both, indeed! The more the better.Arnau wrote:What would you like to add? more real towns or more fictional options? both hehe?
Those functions are merely using the seed param, operate a binary shift and see what the result is, compared to Max. It does not generate a random number by itself. So the seed value must not be changed. Yu can play with the shift as you will, as well as the max.Arnau wrote: Another question. I'm having little problems with the function SeedModChance. The problem is that I don't know how it works, and I'd like to improve this part as I want a better distribution of the words.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
Hi,
I think you have a bug at:
this else will cause city names with prefix only, never with prefix and the rest of the city name.
Regards
I think you have a bug at:
Code: Select all
if (SeedModChance(0, 2, seed) == 0) { // prefix
strcat(buf, name_catalan_pref[SeedModChance(11, lengthof(name_catalan_pref), seed)]);
}
else { <-- HERE
Regards
I confirm this bug after checked the source, can you write in http://bug.openttd.org because the generator is now in trunk.
Sidewinder
Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
Italian Town names patch for OTTD (R5266) now in trunk since 0.4.8
For typo, errors or bug on OTTD italian translation, please PM me.
unofficial italian TTD/OpenTTD forum: http://wolf01.game-host.org/forum/index.php
No, that's just a GUI frontend to the actual svn server for reading stuff, not editing. It lacks write permission.sidew wrote:I confirm this bug after checked the source, can you write in http://bug.openttd.org because the generator is now in trunk.
To edit anything in the svn server, you need to be a developer, so I fixed it.
Revision: 6213 wrote:-Fix: Calatan town names was only prefix OR the rest of the string, never both (nars)
Hi,
I wanted to report the problem, but I've been away for quite a lot of time. Anyway someone noticed before me. So Nars, thanks!. Problem solved Hurrah!
I just found one little little bug more...
in the strings list, in the table/namegen.h
I forgot one space at the end.
Sorry
Bye
I wanted to report the problem, but I've been away for quite a lot of time. Anyway someone noticed before me. So Nars, thanks!. Problem solved Hurrah!
I just found one little little bug more...
in the strings list, in the table/namegen.h
Code: Select all
"Olesa de", ----> "Olesa de ",
Sorry

Bye
fixedArnau wrote:I just found one little little bug more...
in the strings list, in the table/namegen.h
I forgot one space at the end.Code: Select all
"Olesa de", ----> "Olesa de ",
Who is online
Users browsing this forum: No registered users and 27 guests