Barotrauma

Barotrauma

2,058 ratings
Performance Fix
19
9
4
8
8
7
13
3
4
2
6
3
5
5
4
3
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
27.017 KB
Dec 30, 2021 @ 1:28pm
Jan 22 @ 8:39am
27 Change Notes ( view )

Subscribe to download
Performance Fix

Description
This mod will work in any vanilla or modded server that you join, regardless the server having the mod on or off

What is this

This is a very experimental Lua mod, so expect that things may break.

This is mod can greatly improve performance, it works by decreasing the amount of map entity updates, which can greatly improve performance. In my computer, i noticed that my fps nearly doubled after decreasing the updates by 4 times.

This has the potential side effect of making some items act weird, i made an item update priority system to try combat this, so important items update normally, if you have issues with some items acting weird, you can try putting the item's id in the priority list.

This mod also has a config that disables shadow casting lights globally, so if your computer struggles with lightning, try enabling that config.

How to install

Notice: If you only want to boost server-side performance, you don't have to install client-side Lua, and only requires LuaForBarotrauma to be installed on the server.

If you have client-side LuaForBarotrauma installed and wants to update it, press the "Remove client-side Lua" button in the main menu and then do the installation process again.

Windows installation:
This installation is for both multiplayer and singleplayer!

  • Subscribe to Lua For Barotrauma
  • In the setting menu enable LuaForBarotrauma.
  • Select the ServerExecutable to be equal to the LuaForBarotrauma executable
  • Host in-game server
  • While hosting, open the console window (most commonly 'F3')
  • Type in or copy, then execute the console command:
    install_cl_lua
  • Restart the game

Video if you are not able to understand the instructions above: https://youtu.be/wEeJ70vH1TM

Warning: everytime you verify the integrity of the game files or a new update is released, you will need to do the process again.


Linux/Mac installation:
You will have to manually install LuaForBarotrauma, you can follow this guide[evilfactory.github.io],
warning: mac version isn't tested, so it can be unstable.

If something breaks, just verify the integrity of the game files to undo the process.

Submarine builders: You can tag a button component with "performancefix" and that will make it output the map entity update interval continuously. You can also tag components with "highpriority" which will automatically put them in the priority list.


Configuration

To configure the mod, simply use the console command performancefix to open a GUI menu.
To use the command while in the mainmenu, type cl_reloadlua before using the command

reloadlua - Use this command to reload the script in the server-side, it will reload the script, applying the new configuration.

showperf - Useful command to see what is causing performance issues.


Results
(note: these tests been done a few years ago and haven't been updated, so they are probably inaccurate)
I tested the mod in a few servers and submarines that i know that lag a lot:

My specs for comparison: Ryzen 3200g, AMD Vega 8 gpu, 16gb ram 2667mhz

- ECS Argonaut: with 19 players on: 20-25 fps => 40-55 fps, with map entity divider equal to 4

- Vengeance Mk III: local server with me only: 13-16 fps => 38-43 fps, with map entity update divider equal to 4 and shadow casting lights disabled

- The Red Planet: local server with me only: 17-25 fps => 43-60 fps, with map entity update divider equal to 8

- SMS Olympus: local server with me only: 10-14 fps => 28-34 fps, with map entity update divider equal to 2

- SMS Olympus: local server with me only: 10-14 fps => 40-47 fps, with map entity update divider equal to 4

- SNN Cruiser: with 17 players on: 8-12 fps => 25-33 fps, with map entity divider equal to 8

- Juna: local server with map entity divider equal to 4:
Client-side: 15-19 fps => 41-47 fps
Server-side: CPU usage dropped from 24% to 8-12%


I plan on adding more performance options in case i find more ways to optimize the game.

Popular Discussions View All (6)
41
Mar 22 @ 6:40pm
List of items that can act weird
Evil Factory
16
Dec 23, 2024 @ 12:42am
Suggestions & Feedback
アンジェル
2
Jul 4, 2024 @ 3:55am
Any tips for optimizing my settings as the host of a server with mods?
Penguito
727 Comments
JarasonPC May 29 @ 8:16am 
Hello, I have a dedicated server and sometimes we get crazy rubberbanding in big cities, we have this performance fix on the client and also on the server. Is there something to do to fix it or are we doing something wrong? Thanks for an answer in advance.
Bravo May 19 @ 9:16am 
yup sometimes you just rubberband when it gets moderately intensive
great.vladi May 15 @ 8:22am 
update, persons teleporting while walking
numanuma-hei.ei May 11 @ 5:36pm 
I tried this in patch 1.8.8.1 and I can say gladly that this stuff makes wonders! I had medium-sized modded game and it was stuttery as hell, but with this mod it has become more stabilized.:steamthumbsup:
Mrpugglez May 11 @ 11:54am 
nvm i have the hide components and wire checked which made them disappear but tbh those shouldnt be disabled if you check those as they are really important
Mrpugglez May 11 @ 11:51am 
for me the mod is completely removing alien terminal in ruins and just wont let me use anything in their without breaking everything
No way, José?! May 4 @ 9:19am 
how do i make this mod not make everything look like its in slow-mo, cuz me and other players look like theyre teleporting/ are faster than normal
Budyń ⛟ Apr 27 @ 1:52pm 
This modificantion to the game changed my life :praisesun:
LykosNychi Apr 26 @ 6:33pm 
How is this supposed to work? The mod is shown as outdated and hosting a server with it immediately fails, so i can't install it.
Evil Factory  [author] Apr 21 @ 3:36pm 
theres no global settings, all performance settings either affect only you or only the server, if you don't need perf fix as server host, then you don't need it, the mod can run client-side without the server ever needing it