Skip to content

Repository files navigation

CaptainTerrainHelper

Navigation mod for Barotrauma: draws the shape of the level on top of the steering terminal, so the pilot can see the walls, the ceiling, the floor and what is worth stopping for.

What it does

  • The walls around you, on the steering screen — the terrain near the submarine is drawn as lines over the navigation display, following the sonar zoom of that same terminal.
  • The ceiling and the floor of the level — two lines showing how much room is left above and below.
  • Sonar-blocking objects — the things that make the sonar lie to you are marked with a cross, so you know where the picture stops being trustworthy.
  • Ore near the submarine — mineable ore is marked, so a detour is a decision rather than a discovery.
  • One key turns it all off — for when the screen is busy enough already.

Requirements

  • LuaCsForBarotrauma with C# scripting enabled.
  • Checked on Barotrauma 1.13.4.0. Nothing is claimed about other versions.

Client-side mod. It works in singleplayer and on any server without being installed there, and it does not sync anything over the network. It only adds lines to your own screen: nothing about the world, the sonar or the crew's view changes.

Installation

Download the zip from Releases, unpack the folder into Barotrauma/LocalMods/, then enable CaptainTerrainHelper in the game's content package menu.

LuaCsForBarotrauma has to be installed with C# scripting enabled, or the mod will not load at all.

Settings

All settings are in the game options: the key under Mod Controls Settings, the rest under Mod Gameplay Settings, all in one category named CaptainTerrainHelper. Values are stored by the game, outside the mod folder, so updating the mod keeps them.

SettingDefaultWhat it does
Toggle overlayF9Turns the overlay on and off while you play
Overlay ononWhether the overlay is drawn at all; the key flips this same setting
TerrainonThe walls of the level around the submarine
Level ceiling and flooronTwo lines marking the top and the bottom of the level
Sonar-blocking objectsonLevel objects that disrupt the sonar, drawn as a cross
OreonMineable ore near the submarine, drawn as a diagonal cross
Own submarine markeronA cross in the middle marking your own submarine
Marker size6 pxSize of the object and ore markers
Search range14000How far around the submarine the mod looks for objects and ore. Not the zoom: the overlay follows the sonar
Draw past the screen edge1.5How far outside the sonar circle the overlay still reaches, as a multiple of its radius
Terrain detail10How many rings of level cells are drawn
Refresh interval0.15 sSeconds between two rebuilds of the overlay data

The key does nothing while you are typing — in chat, in the console, or in any other text field. A key bound on a non-Latin keyboard layout cannot be used: the game stores it as no key at all, and the mod says so in the console instead of answering to whatever else it cannot name. Bind on the Latin layout and the same physical key works.

Settings apply immediately; nothing needs a restart.

Movement is smooth between refreshes: the refresh interval only decides how quickly newly appearing ore and objects show up, not how smoothly the picture follows the submarine.

Known limits

  • The five colours of the overlay — terrain, level bounds, objects, ore and the submarine marker — are fixed. The game's settings system has no colour type, and spelling five colours out as channels would take twenty sliders. They live in CSharp/Client/Rendering/OverlayStyle.cs.
  • The overlay is drawn on every steering terminal you open, not only the one on your own submarine.
  • Ore markers cover ore that carries the ore tag. Anything a mod adds differently is not shown.
  • On a terminal that has no sonar there is no zoom to follow, and the overlay falls back to using the search range as its scale. The mod says so in the console once.

License

MIT. Author: HoppinHauler.

About

Client-side mod for Barotrauma: steering HUD overlay with terrain, hazards, and resources

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages