GRF encoder tool: GRFMaker [under development]

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

Moderator: Graphics Moderators

User avatar
technosnorunt58
Engineer
Engineer
Posts: 79
Joined: 09 Nov 2008 00:59

Re: GRF encoder tool: GRFMaker [under development]

Post by technosnorunt58 »

again oops... I had figured out that the NFO was not updated by the GRFCreator, so I fixed and recompiled, but I forgot to post that.
But thanks for Part Two!
User avatar
technosnorunt58
Engineer
Engineer
Posts: 79
Joined: 09 Nov 2008 00:59

Re: GRF encoder tool: GRFMaker [under development]

Post by technosnorunt58 »

New error, When I try to form a NFO it gives me a Range Check Error.

Edit: I fixed it by changing all currency to x.
User avatar
technosnorunt58
Engineer
Engineer
Posts: 79
Joined: 09 Nov 2008 00:59

Re: GRF encoder tool: GRFMaker [under development]

Post by technosnorunt58 »

Now It wont register some sprites, it sometimes says out of memory. How do I fix that? Also, how do I refit veichles with diffrent sprites.
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 »

technosnorunt58 wrote:Now It wont register some sprites, it sometimes says out of memory. How do I fix that? Also, how do I refit veichles with diffrent sprites.
if theres any un-paletised white around the blue bounding boxes it will freak out
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
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

