Lethal Company
You are viewing a potentially older version of this package. View Latest Version
Install

Details

Date Uploaded
7 hours ago
Downloads
19
Size
23KB
Dependency string
azumi-UtilitySlotEditor-1.0.2

UtilitySlotEditor

This mod provides functionality for editing the UI of the Utility Slot, a special inventory slot in Lethal Company.

It allows the Utility Slot to be repositioned and its frame size to be adjusted. It also provides additional options for controlling the display and functionality of the Utility Slot, including hiding the key text and disabling the Utility Slot locally.

Features

The Utility Slot editing system and its functionality are designed based on the vanilla game's behavior and UI structure. The details are as follows.

The Utility Slot's customized position is saved to the configuration file and automatically restored when the game is launched.

Utility Slot Position Editing

The Utility Slot can be positioned freely using the mouse while Edit Mode is active.

  • Using Cursor Drag:

The Utility Slot can be positioned directly with the cursor.

  1. Press the configured Edit Key (F8 by default) to enable Edit Mode.
  2. The mouse cursor will become visible and unlocked.
  3. A green overlay will be displayed over the Utility Slot.
  4. Move the cursor over the Utility Slot.
  5. Hold the left mouse button and drag the Utility Slot to the desired position.
  6. Release the left mouse button to commit and save the new position.
  7. Press the Edit Key again to exit Edit Mode.

The Utility Slot can be placed freely within the supported position range.

While dragging, the edit overlay changes to a darker green to indicate that the Utility Slot is currently being moved.

  • Using CursorToggle mod:

If you prefer not to use the built-in cursor-based dragging controls, you can use the external mod CursorToggle by azumi to move and position utility slots directly.

Position Configuration

The Utility Slot position can also be specified directly through the configuration file.

The following settings determine the Utility Slot's anchored position:

  • Position X:
  • Position Y:

The values correspond to the Utility Slot's anchored X/Y coordinates.

This method can be used when an exact position is preferred over cursor-based positioning.

After changing the position values in the configuration, the saved position is applied to the Utility Slot when the HUD is initialized. The position can therefore be configured manually without using Edit Mode.

Position Initialization

The Utility Slot position uses the Position Initialized configuration value to determine whether an initial position has already been saved.

When the mod is attached to the HUD for the first time, it checks this value.

If Position Initialized is false:

  1. The current vanilla Utility Slot position is detected.
  2. The detected vanilla position is stored as Position X and Position Y.
  3. Position Initialized is changed to true.
  4. The configuration is saved.

This allows the vanilla Utility Slot position to be used as the initial reference position without requiring the user to manually enter coordinates.

If Position Initialized is already true, the saved Position X and Position Y values are used instead of detecting and overwriting the vanilla position.

Therefore, the normal initialization flow is.

  1. First Launch.
  2. Detect Vanilla Utility Slot Position.
  3. Save Position X / Position Y.
  4. Position Initialized = true.
  5. Apply Saved Position.

After the initial position has been established, the saved position is retained across game launches.

Position Synchronization

The Utility Slot UI and the saved configuration position are synchronized when Edit Mode is not active.

When the saved configuration position differs from the current UI position, the configured position is applied to the Utility Slot.

When a position is changed through cursor dragging, the new position is committed to the configuration immediately.

When Edit Mode is ended, the current Utility Slot position is also saved to the configuration.

This allows both cursor-based positioning and direct configuration-based positioning to be used without requiring a separate save operation.

Reset to Vanilla Position

The Utility Slot can be returned to the position detected from the vanilla game.

  1. Press the Edit Key (F8 by default) to enable Edit Mode.
  2. Press the Reset Key (F9 by default).
  3. The Utility Slot is moved to its original vanilla position.
  4. The vanilla position is saved to the configuration.

The reset operation can only be performed while Edit Mode is active.

The vanilla position is the position captured when the Utility Slot is initialized and is retained independently of subsequent custom positioning.

Recommended Position Editing Methods

There are two primary methods for positioning the Utility Slot.

  • Cursor-Based Positioning:

Use Edit Mode when the desired position is easier to determine visually.

  1. Press the Edit Key.
  2. Enable Edit Mode.
  3. Drag Utility Slot with Cursor.
  4. Release Left Mouse Button.
  5. Position Saved.
  6. Press the Edit Key.
  7. Disable Edit Mode.

This method is recommended when positioning the Utility Slot relative to other HUD elements.

  • Coordinate-Based Positioning:

