From the command line "java -jar jmw2.jar" will print out usage instructions. As an example (assuming you have Mercenaries installed in C:\MERCS) running:
Code: Select all
java -jar jmw2.jar unwasm -source C:\MERCS\MW2.PRJ -all
The output files *should* be compilable with WASM, but don't always work properly. The following is a list of bugs/shortcomings that I know about:
- Star names (used in the "star" and "mission" constructs) aren't actually stored in the BWD chunks that use them - instead they are identified by a "group ID" value. I make a best effort to properly map these ID values back to star names by searching the including gp_spec BWD files, but sometimes there are gaps, in which case I try to make a guess at the name. It doesn't always work
- There is a similar situation with object names - these aren't stored in the BWD either (again, the binary uses ID values). In this case I wrangle up a name based on the name of the geometry file the object uses. This mostly works OK, but some of the MEC files make for ugly reading.
- There is an "critical" value in the mission tables that I can't identify, and it's driving me insane! The various mission building FAQs only identify "Mandatory" and "Optional", but there is a 3rd value! I can't find anything by hexdumping WASM.EXE either, so at the moment it just craps out if it encounters this value
- I haven't been bothered decoding the weapon/ammo ID values yet (this wont be hard, just time consuming - I will get to it eventually ). As such, any place weapons/ammo are refered to in the xxxxCAM1.BWD files, I output the numeric value but comment it out (since WASM expects a name).
- I haven't decoded the VWSP chunk yet (only occurs once in MW2MECH.BWD, and probably isn't all that important anyway), so this doesn't get decompiled.
- Likewise, I'm still working on the patch record in the WTHR chunk, so these wont decompile yet either (having said that, they don't appear to be used in any BWD anyway, so it doesn't really matter).
- It will output a lot of warnings about chunks that have unknown fields and how data may be lost - this is nothing to panic about, it just means those particular chunks still have bytes I haven't decoded yet, so when they are exported back to WASM source, there may be some loss of information... practically speaking though, I don't think anything important is missing... probably
- I've also got an issue, when trying to recompile sources, of WASM complaining that certain files (generally audio in mission tables) don't exist in the project file. It also complains of not being able to find "Null" in the project file when this is used to indicate "no file" in the mission table, despite the fact that this is what the DEM1 and DEM2 examples in the Mercs tools directory use!!