CustomAppAPI

v1.0.1·Updated 2023-10-02

An API for adding custom apps to the phone.

About this mod Author’s original text

How to use:

Download the CustomAppAPI.dll file in the mod download.

Add the CustomAppAPI.dll to your references in Visual Studio along with your BepInEx Plugin.

Create a new class which inherits from the CustomApp class.

Implement the inherited abstract members, and you're ready to go!

Implementation

The DisplayName will be the app name that shows up on the home screen of the phone.

The Icon will be the texture that shows up next to the app name.

A static LoadTexture function is provided in CustomApp to load a Texture2D from a file path.

To get the file path to your mod.dll, Path.GetDirectoryName(BaseUnityPlugin.Info.Location) will get you the folder your mod is located in, where BaseUnityPlugin is your main plugin class. You may need a static accessor to get the instance of it.

Example Code:

public class MyMod: BaseUnityPlugin {

private static MyMod _instance;

public static MyMod Instance => _instance;

public string ModFolderPath => Path.GetDirectoryName(Info.Location);

private void Awake() {

_instance = this;

}

}

public class MyCustomApp: CustomApp {

public override string DisplayName => "My Custom App";

public override Texture2D Icon => LoadTexture(Path.Combine(MyMod.Instance.ModFolderPath, "myAppIcon.png"));

}

Install & use Install: follow the bundled instructions

  1. Unzip the archive from playbuff and read the bundled readme / instructions first.
  2. Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
  3. For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
  4. Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.

Install locations vary a lot between mods — the bundled readme is the most reliable guide.

Dependencies

Install these first, or the mod will not work:

BepInEx-BepInExPack

File & checksum

Filename
CustomAppAPI-1.0.1.zip
File size
19.3 KiB