NFORenum v3.4.6 released (NFO renumberer and linter)

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by George »

As you can see, props 0A, 10, 12 are not aligned correctly. Could you, please, make arrangement to take escapes into account? :roll:

Code: Select all

 2556 * 82	 00 07 15 02 FA
                 08 6D           6D          
                 09 24           00          
                 0A \b1930 \b2175
                 \b1930 \b2175
                 0B 0A           00          
                 0C 03           03          
                 0D 08           08          
                 0E 08           08          
                 0F 08           08          
                 10 \w1111        \w1111       
                 11 FF           FF          
                 12 \wx480E        \wx480E       
                 13 1F F8        00 00       
                 14 1F           1F          
                 18 20           20          
                 19 0A           0A          
                 1A FF           FF          
                 1B 02           02          
                 1C 07           07          
                 1D 06           06          
                 1E 05 0C 0D FF  05 0C 0D FF 
                 1F 0F           0F
Image Image Image Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

George wrote:
Wiki wrote:You can add 80 to the operation number to make it apply only if the target is not defined yet.
NFO renum says

Code: Select all

//!!Error (117): Offset 2: Invalid operation 80.
   14 * 9	 0D 00 80 01 FE "VC" 00 01
What am I doing wrong?
I thought the wiki also said that the only valid operation for such action Ds is 00.

I can't find anything unambiguous now, though. I'll have to check the code and fix the wiki.
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
Painy
Engineer
Engineer
Posts: 11
Joined: 21 Oct 2005 07:09
Location: Nuremberg, Germany
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Painy »

I just made a simple newgrf that makes all standard train engines available for all climates.

Code: Select all

  2 * 7		00			// action 00
		00			// feature 00 = trains
		01			// properties to change
		1B			// for 27 vehicles
		00			// ID of the first vehicle (Kirby Paul Tank)
		06 0F			// climate 1=Temperate, 2=Arctic, 4=Tropic, 8=Toyland
Compiling the nfo works allright, ingame testing of the compiled newgrf also works as intendet, but NFORenum tells me "Error on sprite 2.".
Looking up my nfo-file again shows this line above sprite 2: "//!!Error (65): Expected 26 more bytes for prop 06."

Am I doing something wrong in my nfo code or is it a glitch in NFORenum?
User avatar
Zephyris
Tycoon
Tycoon
Posts: 2897
Joined: 16 May 2007 16:59

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Zephyris »

You need to specify the new value of the variable for each vehicle you are modifying, ie. you have to specify the climate availability 27 times for 27 vehicles...

Code: Select all

  2 * 33      00         // action 00
      00         // feature 00 = trains
      01         // properties to change
      1B         // for 27 vehicles
      00         // ID of the first vehicle (Kirby Paul Tank)
      06 0F         // train 1
         0F         // train 2
         0F         // train 3
         0F         // train 4
         0F         // train 5
         0F         // train 6
         0F         // train 7
         etc.
         0F         // train 27
Just a little comment: Toyland vehicles in all climates? Really!?
Painy
Engineer
Engineer
Posts: 11
Joined: 21 Oct 2005 07:09
Location: Nuremberg, Germany
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Painy »

ok thanks mate :) NFORenum error is gone now.
Just a little comment: Toyland vehicles in all climates? Really!?
didn't think about toyland vehicles...I guess they will stay where they are then :D
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

Painy wrote:Compiling the nfo works allright, ingame testing of the compiled newgrf also works as intendet
Is that TTDPatch or OpenTTD?
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
Painy
Engineer
Engineer
Posts: 11
Joined: 21 Oct 2005 07:09
Location: Nuremberg, Germany
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Painy »

DaleStan wrote:
Painy wrote:Compiling the nfo works allright, ingame testing of the compiled newgrf also works as intendet
Is that TTDPatch or OpenTTD?
OpenTTD r18867
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1795
Joined: 30 Mar 2005 09:43

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by peter1138 »

For your information, as of r18884 OpenTTD is more strict about this, and will disable a NewGRF if this problem occurs. In addition we removed the debug diagnostics regarding length checking as they were often incomplete or just wrong, and complicated the code somewhat. And of course NFORenum is a much better tool for validating NFO :-)
He's like, some kind of OpenTTD developer.
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Rubidium »

There seems to be a reoccuring spelling mistake with precede; it is often written as preceed (or preceeding), which is according to Merriam-Websters and Oxford's dictionary incorrect. The attached patch fixes all instances of this error.
Attachments
precede.diff
(12.63 KiB) Downloaded 199 times
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DJ Nekkid »

renum r2300 do not seem to support new rails, and it also crashes when trying to do its job.

