Extracting graphics from GRAPHICS.DAT?

Chat about "The Legend of Skullkeep", the true sequel to the original Dungeon Master.
This forum may contain spoilers.
Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Hello all

I've recently been doing a little hex editing to the graphics.dat file in the DM2 directory and just wondering if someone can give me any tips or reading material (or just an outright explanation) on how people previously have managed to actually extract images from it so they're able to be viewed outside the game itself. It seems to be very difficult to find information on, as most information regarding this matter resides on dmweb.free.fr and I haven't seen that website up for a long time now (well, all the download links there are anyway if I view the page as cached. Still can't really find anything though.)
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by Gambit37 »

dmweb.free.fr is not down, it's running perfectly. Check again, all the info you need is on there... it sounds like you may have some local internet block or proxy server issues with your ISP.

This page on dmweb lists lots of useful tools: http://dmweb.free.fr/?q=taxonomy/term/47,80
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Strange, it's been down literally for months for me. Thanks for the page and I'll try to work out why I can't go to the website.

Edit: I visited the website through a proxy, and it worked. Huh...
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by Gambit37 »

Glad you got to it in the end.
It could be that your ISP runs sites through its own proxy which is broken and caching very old pages, or is caching the site at a point when it was genuinely down.
I'd speak to them about it and see what's up, hopefully they can improve it for you.
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Yeah, might do that. Even if I can only access it through a proxy though, that's fine with me. Found some neat utilities on that page and looking into them now. Thank you very much! :D
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by Gambit37 »

You're welcome. By the way, there's no need to quote a full message when you're replying directly after: just use "Reply", saves on screen space and database size ;-)
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Alright, will do!
User avatar
ChristopheF
Encyclopedist
Posts: 1537
Joined: Sun Oct 24, 1999 2:36 pm
Location: France
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by ChristopheF »

Unless you've already downloaded it, the best extractor for DM2 data files (all versions) is sck, available here: http://greatstone.free.fr/dm/
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Thanks Christophe, fantastic link.
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Still having trouble finding any really specific information on what I'm trying to accomplish. Maybe I'm just not good at searching for this sort of stuff lol, has anyone actually had experience doing this sort of thing?
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by Gambit37 »

Do you just want to view the graphics, or are you trying to write your own code to extract them?
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

Well, first find out actually where in the hex values an image (or images) are found, and then if need be write something to extract them into a readable format such as JPEG or PNG. Though a list of offsets would be nice, I was more looking for something that actually ran through the steps of getting to that point. Maybe I'm asking the wrong question considering my limited knowledge of hex editing lol :? just not sure what the next step would be.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by Gambit37 »

Hex editing isn't programming ;-) Are you a programmer? You'll need some programming basics to write an extractor and image converter.

Greatstone, author of SCK mentioned above, and ChristopheF have both accomplished reverse engineering of the DM data structures. Hopefully one of them can help, or you can look at the various pages on DMweb that detail the formats:
http://dmweb.free.fr/?q=taxonomy/term/39 -- DM2 stuff is at the bottom.
User avatar
Pantzmaster
Neophyte
Posts: 8
Joined: Wed Oct 03, 2012 10:18 am

Re: Extracting graphics from GRAPHICS.DAT?

Post by Pantzmaster »

I know a little C# and C++ so I'm fine with that part, it's just the whole hex aspect that is new to me. I'll check out the link and get in contact with those guys if I need to, thanks again! You've been a big help :)

Using some of those documents, I managed to decode TORHAMS name and replace it with some of my own characters!
User avatar
Sphenx
On Master
Posts: 566
Joined: Sun Sep 09, 2001 11:23 am
Contact:

Re: Extracting graphics from GRAPHICS.DAT?

Post by Sphenx »

I am not sure to understand what you're trying to do ?

Did you try DM2GDED http://dmweb.free.fr/?q=node/721 ? With this tool you will be able to extract/edit/replace images (and other resources) within the GRAPHICS.DAT file.

For technical details on how to read a graphics.dat file, Gambit pointed the right place on dmweb; altough as I wrote my own DM2 graphics.dat file generator I can be of some help :)

I won't say you do "hex editing" on graphics.dat file since the file is structured : it has a header, a table with sizes of all items, then encoded data for all items -- and because all of these can be of different sizes, you must understand the structure before editing properly any item.
Post Reply

Return to “Dungeon Master II: The Legend of Skullkeep (DM2)”