NFOGRF (Jeb's GRF program)

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

I have been working on a GRF reader. It is about 95% accurate and
about 65% done. It is written in VB and Any one who would like to
see it, just let me know.

I do need some help in understanding some of the code.
I've tryed ot inteperate each action as per the NewGrf txt file.
Can do Action 0,1,2,3,4,6,7,8,A,B,C & D. Lets you see things in
Plain English.

Goal is to continue to add refinement to explaining Actions.

Adding Editing actions.

Writting a NFO file from the Grf.

Displaying the Real Sprites (akin WinGrf).

If interested Post message.

JEB

Ps Also will read NFO files. and I do have a version I wrote in
Q Basic that will edit.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

*scratches head*
How'd I manage to miss this post?
Anyway, I would like to see this. Source or executable are fine (I expect), as I have Visual Studio .NET.
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
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

will try to get it up this weekend!

JEB


I removed this down load , go to one farther down in message base.
Last edited by JEB on 17 Nov 2004 23:29, edited 1 time in total.
User avatar
Warspite
Engineer
Engineer
Posts: 118
Joined: 02 Apr 2003 15:48
Location: Cambs, UK

Post by Warspite »

i certainly would. i am thinking of learning how to create my own graphics. I live in a town which had one of the biggest marshalling yards in the world, so there are lots of resources available to me to obtain images. Although the yards were scrapped years ago, a new cargo transfer area has been made recently. Can't really get close enough to take pictures though :(
---------------------------
Warspite
Aspiring Poet
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

JEB wrote:<mywork.rar>
What version of Windows/VB/etc. are you using? The executable complained about no VBRUN300.DLL, then no CMDIALOG.VBX. Now that I have both of those, the error message, in full, is "Path not found". I tried to open the .MAK file, and discovered that VS.NET can't read 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
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

visual basic 3

I didn't realize that cmddialog I used wouldn't work in
VB6. I loaded these in VB6 and that's how I found
out. I don't own VB6 so its hard to work out the
differances when I discover them. I think I might be
able to get it in VB6 and then it will be converted.
Except the cmddialog would have to be upgraded
to the VB6 version.

The exe version works on my system and the one
I use at work. So I figured it would work okay.
I did forget about the vbrun300.dll file.

I'm starting to go back to my QB45 program so I can
start adding editing to the reader. I can do that
my QB program. I found a bug in when I got it out
and was testing it. Otherwise it worked yet.

Well hope that helps. Otherwise if you think of
anything else let me know. If you would like to
see the QB program I will upload it too.

JEB
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

I've downloaded this and will load it up in VB6 and see what I can do with it for you.
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

can't you just like upload your vbrun300.dll with the grf maker?
Image
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

There should be no problem doing that, will do so next time.
you should be able to easily find it anywhere on the net.
Also it is just a GRF/NFO reader at the moment. Reads the
file and gaves the meaning in english. I am plannig on adding
editing to make it a GRF/NFO alter program. Help from others
explanning various items would help. It only does trains and
vehicles now. If things go well I hope to make do other grf files
too. Hey I'm just learning this VB stuff.

JEB
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Born Acorn wrote:can't you just like upload your vbrun300.dll with the grf maker?
Although a good idea, that is not the problem, nor is cmdialog.vbx. I found both of those. What I have now is an error message that contains no useful information, and will not go away, even if I put the .exe in a fully 8+3 compatible path.
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
User avatar
Szappy
Chief Executive
Chief Executive
Posts: 689
Joined: 29 Mar 2004 14:35
Location: Budapest, Hungary
Contact:

Post by Szappy »

GRFMaker is gl2's project, and it's written in Delphi, so it won't need any VB stuff.
Anyway, I'd be interesetd in your grf reader, but can't run it either...
Image please use email instead of PM
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

DaleStan wrote:
JEB wrote:<mywork.rar>
What version of Windows/VB/etc. are you using? The executable complained about no VBRUN300.DLL, then no CMDIALOG.VBX. Now that I have both of those, the error message, in full, is "Path not found". I tried to open the .MAK file, and discovered that VS.NET can't read it.
The "Path not found" error is because the program is trying to read a text file, the path of which is hard-coded to c:\grfcodec. I can't remember the specifics, I looked at the code last night, but if you alter that, it should work.
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7595
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

I did that, but now i get file not founds.
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Create an empty file "C:\grfcodec\TTDvehs.txt".

@JEB: Looks promising, but can that absolute path please die? It'd also be nice to either provide a real version of the file, a pointer to a place where it can be downloaded, or instructions to create the file.
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
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

Sorry about not telling you more. Actually didn't think it mattered? Will get back to work on the code. Try to fix it better. I've been going over my
QB version trying to get a couple bugs fixed. I needed to fix it to make
it easier to edit the action 4 names for my sets. Than I will fix it to edit
the action 8 data. So it already works as a alter/edit program, if you
don't mind Dos. That is the code I will then put in the VB program. Still
learning how to do this. I experiment a little and learn how to get the
code to do what I want.

don't know how to make the download link you mentioned. Never needed
to know that.

Thanks for the help
any help is very appreciated.

I have all my grf work in a folder named grfcodec and a sub folder
named sprites which contains nfo and pcx files.

I do all my coding with grfmenu a program I made to decode and encode
with.

JEB

I just looked over my code and realized what happened. The file is a
data file I used to load the names of the orginal TTD vehicles and trains
etc. I had forgotten about it. If this was a QB I would have used data
statements. ( oh thats right I did use data in QB for that) Will adjust and
upload new version this weekend.

Does anyone know if there is an equivalent to DATA in VB?

JEB
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

I was able to get the program into VB6, made some quick fixes,
changed the ttdveh file to dat from txt. Still needs a folder called
grfcodec for it to be in. Will work on fixing that. I use a folder
nameded grfcodec for all my grfs work that is why the program
was coded that way. Wanted to get this up so the source code
will be uploaded later. Also included the TTDveh file this time.

I hope this works for you now! I was very upset that it caused
so much trouble. I went back and checked my orginal effort
and also started having different problem, so I got on to my
computer at work at lunch and converted it to VB6.

It should do both grfs and nfo files..

Again any information that will help me create a better interpetation
of the actions and how they work would be most appreciated.

JEB
Attachments
nfogrf1.rar
(24.86 KiB) Downloaded 389 times
TTDvehs.rar
(1.75 KiB) Downloaded 325 times
Last edited by JEB on 13 Nov 2004 14:14, edited 2 times in total.
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

JEB wrote:Does anyone know if there is an equivalent to DATA in VB?
Nope, DATA's not been around since Q[uick]BASIC, as far as I can remember. Either stick your data in a text file, or a Windows resource file, or just in an array or whatever which you load at runtime.
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

Yea I thought that there wasn't. When I get the source file up
you will see I did something like you suggested, but I wanted to
get the TTDveh names into the reader. So I opted for the dat file.
Guess it beats typing it all in.

Jeb
User avatar
orudge
Administrator
Administrator
Posts: 25137
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

That's basically what I did with TTDAlter. TTDAlter can also read TTD's VEHICLE.DAT, though.
JEB
Engineer
Engineer
Posts: 65
Joined: 12 Mar 2004 15:05

Post by JEB »

I see there are no reported problems on NFOGRF, I hope that
means you were able to run it. Remember I'm still developing
the program, your comments about how to correctly interrupt
the code would be appreciated! Otherwise will it be useful to
anyone?

JEB
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 40 guests