探索文件格式的权威指南(01)

来源:互联网 发布:淘宝只能换绑不能解绑 编辑:程序博客网 时间:2024/05/16 18:13
2.介绍
电脑游戏数量庞大,但是大多数电脑游戏都有一些共同点——他们需要一个地方来存储所有的重要文件,比如图片,电影,和音乐,音效等等,为此,游戏开发者通常将他们的数据存储在一个大的档案文件中(archive file)。


将所有数据存储在一个大的档案文件中有很多原因,一些原因包括减少文件数量,隐藏数据文件来阻止人们破坏、修改、或者提取游戏文件,并使所有数据文件使用单个文件的数据流。
#注:以c为例,调用一个文件,需要一次fopen函数,如果有成百上千个文件,就需要很多次fopen,十分麻烦,把文件打包成一个,只需要一次fopen即可


然而,不同的游戏有不同的档案文件,对玩家来说就是个坏消息了,每个游戏开发者都会创建自己的文件档案格式,甚至公司部门之间都会改变不同的格式。


这使我们了解了本教程的重点——如何浏览档案文件并从中获取文件,本教程将尝试让任何人轻松探索新的格式,目的是促进社区的游戏修改和改进。


在下面的页面中,我们将讨论专业术语GRAs(Game Resource Archives游戏资源档案)和GRAFs(Game Resource Archive Formats游戏资源档案格式),通用数据类型,和其他一些定义,从那里我们将讲解破解文件格式的基本原理,包括你要使用的工具,和需要注意的模式。


感谢您阅读我们的指南,我们祝您在探索中获得好运气。


下期预告:什么是GARs,什么是GARFs
下下期预告:工具篇(上)


2. Introduction
Computer games are vast and many, however most computer games have something in common – they need a place to store all their important files like images, movies, and sounds. To do this, computer game developers typically store their data into a big archive file.
There are many reasons for storing all your data files in one big archive, some reasons include reducing the number of files on a CD, hiding the data files to stop people hacking the game, and so that all data files can be accessed using a single data stream.
However, the bad news for gamers is that there are almost as many different archives as there are different computer games – every game developer creates their own archive formats, and they even change their formats between games or departments in the company.
This brings us to the focus of the tutorial – how to explore the archives and grab the files from within them. This tutorial will attempt to make it easy for anyone to explore a new format, with the aim of promoting game modifications and enhancements by the community.
In the following pages, we will discuss the terms Game Resource Archives (GRAs) and Game Resource Archive Formats (GRAFs), common data types, and other definitions. From there, we will explain the fundamentals of cracking a file format, including the tools you use, and the patterns to look out for.
Thanks for reading our guide; we wish you the best of luck in your exploration☺.
0 0