GRF encoder tool: GRFMaker [under development]
Moderator: Graphics Moderators
Re: GRF encoder tool: GRFMaker [under development]
neg is right, I get the same error when trying to increase kN beyond its default setting.
Re: GRF encoder tool: GRFMaker [under development]
I could equally well say "You're both wrong, it doesn't happen for me". Please give more data, version numbers, project files, pictures, etc. to show what you do, what happens, and what you expected to happen. Your textual description is not enough...
Re: GRF encoder tool: GRFMaker [under development]
I sended you the data you requested by PM.
Re: GRF encoder tool: GRFMaker [under development]
I need some help with GRFMaker. I have no idea how to make articulated vehicles. I'd like that my 2M62 and my steamer could be bought complete and not in parts(2M62 unit A, 2M62 unit B) like it is now.
Re: GRF encoder tool: GRFMaker [under development]
@FHS & neg: OK, I've seen the same error now. Unfortunately, I don't have a Delphi environment available for the moment - old computer crashed, and the free Turbo Delphi is discontinued (no new licenses generated) - so I don't know when I will be able to look at it. Sorry
@Killer 11: Take a look in the attached steam.lst - the bitmaps are not there, but I think you can see what to do in GRFMaker anyway.
@Killer 11: Take a look in the attached steam.lst - the bitmaps are not there, but I think you can see what to do in GRFMaker anyway.
- Attachments
-
- steam.zip
- (2.44 KiB) Downloaded 127 times
Re: GRF encoder tool: GRFMaker [under development]
Thanks that helped me A LOT
Would you or someone else also show how to change livery? I know how to change it when vehicle is being refitted but I'd also like to know how I change livery at a certain year? For example vehicle is being introduced at year 1980 in blue and it would change its color to red in 1990, how can I assign that?
Would you or someone else also show how to change livery? I know how to change it when vehicle is being refitted but I'd also like to know how I change livery at a certain year? For example vehicle is being introduced at year 1980 in blue and it would change its color to red in 1990, how can I assign that?
Re: GRF encoder tool: GRFMaker [under development]
Since I want to support newcargoes with this grf I've done with grfmaker, I would also need a cargo translation table. However, grfmaker refuses to accept one in a manual nfo block with the error "8401:incorrect hexadecimal number in the nfo code".
I used the nfo code from this post: http://www.tt-forums.net/viewtopic.php?p=742595#p742595 (and for those of you thinking that comments are the problem, I stripped those and I still get error 8401:incorrect hexadecimal number in the nfo code). It doesn't seem to like stuff like "PASS", so I imagine grfmaker needs to implement support for cargo translation tables(which are crucial for supporting new industries which it can code anyways).
I used the nfo code from this post: http://www.tt-forums.net/viewtopic.php?p=742595#p742595 (and for those of you thinking that comments are the problem, I stripped those and I still get error 8401:incorrect hexadecimal number in the nfo code). It doesn't seem to like stuff like "PASS", so I imagine grfmaker needs to implement support for cargo translation tables(which are crucial for supporting new industries which it can code anyways).
Last edited by Vemarkis on 22 Nov 2009 14:49, edited 1 time in total.
Re: GRF encoder tool: GRFMaker [under development]
As I said in the previous post, I'm out of the loop with respect to fixes and additions in GRFMaker for the moment. I don't think there are any active developers right now, unfortunately
As for the NFO block, you have to translate *everything* to hex - plain old original nfo is what you can enter in the GRFMaker 'manual NFO' block.
As for the NFO block, you have to translate *everything* to hex - plain old original nfo is what you can enter in the GRFMaker 'manual NFO' block.
Re: GRF encoder tool: GRFMaker [under development]
Well, I converted that CTT with str2hex, and I find out when I compile the grf with either grfcodec, or grfmaker that they both add extra " and \ into the CTT label bits for some reason.
http://pastebin.com/m492540e6
I cannot find those extra "'s and \'s in this str2hex output. They won't even show up in grfmaker, but they somehow end up into the compiled grf.
[edit]Apparently, you are not supposed to enter the "'s into the manual nfo block, grfmaker or grfcodec will do it for you
Here is the cargo translation table I put into grfmaker:
this is what it was in text
PASSCOALMAILOIL_LVSTGOODGRAIWOODIORESTELVALUPAPRFOODFRUTCOREWATRRUBRSUGRTOYSBATTSWETTOFFCOLACTCDBUBLPLSTFZDRWHEAGOLDMAIZTWODDIAM___A___B___C___D___E___F___G___H___I
heres the str2hex output
You need to have this code before the str2hex output in the manual nfo block:00 08 01 29 00 09
so the end result looks like this in grfmaker.
So, what can you do this with this cargo translation table? You can define proper refit masks for your vehicles(which means, only use available cargos for refitting only for exceptions, i.e define wood and TWOD when you have a vehicle with refittable cargo classes: piece goods set to disable carrying wood. You can also use it to define cargoes you want to be refitted that are outside your defined refittable cargo classes field, i.e you can have a box car refittable to milk even if you do not have the refittable cargo class "Liquids" selected. You can find the cargo order, and bit values for the cargoes in this thread. For example cargo TWOD resolves to the value 40000000 in grfmaker(aka the second to last cargo in the available cargoes for refitting list in grfmaker). When doing the graphics ID's, use the default ID to define the graphic that will be used when you have not defined a graphic for a cargo.
I'll probably do what I've learned above as a wiki article later, which would be more structured and easily understandable with plenty of pictures for each stage!
http://pastebin.com/m492540e6
I cannot find those extra "'s and \'s in this str2hex output. They won't even show up in grfmaker, but they somehow end up into the compiled grf.
[edit]Apparently, you are not supposed to enter the "'s into the manual nfo block, grfmaker or grfcodec will do it for you
Here is the cargo translation table I put into grfmaker:
this is what it was in text
PASSCOALMAILOIL_LVSTGOODGRAIWOODIORESTELVALUPAPRFOODFRUTCOREWATRRUBRSUGRTOYSBATTSWETTOFFCOLACTCDBUBLPLSTFZDRWHEAGOLDMAIZTWODDIAM___A___B___C___D___E___F___G___H___I
heres the str2hex output
You need to have this code before the str2hex output in the manual nfo block:00 08 01 29 00 09
so the end result looks like this in grfmaker.
So, what can you do this with this cargo translation table? You can define proper refit masks for your vehicles(which means, only use available cargos for refitting only for exceptions, i.e define wood and TWOD when you have a vehicle with refittable cargo classes: piece goods set to disable carrying wood. You can also use it to define cargoes you want to be refitted that are outside your defined refittable cargo classes field, i.e you can have a box car refittable to milk even if you do not have the refittable cargo class "Liquids" selected. You can find the cargo order, and bit values for the cargoes in this thread. For example cargo TWOD resolves to the value 40000000 in grfmaker(aka the second to last cargo in the available cargoes for refitting list in grfmaker). When doing the graphics ID's, use the default ID to define the graphic that will be used when you have not defined a graphic for a cargo.
I'll probably do what I've learned above as a wiki article later, which would be more structured and easily understandable with plenty of pictures for each stage!
Re: GRF encoder tool: GRFMaker [under development]
You did that yourself. str2hex takes strings, not NFO. If you need an nfo2hex converter, encode the nfo with GRFCodec and then decode with -d -xxt.Vemarkis wrote:Well, I converted that CTT with str2hex, and I find out when I compile the grf with either grfcodec, or grfmaker that they both add extra " and \ into the CTT label bits for some reason.
See all those «22 20 22» triples? Those are your «\" \"» bits (Info version 7. Info versions 5 and 6 would read «22 "PASS" 22 20 22 "COAL" 22 20 22 "MAIL" 22 ...».)Vemarkis wrote:I cannot find those extra "'s and \'s in this str2hex output.
GRFCodec interprets quotes as special one-character instructions to switch to or from reading quoted strings. To GRFCodec, «"PASS" "COAL" "MAIL"» is equivalent to, among other things, «"PASSCOALMAIL"», «"P" "A" "S" "S" "C" "O" "A" "L" "M" "A" "I" "L"», «"PASS""COAL""MAIL"», and «"P""A""S""S""C""O""A""L""M""A""I""L"», and all are 12 bytes long. To str2hex, these are 20, 14, 47, 18, and 36 (respectively) characters, to be converted to 20, 14, 47, 18, and 36 (respectively) hex bytes.
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: GRF encoder tool: GRFMaker [under development]
I think you missed the fact I figured out how to get str2hex to convert that cargo translation table properly in the above post, DaleStan without bothering with compiling and decompiling a grf in the first place. Which is a much slower method.
Re: GRF encoder tool: GRFMaker [under development]
No, you figured out how to type the cargo translation table properly. str2hex correctly converted what you typed. It's not its fault what you typed is not what you wanted converted, nor (as the case may be) that you misunderstood the correct input to str2hex.Vemarkis wrote:I think you missed the fact I figured out how to get str2hex to convert that cargo translation table properly
I was explaining what you did wrong, and why GRFCodec wants «"PASS" "COAL" "MAIL"», but str2hex wants «PASSCOALMAIL».
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
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: GRF encoder tool: GRFMaker [under development]
Wow, I just noticed that this was made by a Hungarian, and it includes Hungarian translations. Thank you!
Re: GRF encoder tool: GRFMaker [under development]
OK, I have located and fixed this bug. Actually, GRFMaker was trying to say '#Tractive effort set too high. The maximum value is 10 times its weight: %1kN.' but there was an error in the English error message.neg wrote:I have discovered a bug: If you try to increase traction beyond the default, GRFMaker will generate an error message that tells you that "'k' is not a valid integer value.".
Build 218 is available at http://users.tt-forums.net/grfmaker
-
- Tycoon
- Posts: 1283
- Joined: 23 Oct 2009 19:35
- Location: Here and there, sometime or another
Re: GRF encoder tool: GRFMaker [under development]
Next bug: GRFMaker sets the tractive effort wrong. Instead of setting it as a fraction of the possible total forward force, it literally writes the number that is set in the field for tractive effort into the NFO.
It is also not possible to set the bit for "is articulated vehicle" when coding a road vehicle.
It is also not possible to set the bit for "is articulated vehicle" when coding a road vehicle.
--- 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. ---
--- 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. ---
Re: GRF encoder tool: GRFMaker [under development]
No. At least not for trains,neg wrote:Next bug: GRFMaker sets the tractive effort wrong. Instead of setting it as a fraction of the possible total forward force, it literally writes the number that is set in the field for tractive effort into the NFO.
Wiki says:
prop. 1F = HEX ((TEreal / (Mass * g) * 255)
Code says:
te := trunc(vhd[idx].tractiveeffort / vhd[idx].weight * 25.5);
AP($1F, 1, te);
AFAICS, this is the same.
Now, if you're talking about road vehicles, it's another thing. There you are expected to enter the coefficient directly in GRFMaker (0..255) - who have ever heard of actual TE data for road vehicles?
If you mean the callback bit, this is probably true. Articulated road vehicles were not invented when GRFMaker was written. It might be possible to work around with a "general NFO block", perhaps?It is also not possible to set the bit for "is articulated vehicle" when coding a road vehicle.
-
- Tycoon
- Posts: 1283
- Joined: 23 Oct 2009 19:35
- Location: Here and there, sometime or another
Re: GRF encoder tool: GRFMaker [under development]
It's with RVs... there it is never possible to enter more than ten times their weight in tons as coefficient in GRFMaker itself. That cost me a bit of time...
--- 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. ---
--- 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. ---
Re: GRF encoder tool: GRFMaker [under development]
OK, I've changed the test on TE for road vehicles - it is now assumed to be the coefficient (range 0..255), as that was what the code did, anyway. I choose not to change the code, as that would have invalidated all existing road vehicle projects.neg wrote:It's with RVs... there it is never possible to enter more than ten times their weight in tons as coefficient in GRFMaker itself.
Version 3.04B_r220 is available here.
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: GRF encoder tool: GRFMaker [under development]
Um, for some reson not matter what I do grf maker keeps saying "Invalid Filename" when I try to compile a grf, even though Its called asdtest
Proud Canadian
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!
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!
-
- Tycoon
- Posts: 1283
- Joined: 23 Oct 2009 19:35
- Location: Here and there, sometime or another
Re: GRF encoder tool: GRFMaker [under development]
Doesn't happen to me - have you tried the newest version?
--- 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. ---
--- 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. ---
Who is online
Users browsing this forum: No registered users and 4 guests