工具¶
tools/中給玩家與建置使用的工具。以下API說明為英文。
install_enhanced
¶
AMFP Enhanced side-by-side installer.
Installs the Enhanced exe next to the stock game without changing any stock file:
<game>/aamfp_enhanced.exe launcher: starts bin/AmnesiaAMFP.exe from the game folder
<game>/amfp_enhanced/bin/ the 64-bit game and its DLLs (the root keeps the original
game's 32-bit DLLs of the same names untouched)
<game>/amfp_enhanced/main_init.cfg paths below; saves and settings shared with the stock game
<game>/amfp_enhanced/game.cfg copy of config/game.cfg
<game>/amfp_enhanced/resources.cfg /amfp_enhanced/override first, then the stock list
<game>/amfp_enhanced/default_user_keys_sdl2.cfg Xbox 360 layout for hint / note / inventory
<game>/amfp_enhanced/default_main_settings_sdl2.cfg graphics defaults for new players
<game>/amfp_enhanced/default_user_settings.cfg Modern preset for new profiles
<game>/amfp_enhanced/lang/ copies of config/base_*.lang + our enhanced_*.lang
<game>/amfp_enhanced/lang_main/ copies of config/lang_main/*.lang
<game>/amfp_enhanced/install_manifest.json
On macOS the game, with its libraries inside, is one self-contained app (pixi run bundle-macos) next to Frictional's own apps; it starts in the game folder by itself (Info.plist StartFolder):
<game>/AMFP Enhanced.app instead of the launcher exe and amfp_enhanced/bin/
Everything is generated from the player's own install (nothing from the game is shipped). Uninstall removes only files whose hash still matches what was installed, including an install made under the earlier 2026 names.
pixi run install-enhanced -- --game "D:/SteamLibrary/steamapps/common/Machine for Pigs"
pixi run install-enhanced -- --game ... --uninstall
patch_user_keys
¶
Latest hint on D-pad right, last note on D-pad left (stock: hint on L3, note unbound), written the way the Windows build reads the D-pad (hat 0). The game itself gives every profile its gamepad layout on first start (LuxPadLayout.h); this keeps the defaults in step.
steam_launch_option
¶
Steam > Properties > Launch Options. Steam then runs the Enhanced exe and passes the
launcher's path as an argument, which the exe ignores (only "-map
create_shortcuts
¶
Desktop / Start Menu shortcuts to the Enhanced exe (one PowerShell call).
default_payload
¶
Build output + overlay, assembled into a temp payload folder.
make_comfort_vignette
¶
Generate the comfort edge vignette (our own texture, not a game asset).
Black, alpha 0 inside the centre (the middle 70 % stays untouched), easing to 1 toward the corners. Drawn stretched over the whole screen by LuxComfortHud.cpp, at a low overall alpha. pixi run python tools/make_comfort_vignette.py
bundle_macos
¶
Make the macOS app self-contained: copy the libraries it loads from the pixi environment into AmnesiaAMFP.app/Contents/Frameworks, point the binary at them, and ad-hoc sign it.
The build links against $CONDA_PREFIX/lib (pixi), so the bare .app only runs on the machine that built it. After this it runs anywhere with macOS 11+ on Apple Silicon. System libraries and frameworks (/usr/lib, /System) stay as they are.
pixi run bundle-macos # build/macos/Game/src/AmnesiaAMFP.app
pixi run bundle-macos -- --app path/to/AmnesiaAMFP.app