NFORenum v3.4.6 released (NFO renumberer and linter)
Moderator: Graphics Moderators
167 * 10 02 00 3A 81 41 00 FF 00 1A 00
The offending byte is that 00. The problem is that it's a variational Action2, but all it does is define CargoID 3A to be equivilant to CargoID 1A.
TTDPatch will accept it, so it's a warning, not an error[0].
The correct thing to do here would be to:
1) remove the sprite entirely, and change the definition of 1A and/or following references to 3A accordingly.
2) edit the sprite, so that it points to different cargo IDs.
You can disable these warnings with //@@SANITY ERROR (or higher); in the next version //@@SANITY WARNING1 will work too.
Hmm... I guess I need to specify what what level a warning is. I probably need a list of all warnings, too. *pout* More interface and less interesting stuff.
[0] On that subject, I've decided that a few "errors" should really be warnings. ("line to long" and "variational option cannot be reached") A fixed version should be out once I get the no-longer-missing checks on random and variational Action 2s tested.
The offending byte is that 00. The problem is that it's a variational Action2, but all it does is define CargoID 3A to be equivilant to CargoID 1A.
TTDPatch will accept it, so it's a warning, not an error[0].
The correct thing to do here would be to:
1) remove the sprite entirely, and change the definition of 1A and/or following references to 3A accordingly.
2) edit the sprite, so that it points to different cargo IDs.
You can disable these warnings with //@@SANITY ERROR (or higher); in the next version //@@SANITY WARNING1 will work too.
Hmm... I guess I need to specify what what level a warning is. I probably need a list of all warnings, too. *pout* More interface and less interesting stuff.
[0] On that subject, I've decided that a few "errors" should really be warnings. ("line to long" and "variational option cannot be reached") A fixed version should be out once I get the no-longer-missing checks on random and variational Action 2s tested.
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
And here's the promised revision, with corrected severities and a full list of the sanity checker's messages.
Changelog:
v2.0.1 to v2.0.2
- Added missing checks for Variational/Random Action 2s
- Added missing check for Action 3s
- Added a list of the sanity checker's messages (SANITY or SANITY.txt)
- Downgraded severity of some messages.
- Made sanity failures supress following non-failure-level messages
See first post for full details and download.
Changelog:
v2.0.1 to v2.0.2
- Added missing checks for Variational/Random Action 2s
- Added missing check for Action 3s
- Added a list of the sanity checker's messages (SANITY or SANITY.txt)
- Downgraded severity of some messages.
- Made sanity failures supress following non-failure-level messages
See first post for full details and download.
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
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
It is intendedDaleStan wrote:167 * 10 02 00 3A 81 41 00 FF 00 1A 00
The offending byte is that 00. The problem is that it's a variational Action2, but all it does is define CargoID 3A to be equivilant to CargoID 1A.
And how could I disable specific warnings?DaleStan wrote:TTDPatch will accept it, so it's a warning, not an error[0].
The correct thing to do here would be to:
1) remove the sprite entirely, and change the definition of 1A and/or following references to 3A accordingly.
You can disable these warnings with //@@SANITY ERROR (or higher); in the next version //@@SANITY WARNING1 will work too.
One more problem. With Toyland2MarsW
Code: Select all
//!!Sanity error: Foundations require 42 (0x2A) sprites.
1317 * 3 05 06 4A
This shouldn't be too hard to code, but I haven't done it yet. For now, you can set the warning level to 1 just before that sprite, and then set it back to 3 (or 4, if you want those) after the sprite.George wrote:And how could I disable specific warnings?
Until I code some more checks, you could also replace it with
167 * 14 02 00 3A 81 41 00 FF 01 1A 00 00 FF <id> 00
<id> must not be 1A (to avoid other sanity checks), and must be defined, but will never be used.
May I ask why you want Cargo IDs 1A and 3A to be the same, instead of using only one of them?
I just copied that information straight from the wiki. If the wiki is wrong, I'll fix my code, but in the absence of correct values, I can't do much.George wrote:One more problem. With Toyland2MarsWIf so, find the wrong sprites, please.Code: Select all
//!!Sanity error: Foundations require 42 (0x2A) sprites. 1317 * 3 05 06 4A
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
JEB wrote:167 * 10 02 etc
should be
167 * 10 02 etc

