Invoking MW2
Posted: Sun Sep 14, 2008 3:16 pm
It has been reported in various places that MW2 missions can be started directly from the command line (1, 2, 3). These codes can be found by creating a fake MW2.exe file which prints or logs call parameters instead of or in addition to calling the actual MW2.exe. This still leaves some questions unanswered:
Userstar.bwd defines the user's star/lance when launching into combat. It contains a GPS tag for each mech on the lance/star. See this thread for details on the GPS tag.
(Cleaned Up Thread by Sir MMPD Radick, with later edits by Skyfaller)
- How does the shell tell the sim which mechs the user wishes to use? Userstar.bwd?
- How does MW2 report the mission outcome back to the shell?
- All Windows editions use DLL's rather than .exe's. Is it possible to create wrapper DLL's using Köntzä's project on Sourceforge?
- MechWarrior 2
- GBL regular missions
It says pretty much the same for all Windows versions of MW2.DLL respectively MercsW.DLL. SimMain should be the entry point for the sim, and the event handler SimWindowProc is also exported. This raises the question of whether to call SimMain or to create a window that uses SimWindowProc. The names are not decorated, meaning that they don't give any clues about their calling parameters. Too bad.1 0 0000CC70 SimMain
2 1 0000D95D SimWindowProc
Userstar.bwd defines the user's star/lance when launching into combat. It contains a GPS tag for each mech on the lance/star. See this thread for details on the GPS tag.
(Cleaned Up Thread by Sir MMPD Radick, with later edits by Skyfaller)