NFORenum v3.4.6 released (NFO renumberer and linter)
Moderator: Graphics Moderators
1) Fixed
2) Fixed -- This actually happened for all values of num-sprites 20..DF ("label&0xE0"!="(label&0xE0)==0xE0")
3) Added
Hangs: Fixed (It's probably a good idea to go on to the next byte after deciding to ignore the current one.)
Changelog:
v2.6.1 to v2.6.2
- (bugfix) No warnings about backwards gotos when skipping 20..DF sprites.
- (bugfix) Fixed hangs when using control characters where they are ignored.
- Added checks for generic textIDs.
- Checks for setting out-of-range texts using too-large <num-ent>.
- Up to date with 2.0.1 alpha 69:
- - (hotfix) Action D variable 9F.
- - (hotfix) Action 0 feature 08 props 0A..0F.
2) Fixed -- This actually happened for all values of num-sprites 20..DF ("label&0xE0"!="(label&0xE0)==0xE0")
3) Added
Hangs: Fixed (It's probably a good idea to go on to the next byte after deciding to ignore the current one.)
Changelog:
v2.6.1 to v2.6.2
- (bugfix) No warnings about backwards gotos when skipping 20..DF sprites.
- (bugfix) Fixed hangs when using control characters where they are ignored.
- Added checks for generic textIDs.
- Checks for setting out-of-range texts using too-large <num-ent>.
- Up to date with 2.0.1 alpha 69:
- - (hotfix) Action D variable 9F.
- - (hotfix) Action 0 feature 08 props 0A..0F.
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
NFORenum v2.6.2 works fine, thanks for the prompt updates.
Although there are some more messages turning up with those F8xx text strings.
and here is the equivalent out ot 'ttdpttxt.txt'
I can do without the 'hotkeylists', there's nothing to translate. But the 'FF C7' is a bit of a problem.
Although there are some more messages turning up with those F8xx text strings.
Code: Select all
// Part 2 : Text strings F864 .. F8DC
//!!Error (161): Offset 1435: Text ID FF C7 is not a valid text ID.
//!!Error (161): Offset 1452: Text ID FF C7 is not a valid text ID.
//!!Warning (143): Offset 2599: Using unspecified control character 1E.
6 * 2627 04 48 9F 79 64 F8
...
// F8A8 stationnumdefault
"Stasjon " 81 FF C7 00
// F8A9 stationclassdefault
"Stasjonstype " 81 FF C7 00
...
// F8DB hotkeylistdos
"xqwe!@#$t%1234567890-=" 1E 5C 00
// F8DC hotkeylistwin
"xqwe!@#$t%1234567890-=`" 5C 00
Code: Select all
...
stationnumdefault="Station \81ÿÇ\00" <<< ÿÇ = FF C7
stationclassdefault="Station class \81ÿÇ\00" <<< ÿÇ = FF C7
...
hotkeylistdos="xqwe!@#$t%1234567890-=\1e\\\00" <<< 1E
hotkeylistwin="xqwe!@#$t%1234567890-=`\\\00"
As an interm fix, until I hear the full details from Patchman, this TextIDs.dat will supress the C7FF warning (all C7xx IDs, actually), and add IDs F8DD..F901 to the list of permissible IDs.
WARNING: This file is not backed up by anything more official than my personal interpretation of ttdpttxt.txt.
(69 bytes -> 70 bytes)
Mistake when creating; new files posted.
WARNING: This file is not backed up by anything more official than my personal interpretation of ttdpttxt.txt.
(69 bytes -> 70 bytes)
Mistake when creating; new files posted.
Last edited by DaleStan on 12 Jan 2006 03:21, 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
DaleStan wrote:Hangs: Fixed
I just checked again, and it definitely works here.DaleStan wrote:- (bugfix) Fixed hangs when using control characters where they are ignored.
If it's not fixed for you, then I need to know about it, in very explicit detail.
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
v2.6.2 works fine; it no longer hangs; and all those F8xx (except F8E3 and F8E4, nothing to translate there anyway) are ok, too. But now textIDs in the D3xx range are no longer accepted.
Code: Select all
//!!Error (161): Offset 2469: Text ID 01 D3 is not a valid text ID.
//!!Error (161): Offset 2559: Text ID 02 D3 is not a valid text ID.
//!!Error (161): Offset 2588: Text ID 03 D3 is not a valid text ID.
//!!Error (161): Offset 2872: Text ID 06 D3 is not a valid text ID.
//!!Error (161): Offset 2955: Text ID 02 D3 is not a valid text ID.
//!!Error (161): Offset 3247: Text ID 02 D3 is not a valid text ID.
//!!Error (161): Offset 3368: Text ID 02 D3 is not a valid text ID.
1127 * 6886 04 00 9F 52 80 D0 55 73 61 67 65 3A 20 8A 75 6E 69 76 65 72 73 61 6C 20 73 ...
... 61 74 65 73 29 81 01 D3 00 55 73 61 67 65 3A 20 ...
^^^^^^^^
The wiki says that that's not valid:
I assumed the same was true of the D800 IDs, but that may not be the case; I'll update if necessary once I check with Csaba.
EDIT: I see this has already been discussed elsewhere.
IOW, to include text D301, you need to type "81 01 D7".The wiki wrote:D000 Miscellaneous GRF texts
The table has up to 1024 entries. To use entry X in an include text (code 81), use ID D400+X.
I assumed the same was true of the D800 IDs, but that may not be the case; I'll update if necessary once I check with Csaba.
EDIT: I see this has already been discussed elsewhere.
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
We're going to try this again. I'm getting more and more tempted to just give up. Fortunately for you and unfortunately for me, I'm not yet willing to give up while there are known bugs, and if there aren't known bugs, there's no reason to give up.DaleStan wrote:[New TextIDs.dat]
I duplicated some the ttdpttxt entries when counting them, resulting in a few too many IDs.
Changelog:
- Remove IDs F8FB..F901
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
It turns out that I didn't do that after all. Of the D800 class, NFORenum complains if anything outside of DC00..DCFF is either read or written.DaleStan wrote:I assumed the same was true of the D800 IDs, but that may not be the case; I'll update if necessary once I check with Csaba.
Lots of little things that came up while coding SilentNews.
For one: //!!Error(141): ID 3C is out of valid range (00..49)
v2.6.2 to v2.6.3
- (hotfix) Add new class F8 TextIDs.
- (bugfix) Allow including TextID C7FF (81 FF C7).
- (bugfix) Format/argument agreement for some instances of INVALID_ID (141).
- (bugfix) No longer die on (non-Text)IDs above FF.
- Added format/argument agreement checks. (non-fatal)
- (bugfix) Re-write import sprites in canon format.
- (bugfix) Allow setting properties for sound ID 49.
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
- minime
- Transport Coordinator
- Posts: 339
- Joined: 18 Jan 2004 10:02
- Skype: dan.masek
- Location: Prague, Czech Republic
- Contact:
According to wiki you can change text IDs in the 0xE000 range. However, nforenum (2.6.3) complains:
Code: Select all
//!!Error (161): Offset 4: Text ID 00 E0 is not a valid text ID.
173 * 12 04 48 9F 01 00 E0
"Leden" 00
Grr... I didn't want to release a new version here, but my square wheel went rectangular. Hopefully, I can get out of this bugfix-rut and back to new features soon.
v2.6.3 to v2.6.4
- (bugfix) Complain when DCxx IDs are included.
- (bugfix) Allow changing class E0 TextIDs.
- Revert format/argument agreement checks. Instead:
- (bugfix) Make argument supercede format for width determination.
v2.6.3 to v2.6.4
- (bugfix) Complain when DCxx IDs are included.
- (bugfix) Allow changing class E0 TextIDs.
- Revert format/argument agreement checks. Instead:
- (bugfix) Make argument supercede format for width determination.
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
- minime
- Transport Coordinator
- Posts: 339
- Joined: 18 Jan 2004 10:02
- Skype: dan.masek
- Location: Prague, Czech Republic
- Contact:
DaleStan, would it be possible to pass the path to a .renum directory as a parameter? I keep all the tools in a separate "bin" directory, but can't figure out a way how to prevent .renum being created in everywhere i check a nfo with it.
It's not a problem to delete it, that's just a minor inconvenience, but for some reason it takes a noticeable (a few seconds) time to recreate it the next time.
Also, since the program automatically calculates the size of pseudosprites, could there be a modified version of the @@DIFF command that leaves the sizes as -1 as well? Like:
Anyway, I have to say that your program is priceless. Thanks a ton! It saves a lot of the drudge work.
Cheers,
minime
It's not a problem to delete it, that's just a minor inconvenience, but for some reason it takes a noticeable (a few seconds) time to recreate it the next time.
Also, since the program automatically calculates the size of pseudosprites, could there be a modified version of the @@DIFF command that leaves the sizes as -1 as well? Like:
Code: Select all
-1 * -1 0C 01 02 03 ....
Cheers,
minime
Sure. I've got lots of things in that department I'd like to do, but that's not one that had occurred to me. I should probably change the default to ~/.renum on Unixy systems too.minime wrote:DaleStan, would it be possible to pass the path to a .renum directory as a parameter?
There's a sleep(5); call after all data-directory related messages, to ensure they appear for those who don't run NFORenum from a command-line. I can replace it with a press-any-key-to-continue message, like TTDPatch when it finds an invalid switch in ttdpatch.cfg. Would that be better? I don't like the idea of removing it entirely, though.
minime wrote:could there be a modified version of the @@DIFF command that leaves the sizes as -1 as well? Like:Code: Select all
-1 * -1 0C 01 02 03 ....

I'll try both 0 and -1, and use whichever causes grfcodec to die more gracefully. I don't really see the point in having both commands, but if anyone is particularly attached to the output of @@DIFF being strictly valid, I'll add a parameter.
[0] I wanted the output to always be valid as input to grfcodec.
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
- minime
- Transport Coordinator
- Posts: 339
- Joined: 18 Jan 2004 10:02
- Skype: dan.masek
- Location: Prague, Czech Republic
- Contact:
Hmm, to be honest a keypress would be even worse than the delayDaleStan wrote:Sure. I've got lots of things in that department I'd like to do, but that's not one that had occurred to me. I should probably change the default to ~/.renum on Unixy systems too.minime wrote:DaleStan, would it be possible to pass the path to a .renum directory as a parameter?
There's a sleep(5); call after all data-directory related messages, to ensure they appear for those who don't run NFORenum from a command-line. I can replace it with a press-any-key-to-continue message, like TTDPatch when it finds an invalid switch in ttdpatch.cfg. Would that be better? I don't like the idea of removing it entirely, though.

How about another parameter/switch to disable it? Or possibly, have that as a side effect of the parameter that specifies the path to the data directory. And just to clarify, i'm talking about command line parameters. It would be really nice to have an option to specify things like @@DIFF etc. through them as well.
Check out boost::program_options - that could help ya out.
That's logical. Will be done. If I can figure out a way to do it, I'll make the data-dir option with no argument mean "Use default dir, but eliminate the sleep() call." My excuse for putting it in was that it would only happen once or twice. This is true for me, but, obviously, not true for everyone else.minime wrote:Or possibly, have [disabling the delay] as a side effect of the parameter that specifies the path to the data directory.
Yes it would. That's been on my list of things to make the command line do. I only see @@LINT, @@WARNING [ENABLE|DISABLE], and @@DIFF as potentially command-line useful, though. Command-line options would probably apply to all files listed.minime wrote:It would be really nice to have an option to specify things like @@DIFF etc. through them as well.
Thanks, but I am planning to use GNU getopt, and I think I have it figured out. Any particular advantages/disadvantages of boost vs getopt?minime wrote:Check out boost::program_options - that could help ya out.
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
- minime
- Transport Coordinator
- Posts: 339
- Joined: 18 Jan 2004 10:02
- Skype: dan.masek
- Location: Prague, Czech Republic
- Contact:
Maybe @@PRESERVEMESSAGES too? And when you think about it, a limited variant of the @@LET (only to define constants, no point for calculations there) could be useful too in some situations.DaleStan wrote:Yes it would. That's been on my list of things to make the command line do. I only see @@LINT, @@WARNING [ENABLE|DISABLE], and @@DIFF as potentially command-line useful, though. Command-line options would probably apply to all files listed.minime wrote:It would be really nice to have an option to specify things like @@DIFF etc. through them as well.
Can't really say. I only looked at the source and noticed you didn't use anything atm.DaleStan wrote:Thanks, but I am planning to use GNU getopt, and I think I have it figured out. Any particular advantages/disadvantages of boost vs getopt?minime wrote:Check out boost::program_options - that could help ya out.
No one said anything about validity of @@DIFF output, so it's no longer valid. Since the output isn't valid anyway, @@DIFF also causes sprite 0 to report 0 sprites.
Here are the new command-line options. Full details are hiding behind (surprise, surprise) renum -? or renum --help.
--help -?
--data[=<dir>] -D[<dir>]
--no-replace --keep-old -k
--comments=<type> -c <type>
--diff -d
--let=<expr> -L <expr>
--lint=<level> -l <level>
--preserve-messages -p
--warning-disable=<num> -w <num>
--warning-enable=<num> -W <num>
Changelog:
v2.6.4 to v2.7.0
- Change @@DIFF to set sprite lengths to 0 and sprite 0 to "00 00 00 00".
- Add several command-line arguments (see renum -?).
- Look for .renum directory in HOME too, if defined.
- (bugfix) Crash when directory could not be created.
(Thanks, minime, for prodding me to add commandline args.)
Here are the new command-line options. Full details are hiding behind (surprise, surprise) renum -? or renum --help.
--help -?
--data[=<dir>] -D[<dir>]
--no-replace --keep-old -k
--comments=<type> -c <type>
--diff -d
--let=<expr> -L <expr>
--lint=<level> -l <level>
--preserve-messages -p
--warning-disable=<num> -w <num>
--warning-enable=<num> -W <num>
Changelog:
v2.6.4 to v2.7.0
- Change @@DIFF to set sprite lengths to 0 and sprite 0 to "00 00 00 00".
- Add several command-line arguments (see renum -?).
- Look for .renum directory in HOME too, if defined.
- (bugfix) Crash when directory could not be created.
(Thanks, minime, for prodding me to add commandline args.)
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
Rather than correct Lakie when he thought NFORenum was smarter than it really was, I made NFORenum smarter.
I'm not sure if that second item is useful, or entirely a good idea, but it wasn't hard to add, and I ignored the sprite numbers anyway. They're now optional except on realsprites where the filename starts with a digit.
v2.7.0 to v2.8.0
- Added @@REALSPRITES/--real-sprites/-r.
- Made sprite numbers optional most of the time.
- Up to date with a70's action 7/9/10 handling.
- Add checks for valid usage of variable 0C. (messages 163..165)
- Made "-1 * 1 00" only parse as a real sprite when looking for real sprites.
- (bugfix) Report proper ID range on invalid non-text ids.
I'm not sure if that second item is useful, or entirely a good idea, but it wasn't hard to add, and I ignored the sprite numbers anyway. They're now optional except on realsprites where the filename starts with a digit.
v2.7.0 to v2.8.0
- Added @@REALSPRITES/--real-sprites/-r.
- Made sprite numbers optional most of the time.
- Up to date with a70's action 7/9/10 handling.
- Add checks for valid usage of variable 0C. (messages 163..165)
- Made "-1 * 1 00" only parse as a real sprite when looking for real sprites.
- (bugfix) Report proper ID range on invalid non-text ids.
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 7 guests