How do you create new GRF files?

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
TedStudley
Engineer
Engineer
Posts: 2
Joined: 04 May 2007 15:53

How do you create new GRF files?

Post by TedStudley »

I've got most of the things I would need to do it, I just can't figure out how they work! Whenever I decode them, all that shows up is an image and a bunch of gibberish, so what makes them tick? Also, what would you change in the source code to allow OTTD to load more GRFs? Not sure if this is the right forum, but I'm pretty sure it's the right one.

Thanks!

Ted
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

It's the bunch of gibberish that makes them tick. :wink:

To be specific, it's an NFO file, and the format is defined here: http://wiki.ttdpatch.net/tiki-index.php ... phicsSpecs. The code relating to loading the newgrf files is in newgrf.cpp, and there are some feature-specific newgrf_xxx.cpp files as well, but the code that actually makes them useful isn't centralised at all.

It's not really a question of allowing OpenTTD to load more files, it's just that support for some parts of the spec hasn't been written yet. :)
No-one's more important than the earthworm.
TedStudley
Engineer
Engineer
Posts: 2
Joined: 04 May 2007 15:53

Post by TedStudley »

What editor program should I use to open the .NFO files? I've tried using VIM, but I can't make any sense out of it except for the header. Also, I can't seem to load the NewGraphicSpecs page for some reason. The rest of the OTTD Wiki is working fine, though.

Thanks!
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Post by Maedhros »

TedStudley wrote:What editor program should I use to open the .NFO files? I've tried using VIM, but I can't make any sense out of it except for the header.
Vim's fine - nfo files are made up (mostly) of hex digits, so what you're seeing is what it's supposed to look like.
TedStudley wrote:Also, I can't seem to load the NewGraphicSpecs page for some reason. The rest of the OTTD Wiki is working fine, though.
Yeah, the TTDPatch wiki seems to be down at the moment. You might have more luck with the backup wiki - http://wiki2.ttdpatch.net/tiki-index.ph ... phicsSpecs
No-one's more important than the earthworm.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Generally, you want to do grf-related stuff TTDPatch, not OpenTTD.

GRF files still are, and possibly always will be, a TTDPatch beast. You'll get better human support in the TTDPatch fora, better NFO feature support from TTDPatch, and (AIUI) better debugging support from TTDPatch.

Not that GRF-deving can't be done with Open as the primary host, but I'm not aware of anyone who does so, except possibly for little test GRFs.
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
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 15 guests