Use Position X and Position Y when an exact numerical position is preferred.

  1. Edit Config of UtilitySoltEditer.
  2. Set Position X / Position Y.
  3. Launch / Initialize HUD.
  4. Configured Position Applied.

This method is useful when a specific coordinate is already known or when the same position needs to be reproduced consistently.

Utility Slot Frame Size

The Utility Slot frame can be resized independently of its position.

The frame size is controlled by the Utility Frame Size configuration value:

  • 0 = Vanilla Utility Slot frame size.
  • 1 = Vanilla Inventory Slot frame size.
  • Values between 0 and 1 = Intermediate frame size.

The maximum frame size is calculated based on the vanilla inventory frame size.

When the frame size is changed, the mod also adjusts the Utility Slot's child UI elements proportionally. This includes child RectTransform sizes and positions, text size, and the pixel-per-unit multiplier of sliced UI images.

This is intended to preserve the relative appearance of the Utility Slot while its frame size is changed.

Utility Slot Key Text

The key text displayed on the Utility Slot can be shown or hidden.

The Show Utility Slot Key Text configuration controls this behavior:

  • True = Display the Utility Slot key text.
  • False = Hide the Utility Slot key text.

This option only changes the visibility of the UI element and does not alter the underlying Utility Slot functionality.

Disable Utility Slot

The Utility Slot can be disabled locally through the Disable Utility Slot configuration.

When enabled:

  • The Utility Slot UI is hidden.
  • The Utility Slot's use action is blocked.
  • An item currently held in the Utility Slot is dropped when the setting is applied.

The Utility Slot is disabled locally without removing or modifying its underlying object hierarchy.

When the option is disabled again, the Utility Slot UI is restored.

Edit Mode Visual Indicator

While Edit Mode is active, a semi-transparent green overlay is displayed over the Utility Slot.

The overlay changes to a darker green while the Utility Slot is being dragged.

This provides a visual indication of the current editing state and whether the Utility Slot is currently being moved.

Config

You can change the settings in the config file. Edit the config if desired. We recommend editing the file using LethalConfig by AinaVT.

Controls

You can optionally set the assignments for the following keys in the config.

Setting Default
Edit Key F8
Reset Key F9

Position

You can configure coordinate-related settings as desired using the following items in the Config.

Setting Default Consideration
Position X 0 Min: -430.0 / Max: 430.0
Position Y 0 Min: -237.0 / Max: 237.0
Position Initialized False Automatically managed.
  • If you wish to place Utility Slots evenly alongside the standard Inventory Slots, set the Utility Frame Size to 1 and use the coordinates below.

left side: Position X = -205.5 / Position Y = -177.5 Right side: Position X = 205.5 / Position Y = -177.5

General

You can optionally configure the following items in the config.

Setting Default Consideration
Utility Frame Size 0 Change the frame size of the Utility Slot. Min: 0 / Max: 1
Show Utility Slot Key Text True Show or hide the key text.
Disable Utility Slot False Enable or disable the Utility Slot.

Installation

In addition to installing and managing mods through the Thunder Store, if you wish to install this mod directly via the mod manager linked to the Thunder Store, please follow the steps below.

  1. Access the profile in the Thunder Store's local files.

    Thunderstore Mod Manager/DataFolder/LethalCompany/profiles/(Optional profiles)
    
  2. Place UtilitySlotEditor.dll in the BepInEx directory.

    BepInEx/plugins/azumi-UtilitySlotEditor/UtilitySlotEditor.dll
    
  3. In the Thunder Store, click Modded on the relevant profile to launch the game.

Notes

  • The mod relies on internal game objects and methods accessed through Harmony patches and existing game components. Future game updates may change these structures, which could cause some features to become inaccurate or stop working until the mod is updated.
  • The behavior of this mod is based on the current implementation of Lethal Company's Utility Slot and HUD systems. Changes to the game's UI or inventory implementation may affect compatibility.
  • Utility Slot customization saved in the configuration is only applied while this mod is enabled. If the mod is disabled after customization has been saved, the Utility Slot will return to its vanilla state.
  • This mod does not add the Utility Slot itself, nor does it provide functionality to duplicate the Utility Slot or use multiple Utility Slots simultaneously.
  • This mod cannot provide or edit the Utility Slot on game versions released before the Utility Slot was introduced.
  • This mod has not been tested on versions prior to v81.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.