MGS2 PC patch kit
=================

This archive is a patch kit for the MGS2 PC rebuild work in this tree. It is not a standalone game package. It intentionally does not include GameData, cdrom.img, logs, build outputs, old retail executables, or generated Bluepoint binaries.

Use it with a base source tree and your own GameData directory.

1. Extract the kit into the root of the working tree.

The expected layout is:

C:\MGS2\bp
C:\MGS2\mgs2x
C:\MGS2\tools
C:\MGS2\GameData

From PowerShell or Command Prompt, run:

tar -xzf push.tar.gz -C C:\MGS2

Allow it to overwrite matching source and script files.

2. Make sure GameData is present.

The folder should sit at C:\MGS2\GameData. The scripts also accept another path, but the default wrappers expect GameData in the repo root.

Run:

powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Test-GameDataReady.ps1 -GameDataPath .\GameData

This should report the region folders, pack lists, and asset types.

3. Build the Win32 game binary.

Install Visual Studio Build Tools 2026 or full Visual Studio 2026 with Desktop development with C++ and .NET Framework 4.8.1 targeting support. Then run:

cd C:\MGS2
cmd /c Build-MGS2-Win32.bat

A successful build writes mgs2x\source\main\Release\main.exe. Warnings about Engine_Release.dll and Renderer_Release.dll output paths are expected with the current project files.

4. Prepare runtime data.

If you already have a working mgs2x\cdrom.img folder with stage.dat, codec.dat, face.dat, movie.dat, vox.dat, and demo.dat, keep using it.

If you only have GameData, start with:

powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Build-PCDataLayoutFromGameData.ps1 -GameDataPath .\GameData -Layout US -Force

For the Japanese audio and English text experiment, use:

powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Build-PCDataLayoutFromGameData.ps1 -GameDataPath .\GameData -Layout JpAudioEnText -Force

That script currently rebuilds and stages the stream DATs. It still reports stage.dat and face.dat as unresolved, so a fully playable run may still need an existing PC runtime data folder or more AssetTool cooking work.

If you have an installed or extracted PC data directory, locate it with:

powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Find-MGS2Data.ps1

Then stage it with:

powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Prepare-PCDataLayout.ps1 -SourcePath "PATH_FROM_THE_PREVIOUS_STEP" -Mode Copy -Force

5. Run the rebuilt binary.

Run:

cmd /c Run-MGS2-Win32.bat

The current target is the Bluepoint Win32 path. The title menu works in the current workspace. Cutscenes and audio are still under active repair, so keep an eye on missing asset dialogs, the disc spinner, and early stream audio endings.

6. Optional: build AssetTool.

AssetTool is needed for cooking missing stage, face, texture, or model assets. Build bp\Source\Everything.sln in Release from Visual Studio, or from a Visual Studio Developer Command Prompt with MSBuild. The wrapper Run-AssetTool.bat expects the built executable at bp\Bin\Tools\Release\AssetTool.exe.

Useful helper scripts after AssetTool builds:

powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Cook-StageFlatlistTextures.ps1 -GameDataRoot .\GameData -Locale us -Stage w00a
powershell -ExecutionPolicy Bypass -File .\tools\buildprep\Cook-StageBpModels.ps1 -GameDataRoot .\GameData -Locale us -Stage w00a

Replace the locale and stage name as needed.

Known contents:

This archive includes source files, solution and project files, helper scripts, scenario and text materials, local build wrappers, and mgs2-shareable-changes-vs-orig.patch. It excludes GameData, cdrom.img, logs, build products, old executable payloads, ELF tools, and IRX modules.

The only executable intentionally included is bp\Bin\Tools\sed.exe. The Win32 project file calls sed while generating bp_stageFuncs.c and bp_stageTable.c during the main game build.
