Sign in to follow this  
CodeTitan

File formats

Recommended Posts

Basically, I see people writing utilities to help people mod certain games (Starcraft, Quake, etc.), and it recently struck me that the file formats that the applications load are from the actual game. How can you figure out how to use/load/edit the file formats? For example: Person X writes a Starcraft application called trigger loader. X's application can load and write to the native Starcraft trigger files. I could not find any information on the trigger file format online, but I've seen an application that can write to them. How does a programmer figure out stuff like this? Is it reverse engineering?

Share this post


Link to post
Share on other sites
Well, for Starcraft specifically, there's a bunch of new stuff online; ever since Camsys went down, it's been kind of a closed community (afaik). You could always try emailing the writers of such apps, but I never got any replies.

There's a lot of information online, if you know where to look ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by CodeTitan
You mean it's not simple? Aw man...are there any tuts on this business?


In the case of Blizzard games like Starcraft and Diablo you have use their storm.dll to get access to contents their MoPaq format. Blizzard put alot of care into making it hard to reverse engineer their format much less get access to the game data.

Try here[http://www.campaigncreations.org/starcraft/inside_mopaq/index.htm]

You can also check out Diablo Map editor that use storm.dll and Allegro. Anyway you can find it here[http://www.allegro.cc/depot/project.php?_id=763]. The source is avaliable.


Hope this helps.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by CodeTitan
Ok. So how did the first modders of games like DOOM figure out how to crack the WAD files? Did they guess? I mean, it doesn't make sense.


ID released the DOOM source code. I don't think your going find step by step instructions on to reverse engineer file formats. You'll have to learn how to use tools like hex editor, profilers, and debugs to figure out whats going one and draw conclusion about what certain bytes in the file do. Since alot game data gets obfusticated, encrypted, and/or compressed it makes the job that much harder. It takes mod developers quite awhile to reverse engineer it to point where they can make a mod (that is if the developer isn't very friendly toward modding).

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
I don't think your going find step by step instructions on to reverse engineer file formats. You'll have to learn how to use tools like hex editor, profilers, and debugs to figure out whats going one and draw conclusion about what certain bytes in the file do.


A good start to understanding this is to start "savegame hacking" where you tweak values in the save game and reload the game. Working through this can give you an understanding of how the game stores information. Once this is completed you can move onto more complex file formats. Another useful trick is to create stubs for DLLs and track how the individual functions in the DLLs the game relies on are called.



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this