In the Action0 i get a "linter failure" - Unknown feature byte ... i.e. it dont support feature 10
The action1 crashes renum. I drive windows7 64bit on a Intel I7-820.
Action2 and 3 i dont know, as it crashes on Action1

More info can be provided if needed.
Member of the
ImageImage
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

More information is needed.

What information is needed can be provided if needed.
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
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DJ Nekkid »

the .nfo and a screenshot ? :)

i'll fix it when i come home from work :)
Member of the
ImageImage
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DJ Nekkid »

Here is a screenie of the error, plus the code, the action1 is line 66

Code: Select all

.....

-1 * 0  01 10 01 \b10
-1 sprites/pcx/hstr.pcx         01      01      1       64      32      -16     -32
-1 sprites/pcx/hstr.pcx         66      01      1       64      32      -16     -32
-1 sprites/pcx/hstr.pcx         131     01      1       64      32      -16     -32
-1 sprites/pcx/hstr.pcx         196     01      1       64      32      -16     -32
-1 sprites/pcx/hstr.pcx         261     01      1       64      32      -16     -32
-1 sprites/pcx/hstr.pcx         326     01      1       64      32      -16     -32
-1 sprites/pcx/hstr.pcx         391     01      1       64      39      -20     -32
-1 sprites/pcx/hstr.pcx         456     01      1       64      23      -12     -32
-1 sprites/pcx/hstr.pcx         521     01      1       64      23      -12     -32
-1 sprites/pcx/hstr.pcx        586     01      1       64      39      -20     -32
-1 * 0  02 10 60 01 00 \w0
Attachments
error.png
error.png (34.29 KiB) Viewed 3851 times
Member of the
ImageImage
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by FooBar »

DJ Nekkid wrote:Here is a screenie of the error, plus the code, the action1 is line 66
The error specifies sprite numbers, not line numbers. If you have an empty line or a comment somewhere, line numbers and sprite numbers aren't equal anymore. I made that mistake once myself... :P

Not that you couldn't be right, but just that you could be wrong :D
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

FooBar: Sorry. I can find that information just fine. What I couldn't (everyone, please note tense) find was a demonstrating NFO.

George: Your issue with tabulating escapes should be fixed now. Mostly, it took me quite a while to muddle out how to fix it.
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
User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DJ Nekkid »

you can try this one DaleStan? :)

The action 1-2-3 is a the bottom, currently commented out in sprites/nfo/nutracks.nfo
Attachments
sprites.zip
(47.67 KiB) Downloaded 152 times
Member of the
ImageImage
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by George »

DaleStan wrote:FooBar: Sorry. I can find that information just fine. What I couldn't (everyone, please note tense) find was a demonstrating NFO.
George: Your issue with tabulating escapes should be fixed now. Mostly, it took me quite a while to muddle out how to fix it.
What am I doing wrong?

Code: Select all

 1517 * 82	 00 07 15 02 E8
                 08 6D           6D          
                 09 24           00          
                 0A \b1930 \b2175
                 \b1930 \b2175
                 0B 0A           00          
                 0C 03           03          
                 0D 08           08          
                 0E 03           03          
                 0F 08           08          
                 10 \w450        \w450       
                 11 FF           FF          
                 12 \wxDCE7        \wxDCE7       
                 13 1E F8        00 00       
                 14 11           11          
                 18 20           20          
                 19 0C           0C          
                 1A FF           FF          
                 1B 02           02          
                 1C 08           08          
                 1D 06           06          
                 1E 01 02 00 FF  01 02 00 FF 
                 1F 0F           0F
Image Image Image Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

Sorry. I misspoke. It should be fixed in r2304.
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
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by George »

DaleStan wrote:Sorry. I misspoke. It should be fixed in r2304.
Thank you, now it is fixed for prop 10 and 12. As for prop 0A, do I understand it right that you've decided not to change it?

Code: Select all

 1517 * 82	 00 07 15 02 E8
                 08 6D           6D
                 09 24           00
                 0A \b1930 \b2175
                 \b1930 \b2175
                 0B 0A           00
                 0C 03           03
                 0D 08           08
                 0E 03           03
                 0F 08           08
                 10 \w450        \w450
                 11 FF           FF
                 12 \wxDCE7      \wxDCE7
                 13 1E F8        00 00
                 14 11           11
                 18 20           20
                 19 0C           0C
                 1A FF           FF
                 1B 02           02
                 1C 08           08
                 1D 06           06
                 1E 01 02 00 FF  01 02 00 FF
                 1F 0F           0F
Image Image Image Image
Locked

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest