Fallout Prototype Editor on the way - NEED HELP...

Shadowbird

Where'd That 6th Toe Come From?
Intro starts here - if you just want to see the "help" part, skip to the end of it:
I believe most of you have heard of a program I made some while ago for editing Fallout items - FIC. Judging from e-mails I got it was quite appreciated in the modding crowd, even though you had to bear with the slow and compilcated 3.5 version at best. FIC 4 was in development (actually - it was almost finished) - it would have been a major udpate with increased speed, ease to use, etc, but...
Something came up.
The Fallout Editors.
At first I thought the editors were gonna put end to my FIC and any other modding prog, but! I noticed quite a few draw-backs - as one of the most important - the Editors limit most of the values that game doesn't (like - item weight cannot exceed 4000 pounds, although game allows up to over million, and same goes for the negative numbrs). Also, a windows prog made explicitly for item editing is much faster the the whole editor, SO!
Intro ends here

I've decided to drop FIC 4, and start a new prog - an all-around prototype editor, and I need a help with two things - unpacking and FRM reading. I'm making the FPE in Borland Delphi 7, and I need functions for unpacking files from .DATs (I could make those myself it if weren't for the gzip part - as I have heard, many files are gzipped) and for reading FRMs and displaying them. So - if anyone out there feels competent enough with Delphi/Pascal to make any of these functions, I'd really appreciate it (and so would the future FPE users).
Right now I can only make an item+critter+misc and maybe scenery editor, since walls and tiles (most of them) don't have any names, and the only way to identify them is by the picture.
So - anyone up for some coding :?:

P.S. I've also done (at least I think I have) the FRM reading part, the only problem is displaying them in the prog.
 
Wow i loved FIC because it was so much better than FIME it could change the armours appearence and everything, i really liked it and thought it was quite easy to use anyway. Shame your discontinuing it.
 
I am NOT discuntinuing FIC! It will be integrated if the new FPE, with or without the help I asked. FPE (and thus - also FIC 4) will come out, the only difference will be: if someone helps me with the stuff I asked, it will be ALL prototypes editor, if not - only items, critters and misc. Get it? FIC will be combined with FCE (Fallout Critter Editor) and FME (Fallout Misc Editor) in one prog - FPE.

P.S. Also, if I get the help, FPE will use the undat'ed files, and, if not found - unpack from original dats. If not (helped), you'll have to unpack everything the program will require.
 
Oh sorry must have misread, any way cool. :)

--EDIT--

There might be a DAT unpacker source code somewhere, unless youve already looked.
 
Gameshark said:
There might be a DAT unpacker source code somewhere, unless youve already looked.
There are, but
1) They are in C++. Not that I don't know C++, actually I could port it to Delphi, but:
2) as stated above, manu files are GZipped, and sources for GZip are in C++ also, and those I don't really know how to port to Pascal. I am trying, though.
 
Not sure if this is helpful, but here is a link to the specification of the gzip format.

http://www.gzip.org/zlib/rfc-gzip.html

If you don't want to write/port the gzip stuff yourself, you still have a couple of options:

1) Try to find a pascal library that implements gzip. I'm sure this must exist somewhere.

2) Include gzip (the app) with your editor and call it from the editor whenever you need to unpack files. I'm not exactly sure what the gzip license is, but it's probably free (GPL)
 
de dood said:
Include gzip (the app) with your editor and call it from the editor whenever you need to unpack files. I'm not exactly sure what the gzip license is, but it's probably free (GPL)

That will be so. Slow. I know. I tried to do the same thing with FIC and FRM2BMP - AAAAAAA!!! No, I need the source.

But, anyway, the unpacking and gzipping part is the part that I think I can do myself sooner or later, the problems I have is with the other part - FRMs. I have the doc describing the format (which is a bit buggy I think since it doesn't include the palette information but it IS saved in the file i think), and I've made a prog that can read the file, but - I can't display it. That is, I don't know how. The pixel-by-pixel drawing on a TPicture canvas is slow, I don't know how to deal wit the palette issues, and then the multiple frames... (OK, i can do wihout that last one, but the first two are still a problem).
 
Alright, here comes a small lesson on how to do it, I think.

For as far as I could remember the palette wasn't stored in the file, but in a seperate file in master.dat But I'm not sure...

Anyway, on the pixel-by-pixel drawing, it isn't that difficult, you should probably try to do it with scanline, and scanline is very fast doing pixel by pixel stuff. Look around www.torry.net for scanline examples in Delphi.

Better yet, ask around on: www.dgdev.tk which is the Delphi Games Dev forum.....

Anyway, doing pixel-by-pixel drawing should be done with scanline(I'm sure it's on those forums, or ask if you can't find it), and the palette can be changed within Delphi as well, if you store it in a TBitmap at least, which is probably most convenient.
But I'm too lazy to look for it now, so you'll have to do that yourself....;)
 
Sander said:
For as far as I could remember the palette wasn't stored in the file, but in a seperate file in master.dat But I'm not sure...
The file contents description tutorial says FRMs use standart 256 color palette. Some FRMS (the big ones - help screen and town maps) use external palettes. AFAIK, others don't.

Sander also said:
the palette can be changed within Delphi as well, if you store it in a TBitmap at least, which is probably most convenient.
What I need is that 256 color palette in such a format that I can pass an index, and it returns color - I tried to find a way to access TBitmap's palette, but I couldn't. Am I just plain stupid? Also, bitmaps can have more than 256 colors, so - how do I get to the palette?
 
me said:
But I'm too lazy to look for it now, so you'll have to do that yourself
Well, go into Delphi type in palette, and press f1 while your indicator is on "palette" and help will fire with the right thing you need. Check the example as well.

If you still can't figure it out, try posting on DGDev, they'll definitely help you there ;)
 
Back
Top