Lethal Company
This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Install

Details

Last Updated
First Uploaded
Downloads
84K
Likes
2
Size
50KB
Dependency string
45x_Dev-45x_Suit_Variants-3.0.4
Dependants

45x Suit Variants Thunderstore Version

This library allows you to register a group of suits using the ModelReplacementAPI and cycle through them using a configurable hotkey.
In order for a set of suits to be accessible at least one of the suits in a group will need a MoreSuits PNG file (See Instructions below).
For Examples of mods using this library, see below:
Thunderstore Version Thunderstore Version

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 RegisterSuit function: SuitVariantsAPI.RegisterSuit(Suit Name, Type of Suit Class, Parent Suit Name);
Example:

// 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.RegisterSuit("My First Suit", typeof(MyFirstSuitModel));

// 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.RegisterSuit("My First Suit [V2]", typeof(MyFirstSuitVTwoModel), "My First Suit");

Alternatively, there is a method to add the main suit and variants all at once:

SuitVariantsAPI.RegisterSuits<string, Type>(
    ("My First Suit", typeof(MyFirstSuitModel)),             // Include a moresuits PNG file for this so that it shows on the suit rack since it is the default suit
    ("My First Suit [V2]", typeof(MyFirstSuitVTwoModel)),    // Do not include a moresuits PNG file for this since it is accessible through the cycle button after switching to the default suit
    ("My First Suit [Alt]", typeof(MyFirstSuitAltModel))     // 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

Thunderstore development is made possible with ads. Please consider making an exception to your adblock.