Re: [] Barotrauma Client/Server Modification

I have worked for what feels like forever on updating this mostly manually. I just finished and then suddenly we had a :REDACTED:

Given the scale of the changes (366 changed files with 128,209 additions and 8,743 deletions. + another 112 changed files with 115,714 additions and 105,934 deletions.) as a combination to the gap between and I am expecting numerous bugs. For now though what i'm fairly certain might be the case:

A few translation texts from vanilla might not be fetched where they should (I need to include my own variation of this same feature for my mod specific texts without requiring replacement or editing of the original).

Log lines in server logs might not properly show disguised, or be double-verbose and show client name, disguised name -and- characters base name (Or disguise name twice!) - I have yet to go through every single server log line to ensure these are correct.

Server logging may be in the incorrect categories. (IE. pumps should go in pumps but perhaps they wind up showing as item interaction). I'll go through this at some point.

Custom CPR variables do not work right now, I have not worked out how I want to mold my changes to the new system so for now this is vanilla.

My own version of checktraitor is likely broken, but I think the update added its own can't recall now.

Most console commands from my modification do NOT have client-specific code yet, I have no idea what will happen if clients are allowed to use them and then actually try it (It might work though, for maybe things like freeze command). I need to investigate and learn the new console command structure.

I likely have way more issues than this but I don't have the capacity to test it that far, if it crashes the reports would be nice (private message, forum post, discord etc), If you see any buggy behavior I'd love to know.

There were modifications to the In Game Info GUI, streamlining and attempting to improve its handling/responsiveness while reducing bugs and issues with it such as stack overflow, it may currently be more problematic but should be Ok.

- Spy code (Viewing others inventories as the host) can now view inventories of stunned and handcuffed players, allowing you to remove cuffs or access rag-dolled/Stunned players inventories.
Theoretically you can also get a spied character to kill themselves via give-in but its not tested, I'd avoid that for now.

- itemdetail command has been greatly improved since previous and is now beginning to list details on item components. I recommend not using it in the middle of a server however not that it should cause an issue.

Generally this is (Mostly) the full modification, go nuts!

Missed a rediculously important check for power transfer that well, checks if we should burn or not. Raging infernos before you even opened the first door should stop now.
25/02/2018-3: fixed spawnitem command not being able to target inventory.
25/02/2018-4: Fixed crash bugs with repair tools and kick/ban/perms gui in netlobby screen
27/02/2018-1: Correctly fixed crash bugs with repair tool (Fire extinguisher), improved crash reports, added debugging information regarding a vanilla unremoved ragdolls crash.

- Added a github issue board where my modifications fork is from the main barotrauma, if your unsure if its the vanilla game or the mod that has the bug it may be better to post there.
Host of ARS (A Random Server)

Re: [] Barotrauma Client/Server Modification

I am adding a new post as the previous versions have had fundamentally game-breaking problems, I feel this current version is (Finally) more stable and game-play worthy.

