GRF encoder tool: GRFMaker [under development]
Moderator: Graphics Moderators
-
- Engineer
- Posts: 15
- Joined: 07 Apr 2008 06:34
Re: GRF encoder tool: GRFMaker [under development]
I may be very stupid here or trying something that's not meant to work, but I can't seem to load an existing .grf file into grfmaker. Is there any way of doing this?
Re: GRF encoder tool: GRFMaker [under development]
I haven't really used grf maker, but for a quick answer...
no. I 'm pretty sure it isn't possible.
no. I 'm pretty sure it isn't possible.
previously known as daylight
-
- Engineer
- Posts: 15
- Joined: 07 Apr 2008 06:34
Re: GRF encoder tool: GRFMaker [under development]
Oh, okay. So my next question would be: is there some kind of (graphical?) tool with which I can load .grf files and edit them? Alternatively, is there some way to convert the .nfo files I extract with grfcodec to a human readable format?
Thanks!
Thanks!
Re: GRF encoder tool: GRFMaker [under development]
No, there isn't.DanielZKlein wrote:is there some kind of (graphical?) tool with which I can load .grf
Yes, that's called GRF to HTMLDanielZKlein wrote:Alternatively, is there some way to convert the .nfo files I extract with grfcodec to a human readable format?
Re: GRF encoder tool: GRFMaker [under development]
GRFMaker *can* import NFO files, with more or less success. It will never combine sprites into larger GRFMaker blocks, but it is certainly possible to look at (some) NFO files with it.
GRF to HTML gives a much better view though, especially as there are clickable links.
GRF to HTML gives a much better view though, especially as there are clickable links.
Re: GRF encoder tool: GRFMaker [under development]
BZZZT. grf2html cannot read nfo files. If it could, it'd be called "nfo2html".FooBar wrote:Yes, that's called GRF to HTMLDanielZKlein wrote:Alternatively, is there some way to convert the .nfo files I extract with grfcodec to a human readable format?
And if the object is to create something that can be edited and then turned back into a GRF, grf2html is not the correct tool for that job; it performs a one-way transformation.
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
Re: GRF encoder tool: GRFMaker [under development]
Hello, I've spent some days tryin' to add some double decker train cars.
I used GRF Maker v2.21. I read also the User Guide for this version and
I made my first wagon according to it.
The final message was 'Invalid Filename'.
Where I get wrong ? Thanks !
(I attached the project)
I used GRF Maker v2.21. I read also the User Guide for this version and
I made my first wagon according to it.
The final message was 'Invalid Filename'.
Where I get wrong ? Thanks !
(I attached the project)
- Attachments
-
- grfmaker.zip
- BMP source, NFO, PCX
- (5.18 KiB) Downloaded 617 times
Re: GRF encoder tool: GRFMaker [under development]
I opened your project in GrfMaker 3.03B (the last 'official' version) and it created the grf with no problems. Look back in this thread for a download location of this version.wiste wrote:I used GRF Maker v2.21.
Edit:
I'll attach a compile of the current SVN version too, main (visible) changes are:
- Ver. 3.03Beta_OS (needs a build number somewhere in the version string, but it isn't there yet)
- faster
- better at importing NFO
- some hard limits raised a bit
- Attachments
-
- Grf.zip
- (844.23 KiB) Downloaded 917 times
Re: GRF encoder tool: GRFMaker [under development]
Do you have TTD installed on your computer?wiste wrote:The final message was 'Invalid Filename'.
Do you have a newgrf folder in your TTD installation?
Have you configured everything in the GrfMaker File --> Settings dialog?
GrfMaker tries to save your grf in <TTD game path as configured in Settings>\newgrf, and if that folder isn't found, the error message you describe will be shown.
Re: GRF encoder tool: GRFMaker [under development]
OK, I did it...
I downloaded also GRFcodec 0.9.10 r1854E, but I figured finally what I haven't done:
the location... so I put in cmd line:
d:\download>grfcodec.exe -e -u 26-26.grf d:\download
and the result was
GRFCodec version 0.9.10 r1854E - Copyright (C) 2000-2005 by Josef Drexler
Encoding in temporary file 26-26.new
Sprite 0 Done: 0% Compressed:100% (Transparency:100%, Redundancy:100%)
Warning: Found 4 fewer sprites than sprite 0 reports.
Sprite 1 Done: 6% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 2 Done: 12% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 3 Done: 18% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 4 Done: 25% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 5 Done: 31% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 6 Done: 37% Compressed:100% (Transparency:100%, Redundancy:100%)
Loading D:\download\26-261.PCX
Sprite 7 Done: 43% Compressed:127% (Transparency:147%, Redundancy:101%)
Warning: 17 of 336 pixels (5%) in sprite 7 are pure white
Sprite 8 Done: 50% Compressed:106% (Transparency:107%, Redundancy:101%)
Warning: 15 of 420 pixels (3%) in sprite 8 are pure white
Sprite 9 Done: 56% Compressed:108% (Transparency:109%, Redundancy:100%)
Warning: 17 of 336 pixels (5%) in sprite 9 are pure white
Sprite 10 Done: 62% Compressed:103% (Transparency:102%, Redundancy:100%)
Sprite 11 Done: 68% Compressed:103% (Transparency:102%, Redundancy:100%)
Sprite 12 Done: 75% Compressed:103% (Transparency:102%, Redundancy:100%)
Warning: 15 of 420 pixels (3%) in sprite 12 are pure white
Sprite 13 Done: 81% Compressed:105% (Transparency:104%, Redundancy:100%)
Sprite 14 Done: 87% Compressed:105% (Transparency:104%, Redundancy:100%)
Sprite 15 Done: 93% Compressed:105% (Transparency:104%, Redundancy:100%)
Renaming 26-26.grf to 26-26.bak
Replacing 26-26.grf with 26-26.new
Done!
and a brand new happy grf... phew ! #:-S
I downloaded also GRFcodec 0.9.10 r1854E, but I figured finally what I haven't done:
the location... so I put in cmd line:
d:\download>grfcodec.exe -e -u 26-26.grf d:\download
and the result was
GRFCodec version 0.9.10 r1854E - Copyright (C) 2000-2005 by Josef Drexler
Encoding in temporary file 26-26.new
Sprite 0 Done: 0% Compressed:100% (Transparency:100%, Redundancy:100%)
Warning: Found 4 fewer sprites than sprite 0 reports.
Sprite 1 Done: 6% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 2 Done: 12% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 3 Done: 18% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 4 Done: 25% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 5 Done: 31% Compressed:100% (Transparency:100%, Redundancy:100%)
Sprite 6 Done: 37% Compressed:100% (Transparency:100%, Redundancy:100%)
Loading D:\download\26-261.PCX
Sprite 7 Done: 43% Compressed:127% (Transparency:147%, Redundancy:101%)
Warning: 17 of 336 pixels (5%) in sprite 7 are pure white
Sprite 8 Done: 50% Compressed:106% (Transparency:107%, Redundancy:101%)
Warning: 15 of 420 pixels (3%) in sprite 8 are pure white
Sprite 9 Done: 56% Compressed:108% (Transparency:109%, Redundancy:100%)
Warning: 17 of 336 pixels (5%) in sprite 9 are pure white
Sprite 10 Done: 62% Compressed:103% (Transparency:102%, Redundancy:100%)
Sprite 11 Done: 68% Compressed:103% (Transparency:102%, Redundancy:100%)
Sprite 12 Done: 75% Compressed:103% (Transparency:102%, Redundancy:100%)
Warning: 15 of 420 pixels (3%) in sprite 12 are pure white
Sprite 13 Done: 81% Compressed:105% (Transparency:104%, Redundancy:100%)
Sprite 14 Done: 87% Compressed:105% (Transparency:104%, Redundancy:100%)
Sprite 15 Done: 93% Compressed:105% (Transparency:104%, Redundancy:100%)
Renaming 26-26.grf to 26-26.bak
Replacing 26-26.grf with 26-26.new
Done!
and a brand new happy grf... phew ! #:-S
-
- Engineer
- Posts: 15
- Joined: 07 Apr 2008 06:34
Re: GRF encoder tool: GRFMaker [under development]
Wow, so there really is no way to "edit" a newgrf's properties (cost of vehicles etc) in-place without resorting to direct editing of the nfofiles? That is... kind of weird. So those people who use grfmaker to make grfs never post their .lst files?
Re: GRF encoder tool: GRFMaker [under development]
You can hex-edit the GRF too. This is only rarely recommended, though. Even I don't do that for anything but the most mundane of changes.DanielZKlein wrote:Wow, so there really is no way to "edit" a newgrf's properties (cost of vehicles etc) in-place without resorting to direct editing of the nfofiles?
Rarely. The .LSTs may be available upon request, though.DanielZKlein wrote:So those people who use grfmaker to make grfs never post their .lst files?
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
Re: GRF encoder tool: GRFMaker [under development]
Hey guys, i'm giving Grfmaker a go. I'd like to make this train of mine

I've figured enough out to make the train, adjust the speed, set the track type, etc. what i'm needing assistance on is
1.) Adding a power car every 3 cars.
2.)Making the rear engine use the supplied graphics rather that just mirroring the front.
and possibly...
3.) making sure i'm setting the passenger and mail car graphics correctly
I hope that its not to much to ask
~Cheers
sorry if the pic isn't up yet, it seems there is a bit of a delay in Picasa web albums
I've figured enough out to make the train, adjust the speed, set the track type, etc. what i'm needing assistance on is
1.) Adding a power car every 3 cars.
2.)Making the rear engine use the supplied graphics rather that just mirroring the front.
and possibly...
3.) making sure i'm setting the passenger and mail car graphics correctly
I hope that its not to much to ask

