You are viewing a potentially older version of this package. View all versions.
Dolphin2Point0-FadingFlashlights-1.0.2 icon

FadingFlashlights

Dims flashlights as the battery gets lower.

Date uploaded 3 months ago
Version 1.0.2
Download link Dolphin2Point0-FadingFlashlights-1.0.2.zip
Downloads 15442
Dependency string Dolphin2Point0-FadingFlashlights-1.0.2

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

README

"light get darker as energy used." - Me, just now

Fading Flashlights

Lethal Company's flashlights are fun, but they are mostly static. Let's fix that.

With this mod, over time your flashlight will dim in brightness. By default, either type of flashlight starts to fade at 50% battery, starting slowly, but dimming faster and faster over time, finally reaching no light at no battery.

This works for the regular and pro flashlights, but might not work with flashlights from other mods.

Config

Fade Start

A number between 0 and 1, representing the percentage of the flashlight used before it starts to fade. For example, a value of 0.5 means that it will start fading at 50%.

Default: 0.5

Fade Final Brightness

A number between 0 and 1, representing the percentage of brightness the flashlight will run out with. For example, a value of 0.5 means that the flashlight will end with a brightness that is 50% of the original.

Default: 0.5

Fade Function Exponent

Any number is acceptable.

I am a math nerd

The above two config options create a linear line, that goes through points (0, FadeFinalBrightness), and ending at (FadeStart, 1).
Then, we put the output of that line at the specified charge value for x^(2^FadeFunctionExponent).

This means that if you put in -1, you take the square root. If you put in -2, you are doing the fourth root. If you put in 1, your square, and if you put in 2, you put it to the power of four. If you put in 0, the brightness will linearly decrease over time.

I am normal

This affects how quickly your flashlight runs out of battery.

If you put in a negative number, it will start staying brighter for longer, but the brightness will decrease faster and faster over time.
If you put in a positive number, it will start decreasing quickly, but the rate will slow down over time.
If you put in zero, the brightness will decrease at the same rate over time.

Default: -1 (square root)

Credits

I wrote all of the code myself, and drew the logo, but that doesn't mean I got no help.

Mommyplier - Help with Programming, Math, and the Logo
Braydon3DS - Emotional Support and distracting me with Ratchet and Clank
TheRealMutt - Not believing that I could create a mod

CHANGELOG

Changelog

v1.0.2

  • revert the calamity I caused in the previous update where batteries would discharge twice as fast and not sync
  • (next time I will properly test code before I push it to here, my bad!)

v1.0.1

  • allow other players to see your flashlight dimming

v1.0.0

  • initial release