Porting Weapons (PS2) - GReinoso96/XXModding GitHub Wiki
Important: this tutorial was written in haste, it'll eventually be rewritten and made easier to follow.
All PS2 games and Frontier use the same model format so this is relatively straightforward, but still requires minimal knowledge of using command line tools and hex editors.
Requirements
- AFSPacker
- Crappack
- MHTexTool
- ReFrontier
- Rainbow
- Any hex editor that lets you copy and paste chunks of data.
Unpacking Models
PS2 Model Files
Using AFSPacker, unpack data.bin then the first unnamed .bin file, this should net you a folder containing lots of game files including weapon models and textures, for 1 and G, unpack afs_data.afs instead.
Frontier Model Files
Using ReFrontier, unpack the we*.abn files in /dat/extend/, there's about 12 of them, do not unpack the snd ones as they just contain sound files.
Crappack
Crappack is a python program to pack and unpack compressed files in PS2 MH games, for instructions on how to use it, simply open crappack.py in any text editor.
Using Crappack, unpack we***_amh.bin and we***_tex.bin, corresponding to the weapon model you intend to replace.
MHTexTool
MHTexTool was written for use with _tex.bin files, but it can be used to unpack any simple container such as _amh, however it gives every output file the .apx extension, this is a design problem that will be addressed later, the tool outputs all the contained files and a .txt file that we'll modify later.
Using MHTexTool, unpack _amh and _tex files, then copy over the .fmod and .fskl files from the weapon you want to import, modify the .txt file to list the replacement filenames instead of the original, save and repack the file using MHTexTool.
For the texture, the unpacked .apx file must be renamed to .tm2 if you're modding Dos, you can use Rainbow or any other program to then replace the texture, when you have your new .tm2, follow the same steps as with the _amh file.
Reinserting
Once you have your modified _amh and _tex files, use crappack to recompress them, then replace the original files in the data folder.
Lastly, use AFSPacker to repack first the unnamed bin file and then data.bin, at this point you can use any iso editing software to reinsert this file back into the game.