1. Assume that I've been working on a game extractor since May, and it's starting to come together.
2. Assume I've released game extractors before and thus know how to code, and -
3. Assume I'm posting this here only because this seems to the best game archive community around, and not because I want to ride on anyone's coat-tails or take advantage of these forums (or Mr. Mouse, whom I very much respect for the things he does)
OK.
Now, this game extractor I'm working on supports scripting, but it does it differently to Mex. It has the advantage of being (IMO) easier to read, but the disadvantage of being less powerful in the things it can do.
A few samples:
Code: Select all
driver "Eve Online"
file name = "*.stuff" {
packed simple
unsigned32 fileCount
FileEntry [fileCount] (
unsigned32 size
unsigned32 nameSize
string name
)
}
file name = "*.txt" {
text
}
file name = "*.ogg" {
sound OGG
}
file name = "*.dds" {
image DDS
}
Code: Select all
driver "Cars (THQ)"
file name = "*.pak" {
packed simple
unsigned32 fileCount
FileEntry[fileCount] (
FixedString name 100
unsigned32 offset_from_end_of_header
offset: (fileCount * 108) + 4 + offset_from_end_of_header
unsigned32 size
)
}
Code: Select all
file name = "sc2000.dat" {
packed simple
FileEntry[filePos < dataStart] (
FixedString name 12
unsigned32 offset
)
}
file name = "title.raw" { #title image is special
data unknown 4
image VGA (
width: 640
height: 480
)
}
Code: Select all
file name = "*.pack" {
unsigned16 fileCount;
FileEntry[fileCount + 2](
unsigned32 size
name: "Dunno" + size
someFlag = true
)
}
file (someFlag) = 1 OR (name = "Something") {
image RAW24 (
width: 24
height: size / ( width * 3)
)
}
Some of the things you might ask for that work already:
- Archives with no names. You can:
Code: Select all
file name = "*.pak" {
u8 fileCount
packedName: name #store the packed file's name
FileEntry[fileCount] (
u32 size
u32 offset
name: filenames["name"]
)
}
table filenames(
-packedName- name
"foo.pak" booPakFiles["name"]
"bar.pak" barPakFiles["name"]
)
table booPakFiles (
-fileNum- name
0 "blah.bmp"
..etc..
)
- Data types: u8, s8, u16, s16, u32, s32, string (a null-terminated string), fixedString (a string of fixed size, with or without null terminator), ansiString (a u8 of size followed by data), and dirtyString (a u8 of size, followed by string data, padded out to a certain length with no null ternimator); u64/s64 and floats might come later if it's required.
- Hex viewer: still very crap, but it works.
- Modding: not yet, however it's definately planned. Given that the program reads a file in given the structure, it should be possible to reverse the process quite easily (in some cases).
Now, the reason I'm posting this is the following: this thing's fairly far into development, and I can see that the way I chose it implement it does, in fact, work (against my better judgement ) So, now that I can see results and things work, I can start to massage in things that people want. What would you like to see in something like this? What would you like the scripts to look like? What would you find easiest to read? Would you prefer variables to be written as "var name: 'Something' + size" to set them apart from data in a file more? Once again, I emphasise that I'm trying to write something that people will find a use for, not to blow my own trumpet or prove anything.
Cheers guys.