Lunar Mods

 The main repository for Beat Saber mods is Beatmods, which is unfortunate because active development for it has ceased and its last commit was in 2020 and since then, the entire github repo has been archived. Beatmods itself is greatly flawed and has always known to be jank.

 Frustrated by a lot of the issues with Beatmods, in 2023, I decided to see if I could make a competitor that fixes a lot of the issues. Although it was never used, I still took this opportunity to learn all the different components that make up launching a website.

 The website runs using ASP.NET while each page is a Razor Page which uses C# and HTML respectively. For the design, I used the Bootstrap library, modified using Sass. All the data is held in a MariaDB database and the website is behind an NGINX reverse proxy. The applications are all containerized and use Docker Compose.

Lunar Mods
GitHub Repo
Directory
Mod Directory
Discord login
Discord login

 For authentication, I decided to just use Discord's OAuth2 API as I found it smarter to leverage a mature authentication system which is already widely used in Beat Saber modding. This saves me the time and trouble of trying to write my own authentication system.

 The site uses role-based permissions to grant access to actions such as uploading mods, deleting mods, and viewing unlisted entries.

 My main goal for this website was to be an improvement over Beatmods. The biggest change is the structure of how mods are hosted. On Beatmods, every uploaded version of a mod is its own standalone file and offers little other than a short description.

 For my site, every mod has its own dedicated page which allows the uploader to write a description using Markdown and include any media such as videos and pictures. Additionally, there is a sidebar on the right which shows all of the information for the mod and more importantly, a download button for the latest version and a link to all released versions.

 Here, all uploaded versions are grouped under the mod making them easier to find. Additionally, there is even more information provided for each version such as a changelog, dependencies, checksum, etc. Finally, all mod listings are shown under the directory using a preview image, category, and a short description.

CustomJSONData listing
An example listing for CustomJSONData
Trusted status
A mod version with the Trusted status

 One of the main issues of Beatmods is its lengthy approval process before an uploaded mod can be downloaded. Unfortunately, the nature of volunteer work means that no matter what, this process will take time. However, I planned to mitigate that using the following methods:

  • Because mods are visible whether they are approved, you can still download them which provides a centralized place to distribute your mod regardless of status.
  • I added a third status called "Trusted" between approved and unapproved where any trusted uploader would automatically have their uploads' status be elevated. This allows any proven as trustworthy to quickly upload versions and lets approvers know they have a good record.
  • BepInEx

     Seeing as BSIPA (the common mod loader for Beat Saber) was pushing a breaking change, I wanted to see if it was possible to rip the band-aid off completely and move to a separate mod loader. This mod loader was BepInEx, chosen because it was popular, actively-maintained, and BSIPA already used multiple libraries developed by the BepInEx team (HarmonyX and AssemblyPublicizer).

     This swap would allow for multiple benefits. These benefits include:

  • Regular updates. The current maintainer for BSIPA is no longer active in the Beat Saber community and does not push updates frequently.
  • More features. BepInEx has a few more features over BSIPA such as preloader patches.
  • Centralization. If there is an issue with BepInEx, I can go directly to their Discord and get help from developers in any modding community. Additionally, if I want to use a general BepInEx mod, I can directly install it without having to convert it to a BSIPA mod to load it.
  • More features. BepInEx has a few more features over BSIPA such as preloader patches.
  •  With these benefits in mind, I converted many mods to BepInEx (these conversions are what's uploaded on the site). Additionally, BepInEx even had a loader that could load BSIPA plugins meaning plugins that don't convert could still be loaded anyways. Although my plan to swap to BepInEx did not catch on, I still believe it to be the superior mod loader.

    BepInEx logo
    BepInEx Logo

    LunaAssistant

    LunaAssistant
    LunaAssistant a lightly modified fork of ModAssistant

     In order to use Lunar Mods and BepInEx, I created a fork of ModAssistant (the premier mod manager for Beat Saber) called LunaAssistant. For this fork I replaced all the calls to the BeatMods API with calls to the Lunar Mods API.

     Previously, the BSIPA loader was uploaded to Beatmods and ModAssistant was hard coded to search for this mod and download it. Instead, LunaAssistant downloads from the BepInEx GitHub release and installs that.

    GitHub Repo