GRFMaker User Guide - TT-Forums



GRFMaker User Guide

Part 1: Creating a train and carriage

By James Vassie

Welcome all, to the first part of my user guide for GRFMaker. In this tutorial I will show you with screenshots, how to successfully get a train and passenger coach up and running in TTDPatch.

Firstly, in order to do this, you need several things:

← A copy of GRFMaker, ask Szappy in the TT-Forums.

← A set of sprites

← An image editing program (not required but useful)

Right, once you have all those things, its time to get started! (

First Step: Opening and setting up GRFMaker:

Once you’ve installed GRFMaker on your computer, browse to the application in My Computer and double click on it to run it. If this is your first time and it probably is, then you will need to fill in the boxes with your preferences.

[pic]

Change the setting so that they point to where TTDPatch is installed and to another directory for the NFO files, I would make a folder in your GRFMaker folder called ‘NFO files’ and choose that folder for ‘NFO Directory’. Then input your name and whether you use DOS or Windows. The rest you can leave the same.

Normally, you don’t need to check and set the “NFO directory” it’s for advanced users. It outputs the NFO+BMP files in the directory specified, to be encoded with grfcodec (this is done upon encoding). It was intended for users who want to manually edit their NFOs, or manually encode them with grfcodec (so it’s for backwards compatibility with grfcodec). Also be aware, that it overwrites any same named nfo file there, without warning you.

After you’ve done this, you should have something that looks like this:

[pic]

To start off with, double click on the first line in the main window, starting GRF v01 [56:4A:00:00]. Next up will be a popup box looking like this:

[pic]

First thing is the ‘Version number’; I’ll assume you have the latest Alpha from src so type 6. Right, where it says ‘First GRF-ID’, type in a random number less than 100, in this case 38, in the ‘Second GRF-ID’ input another one, 15 and then click on … button to the right of ‘Description’. In here type whatever you want, although limit it to about 5 words. In the … next to ‘Copyright’, you can input a longer description plus

any copyright you might want to add.

The grfID’s first and second byte is not a random number, it’s your initials! That’s what those “Set” buttons do, they set the first 2 bytes to your initials, and that’s why you set your name in the config screen. This ensures that the GRFID is unique (as long as no one else uses your initials).

You should have something that looks like this:

[pic]

Cool, we are finished with the set info, now were going to add some train stuff!

Click on the capital blue ‘A’ on the toolbar, highlighted below:

[pic]

You will get a popup box like the one below:

[pic]

Right, change the ‘Road Vehicle’ to ‘Train’. The language you can leave as is. In ID leave it as 00 as well. In name you can input anything you want for example Passenger Loco. It should like the one below, and then click on OK:

[pic]

You don’t need this step, as you’re also setting the vehicle’s name in the vehicle data block, in the next step. That does exactly the same, so this is redundant. This block is needed, if you want to set different names for the different languages. Otherwise, it’s easier to just use the built-in function in the vehicle data block. So either don’t use this block for a single vehicle definition, or don’t set the name field in the next step.

Right, now on the main screen, click on the train symbol with 3 lines underneath it, highlighted below:

[pic]

You’ll get a popup like below, after clicking OK with ‘Engine’ highlighted and then double clicking on the row (ID00) in the main screen.:

[pic]

Please carefully change the above details until you get it looking like below:

[pic]

All done? Good! Right, now we have finished filling in the details of the loco, click on OK and we are back on the main screen, it should now look like below, if it doesn’t, then you need to go back over the above and make sure you have done everything right!

[pic]

Next step is to add the graphics. To do this, visit the thread about GRFMaker on TT-Forums: and go to page 7 where you will find some graphics made by me which you can use for this tutorial! Ideally you’ll have a program which can handle .PNG and .BMP files. I suggest using Microsoft Paint for this, supplied with most computers. Right click on the picture and save it to your GRFMaker directory under the ‘projects’ folder. Now, open the picture in Paint, don’t worry, there is no need to edit it at all, click Save As under the file menu, in the filename part, type grfpassengerloco and under type, choose 24-bit bitmap. Cool, now back in GRFMaker, click on the sprite editor, shown below…

[pic]

You’ll get a window that looks like this:

[pic]

Click on ‘File’ then ‘Import true-colour bitmap. Now, choose the bitmap that we saved earlier in the ‘projects’ folder. Click OK on the popup. Now we have our graphics… Click on ‘File’ then ‘Save As’, choose the projects folder again and keep the type the same, you may want to change the name to passengerloco or something like that.

Next up is to choose our graphics… Click on the little train symbol with the white boxes below it, picture below:

[pic]

You’ll get a popup box that looks like the one below:

[pic]

Right, here we go. Keep the ‘Type’ as Train (engine/wagon) because we are making a locomotive. In ‘Bitmap file name’ expand it and select the one called passengerloco. Next up is ‘Palette type’ ill assume your using Windows if not change it to DOS. Method 2 in the ‘Sprite search mode’ can be left as is. ‘Graphic ID’ is important because if we change this later on then other parts won’t work correctly unless you change them as well! We will keep this as 01, the 0 is important so keep it there! And we want to keep the Xrel/Yrel the same so keep it on ‘Yes’. Click on ok.

Now we have a screen looking like so:

[pic]

This is where we select the sprites we want to use, so, using your middle mouse button (MMB) click on one of the 8 views in the box near the top. It will change so that the 8 views are surrounded with a red box.

You can also select individual sprites with the right mouse button (RMB) if you don’t have 3-buttoned mouse. Also there have been problems with the recognition of the 3rd button (maybe a Delphi bug?)

[pic]

Next step is to click on ‘XYrel’ on the toolbar at the top and then choose ‘Set default values’, this will setup the loco so it’s near enough to the track to look acceptable, we can change these values at a later time. You will see the numbers below the picture change from -1’s into other numbers. On the mid-right we have some options to set… We can leave the first lot up until the greyed out ‘Action 2’ checkbox, click in the checkbox to un-grey it, and then select ‘Automatic’ from the two types. Please click on OK at the bottom to continue.

Be aware, that the default values aren’t always right, so pinpoint positioning is available, by using the arrowed buttons. You will have to see your graphics in game to determine the needed displacement though.

Now we need to select the depot sprites the loco will use. So now click on the little train icon with the blue boxes beneath it. Shown below:

[pic]

A similar popup to the one before will appear… Choose the same file from the drop-down list and then type in 11 as the ‘Graphic ID’. I normally use the normal ‘sprite ID’ plus 10 as the ‘depot ID’. Click OK. Double click on the line in the main window and select the sprite shown below:

[pic]

Right, we are making good progress here! ( Click Ok to proceed.

Your main screen should now look like this:

[pic]

If it doesn’t, you know what to do, go back over and make sure everything is as says in the guide!

Again, this step might be redundant. First, you don’t really need this block, since you can simply use “vehiclelist sprite” checkbox, in the previous step to tell which sprite to use (from the selection), and give it an ID.

Secondly, since you’re using the normal engine sprite for the depot sprite, this step isn’t needed at all, since the patch automatically uses the 7th sprite as the depot sprite. This block is for custom depot sprite definition.

Since this is an example, it’s good to tell what this block is used for, but in this particular case, it’s not needed.

Last part for the passenger loco… Click on the little train icon with the yellow arrow beneath it, shown below, this will link the ID we gave the vehicle and its stats with the in-game and depot sprites.

[pic]

Click ok on the popup; we don’t need to change it because we are creating an Engine as shown. Double click on the line on the main screen and you’ll see the following popup:

[pic]

Don’t worry, this may seem complicated but we aren’t doing much apart from changing a few tiny little numbers. Earlier if you remember, we gave this loco the ID 00, as already highlighted above. We don’t need to change this. Next we have the ‘Default graphic ID’ which is the number we gave to the in-game sprites, 01, so type 01 in here. Almost done here, in the first section entitled ‘Graphic IDs depending on cargo type’ on the far right at the bottom you will see a greyed out box called ‘Vehicle list’, click on it to un-grey it. Then type 11 in the box, this is because this is the number we gave the depot sprites earlier… You ALWAYS need to set this so don’t forget! Now you can click on OK. Right, last check before we move on to the passenger coach, make sure it looks like below, and then we’ll test it out!

[pic]

When it does, we need to save it so, click on ‘File’ then ‘Save As’, type ‘example’ in the name box and save it in your projects folder as normal. Now we need to make the actual .grf that can be used in TTDPatch. Click on the blue GRF icon if you’re a windows user or the blue GRF icon with DOS underneath if you’re a DOS user.

[pic]

You’ll see some black bars flying across a popup which will then disappear when it’s finished. Right now you can do one of two things here:

← You can click on the red GRF icon with a red line underneath to test the GRF on its own without other graphics.

← Or you can browse to your TTDPatch directory and edit the newgrf.cfg file in a text editor such as notepad, and the following to the bottom without the apostrophe’s:

‘newgrf/example.grf’

also, there is a newgrf.cfg editor built-in (top row 5th button, the one with the folder icon with GRF written under it)

Save the .cfg file and start up TTDPatch and you should have your in-game graphics!

Thanks for looking at this user guide and hopefully you can browse my next user guide which will talk about Wagons and livery overrides.

James Vassie © 2005

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download