You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.6 KiB

5 years ago
5 years ago
5 years ago
5 years ago
  1. ---
  2. title: Beat Saber IPA
  3. ---
  4. # ![Beat Saber IPA Reloaded](images/banner_dark.svg) [![Build status](https://ci.appveyor.com/api/projects/status/1ruhnnfeudrrd097?svg=true)](https://ci.appveyor.com/project/nike4613/beatsaber-ipa-reloaded-9smsb)
  5. Beat Saber IPA - The mod injector tailored for Beat Saber
  6. ## How To Install
  7. 1. [Download a release](https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/releases)
  8. 2. Extract the contents into the game folder
  9. 3. Run **IPA.exe**
  10. 4. Start the game as usual
  11. ## How To Uninstall
  12. 1. Drag & drop the game exe onto **IPA.exe** while holding <kbd>Alt</kbd>
  13. - Or run `ipa -rn` in a command window
  14. ## Arguments
  15. `IPA.exe file-to-patch [arguments]`
  16. - `--launch`: Launch the game after patching
  17. - `--revert`: Revert changes made by IPA (= unpatch the game)
  18. - `--nowait`: Never keep the console open
  19. - See `-h` or `--help` for more options.
  20. Unconsumed arguments will be passed on to the game in case of `--launch`.
  21. ## How To Develop
  22. 1. Create a new **Class Library** C# project (.NET 4.6)
  23. 2. Download a release and add **IPA.Loader.dll** to your references
  24. 3. Implement `IPA.IPlugin` or `IPA.IEnhancedPlugin`
  25. 4. Build the project and copy the DLL into the Plugins folder of the game.
  26. See [Developing](xref:articles.start.dev) for more information.
  27. ## How To Keep The Game Patched
  28. BSIPA will automatically repatch the game when it updates, as long as `winhttp.dll` is present in the install directory.
  29. ## Notes for running under Wine
  30. For some reason, by default, Wine does not load DLLs in quite the same way that Windows does, causing issues with the injection.
  31. To make the injection work with Wine, `winhttp` has to have a DLL override set to `native,builtin`. This can be set either through
  32. Protontricks, or with the following `.reg` file.
  33. ```reg
  34. REGEDIT4
  35. [HKEY_CURRENT_USER\Software\Wine\DllOverrides]
  36. "winhttp"="native,builtin"
  37. ```
  38. For Steam there's a per-game Wine prefix under `compatdata`. In this case `SteamLibrary/steamapps/compatdata/620980/pfx/user.reg`.
  39. Changes to this file will likely be ovewritten when the game updates or if local files are validated through Steam.
  40. ## Developing BSIPA itself
  41. ### Prerequisites
  42. - Microsoft Visual Studio 2019 or later (2017 may work, no guarantees)
  43. - Tools for C/C++ (MSVC) v141
  44. - .NET 4.6.1 SDK and .NET 4.7.2 SDK
  45. ### Building
  46. 1. Clone with `git clone https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git --recursive`
  47. 2. Create a file, `bsinstalldir.txt` in the solution root. Do NOT create this in Visual Studio; VS adds a BOM at the begginning of the file that the tools used cannot read.
  48. It should contain the path to your Beat Saber installation, using forward slashes with a trailing slash. e.g.
  49. ```
  50. C:/Program Files (x86)/Steam/steamapps/common/Beat Saber/
  51. ```
  52. 3. Open `BSIPA.sln` in Visual Studio.
  53. 4. Choose the configuration `x64-Net4`
  54. 5. Rebuild all.
  55. When you make a change somewhere in BSIPA itself, right click on `BSIPA-Meta` and click `Build` or `Rebuild`. This sets up the output in `path/to/solution/BSIPA-Meta/bin/<Configuration>` to be what
  56. should be copied to the game directory.
  57. When making a change to the Mod List, you only need to build the mod list. Install by copying everything in `path/to/solution/BSIPA-ModList/bin/<Configuration>` to your game
  58. directory.
  59. When building a Debug build, all referenced assemblies from Beat Saber will be copied from the install directory provided in `bsinstalldir.txt` into `Refs/`. Any new references
  60. should reference the copy in there. When building for Release, it just uses the files already in `Refs/`