So I finally got bored of having all but Temperate corrupted by my ancient grf hacks, not to mention OTTD complaining about my grf files being wrong.
So I downloaded the grfcodec utilities and the original grf files. I ran grfdiff originals\trg1r.grf legacy\trg1r.grf (legacy being the folder with my grfs in) and the same for c and t (h and i were unchanged), and ended up with three .grd files... but the thing is, they are 13MB (1), 9MB (c) and 17MB (t), which surely can't be right.
When I used grd2grf, it went painfully slow on 1, and on c, it got stuck at 97%, so I tried to use grfcodec -d trg1r.grf, and it gave an error saying "Not enough input data for decompression".
What am I doing wrong? It's been absolutely ages since I last edited the original grf files so I'm not sure if I'm using the commands right. If anyone else wants to try obtaining newgrfs from my differences, the three changed files are at http://var.projectnanako.com/junk/legacy/ (please don't edit the resultant files, I know there is a lot of corruption in them but I'd rather sort that out myself).
I'd be thankful if someone could help me get the utilities to work or convert the grfs for me.
grfcodec oddities
Moderator: Graphics Moderators
Re: grfcodec oddities
Grdtogrf uses an own decompression routine that seems to fail miserably, your grf file is fundamental broken.
Painfully slow = tries to decode and the result gets bigger and bigger until it won't fit in ram anymore
Stuck = decoding loop
Warning: If you try to decompress or diff a broken file the decoders can create garbage files.
Painfully slow = tries to decode and the result gets bigger and bigger until it won't fit in ram anymore
Stuck = decoding loop
Warning: If you try to decompress or diff a broken file the decoders can create garbage files.
Re: grfcodec oddities
Well, I just tried using grfcodec to decode and then re-encode trg1r.grf, and I get the same result on the newly encoded file, except now the grd is even bigger than it was (14MB).
I can read the PCX file though, so I guess I can just manually look for all the changes, but it's odd that even a re-encoded file is apparently broken.
I can read the PCX file though, so I guess I can just manually look for all the changes, but it's odd that even a re-encoded file is apparently broken.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: grfcodec oddities
You might want to try whether your attempts work with an unmodified grf.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: grfcodec oddities
Well if you do that, you get a <1 kB grd file and grfdiff tells you that the file has no differences. I haven't tried running grdtogrf on that file though...
Who is online
Users browsing this forum: No registered users and 10 guests