~Cheers
sorry if the pic isn't up yet, it seems there is a bit of a delay in Picasa web albums
Re: GRF encoder tool: GRFMaker [under development]
1.) One of the callbacks. 10 or 11, I think.
2.) Appropriate use of varaction2 and variable 40.
3.) Then set them the way you want.
2.) Appropriate use of varaction2 and variable 40.
3.) Then set them the way you want.
You know, you could use the forum attachment tool, like all the rest of us.That Guy wrote:sorry if the pic isn't up yet, it seems there is a bit of a delay in Picasa web albums
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
Re: GRF encoder tool: GRFMaker [under development]
I have spent the last days learning about grf creation, nfo files and finally GRFMaker. I'm mostly interested in creating cargos and industries, which GRFMaker handles nicely except for a few bugs, which didn't let me continue with my test grf. After a few hours doing trial-and-error changes in the source (I don't know anything about pascal
), I have managed to fix them all and clean a few strings.
1) In the Industry tile data block window, changes to "Cargo acceptance 1", "Cargo acceptance 2", "Cargo acceptance 3" and "Animation" properties weren't saved into the block.
2) In the Industry tile data block window, a lot of default industry tiles were missing from the "Substitute tile type" and "Override tile type" properties.
3) In the Industry data block window, a lot of default industries were missing from the "Substitute industry type" and "Overridden industry type" properties.
Attached to my post is a diff file with my fixes and the compiled GRF.EXE file. I hope they are useful!
EDIT: I have added the FF industry type to allow disabling of default industry types with the "substitute industry type" property, and uploaded new versions of the patch and the GRF.EXE. Sorry if you already downloaded the old files.

1) In the Industry tile data block window, changes to "Cargo acceptance 1", "Cargo acceptance 2", "Cargo acceptance 3" and "Animation" properties weren't saved into the block.
2) In the Industry tile data block window, a lot of default industry tiles were missing from the "Substitute tile type" and "Override tile type" properties.
3) In the Industry data block window, a lot of default industries were missing from the "Substitute industry type" and "Overridden industry type" properties.
Attached to my post is a diff file with my fixes and the compiled GRF.EXE file. I hope they are useful!

EDIT: I have added the FF industry type to allow disabling of default industry types with the "substitute industry type" property, and uploaded new versions of the patch and the GRF.EXE. Sorry if you already downloaded the old files.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: GRF encoder tool: GRFMaker [under development]
I have done a few more little fixes:
- Hex codes added to list of refit cargo types.
- Hex codes added to list of cargo types.
- New values added to cargo town growth values in addition of already placed standard values.
- Industry colors have been completely remade, with every standard industry color and a few non-standard ones.
- Allow industry tile landshape flag property to place tiles on both land and water.
Here is the diff file and the new compiled GRF.EXE:
- Hex codes added to list of refit cargo types.
- Hex codes added to list of cargo types.
- New values added to cargo town growth values in addition of already placed standard values.
- Industry colors have been completely remade, with every standard industry color and a few non-standard ones.
- Allow industry tile landshape flag property to place tiles on both land and water.
Here is the diff file and the new compiled GRF.EXE:
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: GRF encoder tool: GRFMaker [under development]
Well, there hasn't been a single commit to grfmaker since 2007-10-02. So I would say there is currently no developer.
Though I could technically commit your stuff, I did never do anything for grfmaker.
So if you like, I suggest you to PM AndersI (he was the last active developer) whether he is fine with you taking over the project, and then we can organize the commit rights for you
Though I could technically commit your stuff, I did never do anything for grfmaker.
So if you like, I suggest you to PM AndersI (he was the last active developer) whether he is fine with you taking over the project, and then we can organize the commit rights for you

⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: GRF encoder tool: GRFMaker [under development]
I really don't have much time for GRFMaker (even if I would like to), and I don't claim any rights to it - I'm just a Delphi programmer who found the project interesting to look at when it open sourced.
I think it would be very good for the project to get more (and more active) developers involved. AFAIK, I don't have the possibility to add commit rights for others, so it's up to someone who has.
I also haven't had the time to look at your patches, Terkhen, so for the moment I can't comment on them. There are some changes to beware of if binary compatibility for saved projects is to be kept, and I think the project needs a policy for such changes, right now I don't even remember if there is a 'save file version' incorporated in the format. [...] OK, I took a quick look now at your diffs, and it seems you are mostly adding data - shouldn't be any big problems there. But what happens when a project made with your version is loaded into a 'standard' GRFMaker? Have you made any tests?
I haven't done any GRF coding outside of trains, so I can't verify that your additions are OK, even though I *believe* they are.
Seeing that you (more or less) just added data to increase the possibilities with the program, I feel these data should preferably be read from data files, not generated by code as it is today. That way it would be easier to upgrade GRFMaker when the NFO spec is augmented. Might be a suitable subproject for programmers to think about...
I think it would be very good for the project to get more (and more active) developers involved. AFAIK, I don't have the possibility to add commit rights for others, so it's up to someone who has.
I also haven't had the time to look at your patches, Terkhen, so for the moment I can't comment on them. There are some changes to beware of if binary compatibility for saved projects is to be kept, and I think the project needs a policy for such changes, right now I don't even remember if there is a 'save file version' incorporated in the format. [...] OK, I took a quick look now at your diffs, and it seems you are mostly adding data - shouldn't be any big problems there. But what happens when a project made with your version is loaded into a 'standard' GRFMaker? Have you made any tests?
I haven't done any GRF coding outside of trains, so I can't verify that your additions are OK, even though I *believe* they are.
Seeing that you (more or less) just added data to increase the possibilities with the program, I feel these data should preferably be read from data files, not generated by code as it is today. That way it would be easier to upgrade GRFMaker when the NFO spec is augmented. Might be a suitable subproject for programmers to think about...
Re: GRF encoder tool: GRFMaker [under development]
First things first, thanks for your replies!
As I said, I have little knowledge of pascal in any of its forms. I don't think I should take over the project because I'm only able to do small additions and my experience with real GRF coding (besides using GRFMaker) is really scarce. I would be happy to help with testing and adding data, though.
Older projects are compatible with my version, and projects made with my version are compatible with the old GRF.EXE file. They will just appear as "blank options" that will dissapear if they are changed. This is because, as AndersI noted, they're just adding data for new option in existent fields (except the cargo bug). Every field of data I added has been tested to work in OpenTTD, and since they are just new hex values I'm pretty sure they will work in TTDPatch too.

As I said, I have little knowledge of pascal in any of its forms. I don't think I should take over the project because I'm only able to do small additions and my experience with real GRF coding (besides using GRFMaker) is really scarce. I would be happy to help with testing and adding data, though.
Older projects are compatible with my version, and projects made with my version are compatible with the old GRF.EXE file. They will just appear as "blank options" that will dissapear if they are changed. This is because, as AndersI noted, they're just adding data for new option in existent fields (except the cargo bug). Every field of data I added has been tested to work in OpenTTD, and since they are just new hex values I'm pretty sure they will work in TTDPatch too.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
- trainboy2004
- Director
- Posts: 572
- Joined: 10 Aug 2005 10:18
- Location: Sittard, The Netherlands
- Contact:
Re: GRF encoder tool: GRFMaker [under development]
I've got 3 problems with importing sprites in to GRFMaker.
Problem 1:
I don't see the sprites appear in the sprite window like jvassie's tutorial. I tried with other sprites from the 2cc set and the swiss set, but no results.
Or
Problem 2:
When I open the sprite and resave it in the Bitmap editor. I get an Range Check Error when I want to import the sprites back in to GRFMaker. See the modified sprite in the zip file.
Or
Problem 3:
The program is freezing entirely and after a while says: 'Out of memory'.
I'm using the latest version from Anders.
A screen dump of problem 1, plus the original sprite (png) and modified (bmp 8 ttd pallette) are in a zip file below in the attachments.
Thanks in advance
Problem 1:
I don't see the sprites appear in the sprite window like jvassie's tutorial. I tried with other sprites from the 2cc set and the swiss set, but no results.
Or
Problem 2:
When I open the sprite and resave it in the Bitmap editor. I get an Range Check Error when I want to import the sprites back in to GRFMaker. See the modified sprite in the zip file.
Or
Problem 3:
The program is freezing entirely and after a while says: 'Out of memory'.
I'm using the latest version from Anders.
A screen dump of problem 1, plus the original sprite (png) and modified (bmp 8 ttd pallette) are in a zip file below in the attachments.
Thanks in advance
- Attachments
-
- sprites.zip
- sprites
- (71.12 KiB) Downloaded 259 times
-
- problem1
- problem.jpg (240.09 KiB) Viewed 1902 times
Who is online
Users browsing this forum: No registered users and 11 guests