what's wrong with fr town name ?

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

what's wrong with fr town name ?

Post by hpfx »

Hello,
I just installed a fresh openttd on my new PC. no newGRF installed. (version 1.4 win 64)

When you select french town name, you will experiance the following :
- it's limited to about 70 towns only (which is very low) even if asking for 200. (others does have more)
- game creation spend more time (it spend many second on "industry generation xxx/880"). changing to other town lonague will make it much faster.

Here are options I used for new game :
- map size = 1024x1024
- no of town = cust (200)
- terrain type= very flat
- date = 1980
- no of industry = normal

You may reply than I can use newGRF to increase number of town name... yes, that what I tried, I picked "french town name r5" newGRF.
But I have exactely the same issue : very slow and only 70 towns possible !

note : I tested austrian, catalan, czech, danish, dutch, english (original), finnish : new game is fast and are not limited to 70 towns.

what's wrong ?
Thank you.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: what's wrong with fr town name ?

Post by Alberth »

Apparently the original set of French names is very limited.
Given that it was for maps of 256x256 tiles, it is not a surprise to me.
You may reply than I can use newGRF to increase number of town name... yes, that what I tried, I picked "french town name r5" newGRF.
But I have exactely the same issue : very slow and only 70 towns possible !
Indeed, a newgrf should solve it, if it has more strings than the original name generator :)

It sounds asif you didn't select the newgrf as name generator to use.
After setting the newgrf, go to the game options. You will see a new entry at the top of the menu. You need to select that to use the newgrf as town name generator.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: what's wrong with fr town name ?

Post by planetmaker »

The list of French townnames built-in into OpenTTD covers 70 townnames. The French townname NewGRF available from content download covers 170 townnames. Those are the respective maximum number of towns which can be placed when using them. OpenTTD will try to place the amount of towns you ask for nonetheless - and only fail slowly.

The other grfs you cite obviously provide more than the 200 names you expect the NewGRF(s) to provide.
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

Re: what's wrong with fr town name ?

Post by hpfx »

Alberth wrote:Apparently the original set of French names is very limited.
Given that it was for maps of 256x256 tiles, it is not a surprise to me.
indeed.
Alberth wrote:It sounds asif you didn't select the newgrf as name generator to use.
After setting the newgrf, go to the game options. You will see a new entry at the top of the menu. You need to select that to use the newgrf as town name generator.
Believe it or not : it tooks me 10 minutes to find it out (after re-reading your post at least 3 times)
I just figured out the double "french" entry in "town names" (one for original and the one on the top of the list as you said : for the grf)
I created a new game, it worked (more than 70, and fast) but for your information when returning back to option I had "(undefined string)" selected as "Town Names"... strange, but it still works.

Thank you.
planetmaker wrote:The French townname NewGRF available from content download covers 170 townnames.
Now I know how to use it, I tested it, it could create about 490 towns.
planetmaker wrote: The other grfs you cite obviously provide more than the 200 names you expect the NewGRF(s) to provide.
If we speak about the same (?) : other town language I cited was not newgrf I downloaded, it was built-in.

Thank you for your answer.

I didn't expect answer so fast, so in the mean time, I was trying to understand actionF, NFO and how newGRF are built... not so easy.

I have questions :
- just to be sure I understood correctly : there are no option to tell this town is a city (for town like "paris" for example)
- also, there are no option to give placement ? (for example to tell this town in the north side, this one on south-east ...)
- I wanted to increase number of town in provided new grf, I took http://users.tt-forums.net/grfmaker/ read ActionF doc, took the provided TownListExample.lst file, but manny things are so hard to understand (*)... but at the end I could find a simple file on the forum in NML format... that I can easily extend with more town name... but I don't know how to convert it into GRF or even NFO file, Do you have some links to help me ?

(*) sorry, it's not to complain about documentation, but here http://newgrf-specs.tt-wiki.net/wiki/ActionF sentence like this is not so obvious

