EasyMYP
Warning: This is going to be a completely self justifying note
What is EasyMYP ?
EasyMYP is an application that allows users to open MYP Archives that are used in Warhammer Online and may also open UOP files since the UOP format has also changed. It is an application written in C# using the .NET Framework though not the WPF one but still the old windows form system.
The MYP Format
The MYP format is as follow. At least in the current version of the game in march 2009.
MYP File Header:
40 Bytes: header info
0->3: MYP, file extension…the usual header
4->7: version (?)
8->11: date (?)
12->15: address of the first filetable in the file
16->19: 0, might be the position (32 high bits) of the first filetable in the file
20->23: Number of file in the first file table (?)
24->27: Number of files in the whole archive, path.myp is an exception it seems
28->31: Number of filetable
32->36: ???
Other Info: There is some CRC check somewhere
MYP filetable format:
12 Bytes: filetable info
0->3: Number of files that can be contained in the filetable
4->7: The address at which we can find the following filetable
8->11: The 32 high bits of the address of the following table
followed by the file entries
filetable file entry format:
34 Bytes: entry info
0->3: starting position , 32 low bits
4->7: starting position , 32 high bits, usefull for 4GB + files
8->11: file header size, usually 136 or 137
12->15: compressed size
16->19: uncompressed size
20->27: full filename + path hash
28->31: CRC32 of the metadata
32->33: compression method
filetable file header
136/137 Bytes: header info:
0->1: ???
2->3: Size of the header from this point on
4->5: ???
6->7: Size of the header from this point on
8 : present or not present, depends, but value is either 1 or 2 (absent when value is 0)
9->136: data… (a hash or something, but that is a wild guess, however 2 files with different names but the same content will have the same value here)
Other information about the format
The format supports 64 bits which is great. Unfortunately the files are always smaller than that because in the beta some people had some troubles with the files that were more than 4 gigabytes. Thus the 64 bits capability of the format are not used.
The archive also used to contain the filenames which is not the case in the current version (date of this post)
The archive does not use cluster alignment techniques.
History of EasyMYP
EasyMYP started simply because of 2 informations that was provided to the community at the time (by PG and MJ mainly):
- Heavy reliance on the community because there would be no official forum.
- << Publicity>> on the part of Mythic regarding the modding capabilities of the game.
Now, for the story, the game was supposed to get out in 2007 Q4 but due to modifications in the MYP format the modding community had a hard time knowing how to actually develop addons. And Mythic never gave any information to mod developers until 1 month before release which was 1 year later. Thus I started to look into the format and develop tools to extract the archives and get access to the lua code and thus access to the functions available to mod developers.
It first was a command line tool, pretty basic and it grew in what can actually be found on google code: EasyMYP . And even if I do not develop it, another player has taken it over (Hadrian), and I really thank him for that and the major work he did in renaming everything to something much more meaningful and repairing bugs and still developing the application.
Conclusion
Even though I know what I did is illegal in the start, I still view it as a useful work and I despise Mythic here for in the end lying to their consummer base. Though promises only engage the one who believe in them (and that goes both ways
).
Also, I like to think that through the use that was made of this tool by the community, the modders were able to provide mods when the game was released and even provide mod which solved some performance issues! Thus maybe having a positive impact on the number of players who ended up buying it at release. (Wishful thinking is allowed
)
Once again this project taught me lots of things:
- Debugging application.
- ASM.
- Compilers! Because looking at dissassembled code is actually very usefull to optimize the way you code in the end so that the compiler can be more efficient.
- Winforms: I tend to hate presentation work and would rather stick to back end algorithms and systems. So had to learn a bit of the winform system.
- Events / Delegates / Threading.
- First approach to parsing / scanning and discovery of Antlr which helped me build a library of the classes / methods / parameter values used in the lua files.
And once again I ended up having some major problems:
- Application out grew its supposed usage scope (which was me) and became a mess in regards to the name of the libraries / files (solved with the major update which is version 2.5 by Hadrian)
- To comment one’s code even for little things and also put comments to explain choices made on code design. Especially when you make it open source.
- Parsing / Scanning is hard though very interesting
And I also thank the people who helped me understand or taught me what I had to learn in order to actually help the modding community through this application.