You are viewing a potentially older version of this package. View all versions.
Command293-LocalFlashlight-1.3.0 icon

LocalFlashlight

Adds a light to the local player which can be configurated

Date uploaded a month ago
Version 1.3.0
Download link Command293-LocalFlashlight-1.3.0.zip
Downloads 3421
Dependency string Command293-LocalFlashlight-1.3.0

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

README

LocalFlashlight

A LC mod which adds a flashlight that has a recharging battery, with visual indicators, custom colors, and multiple recharge options.

Mod capabilities

The mod adds a flashlight that uses a battery system which recharges when not in use. It also adds an indicator that has multiple styles, and custom colors for both the HUD and light. Some values for the light and battery are also configurable.

Installation and configuration

The mod can be installed through either Thunderstore Mod Manager or r2modman, or it can be installed manually by installing BepInEx for the game, downloading the mod manually (either from the Thunderstore page of the mod or the release on GitHub), then extracting the zip file inside the BepInEx/plugins folder after starting the game once with BepInEx installed.

Configuration of the mod can be done after starting up the game with the mod enabled through the Config editor (Thunderstore Mod Manager or r2modman) or by opening the command.localFlashlight.cfg file made by the mod in the in BepInEx/config. Alternatively, you could use LethalConfig if you want to change some config values while in-game.

Mod configs

-Intensity, range and spot angle of the light can be configured

-The battery's max time and recharge multiplier can also be configured

-The HUD has six different styles (Low battery warning, Bar, Percentage, Circular Bar, Vertical Bar, All)

-Custom colors can be set for the light and HUD

-The light's shadows can be enabled or disabled

-Option to prioritize in-game flashlights before the local flashlight

-Multiple recharge options for the flashlight, each with their own upsides and downsides

Indicator config styles

-Bar

bar style

-Percentage

percent style

-Circular bar

circular style

-Vertical bar

vertical style

-Full info

full style

-Low battery warning (can be disabled in config)

low battery warning

[!NOTE] The mod's keybinds are now in Settings -> Change keybinds, as I've added LCInputUtils as a dependency to make setting custom keybinds easier.

[!IMPORTANT] This mod is CLIENT-SIDED, so everyone who wants to use these features must have the mod installed. This also means that other players will not be able to see your light, nor you will be able to see other players' lights if they use the mod (hence the mod being called LocalFlashlight).

If you found a bug, then feel free to open a new issue on the Github page to report it.

CHANGELOG

V1.3.1

  • Added flashlight dimming (with config to set when the light should stop dimming)
  • Added flashlight flickering when the battery runs out or when ghost girl changes behavior state and flickers every other light (default is set to true)
  • (hopefully) Fixed some bugs related to the "Prioritize flashlights in player inventory" config
  • Changed the way the mod's assetbundle is loaded to prevent using up memory while loading it
  • Added 5 frames of leniency before the mod sends an error message if it has errors while trying to find the local player controller

V1.3

  • Added config option for various battery recharge methods, each with their upsides and downsides (and some with configs).
  • Added full recharge sounds to the flashlight when using the time recharge config
  • Added config option for sounds to be heard by enemies (default is set to true)
  • Cleaned up code for optimization
  • Made most logs debug logs to avoid log spam
  • Made it so the error caused by the mod not finding the local player only gets sent once instead of every time per frame
  • The HUD no longer shows up if the light doesn't work
  • Made InGameFlashlight the default sound option for the mod to use
  • Made configs look cleaner (at least when looking at them with LethalConfig)
  • Changed some names for the sound options
  • Added keybind to change light position from left to right, and vice versa to prevent the light from being covered by any items currently held (default key: H)
  • Added keybind to recharge the flashlight (used for Shake and Dynamo recharge methods) (default key: Q)

V1.2.21

  • Fixed light not turning on anymore (with the "Prioritize in-game flashlights" config set to true) if the player dies until they pick up and drop another flashlight
  • Changed some position and rotation values of the light

V1.2.2

  • Added config option to prioritize flashlights in the player's inventory until their battery is depleted
  • Added a third sound option (InGameFlashlight)
  • Added more logs
  • Changed some config descriptions to be more clear about what they do (i recommend deleting the config file as it might cause some issues if the new configs overlap the old ones)

V1.2.1

  • Added LCInputUtils as dependency for easier keybind configuration
  • Added sound options (currently only two of them, Default and ActualFlashlight)
  • Updated README file to add installation and configuration, and a small note about the new keybind configurations

V1.2

  • Added separate config options for light color and HUD color
  • Some settings can now be changed without having to rejoin a lobby (specifically the ones that aren't important, like colors or intensity)
  • Added configs for indicator position on the screen (IndicatorPositionX and IndicatorPositionY)
  • Added config for battery text options (Percentage, AccuratePercentage, Time, All)
  • Added an experimental config to enable light shadows
  • Fixed indicator not fading in when using the flashlight at abnormally high battery times
  • Fixed bugs related to player death not turning off the flashlight, which resulted in battery loss when dead
  • More overall code changes
  • Added more logs in case something goes wrong
  • Updated README

V1.1

  • Made changes to the code so set configs can apply when entering a lobby
  • Added two HUD styles (CircularBar, VerticalBar)
  • Added some debug logs (LightController made, light toggle)
  • Fixed flashlight toggling when pressing the toggle key in the pause menu
  • Added battery regen cooldown config
  • Volume now updates immediately after config change