changes for 28/02/2018-1:
-Fixed welding/plasma cutting tools collision on broken walls (It now doesn't crash and repairs correctly, sorry for having to have 'fixed' this 4 times)
-adds support for other mod creatures in the spawn menu (all BTE creatures can now be spawned via the menu in theory as long as its defined in the content package)
-fixes a vanilla issue with crowbars usage (I don't know if this causes other issues, at first glance its fine)
-adds new values for configuring damage and bleed damage for impacts and door stun if your inside a door
-Clients are sent 0.35 bleed icons even if it is less than that, so its easier for them to notice bleeding damage (May change this to 0.5 in the future)
-Increased crash prevention an issue in vanilla barotrauma where a ragdoll has a null limbs array causing numerous kinds of crashes, all the clients will still crash from it however but the server and perhaps any clients will attempt to debug, remove and dispose of the character quickly.
-Decreased likely-hood of sound init failure on detecting the sound device, initializing it as late as possible appears to help reduce it (the 0-2% will freeze momentarily while it is initializing)

Nilmod update 04/03/2018:

I have added a fully fledged Self-hosted campaign and a number of improvements to the code! both from the next version and my own.

Campaigns now do the following for the submarine in multiplayer:
- Fix the walls
- Extinguish the fires
- Drain the water
- Replenish Oxygen
- Power storages 90% refilled
- All Reactor, Power transfer, relay, door, status map, radar, steering and engine components repaired.
- The reactor is shutdown, set to 100% cooling, 0% temperature and fission.

- Items in player inventories that were not job loadout items are dropped where they were, if you were not on the submarine or left behind your inventory is lost.

- the campaign is capable of starting to server, selecting it, and creating or loading a save automatically.
- Campaigns have a set number of failiures before a new campaign in the settings, wins will decrease the fails, perpetual fail will get the campaign deleted to start a new one.

- Multiplayer campaigns are capable of hostless execution, both in purchasing new campaign items and campaign items for campaigns in progress individually.

- the campaign autobuy system will buy items in the order defined in the config skipping items too expensive if it runs out of money, it cannot purchase items you cannot buy however.

- the previous Admin/Moderator/Spectator slots system has been replaced with a new Owner/Admins/Trusted/Spectators slot system

- The new slot system has replaced your old permissions file with a nilmodpermissions file, this is so the default games config does not erase any servermod settings later added there.

- Melee weapons with structure damage can now damage structures!
Explosions can now damage doors!

- new settings are available in the xml, one of which is "ElectricalRelayMaxPowerMultiplier" which allows you to modify the max power break of relays, around 10000 should make them like the old relays.

- Fixed status effects being none-stackable (They all defaulted to false, this was clearly not the intention for vanilla barotrauma).

- Additional crash-prevention code (Clients will still likely crash though) and debug logging to help debug crash issues.

- Crowbars Work! Not sure this was included the last version.

- Power transfer code fixes from the next version, power grid works quite fine now!

- Resized multiplayer campaign GUI so the buttons are easier to click

- The server does not yet have proper support for dedicated server campaign hosting (Its unclear what'd happen).

Update 05/03/2018:
- multiplayer campaign sync fix for displayed money (Forgot to update the ID's when auto purchasing, it should work fine now! :)

Update 08/03/2018:

I have just updated the mod to version, Hopefully this fixes the campaign syncing bugs the mod was having when creating new campaigns by itself.
Also the following tweaks/changes:
- Added default multiplier of 1.0 to relay max power setting, accidentally missed it out when using the reset command.
- Disabled scrolling in the main game screen when hovering over any GUI element.
- Improvements to character hiding code fixing character visibility when teleporting none-enabled characters, spying disabled characters, etc.
- Fixed ingameinfo GUI removing clients when they are set to control the character they already have.
- TryCatch debug information added to the indoorssteeringmanager, may prevent crashing from it (Not that I see a reason it should, but if it does crash anymore I'd like to know why it does).
- Nilmod date version is now visible from the client menu as well as in crash reports.

Update 09/03/2018:
-Changed program version from to (It works now)
-Added a Linux download, it doesn't have instructions or files to start it up with ease, you'll have to work that out for now.

Update 17/03/2018:
-Fixed windows crash Auto-Restart logic (Or in theory It should work now)
-Tweaked Owner/Admin/Trusted/Spectator slot logic
- Included missing setting "OtherSlotsExcludeSpectators" Which modifies the slot logic for if it should count a spectating admin as both an admin and spectator or just an admin for slot purposes.
-Tweaked client rejoin logic to prevent join failiures when server is not modded by delaying the unmodded reconnect.
-Included next version fix for Indoors steering manager errors and removed the error logic in that code.
-Oxygen can no longer be used to kill characters that do not require it (No instant husk kills with welding fuel or sufforin killing molochs and carrier's)
-Logging improvements to Cutting to be based off vanilla, keeping nilmods information while logging if the wall being broken is an internal or external structure.
Host of ARS (A Random Server)

Re: [] Barotrauma Client/Server Modification (v 17/03/2018-2)

Hey there Nilmod fans :D

You may have found out that Nilmod hasn't been made compatible yet with the latest game version:
A lot of consistent servers for Barotrauma use Nilmod because of it's major advantage in server administration and managing functionalities, and many more.

I noticed Nilanth was less often online recently and knew that if a new update with land, it would definitely cause some trouble. At first I was planning to do a rollback, but yesterday I came with the idea to give it a look myself. I took the latest available Nilmod version from Github and compared it with the latest game version. Luckily, today Nilanth responded in the UG Discord, there will eventually be a legitimate Nilanth version, but it will take some time.

This is a temporary solution. I do not make any improvements or edit the code, I respect Nilanth's work and my main goal is to have Nilmod operable, to be shared with the public! I will inform and am already informing Nilanth about what I am doing. Whenever his version arrives, this version can be considered 'out of order', which speaks for itself.

So what did I do? :P First of all, I took these versions:

I compared them file by file, any change in the period of 8 March till release of version had to be merged into the patch. Although it took me a while, I am sure I have done this properly. The current version is running at BT Public 24/7 #1 and #2 without problems, you may give it a test if you like. Nilmod functionalities are working aswell. Ofcourse it's always possible I made a tiny mistake, but I am willing to improve this version over the time it's needed.

You may contact me over Discord or in this forum topic.

As you may have seen, the Nilmod version I used to merge is not the latest available version that can be downloaded at this moment. It's however the latest version that I could find at Nilanth's Git. In order to do these things, source code is needed. This is why above was the only possible option. If you like to see what's missing, you may check this in Nilanth's latest post in this topic, starting from 09/03/2018.

Alright, it's all up to you if decide to use it, the latest version can be downloaded here:
Applying the mod works exactly the same as Nilanth's original patches. :wink:

Enjoy Nilmod's functionalities! (Temporary version - v0.8.1.2 ServerMod Patch 08032018) - Barotrauma Server 24/7 - BT Public 24/7 - Join and play!

Re: [] Barotrauma Client/Server Modification (v 17/03/2018-2)

Hey my friend has run into an error and his game crashes when trying to host the server the crash report
Barotrauma Client crash report (generated on 01/06/2018 20:52:01)

Barotrauma seems to have crashed. Sorry for the inconvenience!
If you'd like to help fix the bug that caused the crash, please send this file to the developers on the Undertow Games forums.

Nilmod version stamp: 08/03/2018-1
Graphics mode: 1280x768 (BorderlessWindowed)
Selected content package: BTE 6.0
Level seed: no level loaded
Loaded submarine: None
Selected screen: Barotrauma.MainMenuScreen
Server (Round hadn't been started)

System info:
Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 64 bit
GPU name: NVIDIA GeForce 9600 GSO
Display mode: {Width:1360 Height:768 Format:Color AspectRatio:1,770833}
GPU status: Normal

This was running NilMod Code!

Exception: Object reference not set to an instance of an object.
Target site: Void Update(Single)
Stack trace:
at Barotrauma.NilMod.Update(Single deltaTime) in C:\Users\lando\Source\Repos\Barotrauma---Nilanths-Edits\Barotrauma\BarotraumaShared\Source\NilModification\NilMod.cs:line 589
at Barotrauma.GameMain.Update(GameTime gameTime) in C:\Users\lando\Source\Repos\Barotrauma---Nilanths-Edits\Barotrauma\BarotraumaClient\Source\GameMain.cs:line 436
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime)
at Microsoft.Xna.Framework.Game.Tick()
at MonoGame.Framework.WinFormsGameWindow.RunLoop()
at MonoGame.Framework.WinFormsGamePlatform.RunLoop()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Barotrauma.Program.Main() in C:\Users\lando\Source\Repos\Barotrauma---Nilanths-Edits\Barotrauma\BarotraumaClient\Source\Program.cs:line 47

Last debug messages:
01/06/2018 20:51:41 - Enter "help" for a list of available console commands

Re: [] Barotrauma Client/Server Modification (v 17/03/2018-2)

Hi Xizeboo,

I see you are running
Selected content package: BTE 6.0
What would happen if you start it as vanilla?

Also, it seems to occur in this screen
Selected screen: Barotrauma.MainMenuScreen
Does this mean it crashes as soon as you hit the 'Start' button? Or has the server run for a while and did it crash later on? - Barotrauma Server 24/7 - BT Public 24/7 - Join and play!