technosnorunt58 wrote:Now I get this.
Ive hit that problem - there is a file length limit for the pics imported in to GRF maker (ie the BMP's) - make the file name shorter
phedon
Engineer
Engineer
Posts: 23
Joined: 13 Jun 2010 11:34

Re: GRF encoder tool: GRFMaker [under development]

Post by phedon »

Why don't you use the newer 3.04 version of GRFMaker?
It's available for download. I am currently working on a OpenTTD-Edition of GRFMaker (german language, paths for openttd, choice of starting year when testing grf in openttd,) etc..
:D

[edit]
couldn't find any filename length limitations in the code - it import's "this is a file with a verly long filename.bmp" w/o problems..
:tipp | hint:
:Alles, was ich schreibe, bezieht sich ausschließlich auf OpenTTD:
:Everything I write solely refers to OpenTTD:
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 »

Hmmm....

I certainly had a problem that truncating the filename fixed - perhaps I deleted a character that GRFmaker didn't like? Seems unlikely tho'

Cheers

Bob
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: GRF encoder tool: GRFMaker [under development]

Post by oberhümer »

OK... I saw a picture, somewhere, of a GRF Maker version 4.06... but where(if at all) can the darn thing be downloaded?
I think it's not an "official" version... anyway, could anybody help?
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
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 »

Well, it's not in the open sourced branch, unfortunately. I believe a later version was available in some Hungarian TTD forum, whatever it was called...

Ah, here it is: http://www.openttd.info/infusions/pro_d ... hp?did=207
No sources, unfortunately...

I haven't tried it, so I have no idea what differs from the open version.

Edit: It seems it was a bit older, version 4.01, and it seems to be able to do articulated road vehicles...
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: GRF encoder tool: GRFMaker [under development]

Post by Kogut »

I found on wiki information that grfmaker is able to edit newgrfs. Unfortunatelly in opinion of the program grfs are wrong files to open, it wants "grf lista-file". How to convert grf to "grf lista-file"?
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
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 »

In GRFMaker: Edit -> Paste NFO -> change the file type combo to GRF, open GRF file.

But it doesn't work very well - actually, I haven't found a single GRF that can be loaded that way without errors.

It's a bit better at importing NFO (same menu choice as above), but still not very good.

Edit: Tests made with 3.04Beta_r220, link in my sig.
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 »

Edit: It seems it was a bit older, version 4.01, and it seems to be able to do articulated road vehicles...
Being able to do articulated road vehicles is quite exiting.

Unfortunately it seems to be entirely in Hungarian :(

I suppose I could run an older English version and the new version side by side....
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 »

Bob_Mackenzie wrote:Unfortunately it seems to be entirely in Hungarian :(
No, just go to the Setup screen, select English instead of Magyar and restart GRFMaker.
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 »

Bob:
As AndersI says, just need to set to english on that way:
File > Beállítások > Nyelv > Angol/English

Oberhümer:
I think you saw the 4.06B on one of my screens that helps Bob, but this version is not released yet.

AndersI:
All of the GRF maker versions can compile articulated road vehicles, but the newer ones (the latest released 4.01) have much less errors (I think, but I don't know what probbms do you solve in the opne source).
Image
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 »

I also notice the 4.06 grf maker allows you to compile grfs directly into openttd's data folder
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
Bob_Mackenzie
Chairman
Chairman
Posts: 823
Joined: 25 Mar 2010 13:36

Re: GRF encoder tool: GRFMaker [under development]

Post by Bob_Mackenzie »

Bob:
As AndersI says, just need to set to english on that way:
File > Beállítások > Nyelv > Angol/English

Lovely thanks :)

Would anyone care to give an example of how the articulated vehicles work in GRF maker?

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 »

colossal404 wrote:AndersI:
All of the GRF maker versions can compile articulated road vehicles, but the newer ones (the latest released 4.01) have much less errors (I think, but I don't know what probbms do you solve in the opne source).
Can you share the source code? I could try to unify the latest version with the fixes made in the OS one.
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 »

Sorry, I don't have the source, just the program itself, so I can't post it there.
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 »

Oh, and Bob:
I have an example with description, but it's hungarian, and I cannot translate it to englist due to the special words.
But if anyone want to look at the mechanism of the articulated vehicles coding, there's the example attached. If I could I will help there.
Attachments
csuklo_pelda.zip
(9.39 KiB) Downloaded 200 times
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 »

Thanks :) Google gives me this: I will try to make sense of it when I return from work later
This option first appeared in the trains. With this method may be made szerkocsis locomotive. Later, this opportunity was extended, now road vehicles may be used. Be created using articulated trucks and trailers.
A multi vehicle is the fact that two or more vehicles is attached together. Be used to create two types of vehicle. The first type is the first part of the vehicle, the second the rest of the vehicle. The autonomous vehicles in multi vehicle components, they turn to each other only in the game.
A multi vehicle making the $ 16-a callback is required.
The principle of operation: If a vehicle is the $ 16-a callback engedényezve is the first element of the game is drawn after calling the GRF-et, and a variable value in a 1-year returns, indicate that the first element has been displayed. If you then resigned with a special graphics of the game id of a vehicle is already recognized in the annexe of a particular type of vehicle to another vehicle. If this vehicle is displayed, the process starts again, a whole until it does not interrupt this process.
Returning a new vehicle to attach a value FFxx you specify where xx is attached to the vehicle type, its value can be between 0 and 254. If the return value is FFFF, the mount process stops.

As further explained in general terms does not make sense of it, here's an example which shows the preparation of an articulated bus.
The example - to be complete - includes two buses. The 284's and 435-t Ikarus.
The $ 00-dig type will be the first part of the 284 bus.
The $ 01 vehicle will be the first part of the 435 bus.
The $ 57 vehicle will hinge on which of the two commonly used Articulated.

The Model 284's creation of five blocks. The first is a normal data block. There's only so much to do box to allow callbacks to be in the $ 16 "articulate" callback et. The second block is also a basis for calculating block sprites. Here's a graphic identity for assigning the bus is the first part of the sprites were nominated. The last, fifth block is also a daily assignment block. The point of the two blocks is in változófüggő graphics.
The game is the first part of the bus is displayed, you can call the GRF-et, and $ 10 on the variable you enter, to share in the following items to be displayed. The first block változófüggő graphics check this variable. "Domain" list is just a single line. You are given one to one province, graphic identifiers and $ FF57. So if the $ 10-variable 1-year returns, the block is generated by $ 0A graphic graphic identity will be worth $ FF57. So, do not assign a block of sprites, but a value for. The $ FF57 a value which means the program, they have been rendered buszrészhez first to be accompanied by a $ 57 vehicle types. As seen above, this type of vehicle was félrerakva wrist. Then the $ 00-dig the first section binds the $ 57 wrist. The game is once again calling the GRF-et, this time with a $ 10 value of 2 will be variable. However, since only two-part buses are built, there is no need for a third element, so the default identifier grafukus specified value $ FFFF receive the block generated by $ 0A graphic identity, which indicates the program that there is no need for a third part.
Note that these blocks, the program for $ 0A changing value stored in the program is still not forthcoming. That this value, the program receives, it is necessary to block a változófüggő graphics, which in this case the second one.
There is a $ 0C variable, which specifies which callback is called to the GRF, et. In the second block of this variable query. If the $ 16-a callback (decimal 22) is forthcoming, it creates a block of $ 0F to the variable load of the previous block is generated by $ 0A variable. If this is not the callback runs in the first bus to the variable $ 0F-jai are part of the sprites. So this block is a kind of "switch" operation. So, if you display, you can give back to the Sprite $ 0F variable, and if a callback, you can give the program - $ 0F are also variable - what to do.

A 435 bus five blocks does not make sense to give details of the same functions as the 284-bus case.

Here are the wrist. It is also five blocks. The first block of the most important thing is that the callback field, to allow the $ 16 "articulate" callback et. To ensure that the wrist does not appear in the list of vehicles during the game, all four fields of climates climate should be banned.
Both sorts of buses that vehicle use wrist. The first block of the 1-sprites and graphic identity assigning the 284 bus spritejait wrist. The second block, the 2 sprites and graphic identity assigning the 435 spritejait wrist. We're just a task to determine if the display hinge is the type of vehicle bus is currently on. Therefore, there is the next block változófüggő graphics.
In the Type field in the block is $ 82 missing, since this is not the type of vehicle you want to search, but a group of vehicles in the first vehicle of the type we are interested. This type is the $ 80 + $ 42 (ie, $ C2) we know the variables. If this value is 117 *** (explanation later), then the wrist of the vehicle 435 after the bus is connected, so the block is created by the $ 10 and graphics identifying the 2-year graphics sprites were nominated will receive an identification. If not, then the only way to be 284's to $ 10 for an ID graphics and graphic identity sprites were nominated received. The following járműhozzárendelő block the vehicle from the wrist to $ 10 graphics boards gives identities are sprites, so the pass will be the "tractor"


*** The 117 figure Explanation: The TTD and in the OTTD In total 256 types of vehicle is. The first 116 types of locomotives and wagons is assigned. After that come from road vehicles. In this case, no reference should be made to the categories within the model number (which would be one), but the entire list of reference should be made on the basis of a 435-bus type. Therefore, to give 117 et. So in this case the bus type of the first type of train 116 + 1, ie, 117th
As explained above, the latest "nightly" versions are no longer true. In the meantime, been introduced to more than 256 vehicle ID can be used. OTTD's versions, which are more than 256 IDs are treated as no longer the absolute ID must be given to examining the train, but the actual vehicle ID, namely the 435 bus, the 117 figure instead of 1-year value must be given, since this is the 435-vehicle real ID.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 7 guests