Creating a total new GRF file [help wanted]

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
User avatar
Dribbel
Engineer
Engineer
Posts: 64
Joined: 11 Jul 2004 16:25
Location: The Netherlands - Grunn

Creating a total new GRF file [help wanted]

Post by Dribbel »

I want to add something totaly new (eg a spaceport/ a looping/whatever) and i don't want to sacrifice any existing thing so i need an extra GRF file with my stuff in it.

I did some research on the grf stuff, i know how to use them in the code (i can program :) ) but i keep having a hard time getting my grf file right

1)
I start with the image below and a correct before NFO file
Image
(click it for pcx version)

2)
encode it using the grf encoder.

3)
I decode it again if thing went correct. I end up with something like this:
Image
after_test.nfo

What is going wrong here, i don't know. Please help :)
Programmeren is makkelijker als je denkt - Dutch pun
[url=callto://zoekdribbel]Image[/url]
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Your PCX file must have an even X dimension. Odd won't work.
User avatar
Dribbel
Engineer
Engineer
Posts: 64
Joined: 11 Jul 2004 16:25
Location: The Netherlands - Grunn

Post by Dribbel »

Thanks! I' try that! Was that somewhere in de docs or specs?

--edit
hmm it's even: 800px
Programmeren is makkelijker als je denkt - Dutch pun
[url=callto://zoekdribbel]Image[/url]
User avatar
dominik81
OpenTTD Developer
OpenTTD Developer
Posts: 768
Joined: 16 Aug 2003 12:55
Location: Bonn, Germany

Post by dominik81 »

Why don't you just add them to openttd.grf? Or you could rename openttd.grf to mygraphics.grf and remove all the graphics you don't want from that file.
"There's a readme that comes with the source. I suggest you read it."
- Korenn
User avatar
Dribbel
Engineer
Engineer
Posts: 64
Joined: 11 Jul 2004 16:25
Location: The Netherlands - Grunn

Post by Dribbel »

i think i'll do something like that. Making a new one is quite hard.
Programmeren is makkelijker als je denkt - Dutch pun
[url=callto://zoekdribbel]Image[/url]
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: _dp_ and 10 guests