File information

Last updated

Original upload

Created by

Remodor

Uploaded by

Remodor

Virus scan

Some manually verified files

Tags for this mod

About this mod

Added a highly customizable energy info overlay. Displays the energy production/consumption per hour for bases, vehicles, and tools. Displays energy spikes.

Requirements
Permissions and credits
Changelogs
Donations
Introduction:
The energy overlay was originally a debugging tool to help create some of my other mods, like the Power Modifier. Eventually, it reached a production-ready state and was added to Vehicles Improved. After many further iterations and additions, it finally has become its own mod.

Description:
First up, everything is configurable in the mod options and/or the config file and therefore optional!
As with all my mods, I highly care for a minimal performance impact. The overlay should cause neglectable performance costs -- less than a frame. This is achieved by a less-optimal precision and update frequency.

Disclaimer: In the base game, energy consumption/ production is implemented very inconsistent/chaotic. Sometimes energy is modified directly, sometimes it is modified every frame, sometimes it is modified in vastly varying intervals (up to every few seconds) which results in annoying energy spikes. Handling every producer/consumer individually would be a tedious endeavor and modded items/sources would not be covered.
Therefore, I decided to go for a different route and just look at the current energy values in fixed intervals. Every sample is used to calculate a delta to the previous sample. To account for all different production/consumption types is difficult. For example, a sample interval of 0.5 seconds and an energy consumption interval of 1 second would result in an alternating display of 0 and X energy consumption. Contrary, very high sample intervals result in a very low update frequency but can correctly show the energy consumption per in-game hour. The result is a middle-ground trying to achieve best intel. Depending on your goal, it can be necessary to adjust the sample interval. Test it yourself, it is still incredibly functional and useful!

Additions:
  • Added a highly customizable energy info overlay which states the current energy consumption/change approximated to an in-game hour (e/h).
  • The overlay can be turned off completely removing any performance impact.
  • Can be separately enabled for base/ Cyclops, vehicles, and tools. The base/ Cyclops has higher priority than held tools when inside.
  • The sample interval can be adjusted: Defines the refresh rate of the energy info. Shorter intervals mean quicker updates but increase fluctuation. Some energy consumers/ producers, like the filtration machine or the thermal plant, draw/ produce energy in intervals. Increasing the sample interval can cover these spikes and calculate an energy consumption per in-game hour (e/h). When consumer and producer spikes overlap (filtration machine + thermal plant), they can interfere and show wrong values. Further increasing the interval can correctly show the e/h. Longer intervals can be set inside the config file.
  • Accounts for energy spikes: Some actions draw energy on a per-use basis, like the prawn suit's jump ability initially consuming 1.2 energy per jump. These spikes can be shown separately without affecting the consumption-per-hour rate (see Cyclops picture showing the e/h together with the 5e energy spike for silent running).
    • Added an adjustable spike threshold: The spike threshold defines what is considered a spike. Greater thresholds can be set inside the config file.
    • Added an adjustable linger duration: Defines how many sample intervals an energy spike is shown (i.e. how long a spike is shown). A value of 0 hides energy spikes. Keep in mind that a new spike with the same value can not be noticed if the linger duration is set too high.
  • Added the ability to show/hide the energy units (see pictures) -- 'e/h' for energy per in-game hour and 'e' for energy spikes.
  • Added the ability to invert the displayed energy: The default energy displays the energy production (positive values: energy produced, negative values: energy consumed). This setting inverts the displayed energy (positive value: energy consumed, negative value: energy produced).
  • Added the ability to enable modification mode to conveniently modify the HUD: Using the arrow keys moves the overlay on the HUD. Using 'left-shift' + 'Up' or 'Down' increases/ decreases the overlay size. Additionally, the overlay can be modified using the config file.

Options:
The options for this mod can be changed either in-game within the options/mod or with the help of the BepInEx/config/Rm_EnergyInfo/config.json file.
I am currently playing with (see picture with small energy info):
{
    "Enable": true,
    "EnableSub": true,
    "EnableVehicle": true,
    "EnableTools": true,
    "SampleInterval": "1",
    "SpikeThreshold": "0.4",
    "SpikeLingerDuration": 1,
    "DrawEnergyUnit": true,
    "InverseEnergyDisplay": false,
    "ModifyHud": false,
    "HudPosition": {
        "X": "130",
        "Y": "530",
        "Z": "0"
    },
    "HudSize": {
        "X": "250",
        "Y": "125"
    },
    "HudFontSize": 25
}

Installation:
This mod requires BepInEx Pack for Subnautica and Nautilus.
Extract the Rm_EnergyInfo archive into your BepInEx/plugins folder:
"Subnautica/BepInEx/plugins/Rm_EnergyInfo/Rm_EnergyInfo.dll"

Compatibility:
This mod should be compatible with all other mods, even if they add new power producers/consumers.


Visit the modding community for help or additional information!

Sourcecode: Github