Code: Select all

<ID> 
ID of this definition in the bottom 7 bits. If bit 7 is set, this is a final definition (it will be displayed in the Options window), 
if it's clear, this is an intermediate definition that can be used to create more complex decision chains, see below. 
Final and intermediate definitions share the same 128 IDs, so 01h and 81h define the same ID for different usages, 
and not two separate IDs. 
is an ID a uniq identifier ? or something else ? comments provide tips but I don't know what to choose here ?

Thank you.
Brumi
President
President
Posts: 921
Joined: 18 Jul 2009 17:54

Re: what's wrong with fr town name ?

Post by Brumi »

hpfx wrote:I had "(undefined string)" selected as "Town Names"... strange, but it still works.
That is a bug in version 1.4.0, it has been already fixed in the upcoming versions.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: what's wrong with fr town name ?

Post by Alberth »

hpfx wrote:I didn't expect answer so fast, so in the mean time, I was trying to understand actionF, NFO and how newGRF are built... not so easy.
You should read some other bits of the specs first, before claiming it as not easy :D
hpfx wrote:I have questions :
- just to be sure I understood correctly : there are no option to tell this town is a city (for town like "paris" for example)
- also, there are no option to give placement ? (for example to tell this town in the north side, this one on south-east ...)
- I wanted to increase number of town in provided new grf, I took http://users.tt-forums.net/grfmaker/ read ActionF doc, took the provided TownListExample.lst file, but manny things are so hard to understand (*)... but at the end I could find a simple file on the forum in NML format... that I can easily extend with more town name... but I don't know how to convert it into GRF or even NFO file, Do you have some links to help me ?
- Indeed, no way to reserve a name for a city/village.
- Indeed, no way to give preference to placement.
- ".nml" files can be converted into NFO and/or GRF by nmlc, the NML compiler at https://dev.openttdcoop.org/projects/nml

You may want to add a project to https://dev.openttdcoop.org/projects/townnames, or extend the French townnames grf we already seem to have.
hpfx wrote:(*) sorry, it's not to complain about documentation, but here http://newgrf-specs.tt-wiki.net/wiki/ActionF sentence like this is not so obvious

Code: Select all

<ID> 
ID of this definition in the bottom 7 bits. If bit 7 is set, this is a final definition (it will be displayed in the Options window), 
if it's clear, this is an intermediate definition that can be used to create more complex decision chains, see below. 
Final and intermediate definitions share the same 128 IDs, so 01h and 81h define the same ID for different usages, 
and not two separate IDs. 
is an ID a uniq identifier ? or something else ? comments provide tips but I don't know what to choose here ?
The specs assume you know how binary numbers work, which is normal when you are defining storage of information in a computer. If you don't know that, you may want to look into that first.

An ID is a number, intermediate IDs are between 0 and 127 (bottom 7 bits == bit 0 to 6), if it is a final ID, add 128 (bit 7 is set, 2**7 == 128).

The specs assume you know how binary numbers work.
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

Re: what's wrong with fr town name ?

Post by hpfx »

Hi,
Thank you for answers,
Alberth wrote:The specs assume you know how binary numbers work.
I well know how binary works, this was not this part which gave me troubles.
I mean, usually when you have something called "id" it's an identifier, and then the question is : what id can I take, if I extend a newgrf, is it better to keep id or should I take another one. In a case id have to be uniq (it's not specified, but it's common) where can I check existing ids ? is there a place where I can find already registrered ids ? ....this kind of question, not technical questions about LSB, MSB...

Maybe I should not asking myself too much questions, maybe I can pick just a random ID?...

Best Regards
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

Re: what's wrong with fr town name ?

Post by hpfx »

Brumi wrote:
hpfx wrote:I had "(undefined string)" selected as "Town Names"... strange, but it still works.
That is a bug in version 1.4.0, it has been already fixed in the upcoming versions.
Thank you,

