GRF encoder tool: GRFMaker [under development]

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

I have an articulated vehicle

http://www.tt-forums.net/viewtopic.php? ... 1&start=80

However I'm now struggling with how to get the graphics to change with a refit - help please :)

Cheers

Bob
User avatar
kcjonesrr
Engineer
Engineer
Posts: 23
Joined: 27 Sep 2009 04:35

Re: GRF encoder tool: GRFMaker [under development]

Post by kcjonesrr »

I was following the user guide while making my first train loco, and every time I set the image to "fstloco.BMP" in the vehicle sprite block, an error comes up:

RANGE CHECK ERROR.

How do I solve it?
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by AndersI »

Make sure that "fstloco.BMP" is in 256 colors, using the correct palette. Also make sure that the sprites all start at the same pixel line, that you have a small white margin around all the sprites (and that the image isn't exactly 256 pixels wide?).
User avatar
kcjonesrr
Engineer
Engineer
Posts: 23
Joined: 27 Sep 2009 04:35

Re: GRF encoder tool: GRFMaker [under development]

Post by kcjonesrr »

What do you mean? Here's the sprites.
Attachments
fstloco.png
fstloco.png (1.66 KiB) Viewed 8629 times
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

They look too close together to me - there must be at least 4 pixels between each element, and 4 white pixels between the elements and the outside edge of the picture
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by AndersI »

Actually, that's not true. There are two things that are important, though:

- make sure the image is in 256 colors, preferably a .PCX
- make sure there are at least four empty lines *under* the sprites (GRFMaker uses this space to encode xrel/yrel in the image)

Doing those two changes on your image makes it work for me in GRFMaker 3.04B_r216
Attachments
Image1.pcx
(3.26 KiB) Downloaded 260 times
User avatar
kcjonesrr
Engineer
Engineer
Posts: 23
Joined: 27 Sep 2009 04:35

Re: GRF encoder tool: GRFMaker [under development]

Post by kcjonesrr »

Thanks. When I tried to make the .grf file, it says this:

ERROR: Invalid filename.

How come?
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: GRF encoder tool: GRFMaker [under development]

Post by NekoMaster »

kcjonesrr wrote:Thanks. When I tried to make the .grf file, it says this:

ERROR: Invalid filename.

How come?
The directory your trying to compile the grf to does not contain a "newgrf" folder (it must be named newgrf)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
kcjonesrr
Engineer
Engineer
Posts: 23
Joined: 27 Sep 2009 04:35

Re: GRF encoder tool: GRFMaker [under development]

Post by kcjonesrr »

You mean set the game's path to a newgrf folder?
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: GRF encoder tool: GRFMaker [under development]

Post by NekoMaster »

kcjonesrr wrote:You mean set the game's path to a newgrf folder?
Say you set it to "C:\Program Files\OpenTTD" then the folder the path points to must contain a folder called newgrf
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
User avatar
kcjonesrr
Engineer
Engineer
Posts: 23
Joined: 27 Sep 2009 04:35

Re: GRF encoder tool: GRFMaker [under development]

Post by kcjonesrr »

Thanks. Now I've made my first grf file, you can find it in the Graphics Development forum.
BTW, if I'm making multiple locos, do I repeat the process as shown in the tutorial but give them different IDs?
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

Only the ID blocks need new ID;s the graphics blocks (G) can re-use ID's
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

I'm using v4.01 to code helicopters (see the release forum)

The speed certainly isn't in kmh - I've entered a value of 60 to get a game speed of 96mph (edit Ive sussed it - 60 is HEX for 96)

Also the button to change the running costs doesn't work

[EDIT]

It also fails to load rotor sprites and kills the prog with the following error

error.jpg
error.jpg (47.65 KiB) Viewed 8455 times
Cheers

Bob
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: GRF encoder tool: GRFMaker [under development]

Post by AndersI »

Unfortunately, it's not much use reporting problems with GRFMaker 4.01, as the open source version is only at 3.04B_r_<something>. I don't know who is programming the 4.01 version, but it seems it is only available on the hungarian tt-forum?

Anyway, we can only find and (possibly) fix problems in the open source branch, not in other versions.
Zonta
Engineer
Engineer
Posts: 7
Joined: 18 Aug 2010 12:44

Re: GRF encoder tool: GRFMaker [under development]

Post by Zonta »

I dunno how do you call that but i want to make different skin for the same wagon depending of the train. Because i'm making train set and i want to do somehing like Temperate trainset GRF witch they change from the color of the train. Its is possible and how it would be. I'm using GRF Maker 4.01

Thanks
Image
User avatar
colossal404
Chief Executive
Chief Executive
Posts: 652
Joined: 07 Mar 2009 12:48
Location: Szeged, Hungary

Re: GRF encoder tool: GRFMaker [under development]

Post by colossal404 »

It's possible, you have to set these things in vehicle assign block.
If a passenger car attached to this locomotive (red marked), the blue marked graphics ID will be shown in game. Of cours, you need to set a new graphics block with that ID to gt it works.
Attachments
ijkl.PNG
ijkl.PNG (47.61 KiB) Viewed 2192 times
Image
Zonta
Engineer
Engineer
Posts: 7
Joined: 18 Aug 2010 12:44

Re: GRF encoder tool: GRFMaker [under development]

Post by Zonta »

By the way is this possible to add more train in the game? I would like to keep all those train who are already existing and i want to add a new Maglev. It is possible to create some ID that don'T exist?.
Image
User avatar
colossal404
Chief Executive
Chief Executive
Posts: 652
Joined: 07 Mar 2009 12:48
Location: Szeged, Hungary

Re: GRF encoder tool: GRFMaker [under development]

Post by colossal404 »

No, you have to overwrite an existing vehicle, but use the toyland vehicle IDs.
Image
User avatar
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

Unfortunately, it's not much use reporting problems with GRFMaker 4.01,
I fear you are right - I was wondering if Colossal 404 has contacts?
User avatar
colossal404
Chief Executive
Chief Executive
Posts: 652
Joined: 07 Mar 2009 12:48
Location: Szeged, Hungary

Re: GRF encoder tool: GRFMaker [under development]

Post by colossal404 »

Yeah, I have contact with the programmer, so I can report bugs to him.
Image
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests