Editing a GRF
Moderator: Graphics Moderators
Editing a GRF
Is there an Easy way to edit the UK Renewal set to change the introduction, and removal years of the train so they're at their propper real life years?
What tools will i need to do it?
What tools will i need to do it?
Re: Editing a GRF
Look, There is no easy way to do that (unless this was TTD) without using the good old notepad.
http://wiki.ttdpatch.net/tiki-index.php ... llbacks_1E_
http://wiki.ttdpatch.net/tiki-index.php ... llbacks_1E_
ERROR: Signature Not Found, Search Behind Couch? Y/N
- DeletedUser5
- Transport Coordinator
- Posts: 277
- Joined: 07 Oct 2007 15:10
Re: Editing a GRF
There's no need to use notepad. Any other program that handles .nfo files can be used too. For decoding you need grfcodec.caibrenden wrote:good old notepad
Re: Editing a GRF
Although that is an alternative to the original ways. Yeah, that would work.Soeb wrote:There's no need to use notepad. Any other program that handles .nfo files can be used too. For decoding you need grfcodec.caibrenden wrote:good old notepad
(That does not include 'System Information' which also stores info in NFO format)
ERROR: Signature Not Found, Search Behind Couch? Y/N
- DeletedUser5
- Transport Coordinator
- Posts: 277
- Joined: 07 Oct 2007 15:10
Re: Editing a GRF
Step by step tutorial:
1. Download grfcodec. I posted link in topic already.
2. Just enter grfcodec/./grfcodec ( first one if you use windows / second one if you use linux ) to see all available commends.
3. Enter "grfcodec-d *****.grf -p 2" to decode grf you want. As stars write grf name.
4. Now look on ttdpatch wiki. Links also were here.
5. Read it, do what do you want to do with grf.
6. Now encode grf. Enter that commend: "grfcodec -e *****.nfo". As stars enter nfo file name.
7. All commends enter in console
I hope it's understandable. But better tutorial on making grfs you'll find on ttdpatch wiki.
1. Download grfcodec. I posted link in topic already.
2. Just enter grfcodec/./grfcodec ( first one if you use windows / second one if you use linux ) to see all available commends.
3. Enter "grfcodec-d *****.grf -p 2" to decode grf you want. As stars write grf name.
4. Now look on ttdpatch wiki. Links also were here.
5. Read it, do what do you want to do with grf.
6. Now encode grf. Enter that commend: "grfcodec -e *****.nfo". As stars enter nfo file name.
7. All commends enter in console
I hope it's understandable. But better tutorial on making grfs you'll find on ttdpatch wiki.
Re: Editing a GRF
I allready got my file decoded, but i can't find what/how to edit the coding to set the years
- DeletedUser5
- Transport Coordinator
- Posts: 277
- Joined: 07 Oct 2007 15:10
Re: Editing a GRF
I don't know that too. Read ttdpatch wiki and/or ask Dalestan
Re: Editing a GRF
I found the thing i need to edit is on here:
http://wiki.ttdpatch.net/tiki-index.php ... on0General
But i've no idea where they are in the .nfo file
http://wiki.ttdpatch.net/tiki-index.php ... on0General
But i've no idea where they are in the .nfo file
Re: Editing a GRF
I dunno either. You have to find it. The wiki tells you everything you need to know.
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: Editing a GRF
All i see is a jumble of numbers and hexi code
Code: Select all
229 * 7 00 00 01 01 2F 27 07
230 * 7 00 00 01 01 39 27 07
231 * 7 00 00 01 01 3E 27 07
232 * 7 00 00 01 01 41 27 07
233 * 9 00 00 02 01 1B 27 03 1E 0B
234 * 9 00 00 02 01 1C 27 03 1E 0B
235 * 9 00 00 02 01 25 27 03 1E 0B
236 * 13 00 00 03 01 25 00 00 00 09 FF FF 06 03
237 * 13 00 00 03 01 1B 00 00 00 09 FF FF 06 03
238 * 13 00 00 03 01 1C 00 00 00 09 FF FF 06 03
239 * 15 00 00 05 01 1B 12 FD 17 56 1C 0F 16 23 14 28
240 * 15 00 00 05 01 1C 12 FD 17 48 1C 08 16 20 14 23
241 * 15 00 00 05 01 25 12 FD 17 48 1C 08 16 20 14 1E
Re: Editing a GRF
Obviously you did not read (enough of) the wiki, as if you had, it would have become abundantly clear that that is exactly what you are supposed to see.
Find the vehicle's ID (either by name or graphics) then find its action 0s, then edit them.
Find the vehicle's ID (either by name or graphics) then find its action 0s, then edit them.
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: Editing a GRF
I can't be bothered anymore, it is just too much of a hasstle.
And i know that's what i suposed to see.
What i'm saying, is that it makes zero sence to me.
And i know that's what i suposed to see.
What i'm saying, is that it makes zero sence to me.
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Editing a GRF
Obviously. But reading the Wiki, as Dale pointed out, would turn zero to a much higher number, believe me.Slow_Fox wrote:it makes zero sence to me.
OTOH, it´d indeed less "hassle" to do nothing.
regards
Michael
-
- Traffic Manager
- Posts: 165
- Joined: 03 Dec 2007 15:06
Re: Editing a GRF
use grf2html, that generates a html file out of the grf, in that html you can search for the line that contains the things you want to change
Re: Editing a GRF
You can directly use a hex editor. Using grfcodec is usually slightly easier, though the difference is pretty small :)Slye_Fox wrote:What tools will i need to do it?
There are also some atempts to convert NFO to something more human readable, like:Gonozal_VIII wrote:use grf2html, that generates a html file out of the grf, in that html you can search for the line that contains the things you want to change
NFO2 language: http://www.tt-forums.net/viewtopic.php?f=26&t=35541
GRL language: http://www.tt-forums.net/viewtopic.php?f=26&t=35535
Newgrf Description Language (NDL): http://www.tt-forums.net/viewtopic.php?f=26&t=35497
Though none of the ttempts lived long enough to produce some usable (de)compiler for NFO
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Re: Editing a GRF
No, the difference is quite large. There's no reliable way to detect an end-of-sprite in the GRF, except by reading all previous sprites. For early sprites, this is OK (The most recent ttdpbase[w].grf, for example, was generated by hex-editing the previous one) but for later sprites it's rather a lot of bother, and quite prone to failure, especially in the real sprites.Bilbo wrote:You can directly use a hex editor. Using grfcodec is usually slightly easier, though the difference is pretty smallSlye_Fox wrote:What tools will i need to do it?
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
Who is online
Users browsing this forum: No registered users and 29 guests