Advertisement
danielocdh

Untitled

Feb 22nd, 2020
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Mod assistant 1.0.30 will work with 1.7.0 even that it will show 1.6.1
  2. With all these changes mod assistant will install the bsipa from _local_mods\bspia.zip
  3. If you want to (re)install bspia manually every time just skip the changes to Mods.xaml.cs
  4.  
  5. getting bsipa 3.13.7
  6. git clone https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded.git --recursive
  7. cd BeatSaber-IPA-Reloaded
  8. git checkout 681860c90103925ac6ef06d1bfc7010beb11418a --force
  9. git submodule update
  10.  
  11. getting latest mod assistant:
  12. git clone https://github.com/Assistant/ModAssistant.git
  13.  
  14. File BeatSaber-IPA-Reloaded\bsinstalldir.txt
  15. Must contain the path to the game (I usually compile on a different computer, the path can be
  16. different, it might be that the version of the game has to be the same) with regular slashes,
  17. ending with a slash, without new lines, encoded in UTF8 without BOM(use notepad/notepad++)
  18. example:
  19. G:/games/Beat Saber/
  20.  
  21.  
  22. File BeatSaber-IPA-Reloaded\IPA.Injector\AntiPiracy.cs
  23. from:
  24. public static bool IsInvalid(string path)
  25. {
  26. to:
  27. public static bool IsInvalid(string path)
  28. {
  29. return false;
  30.  
  31.  
  32. File BeatSaber-IPA-Reloaded\IPA.Loader\Config\SelfConfig.cs
  33. from:
  34. public bool Regenerate = true;
  35. to:
  36. public bool Regenerate = false;
  37.  
  38. from:
  39. public bool AutoUpdate = true;
  40. to:
  41. public bool AutoUpdate = false;
  42.  
  43. from:
  44. public bool AutoCheckUpdates = true;
  45. to:
  46. public bool AutoCheckUpdates = false;
  47.  
  48.  
  49. File ModAssistant\ModAssistant\Classes\Updater.cs
  50. from:
  51. public static bool CheckForUpdate()
  52. {
  53. to:
  54. public static bool CheckForUpdate()
  55. {
  56. return false;
  57.  
  58.  
  59. File ModAssistant\ModAssistant\Classes\Utils.cs
  60. from:
  61. public static bool isVoid()
  62. {
  63. to:
  64. public static bool isVoid()
  65. {
  66. return false;
  67.  
  68.  
  69. File ModAssistant\ModAssistant\Pages\Mods.xaml.cs
  70. This file contains the changes that make mod assistant install bsipa from _local_mods
  71. from:
  72. if (mod.name.ToLower() == "bsipa")
  73. {
  74. MainWindow.Instance.MainText = $"Installing {mod.name}...";
  75. await Task.Run(() => InstallMod(mod, installDirectory));
  76. to:
  77. if (mod.name.ToLower() == "bsipa")
  78. {
  79. MainWindow.Instance.MainText = $"Installing {mod.name}...";
  80. await Task.Run(() => InstallModLocal(mod, installDirectory));
  81.  
  82. from:
  83. private void InstallMod (Mod mod, string directory)
  84. to:
  85. private void InstallModLocal(Mod mod, string directory)
  86. {
  87. string installDirectory = App.BeatSaberInstallDirectory;
  88. string localDir = Path.Combine(installDirectory, "_local_mods");
  89. string localZip = Path.Combine(localDir, $"{mod.name.ToLower()}.zip");
  90.  
  91. if (!Directory.Exists(localDir) || !File.Exists(localZip))
  92. {
  93. System.Windows.MessageBox.Show($"Could not find '_local_mods\\{Path.GetFileName(localZip)}' for {mod.name}");
  94. return;
  95. }
  96.  
  97. using (FileStream zipToOpen = new FileStream(localZip, FileMode.Open))
  98. {
  99. using (ZipArchive archive = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
  100. {
  101. foreach (ZipArchiveEntry file in archive.Entries)
  102. {
  103. string fileDirectory = Path.GetDirectoryName(Path.Combine(directory, file.FullName));
  104. if (!Directory.Exists(fileDirectory))
  105. Directory.CreateDirectory(fileDirectory);
  106.  
  107. if (!String.IsNullOrEmpty(file.Name))
  108. file.ExtractToFile(Path.Combine(directory, file.FullName), true);
  109. }
  110. }
  111. }
  112. }
  113. private void InstallMod (Mod mod, string directory)
  114.  
  115.  
  116. for bsipa:
  117. build->configuration manager: release, x64-Net4
  118. build->clean
  119. build->rebuild solution
  120. compress files from BSIPA-Meta\bin\x64-Net4\Release to <game dir>\_local_mods\bsipa.zip
  121.  
  122. for mod assistant
  123. build->configuration manager: release
  124. build->clean
  125. build->rebuild solution
  126. copy ModAssistant.exe from bin\Release to <game dir>
  127.  
  128. Compile tested with visual studio 2019
  129.  
  130. IPA --launch and/or IPA "Beat Saber.exe" have to be run at some point with new .exes
  131. I had to run the game twice to get the left side mods tab. The mod settings button was there the 1st time.
  132.  
  133. ================================================================================
  134. ================================================================================
  135. Feel free to use my compiled one, instructions:
  136. 1 extract to game folder
  137. 2 use ModAssistant to install desired mods
  138. 3 launch game
  139. 4 if it doesn't work drop the "beat saber" executable on top of ipa
  140. 5 might need to launch the game again to get the left side mods tab
  141. https://mega.nz/#!815gDKpK!0lymgqFf3cO5ZoiwWZA2Ut7lVa4om2wnAftrzMq9MdY
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement