Barotrauma

Barotrauma

3,063 ratings
Lua For Barotrauma
34
25
5
9
16
12
5
5
9
8
3
3
4
4
2
3
3
2
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
160.576 MB
28 Jul, 2021 @ 9:10am
31 Oct @ 9:25am
175 Change Notes ( view )

Subscribe to download
Lua For Barotrauma

Description
Updated for the Hotfix v1.6.19.1 Unto the Breach Update
Consider supporting the project:

This is a Barotrauma modification that adds Lua modding, and optional CSharp modding, this is not a direct replacement for xml, but works great in doing things that weren't possible in xml.




Some Info
Client-side mods run on your game client, whether you're playing singleplayer or joining a server. Server-side mods run on the server, which applies when you're hosting, meaning both client and server mods are active.

It's important to know that some mods require only server-side, some only client-side, and some both. If you don't have the necessary client-side mod, some features might be disabled, or the mod might not work properly. For example, Neurotrauma works in multiplayer with only server-side installed, but you'll need client-side for singleplayer. Meanwhile, Movable and Sellable Wrecks requires both server-side and client-side for multiplayer; players without the client-side mod may encounter issues.
So always consult the mod description to know what it exactly requires.




Installation
There's two parts to this mod, the server-side and the client-side, which one you need depends on the mod that you are trying to use. Client-side is always required for singleplayer support.

New Install Method
The mod now has a new installation method, you can install it by simply putting in a special launch option in Steam, here's how you do it:

This installation method will download the mod and install automatically both client-side and server-side from GitHub every time you launch the game. This means the mod installation will always be preserved even if you verify the game files or a new Barotrauma update is released. You can of course uninstall the mod by deleting the launch option and verifying the game files.

Also with this installation method, you don't and shouldn't use the content package, you can enable it if you want to, but it's not required, just make sure to NOT select LuaForBarotrauma in the ServerExecutable dropdown if you are hosting a server.

Classic Install Method
This is the classic way of installing the mod, it makes use of the content package, so make sure to have this mod subscribed and updated in the workshop.

If you are running Linux, subscribe/enable Lua For Barotrauma Linux instead.

If you are using MacOS, this installation method is not supported, you will need to install the mod manually, refer to this guide: https://evilfactory.github.io/LuaCsForBarotrauma/lua-docs/manual/installing-lua-for-barotrauma-manually

There's two parts to this installation, server-side and the client-side, which one you need depends on the mod that you are trying to use. Client-side is always required for singleplayer support.

Server-Side
Simply enable the mod and before hosting a server, select LuaForBarotrauma in the ServerExecutable dropdown. This is all you need to do to enable the mod server-side.



Client-Side
This one is a bit more complicated, you need to install the mod while hosting a server, here's how you do it:
  • Open hosting menu
  • Select LuaForBarotrauma in ServerExecutable and host a 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 don't understand the instructions above: https://www.youtube.com/watch?v=wEeJ70vH1TM )

The client-side installation will be reverted every time you verify the game files or a new Barotrauma update is released, so you will need to do this process again if that happens.

Dedicated Servers
Dedicated servers require you to manually install the mod, refer to this guide:
https://evilfactory.github.io/LuaCsForBarotrauma/lua-docs/manual/installing-lua-for-barotrauma-manually
Note: Some game hosting services don't allow you to mess with the game files, so you might not be able to install the mod on those services.




Checking if the mod is working properly
You can test if client-side is working properly by opening the debug console (F3) and typing in cl_reloadluacs, if you see a message saying command not found, then the mod is not installed on the client.
To test if server-side is working, first host a server, then open the debug console (F3) and type in reloadluacs, again if you see a message saying command not found, then the mod is not installed on the server.

Common Troubleshooting
If you are having problems with the mod, always try doing these things before seeking for help:

- Go to the Barotrauma in game workshop menu, and click the reinstall button

- Delete this folder %LocalAppData%\Daedalic Entertainment GmbH\Barotrauma\WorkshopMods\Installed\2559634234 and restart the game

- Disable and Enable the mod and try again

Nothing worked? Feel free to seek for help, but please always try to provide as much information as possible, it's hard to solve a problem without much information.






Notable Contributors
Perfidious Leaf[github.com] - Fully reworked and improved the C# loading mechanism
peelz[github.com] - Contributed a lot to the project, from fully reworking the hook system to fixing a bunch of bugs on the moonsharp repo.
oiltanker[github.com] - Contributed the initial CSharp mod loader.
zhurengong[github.com] - Provided lots of useful feedback for the mod on the early days and helped with the making of the CSharp loader.

Special thanks to all sponsors that kept and keep the project going:
Taj the King
FearTheQueer[github.com]
Ricky[github.com]
Rolf Lewis[github.com]
Perfidious Leaf[github.com]
Hadrada[github.com]
WjunniorW
dnova
Amadare
Esirprus
The Great Coachwhip
Evergreen
StarryCult
Popular Discussions View All (32)
6
10 Apr @ 2:50am
unknown crash when starting server (mac)
le0twigs
4
29 May @ 1:01pm
Lua Mac Fix
W4MONGER
3
17 Mar @ 1:20am
lua for mac tutorial
Goosey
2,052 Comments
XDninjaCAT 17 Nov @ 7:36am 
Did I install it wrong? it keeps forcing me to download it when connecting to servers
Luxcidic 14 Nov @ 10:17am 
Thank you! Really appreciate the amazing work :er_heart:
Evil Factory  [author] 14 Nov @ 7:11am 
@Luxcidic performance fix
Evil Factory  [author] 14 Nov @ 7:10am 
@Ipeerownu well theres nothing I can do about that, its an issue with your antivirus that is breaking the ssl certificates in your computer
Luxcidic 13 Nov @ 11:21pm 
For some reason turning this mod on makes it so I can't use any of the chainguns on my drones. They spin up but won't fire, works fine on Vanilla.
Ipeerownu 13 Nov @ 8:38pm 
@Evil Factory

Yep. Pretty sure that's the issue; though I'd prefer not to have to ignore the SSL certificate just to run the autoupdater. That's a security issue waiting to happen. Only way I could figure out how to make it work without actually turning off my antivirus. Tried every exception I could think of for AVG. I have a friend that is also affected, and he just toggles his antivirus on/off. The part that's causing the issue is the AVG Web Shield specifically.
Fren 13 Nov @ 9:19am 
Nvm it's saved in the Barotrauma folder in common/steamapps , i excluded it on Windows defender and it began to work again.
Fren 13 Nov @ 9:14am 
where on a computer is Luatrauma.AutoUpdater.win-x64.exe saved by default?
Evil Factory  [author] 13 Nov @ 5:15am 
did your antivirus somehow mess up the SSL certificate providers in your computer? your computer for some reason thinks the ssl certificate from github.com is invalid
Ipeerownu 12 Nov @ 7:01pm 
With how the Windows command was described; it keeps failing on my end with AVG turned on. Spits out an error about being unable to check for revocation for the certificate when I plug it into a normal command prompt. What was missing from the curl command was a flag telling it to avoid checking for a certificate for the download. Correct launch option in Steam for Windows is the following:

cmd /c "curl -L -z Luatrauma.AutoUpdater.win-x64.exe -o Luatrauma.AutoUpdater.win-x64.exe https://github.com/Luatrauma/Luatrauma.AutoUpdater/releases/download/latest/Luatrauma.AutoUpdater.win-x64.exe --ssl-no-revoke && start /b Luatrauma.AutoUpdater.win-x64.exe %COMMAND%"