- Home-
- Lethal Company-
- Mods for Lethal Company-
- ReservedItemSlotCore core

ReservedItemSlotCore core
About This Mod
ReservedItemSlotCore
V64 compatible!
The main mod for all ReservedItemSlot mods.
This mod is required for my ReservedItemSlot mods, such as ReservedFlashlightSlot and ReservedWalkieSlot.
These mods will give you free dedicated slots in inventory for the respective items. These slots will appear on the right side of the screen, folding vertically.
You will not be able to switch to these slots manually by scrolling the screen. Instead, to switch to these items, hold down Alt (the default hotkey) and scroll up and down to switch between them.
So you can switch to these items to throw them, as well as perform other activities such as charging, storage, etc.
The capture of the reserved items, as well as the switch between the main hotbar and the reserved hotbar slots, must be synchronized between customers using this mod.
If appropriate, these mods will have special key bindings to activate items without having to select them now.
All customers using this main mode will synchronize with the host and have the same reserved item slots regardless of which of the reserved item slots mods they have installed.
Using reserved slots for host items for mods you don't have should not be a problem, but you won't be able to take advantage of additional fashion features, such as special hotkeys for reserved items, and won't see these reserved items with players until they're at the moment.
This may change or be adjusted in the future, but this is currently done in order to try to keep the same inventory size for everyone to help with synchronization.
It can also help in sending reserved slots for items to other clients from the host, if I add functionality to create them in config, or if I create a ReservedCustomItemSlot mod that will be a server-side mod.
~Using this mode while the host does not have this mode has been allowed, but expect errors and out-of-sync issues. Use with caution!
This mod will again be disabled for non-host clients if the host does not have this mod for various reasons.
For those who are stubborn enough, it can be forcibly allowed in config. You've been warned!
Buying reserved item slots (new in 2.0.0)
Reserved slots for items can be purchased at the terminal. At the moment, buying reserved slots will unlock the slot for each player. There is currently no way to set his unlock for each player.
You can enter "reserved" in the terminal to see tips on how to purchase reserved item slots.
For Reserved Item Slot mods that support this feature, prices can be configured in config. All reserved slots items I made have these configs.
Purchased slots items will be saved in saving your game. Quitting the game and reloading the save must reload all previously unlocked item slots. Unlocked slots will be reset when you start a new game.
Purchasing of slots items can be disabled in config.
Custom
Each of the following configurations must be supported by each Reserved Item Slot mode.
Adds support that allows Reserved Item Slot mods to set the price of the item slot in config.
Adds support to allow Reserved Item Slot mods to configure the item slot priority in config.
The higher the priority, the lower the order they will be on the right side of the screen.
Negative priority will cause item slots to be displayed on the right side of the screen if it is not disabled in config.
Adds support for adding additional items to reserved slots in config.
Adds support for removing existing items from reserved slots in config.
Supports InputUtils
All required hotkeys for this mode can be controlled in the in-game shortcut menu.
InputUtils is not a dependency, but is recommended!
API support (examples below)
Adds API functions that allow developers to easily create their own Reserved Item Slot mods or add their own items to existing Reserved Item Slots.
When creating a ReservedItemData for a specific item, developers can specify the target bone to which the item will be attached to the player (and the enemy in the mask), as well as specify position/rotation offset.
My ReservedItemSlot Fashions
ReservedFlashlightSlot
ReservedWalkieSlot
ReservedWeaponSlot
ReservedUtilitySlot
ReservedSprayPaintSlot
Other Reserved Item Slot mods can exist on Thunderstore!
Mode Compatibility
HotbarPlus is compatible!
LethalThings Utility Belt is (or should be) compatible! (i hope it stays that way.)
This mod may not work well with Advanced Company. Use at your own risk!
Other mods that add hotbar slots are not guaranteed to work.
Other mods that can change the layout of hotbar (HUD) slots do not guarantee good work with these mods, but can technically work.
If you've read it to this point and you like my fashion.
Please support me here!
This is not necessary, but I would appreciate it! =)
API Samples
First, make sure you add the latest version of ReservedItemSlotCore.dll to your VS project references.
NOTE
Adding items that do not exist (either by mistake or from an unloaded mod) to ReservedItemSlotData will not break anything.
Adding an item to an existing ReservedItemSlotData that was created from an unloaded mod will not break anything.
Add your fashion items to an existing reserved items slot
This class will be used to add items from your mod to existing reserved items slots that have been created by another mod, and if ReservedItemSlotCore is enabled.
Create a class like this in a separate file.
using ReservedItemSlotCore.Data;
public static class ReservedItemSlotsCompat
{
public static void AddItemsToReservedItemSlots()
{
// Name of your item as it is displayed in the game
ReservedItemData myReservedItemData = new ReservedItemData(«ItemDisplayName»);
// It's okay if the mod that created this slot for the item is not enabled on the client. Nothing will break
ReservedItemSlotData.TryAddItemDataToReservedItemSlot(myReservedItemData, «nameOfItemSlot»);
}
}
Or to make your item visible when wearing a holster:
Using ReservedItemSlotCore.Data
public static class ReservedItemSlotsCompat
{
public static void AddItemsToReservedItemSlots()
{
// Arguments: ItemDisplayName, ParentBone(enum), PositionOffset, RotationOffset
ReservedItemData myReservedItemData = new ReservedItemData(«ItemDisplayName», PlayerBone.Spine3, new Vector3(0.2f, 0.25f, 0), new Vector3(90, 0, 0));
// It's okay if the mod that created this slot for the item is not enabled on the client. Nothing will break
ReservedItemSlotData.TryAddItemDataToReservedItemSlot(myReservedItemData, «nameOfItemSlot»);
}
}
And in the Awake (or Start) method in the Plugin class, add this: (preferably after binding the configs)
If your mod doesn't depend on ReservedItemSlotCore, but only optionally adds your items to Reserved Item Slots, if they exist, then checking whether this mod is enabled is very important!
if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey(«FlipMods.ReservedItemSlotCore»))
ReservedItemSlotsCompat.AddItemsToReservedItemSlots(); // This will be a call to your function
Last but not least, add this SoftDependency header above your plugin class definition
If your mod depends on ReservedItemSlotCore, you can change BepInDependency.DependencyFlags.SoftDependency to BepInDependency.DependencyFlags.HardDependency.
[BepInDependency("FlipMods.ReservedItemSlotCore", BepInDependency.DependencyFlags.SoftDependency)] // Add this line
[BepInPlugin("EXAMPLE_MOD_GUID", "EXAMPLE_MOD_NAME", "1.0.0")] // YOU SHOULD HAVE THIS STRING UNDER THE DEFINITION OF YOUR PLUGIN CLASS.
public class Plugin : BaseUnityPlugin
{
...
}
Create Your Own ReservedItemSlot
An example of creating your own ReservedItemSlotData and adding your fashion items (or existing items in the game) to a slot items.
Include this code in the Awake (or Start) method of your Plugin class. You do not need to create a separate file or class to add this code.
using ReservedItemSlotCore.Data;
// MAKE SURE YOU PUT THIS HEADER OVER THE PLUGIN CLASS
[BepInDependency(«FlipMods.ReservedItemSlotCore», BepInDependency.DependencyFlags.HardDependency)]
[BepInPlugin("EXAMPLE_MOD_GUID", "EXAMPLE_MOD_NAME", "1.0.0")] // YOU SHOULD HAVE THIS STRING AFTER DEFINING YOUR PLUGIN CLASS.
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
// Your existing code...
// This will register your ReservedItemSlotData and will be added to the game if the host is running mod.
// Arguments: ItemSlotName (format not too important), ItemSlotPriority, ItemSlotPrice
ReservedItemSlotData myReservedItemSlot = ReservedItemSlotData.CreateReservedItemSlotData(«my_item_slot_name», 20, 100);
// Create ReservedItemData data for your item
// You can also add extra arguments to allow this item to appear on players when it is in the holster. (see previous example)
ReservedItemData myReservedItemData = new ReservedItemData(«ItemDisplayName»);
// Add ReservedItemData to your ReservedItemSlotData, and you're done!
myReservedItemSlot.AddItemToReservedItemSlot(myReservedItemData);
}
}
Other API Functions
Here are a few examples of how you can receive and manage reserved player items.
PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController;
for (int i = 0; i < SessionManager.numReservedItemSlotsUnlocked; i++)
{
ReservedItemSlotData itemSlotData = SessionManager.GetUnlockedReservedItemSlot(i);
if (itemSlotData != null)
{
// Gets the index of this item slot in the player's inventory
int indexInPlayerInventory = itemSlotData.GetIndexInInventory(localPlayerController); // any gamer controller can be transferred
// Gets the object that is currently held in this slot by the specified player or returns null
GrabbableObject heldObjectInSlot = itemSlotData.GetHeldObjectInSlot(localPlayerController);
// Receives the item slot frame (image component in HUD) for this item slot. Applies to local player only
Image itemSlotFrameHUD = itemSlotData.GetItemSlotFrameHUD();
// To check if a reserved item slot will accept a certain item (item name as it looks in the game)
// You can also pass the link to GrabbableObject
if (itemSlotData.ContainsItem(«Flashlight»))
Plugin.Log("This slot contains a flashlight");
}
}
If you're creating your own ReservedItemSlotData, don't forget to also include this line in your manifest.json dependency list.
«FlipMods-ReservedItemSlotCore-2.0.7»
If you want to see more examples, feel free to take a look at my existing ReservedItemSlot fashion on github!
If you think I missed something, or faced any problems, please let me know! I'm quite active in the Lethal Company modding discod, so find me!
You can also leave a report of any problems on github for this fashion!
Similar Mods/Addons
Gubkinsky boots1.0.1Mods for Lethal CompanyLethal Company
This mod is designed to improve many steps in Lethal Company with Spongebob SquarePants footstep FX....000
BoomboxVolume control1.0.1Mods for Lethal CompanyLethal Company
Adjusting the boombox volumeA mode that allows you to adjust the volume of the boombox, especially u...000
Shungite1.0.1Mods for Lethal CompanyLethal Company
Replace the SFX in the "Bug Bug" with various clips of the Shungit.000
Fricken costumes1.0.2Mods for Lethal CompanyLethal Company
more costumes and crapupdatedrenewed again, you want to test god?000
Dynamic range of the scanner1.0.0Mods for Lethal CompanyLethal Company
Dynamic scanning range.Each node being scanned can have its own scanning range.Modificationsv1.0.0Ad...000
MetalGearMenu mod1.0.0Mods for Lethal CompanyLethal Company
Replace the music from the menu with the music from the MGS1 menu. Recommended by Misophonics)000
SaiCosmetics1.1.0Mods for Lethal CompanyLethal Company
Sai Cosmetics.More company plugins to add cosmetics. Updated regularly.Update/Publish.Faith. 1.0.0 A...000
Freddy's Golden Suit1.0.0Mods for Lethal CompanyLethal Company
Thanks to Festive_Arms for organizing Freddie's original costume.My eyes lit up and I became Freddie...000
Fire escapes1.0.1Mods for Lethal CompanyLethal Company
Staircase for emergency exitsInstall a ladder near most emergency exits. They can replace sliding la...000
BearVids mod0.0.7Mods for Lethal CompanyLethal Company
#BearBoyTeam #BearModsAn uninteresting video with a compressed size of about 50 MB.000
Epikalla1.0.0Mods for Lethal CompanyLethal Company
What he's doing.This mod allows you to replace the game's standard sound with your own .wav/.mp3/.og...000
Fatal Weight Loss Fix1.1.1Mods for Lethal CompanyLethal Company
If you've ever been asked by a friend: "How best to do this?", then this fashion is for you!Fixed is...000
Mario 64 Piranha Plant Jester No Stem Version mod1.0.1Mods for Lethal CompanyLethal Company
Mario 64 Piranha Plant Jester (without handle) - PokeTrainerThis version of Mario 64 Piranha Plant d...000
Tun Link0.1.2Mods for Lethal CompanyLethal Company
Toon Link Suit v0.1.2Toon Link SuitUse.Place the content in the bepinex/plugins folder and verify th...000
Kreiszutz.1.0.1Mods for Lethal CompanyLethal Company
Behind you. ...... You ....... (Death by mine).000
FunkyMCMoon mod1.0.0Mods for Lethal CompanyLethal Company
Modified minecraft moonhat.#FeaturesCrazy loot.A lot of bugs.Minecraft.Lots of enemies000
LabMan Suit1.0.0Mods for Lethal CompanyLethal Company
Derpley's costume v1.0.Add a Derply themed costume.000
WereRich1.0.3Mods for Lethal CompanyLethal Company
We're Rich.Maud, who brings the famous Deep Rock Galactic song "We're Rich" to the Company.Just look...000
SavageProdSuits1.1.2Mods for Lethal CompanyLethal Company
Supplementary clothing v1.0.2About extra clothesAdds 8 standard costumes to your wardrobe at the beg...000