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
Date uploaded | 5 months ago |
Version | 2.0.2 |
Download link | 45x_Dev-45x_Suit_Variants-2.0.2.zip |
Downloads | 11832 |
Dependency string | 45x_Dev-45x_Suit_Variants-2.0.2 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100Rune580-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.7xilophor-LethalNetworkAPI
A library/API to allow developers to easily add networking to their mods.
Preferred version: 3.1.1README
45x Suit Variants
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:
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);
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.AddSuit("My First Suit", "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.AddSuit("My First Suit [V2]", "My First Suit", typeof(MyFirstSuitVTwoModel);
Alternatively, there is a method to add the main suit and variants all at once:
FFXSuitVariants.AddSuitAndVariants(
new Suit("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
new 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
new 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
CHANGELOG
Changelog
Latest - 3.0.4
- Fixed error
Previous Updates
Show / Hide
Latest - 3.0.3
- Fixed issue causing the host to received model replacements instead of the correct players
3.0.2
- Update preferred dependency versions
3.0.1
- Add API methods to get suit name and variant name
3.0.0
- Total Rewrite of the mod
- Now works properly with LethalNetworkAPI 3.0.0
2.0.2
- Removed broken HUD display
- Updated dependencies
- Re-arranged code
2.0.1
- Add hotkey and current variant display to HUD (Bottom Left below text chat, only shows when you can switch suit variants)
- Changed Keyboard and Controller bindings to fix a startup error (Controller hotkey is now Y on Xbox and Triangle on Playstation by default)
- Fixed errors from trying to sync suits before in a lobby or when playing in singleplayer lobbies
- Updated Lethal Company Input Utils version
- Updated readme
- Added !less-suits.txt to hide the extra suits that come with MoreSuits by default
2.0.0
- Re-arranged code so that patches are now grouped by the class they patch (I.e All PlayerControllerB patches are in the same file)
- Removed unused field
IsVariant
from theSuit
class - Sync model replacements between clients on game join
- Code Cleanup
- Updated Dependencies
- Updated mod icon
1.2.4
- Code cleanup
- Add helper method
AddSuitAndVariants
- Add function documentation where relevant
1.2.3
- Temporarily disable suit variant popup due to bug
1.2.2
- Fix README
1.2.1
- Improve formatting of suit variant names and keybinds when showing popup
1.2.0
- Added message on suit change to show suit variants and the keybind to change them if a suit has available variants
1.1.1
- Prevent suit variant changing under the following circumstances: Typing in chat, Using the terminal, in an animation with an enemy, not on the ship
- Play suit change sound when changing suit variant
1.1.0
- Added sync functionality between clients
1.0.1
- Fixed nullpointer exception breaking functionality
1.0.0
- Initial Release