Extracting graphics from GRAPHICS.DAT?
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
Extracting graphics from GRAPHICS.DAT?
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.)
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.)
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Extracting graphics from GRAPHICS.DAT?
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
This page on dmweb lists lots of useful tools: http://dmweb.free.fr/?q=taxonomy/term/47,80
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
Re: Extracting graphics from GRAPHICS.DAT?
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...
Edit: I visited the website through a proxy, and it worked. Huh...
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Extracting graphics from GRAPHICS.DAT?
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.
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.
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
Re: Extracting graphics from GRAPHICS.DAT?
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!
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Extracting graphics from GRAPHICS.DAT?
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
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
- ChristopheF
- Encyclopedist
- Posts: 1544
- Joined: Sun Oct 24, 1999 2:36 pm
- Location: France
- Contact:
Re: Extracting graphics from GRAPHICS.DAT?
Unless you've already downloaded it, the best extractor for DM2 data files (all versions) is sck, available here: http://greatstone.free.fr/dm/
Christophe - Dungeon Master Encyclopaedia
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
Re: Extracting graphics from GRAPHICS.DAT?
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?
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Extracting graphics from GRAPHICS.DAT?
Do you just want to view the graphics, or are you trying to write your own code to extract them?
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
Re: Extracting graphics from GRAPHICS.DAT?
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.
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Extracting graphics from GRAPHICS.DAT?
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.
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.
- Pantzmaster
- Neophyte
- Posts: 8
- Joined: Wed Oct 03, 2012 10:18 am
Re: Extracting graphics from GRAPHICS.DAT?
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!
Using some of those documents, I managed to decode TORHAMS name and replace it with some of my own characters!
Re: Extracting graphics from GRAPHICS.DAT?
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.
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.