OK, I know what you mean, but most browsers smash all whitespace to a single space, so I didn't feel it was necessary to put the tab in my post, considering it wouldn't be displayed.
AFAICT, GRFCodec doesn't require the tab; it's just there to make things line up.
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
- George
- Tycoon
- Posts: 4364
- Joined: 16 Apr 2003 16:09
- Skype: george-vb
- Location: Varna, Bulgaria
- Contact:
Logic. 0* means..., 1* means ..., and so on. In some cases there are no variants, but the step of logic is requred (to avoid mistakes and make error search easier)DaleStan wrote:May I ask why you want Cargo IDs 1A and 3A to be the same, instead of using only one of them?George wrote:And how could I disable specific warnings?
The track foundation file also has 4A. Fix the wikiDaleStan wrote:I just copied that information straight from the wiki. If the wiki is wrong, I'll fix my code, but in the absence of correct values, I can't do much.George wrote:One more problem. With Toyland2MarsWIf so, find the wrong sprites, please.Code: Select all
//!!Sanity error: Foundations require 42 (0x2A) sprites. 1317 * 3 05 06 4A

Fixed, as is my code.George wrote:The track foundation file also has 4A. Fix the wiki
I do not expect to be doing more TT-related work, of any sort, until after the new year.
Changelog:
v2.0.2 to v2.0.3
- Corrected number of sprites required for foundations.
- Ensure that the sanity checker will never try to read bytes that do not exist.
The method I used of implemeting the second was a bit of a cop-out on my part, but it works. The new failure message should only be issued on the first few bytes of the sprite.
See first post for full details and download.
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
OK, after entirely too long doing nothing, I have a new version, updated to accept everthing that a43 does.
For those of you who pay attention to such things, this EXE is 5% (3.5KB) smaller than the previous version; I blame this on having removed a lot of duplicate text.
Changelog:
- Changed supression of errors and warnings by failures.
- Added a @@DIFF comment command to help produce useful diffs.
- Changed "Invalid action byte" to a failure.
- (Bugfix) removed "invalid ID" message for @@USEID2
- (Bugfix) Added some missing "can't happen"s
- Up-to-date with a43
If you are interested in translating this program, it's now reasonable to do so; all messages have been relocated to messages.h.
See first post for full details and download.
For those of you who pay attention to such things, this EXE is 5% (3.5KB) smaller than the previous version; I blame this on having removed a lot of duplicate text.
Changelog:
- Changed supression of errors and warnings by failures.
- Added a @@DIFF comment command to help produce useful diffs.
- Changed "Invalid action byte" to a failure.
- (Bugfix) removed "invalid ID" message for @@USEID2
- (Bugfix) Added some missing "can't happen"s
- Up-to-date with a43
If you are interested in translating this program, it's now reasonable to do so; all messages have been relocated to messages.h.
See first post for full details and download.
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
Grr... A "can't happen" while trying to tell me that a "can't happen" did.
Well, I fixed that (both of them), and here's 2.1.0.
Changelog:
v2.0.4 to v2.1.0
- Added some checking of Action 0s
- (Bugfix) Removed various incorrect messages that could be issued on an overlength Action 3
- Moved source files to the src/ directory. This should make decompressing less messy.
I've added a .renum directory; this directory will contain any data files that NFORenum requires (currently just 0.dat)
See first post for full details and download.
Well, I fixed that (both of them), and here's 2.1.0.
Changelog:
v2.0.4 to v2.1.0
- Added some checking of Action 0s
- (Bugfix) Removed various incorrect messages that could be issued on an overlength Action 3
- Moved source files to the src/ directory. This should make decompressing less messy.
I've added a .renum directory; this directory will contain any data files that NFORenum requires (currently just 0.dat)
See first post for full details and download.
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
To go along with a new TTDPatch version, here's a new NFORenum:
Mek, I believe string support is working correctly, but please let me know. I still can't run the patched GRFCodec, so I just read the source.
Changelog:
v2.1.0 to v2.2.0
Mek, I believe string support is working correctly, but please let me know. I still can't run the patched GRFCodec, so I just read the source.
Changelog:
v2.1.0 to v2.2.0
- (bugfix) 0.dat can be updated for new features without changing the source.
- Up-to-date with alpha 49:
New action 0 properties for industry tiles and industries
Extended-byte <num-ent> for action 1 and <num-sprites> for action 5
Action 10 - (bugfix) Terminated repetition now correctly handles multi-byte terminators.
- Updated the action 1/2/3 linter:
Feature bytes larger than 07 are permissible.
Checks ALL standard action 2s
Accepts callback results in standard action 2s
Added detection for property repetition in an action 0. - Added string support (but only if "Info version 5" or no NFO header)
- Added @@PRESERVEMESSAGES and made @@REMOVEMESSAGES default.
- Added checks:
- Action 8:
Presence
Duplicate
Valid GRFID - Action 7/9:
<variable>, <varsize>, and <condition-type> agreement
Backwards goto - Action 10:
Duplicate
Usage - Action 4:
Counts strings
- Action 8:
- Adjusted some warning levels
- (bugfix) Feature 10 prop 1A is a dword, not a byte
- Do not lint NFO files where the first sprite is a real sprite.
- (linter) Do not accept real sprites prior to the first Action 1/5/A.
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
And here's 0.dat updated with feature 0A prop 21, for those of you who have already downloaded 2.2.0. If you haven't, just head over to the OP and download one of those instead.
It's only 343 bytes (the old one was 342, so that's how you can tell which one you have) but .dat is not a permitted extention, so I have to compress it.
(downloads removed; new version)
It's only 343 bytes (the old one was 342, so that's how you can tell which one you have) but .dat is not a permitted extention, so I have to compress it.
(downloads removed; new version)
Last edited by DaleStan on 04 May 2005 06:14, edited 1 time in total.
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
Grr... And that's what comes of not checking with TTDPatch after producing magic numbers. Fixed (and checked too).
Changelog:
v2.2.0 to v2.2.1
- (bugfix) TTD defines sprites up to #4894.
- (bugfix) changing TTD's last sprite is permissible.
See first post for full details and download.
Changelog:
v2.2.0 to v2.2.1
- (bugfix) TTD defines sprites up to #4894.
- (bugfix) changing TTD's last sprite is permissible.
See first post for full details and download.
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
George, you wanted better control of the linter? Inspiration hit (such as it was). This is an ugly crock of a solution, and will be replaced as soon as I come up with a better one, but for now, the @@WARNING command should do the trick.
Changelog:
v2.2.1 to v2.2.2
- Added @@WARNING command.
- Changed FAILURE to FATAL.
- Changed/combined some strings.
- (bugfix) No longer warns about "-1*6 00 00 01 00 ?? 1A" (Finally!)
- Enabled var/rand action 2 and action 3 for feature 0A.
See first post for full details and download.
Changelog:
v2.2.1 to v2.2.2
- Added @@WARNING command.
- Changed FAILURE to FATAL.
- Changed/combined some strings.
- (bugfix) No longer warns about "-1*6 00 00 01 00 ?? 1A" (Finally!)
- Enabled var/rand action 2 and action 3 for feature 0A.
See first post for full details and download.
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
There's a new version of grfcodec out; and it broke NFORenum. That's fixed, so here you are:
Changelog:
v2.2.2 to v2.2.3
- Removed check for comments at the end of pseudo-sprite lines
- (bugfix) '/' is now an acceptable directory separator
- (bugfix) String support no longer breaks when high-ASCII characters are quoted.
See first post for full details and download.
Changelog:
v2.2.2 to v2.2.3
- Removed check for comments at the end of pseudo-sprite lines
- (bugfix) '/' is now an acceptable directory separator
- (bugfix) String support no longer breaks when high-ASCII characters are quoted.
See first post for full details and download.
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
If any of you (like me) have ever tried to test a 40+x or 80+x variable that simply didn't exist, well, now NFORenum will let you know that something is wrong.
I decided to mark vehicle variable 80 as non-existant, not because it doesn't exist, but because it's not a variable; it's 10h plus the feature byte. Always.
Changelog:
v2.2.3 to v2.3.0
- (bugfix) "Feature byte does not match..." message would output jibberish instead of the location of the previous action 3.
- Added checks:
- - Standard action 3 preceeds override action 3
- - Override action 3 closely follows standard 3
- - Variable in variational action 2 exists.
- - Variable in variational action 2 is not being shifted into oblivion.
- (bugfix) Validated 0.dat: New props, length fixes.
See first post for full details and download.
I decided to mark vehicle variable 80 as non-existant, not because it doesn't exist, but because it's not a variable; it's 10h plus the feature byte. Always.
Changelog:
v2.2.3 to v2.3.0
- (bugfix) "Feature byte does not match..." message would output jibberish instead of the location of the previous action 3.
- Added checks:
- - Standard action 3 preceeds override action 3
- - Override action 3 closely follows standard 3
- - Variable in variational action 2 exists.
- - Variable in variational action 2 is not being shifted into oblivion.
- (bugfix) Validated 0.dat: New props, length fixes.
See first post for full details and download.
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
The fact that the RAR and ZIP files just got about 30KB smaller is not something to worry about. I put duplicate data in the 2.2.3 and 2.3.0 versions.
Changelog:
v2.3.0 to v2.3.1
- Added station variables 46 and 47 (a51).
- (bugfix) Now checking correct byte of action 7s for potential goto.
- Changed all the sprite-too-long type messages to warning level 2
- Added checks for Action 6:
- - Changes following sprite
- - Does not attempt to extend following sprite
- - Following sprite exists
- (packaging fix) Removed renum.tar.bz2 from the src/ dir (renum.rar and renum.zip) Please don't ask me how it got there.
See first post for full details and download.
Changelog:
v2.3.0 to v2.3.1
- Added station variables 46 and 47 (a51).
- (bugfix) Now checking correct byte of action 7s for potential goto.
- Changed all the sprite-too-long type messages to warning level 2
- Added checks for Action 6:
- - Changes following sprite
- - Does not attempt to extend following sprite
- - Following sprite exists
- (packaging fix) Removed renum.tar.bz2 from the src/ dir (renum.rar and renum.zip) Please don't ask me how it got there.
See first post for full details and download.
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
- Updated SANITY.txt to reflect this change.DaleStan wrote:- Changed all the sprite-too-long type messages to warning level 2.
EDIT: the distribution archives have been updated. (as should be evidenced by the new version and the missing attachment.)
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
Well, after figuring out that one of my data files had grown an extra byte where it had no business being, everything went smoothly. That is, until a54 was released mere minutes before I was going to release 2.3.2.
I'm posting it 2.3.2 anyway; it'll probably take me a while to make sense of the new action 2.
Changelog:
v2.3.1 to v2.3.2
- (bugfix) Standard action 2s not preceded by an action 1 now return a more meaningful error.
- (bugfix) Standard action 2s that do not require new graphics do not check the preceding action 1 (if it exists)
- Up to date with alpha 53 vcs:
- - Industry production callbacks
- - Industry tile properties 0E-11
- - Industry tile variable 44
- - Industry variables 40-42
- Changed one more sprite-too-long type message to warning level 2.
See first post for full details and download.
I'm posting it 2.3.2 anyway; it'll probably take me a while to make sense of the new action 2.
Changelog:
v2.3.1 to v2.3.2
- (bugfix) Standard action 2s not preceded by an action 1 now return a more meaningful error.
- (bugfix) Standard action 2s that do not require new graphics do not check the preceding action 1 (if it exists)
- Up to date with alpha 53 vcs:
- - Industry production callbacks
- - Industry tile properties 0E-11
- - Industry tile variable 44
- - Industry variables 40-42
- Changed one more sprite-too-long type message to warning level 2.
See first post for full details and download.
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
Who is online
Users browsing this forum: No registered users and 4 guests