I found that I have to first go to newgrf setting to "apply", and then I am able to see it on option screen.

Also, if you openttd with a built-in language like EN, and if you don't apply newgrf, you can't see "(undefined string)" neither "french"(from newgrf) in options window... that's why I could see it first !

according to test I performed, to see it on options, there are only two cases :
- or newgrf town name is already sleected => then you see (undefined string)
- or you apply newgrf at every openttd run => then you see right language name.

I was going to fullfil a bug report... thanks to you, I don't need anymore.
I'm waiting for 1.4.1 now ;)
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: what's wrong with fr town name ?

Post by Alberth »

hpfx wrote:I well know how binary works, this was not this part which gave me troubles.
ok, that was not clear to me.
hpfx wrote:I mean, usually when you have something called "id" it's an identifier, and then the question is : what id can I take, if I extend a newgrf, is it better to keep id or should I take another one. In a case id have to be uniq (it's not specified, but it's common) where can I check existing ids ? is there a place where I can find already registrered ids ? ....this kind of question, not technical questions about LSB, MSB...
As far as I know (but I am mostly a noob at NFO/GRF), action F IDs are local, so you can use any ID that you like. A GRF does also have IDs, which have more rules. Such rules are then explained in the specs.

If you program in NML, you don't need to bother with IDs, the compiler handles them for you.


As far as I know you cannot extend an action F of another GRF (ie they are local). A simpler approach is probably to
- make a new GRF from scratch, or
- make an extension for an existing project, or
- fork an existing project and modify it to your liking.

At least in the latter two cases, there are licenses to consider and obey. In the first case, it is highly recommended to add a license to your GRF, if you publish it.
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

Re: what's wrong with fr town name ?

Post by hpfx »

Thank Alberth, that's clear for me now.

NFO language looks nice, for such simple thing like town it's maybe the best option.

Thanks.
User avatar
Phreeze
Director
Director
Posts: 514
Joined: 12 Feb 2010 14:30
Location: Luxembourg

Re: what's wrong with fr town name ?

Post by Phreeze »

look at NML, eaven easier..it's like XML if you just look at a town name GRF
leifbk
Chairman
Chairman
Posts: 815
Joined: 23 Dec 2013 16:33
Location: Bærum, Norway

Re: what's wrong with fr town name ?

Post by leifbk »

Like they say, creating a town names GRF is very very easy. I created one yesterday, see this topic. It took me a couple of hours to piece together a list of prefixes + suffixes that produces credible random Norwegian town names. 200 prefixes combined with 50 suffixes will provide 10,000 potential unique place names :shock:

The only problem is that they indeed are placed randomly, with no connection to the surroundings. Norwegian place names are usually very consistent with the landscape. A place called Nordvik (ie. Northern bay) may be placed at the southern tip of the map. I can live with that; the first thing I do in a new game is to survey the map for potential routes, and routinely replace poorly chosen names.
hpfx
Engineer
Engineer
Posts: 43
Joined: 09 Nov 2013 00:19

Re: what's wrong with fr town name ?

Post by hpfx »

Brumi wrote:
hpfx wrote:I had "(undefined string)" selected as "Town Names"... strange, but it still works.
That is a bug in version 1.4.0, it has been already fixed in the upcoming versions.
The bug is still present on 1.5.0
Brumi
President
President
Posts: 921
Joined: 18 Jul 2009 17:54

Re: what's wrong with fr town name ?

Post by Brumi »

Yes, and it's strange because I saw it fixed...
Eddi
Tycoon
Tycoon
Posts: 8279
Joined: 17 Jan 2007 00:14

Re: what's wrong with fr town name ?

Post by Eddi »

afair it was a bug that depends on the version of the title savegame. so the bug only ever shows in releases, because the title savegame is new, not in trunk/nightlies, which still uses an ancient title savegame.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 3 guests