45x_Dev-45x_Suit_Variants icon

45x Suit Variants

Provides functionality to register suits and register variants of those suits, as well as a hotkey to cycle through them.

By 45x_Dev
Last updated 3 weeks ago
Total downloads 30922
Total rating 1 
Categories Mods Libraries BepInEx Suits
Dependency string 45x_Dev-45x_Suit_Variants-2.0.0
Dependants 21 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
Rune580-LethalCompany_InputUtils-0.7.4 icon
Rune580-LethalCompany_InputUtils

API/Library for creating Unity InputActions with in-game re-binding support. Provides an alternative UI that allows for supporting mods to have in-game re-bindable keybinds.

Preferred version: 0.7.4
BunyaPineTree-ModelReplacementAPI-2.4.4 icon
BunyaPineTree-ModelReplacementAPI

API to simplify model replacement

Preferred version: 2.4.4
xilophor-LethalNetworkAPI-2.1.7 icon
xilophor-LethalNetworkAPI

A library/API to allow developers to easily add networking to their mods.

Preferred version: 2.1.7

README

45x Suit Variants

Thunderstore Version Thunderstore Downloads
This library extends the functionality of the suit rack and ModelReplacementAPI by allowing suits to be registered as variants of another suit.
This provides the benefit of being able to group suits together and also clean up the suit rack so you no longer end up with dozens of different suits to pick through.
This is a library and only provides a changeable hotkey to switch through suit variants. For Examples of mods using this library, see 45x Anime Models and 45x OC Models

Features

  • Helper functions to register parent suits, suit variants and both at the same time
  • Configurable Keybind through the use of LethalCompany InputUtils
  • Synced variant switching through the use of LethalNetworkAPI
  • Syncing Model Replacements on game join (This should also work for suits not added using this library)

Instructions

  • Place contents in bepinex/plugins folder. Ensure that ModelReplacementAPI, More Suits, LethalCompany InputUtils and LethalNetworkAPI are also installed.
  • Rather than using the ModelReplacementAPI's call to register a model replacement directly, developers should register a suit by using the AddSuit function: FFXSuitVariants.AddSuit(Suit Name, Parent Suit Name, Type of Suit Class);
  • So for a Suit named 'Octavia' (As found in my other mod 45x OC Models) you would use the following lines of code to add multiple variants:
// Always register the base suit first, this should be the suit you want to appear on the suit rack (YOU WILL STILL NEED A MORESUITS PNG FILE)
FFXSuitVariants.AddSuit("Octavia", "Octavia", typeof(OctaviaModel); 

// Register any suit variants after the base suit, these won't appear on the suit rack (DO NOT INCLUDE A MORESUITS PNG FILE FOR THESE)
FFXSuitVariants.AddSuit("Octavia [Smart]", "Octavia", typeof(OctaviaSmartModel) 
  • Alternatively, there is a method to add the main suit and variants all at once:
FFXSuitVariants.AddSuitAndVariants(
    new Suit("Octavia", typeof(OctaviaModel)),                  // Include a moresuits PNG file for this so that it shows on the suit rack since it is the default suit
    new Suit("Octavia [Smart]", typeof(OctaviaSmartModel)),     // Do not include a moresuits PNG file for this since it is accessible through the cycle button after switching to the default suit
    new Suit("Octavia [Fighter]", typeof(OctaviaFighterModel))  // Do not include a moresuits PNG file for this since it is accessible through the cycle button after switching to the default suit
);
  • The default keybind for cycling through suit variants is 'T', this can be configured thanks to LethalCompany InputUtils
  • It is recommended to become familiar with the documentation for ModelReplacementAPI as well, since this will walk you through loading Assets and the basic structure for creating a model replacement mod.

Changelog

Changelog available in the Changelog Tab