Skip to content

AlchlcDvl/CustomLoadingScreens

Repository files navigation

Custom Loading Screens Mod

The loading screen of Slime Rancher functions well, but it can feel a bit static after a while. Now, you can customize it!

This mod functions as a core library for other mods to inject their own loading screen assets, while also allowing users to easily drop in their own icons and backgrounds via a folder system. It also improves the readability of loading screen tips by adding better shadowing.

For Users

Installation

  1. Install the mod and run the game once.
  2. This will create a new folder in your game directory: Loading.

How to Add Custom Images

Drop your images into the Loading folder.

  • Supported Formats: .png, .jpg, .jpeg
  • Naming Rules (Case-insensitive):
    • Ends with _icon (e.g., MySlime_Icon.png): Adds a wobbly icon to the loading loop.
    • Ends with _splash (e.g., MyBackground_Splash.jpg): Adds a full-screen background image.
    • Note: If the file name does not have either of these tags, the image will be ignored.

How to Add Custom Tips

Create a .txt file inside the Loading folder.

  • Content: Each line in the file is treated as a separate loading tip.
  • Localization: Name the text file using the Two-Letter Language Code (ISO 639-1) of the language you want to target (e.g., EN.txt for English, ES.txt for Spanish, DE.txt for German).
  • Note: If the file name does not match a language code (e.g., mytips.txt), it will default to the game's current active language.
  • Also Note: The targeted language must be supported by the game itself, otherwise it will be treated similar to a regular file name.

Configuration

A configuration file is generated in your config folder. You can use this to:

  • Toggle Vanilla icons, backgrounds, or tips On/Off (great for total conversion mods).
  • Toggle Modded content On/Off.

For Developers

To use this API in your mod:

  1. Add "custom.loading" to the load_after list in your modinfo.json.
  2. Add CustomLoadingScreens.dll to your project references.

Implementation Pattern (Soft Dependency)

To prevent your mod from crashing if Custom Loading Screens is not installed, wrap your calls in a separate method or class that is only accessed after checking for the mod's presence.

In your Entry Point:

// Define wrappers to keep the CLS types isolated
public static void AddIconBypass(Sprite icon) => CLS.AddToLoading.AddIcon(icon);
public static void AddSplashBypass(Sprite splash) => CLS.AddToLoading.AddSplash(splash);
public static void AddTipTextBypass(string tipText) => CLS.AddToLoading.AddTipText(tipText);

// Batch variants (Recommended for performance)
public static void AddIconsBypass(IEnumerable<Sprite> icons) => CLS.AddToLoading.AddIcons(icons);
public static void AddSplashesBypass(IEnumerable<Sprite> splashes) => CLS.AddToLoading.AddSplashes(splashes);
public static void AddTipTextsBypass(IEnumerable<string> texts) => CLS.AddToLoading.AddTipTexts(texts);

Then in your Load() method use as follows:

public override void Load()
{
    if (SRModLoader.IsModPresent("custom.loading"))
    {
        // It is safe to call the wrappers here
        SetupLoadingScreen();
    }
}

private void SetupLoadingScreen()
{
    Sprite myIcon = GetMyIcon();
    AddIconBypass(myIcon);

    Sprite mySplash = GetMySplash();
    AddSplashBypass(mySplash);

    AddTipTextBypass("This is a custom tip provided by my mod!");
}

About

Customise your game loading screens in Slime Rancher 1!

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages