Page 3 of 4

Posted: 27 Jul 2006 11:42
by Dave
/me gives applause.

Very nice.

Tell me... does it default for the Mars Climate? Or do I have to manually select it?

Posted: 27 Jul 2006 12:22
by PikkaBird
Dave Worley wrote:Tell me... does it default for the Mars Climate? Or do I have to manually select it?
You have to manually select it before starting the game - unfortunately it's not possible to force a custom town name set.

Posted: 27 Jul 2006 12:45
by Dave
As I found out :D.

BTW, Mr Antonius, you haven't chosen a name for your Name Set in the drop down box - it says (UnnamedStyle).

Posted: 27 Jul 2006 15:04
by DaleStan
It's only named for American. I'd guess you're using English, Dave.
Davus: change the first 01 in the action F (the lang-id byte) to 1F.

And it looks like that check disappeared; I'll have to see if I can resurrect it.

Posted: 27 Jul 2006 15:45
by Davus Antonius
All right, updated the file. Here it is.

Posted: 27 Jul 2006 15:46
by Dave
Ah excellent. Thanks for that.

Posted: 28 Jul 2006 00:24
by LittleHelper
Dave Worley wrote:/me gives applause.
Me too...congratulation!
Great to see a team with a "TTD coding youngster" and an "old fox" working together... and achieving nice results. :] That's the way it should work to enlarge the community with new artists and new coders.

regards
LH

Posted: 28 Jul 2006 01:13
by Aegir
That's often how it does work on the #tycoon IRC channel ;).

Almost anyone worth talking to is on #tycoon :D.

Posted: 28 Jul 2006 14:35
by LittleHelper
Aegir wrote:That's often how it does work on the #tycoon IRC channel ;).
Almost anyone worth talking to is on #tycoon :D.
Thanks, Aegir, will give it it try to get some information out of "old foxes" :]
I was looking for some IRC addresses on the "useful graphics tools & sites", but no category/entry to be found there. Wouldn't it be useful to create one ?!

regards
LH

Posted: 28 Jul 2006 16:44
by nicfer
I too am making a new town names grf but I have a trouble. Here is it:
My GRF File after NFORenum-ing it wrote:// Automatically generated by GRFCODEC. Do not modify!
// (Info version 6)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
0 * 4 02 00 00 00
1 * 8 08 06 "NF" 03 05 00 00
//!!Warning (99): Offset 126: No more data was expected.
2 * 421 0F 80 7F "Argentina" 00 00 02
04 00 04
06 "Gran " 00 04 "Bajos " 00 03 "Nuevos " 00 03 "Fuerte " 00
06 04 07
04 "La Plata" 00 04 "Mar del Plata" 00 04 "Villa Gesell" 00 03 "Necochea" 00
04 "Avellaneda" 00 04 "Bariloche" 00 04 "Neuquen" 00 03 "Salta" 00
04 "Mendoza" 00 04 "Rosario" 00 04 "Posadas" 00 03 "Trelew" 00
04 "Comodoro Rivadavia" 00 04 "Cordoba" 00 04 "Corrientes" 00 03 "Santa Fe" 00
04 "Entre Ríos" 00 04 "Resistencia" 00 04 "Jujuy" 00 03 "Catamarca" 00
04 "Rawson" 00 04 "Formosa" 00 04 "Viedma" 00 03 "Ushuaia" 00
04 "Santa Rosa" 00 04 "San Luis" 00 04 "Santiago del Estero" 00 03 "Tucumán" 00
04 "La Rioja" 00 04 "Villa Carlos Paz" 00 04 "Lanús" 00 04 "Berazategui" 00
04 "Buenos Aires" 00 81 01
What am I doing wrong?

Posted: 28 Jul 2006 17:51
by DaleStan
Do what I told Davus to do. Add the line
//@@BEAUTIFY ON
right after your sprite 0.

Then re-run NFORenum and look at the output.
That gives you some good hints into NFORenum's thought processes.
That will also reformat your NFO file, so if you're particularly attached to that format, be sure you keep a copy somewhere.

Personally, I think you reported a vastly too small <textcount> for the second <parts> block.

Posted: 28 Jul 2006 19:04
by nicfer
I followed that, and now I get another error:
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 6)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
0 * 4 02 00 00 00
//@@BEAUTIFY ON
1 * 8 08 06 "NF" 03 05 00 00
//!!Error (62): Offset 420: ID 02 has not been defined.
//!!Fatal Error (43): Offset 421: Linter requires 1 byte(s) which do(es) not exist.

2 * 421 0F 80 7F "Argentina" 00 00
02
04 00 04
06 "Gran " 00
04 "Bajos " 00
03 "Nuevos " 00
03 "Fuerte " 00
23 04 07
04 "La Plata" 00
04 "Mar del Plata" 00
04 "Villa Gesell" 00
03 "Necochea" 00
04 "Avellaneda" 00
04 "Bariloche" 00
04 "Neuquen" 00
03 "Salta" 00
04 "Mendoza" 00
04 "Rosario" 00
04 "Posadas" 00
03 "Trelew" 00
04 "Comodoro Rivadavia" 00
04 "Cordoba" 00
04 "Corrientes" 00
03 "Santa Fe" 00
04 "Entre Ríos" 00
04 "Resistencia" 00
04 "Jujuy" 00
03 "Catamarca" 00
04 "Rawson" 00
04 "Formosa" 00
04 "Viedma" 00
03 "Ushuaia" 00
04 "Santa Rosa" 00
04 "San Luis" 00
04 "Santiago del Estero" 00
03 "Tucumán" 00
04 "La Rioja" 00
04 "Villa Carlos Paz" 00
04 "Lanús" 00
03 "Berazategui" 00
04 "Buenos Aires" 00
81 01
If I replace the 23 underlined with a 22 the linter error dissapears. Now what is bad?

Posted: 28 Jul 2006 19:33
by Davus Antonius
The 23 in that line indicates how many text strings are in that part. You have to be acurate there or you get errors, a lot of my errors was due to the fact that I had the wrong number in the <textcount> variable.

For the other, if I'm reading that correctly, it's doesn't like that last line. You don't need that last line anyway since that there's only 2 parts to your town names, and you have the 2 parts already defined.

For the 02... that should be after the 2 00, not on the following line, since that defines haw many parts there are in the name style.

Posted: 28 Jul 2006 19:49
by DaleStan
The problem is that NFORenum hasn't seen the Action F with ID 01 yet.

Are you quite sure the message says "ID 02"? I can't reproduce that; every time I try, it says "ID 01", as it should.

And Davus, NFORenum puts the <num-parts> byte on its own line. I don't remember the logic behind that, though. I'd guess that George requested it, but I don't know for sure.

Posted: 28 Jul 2006 20:08
by nicfer
Sorry for the ID 02 error, the trouble is that I changed the 01 to 02 for see if the error too change and after changed the 02 to 01 again and I forgetted to NFORenumering it again. But I deleted the last line and changed the 23 to 21 and it worked :). But before posting grf I will ask if is really necesary that line, case else I will post it.

Posted: 28 Jul 2006 21:51
by DaleStan
Is what line necessary? The "//@@BEAUTIFY ON"? No. It just makes NFORenum format your code in a way that it thinks is more readable than grfcodec's default format.

As far as grfcodec is concerned, that line is a comment, and it will be completely ignored.

Posted: 28 Jul 2006 22:14
by nicfer
UnderBuilder wrote:
81 01
That one :). But I tested it and no problems. Only that when I create a game, leave and create a new one the game overwrites the config for the argentinian town names automaticly to german ones. Here is the grf for all the argentinians but everyone is allowed to download. I don't know if it will work in ottd aswell, only tested in ttdpatch 2.5 beta 7 :).

Posted: 28 Jul 2006 22:48
by DaleStan
Unless you have a Action F with the ID 01, those two bytes are a bad idea. I'd guess that if you put it back in, TTDPatch will refuse to load the GRF, with the message "Invalid sprite #2 (code 4/420)", but I don't know for sure.

Posted: 05 Aug 2006 19:21
by Uwe
Out of sheer curiosity I coded a set of German towns in a very simple Action F. So far, so good.

Now, certain towns are named differently in other languages, like Cologne (Köln), Munich (München) or Nuremberg (Nürnberg). Is there a way to modify the name string depending on the game language? The language is checked for the menu entry, but I did not find a possibility to actually do that for the town name parts. Any ideas?

Posted: 05 Aug 2006 19:44
by Patchman
You would probably have to do that with an action D to read the game language (09) and then an action 9 to skip the relevant action Fs.