Page 1 of 11

[0.8.1.12] Barotrauma Client/Server Modification (v 15/08/2018-2)

Posted: Sat Aug 12, 2017 11:29 pm
by nilanthanimosus
This is a modification Intended for server hosts and clients (Current Client/Single player features are unfinished or offer better syncing with the servers that are modded with it), It was designed for GUI-Hosting in mind but can be used for singleplayer and client usage to play on servers.

It is Highly untested for single player or client usage while also a little untested for dedicated usage (it should work for it though but no guarantees if you crash more).

It offers no cheat-like benefits for Clients unless a server using the modification is setup to allow you that benefit, it may improve net syncing with servers running the modification that change certain values (To feel less buggy) otherwise you have no real reason to get this as a client unless you wish to tweak your single player experience.

It's a little hard to have pictures of a server modification that is primarily modifying mechanics over visual changes, but here you go:
Spoiler
Image
Image
Image
Image
Image
Image
Down to explaining what this actually is for, This server modification allows you to change the very mechanics and calculation of barotrauma on the server side, it allows for you to modify the XML files without the clients having the same modifications, as long as one does not add new content and instead changes values that sync this more or less is ok to do.

It also comes with a variety of new mechanics, Its been hosted a long time under the name "ARS - Epic Survival" without even using its full features, generally these mechanics can all be enabled, disabled and configured to your liking.

The server is capable more or less of the following:
Spoiler
-Dynamically change all the settings at run time mid-round.
-Prevent players deaths and allow them to stay unconscious indefinitely unless they use "Give In"
-Increase health values via multipliers, independently for player characters, infected player characters and AI fish. There are even small tidbits to this, such as configurable health Regen / bleed multipliers and oxygen rates.
-A progressive crush mechanic where you can configure an oxygen/heatlh/bleed change over time, instead of immediately crushing the player to pressure.
-Modify the mechanics of abyss submarine crushing.
-Change the behavior of respawning, the max respawn settings are still not finished yet but you can control behavior such as respawn to main sub (Death match-like), how long it stays past-timer expiry, if it auto pilots back and other such.
-debug settings for simulating lag about as good as the real thing, if you wish to test locally how your clients feel your modified server you may. additionally includes options to turn off error messages that fill up the console at times.
-You may setup the server to a default, launching from clicking the executable to going straight to auto start as a GUI server.
-Comes with custom GUI changes for fast-command access, better sorting of the logging and in general a few quality of life features such as Ctrl+Clicking the server log filters to hide all others.
-Optional revamped method of handling armor code, original armor code is handled as a direct subtraction, where "10" would yield -10 bleed and -10 direct damage. you may use RPG-like power decreasing, multiplicative and direct decrease as a combination now.
-CPR can be setup as to grant health/blood clotting and stun removal, in addition to oxygen. scaling with skill and having skill requirements if you wish - since you can edit the XMLs you may even define your own custom skill levels.
-Ability to change the hosts playing name and optionally bypass skill checks as host (This is more so for spawned humans and husks which always have 0 skill).
-Ability to custom-tailor and define event-based messages tailored to specific players, such as on server join, respawn, shuttle timer getting low or being a traitor.
Ability to setup a help-system of help topics, the framework is there but I have not had the time yet to write out the XML for it.
Additional debug console commands to make spawning items, operation of the server and modding the XMLs a little simpler - Use help to check the commands list.
One major flaw is that there is a lack of documentation at the moment, I did not feel this was ready for release but its not strictly buggy as it is possibly confusing.

Another major detail to note is the mod is definitely nowhere near finished, it has disabled features, one or two lines that do nothing and a lot of its nicer features commented out in the code, such as default submarine not being chosen or disabled HUD elements.

The latest version does not crash or write a dump, Just ignore the header error for now as best you can (It still forces the console open - was meant to crash but It neither crashes nor writes the data to file). It does however fix a number of client bugs/irks such as the medical HUD scanner or console spam of issues like "Received a position update for an object without a physics body."

It may be a good idea to have a copy of the game you can always fall back on, just some advice :wink:

Please be aware the date below is the current revision of the server modification, and is represented both in date and filename.
Windows ( 15/08/2018-2 ) : https://www.dropbox.com/s/8klgni1kzz04c ... 2.rar?dl=0
Linux ( 15/08/2018-2 ) : https://www.dropbox.com/s/81dvk81tdcfrf ... 2.zip?dl=0

Old Files ( 0.5.4.5 - 0.8.1.12 ) : https://www.dropbox.com/sh/vrwhaswwfpyk ... YjkLa?dl=0

Github Issue board - Please note I do make mistakes, quite a few in fact. I try to notice and fix them as I go but if you have issues and are not sure if their caused by my modification or not, feel free to use the URL below to report bugs in my modification or even perhaps ideas. :
https://github.com/NilanthAnimosus/Baro ... its/issues

------> Installation and setup Instructions <------

1) Download and install the same version of Barotrauma the mod is intended for - the original game files are a requirement.

2) Extract the files from the archive into the Barotrauma folder (Only settings files the mod cannot yet create on its own are included, do not worry on losing settings unless you tweaked those files in particular).

3 A) If your new to nilmod - Start the game up once to create the config files. then close it and go inside Barotrauma/Data/NilMod/

3 B) If you are from an older version of nilmod, the settings files have had their save location changed. Just move the old configs into Data/NilMod/ and remove the word "NilMod" from the filenames (IE. Data/NilModSettings -> Data/NilMod/Settings).

4) look over the XMLs using any text editor (I recommend Notepad++ for far easier reading!) and modify the settings to your liking - relevant settings are used in single player, as a client and as a server. if you damage any of these files you can either try to fix it, or simply remove the setting file to create a new one, invalid settings are automatically removed and new settings added between updates.

5) either use "nilmodreload" in console if the server is already running (Every setting will take immediate effect mid-round without issues) or start/restart the server.

6) Pretty much finished, experiment with it to your liking and play around with what you can do!

Re: Barotrauma Server Modification

Posted: Mon Aug 14, 2017 11:50 am
by Fakyring
Very cool mod, but why not all abilities are working?

Re: Barotrauma Server Modification

Posted: Mon Aug 14, 2017 2:35 pm
by nilanthanimosus
I believe you mean the buttons on the GUI (For quick access of debug commands) being disabled - their unfinished (I literally just made that a day before I released it here). I need to write some methods and input screens to choose a player / creature and such. for now though most of it works correctly but is setup to emulate (as best it can) default Barotrauma.

It has a lack of documentation that's up to date right now, that is probably what I'll be working on when I get around to it.

I will need to figure out the GUI more to create some lovely input menus for those commands though, I should have added the reason they are disabled to the opening post :wink:

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Tue Aug 15, 2017 11:32 am
by Fakyring
There is also one bug: when shuttle is going to spawn the game crashs. I hope that it will be fixed near future

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Tue Aug 15, 2017 12:48 pm
by nilanthanimosus
As far as I'm aware there are no bugs with re-spawning that are caused by my modification that are not present in default barotrauma - could you please attach or pastebin the crashlog.txt in the games folder so I can check it out? Otherwise I have no real idea what the issue possibly is. I don't think it should be related to job assignment as that's been fixed for sure now no matter what XML edits one makes.

If it is however "FarseerPhysics.Dynamics.Body.set_Enabled" that is a crash that can occur with default barotrauma to my understanding, and occurs on round starts too. (And I've no idea how I would work that out other than to run a server in debug mode for a week until it splatted on everyone - I will try that at some point though for that crash).

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Wed Aug 16, 2017 11:35 am
by Fakyring
nilanthanimosus wrote:As far as I'm aware there are no bugs with re-spawning that are caused by my modification that are not present in default barotrauma - could you please attach or pastebin the crashlog.txt in the games folder so I can check it out? Otherwise I have no real idea what the issue possibly is. I don't think it should be related to job assignment as that's been fixed for sure now no matter what XML edits one makes.

If it is however "FarseerPhysics.Dynamics.Body.set_Enabled" that is a crash that can occur with default barotrauma to my understanding, and occurs on round starts too. (And I've no idea how I would work that out other than to run a server in debug mode for a week until it splatted on everyone - I will try that at some point though for that crash).
Of course:

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Wed Aug 16, 2017 4:56 pm
by nilanthanimosus
:REDACTED:

I figured out the cause of that crash, I'll have it fixed and uploaded. In short it's only caused if the host respawns into the shuttle.

Uploaded the small bugfix that crashes a server on spawning the hosts character.

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Sat Aug 26, 2017 12:38 pm
by nilanthanimosus
New version has been released which includes the following:

A method to debug the CPU Usage of the game loop in ticks, most of it is negligible to look at, but it may help in determining where a slowdown occurs (Such as entity events which are items and the likes, or the character updates to pruning a few characters may alleviate slowdown, or if its the physics - so perhaps a submarine teleport, as well as providing helpful information on perhaps where the mod may need optimization). This will not record FPS loss due to graphics hardware.

Fleshing out of the GUI, this now includes a lovely Spawn menu for creatures, and the method for clicking in world to perform commands, such as teleportation of players without typing their name, healing or immediately killing, removal of corpses. Suggestions are always welcome.
Image
Image
A method to see which command you are currently using (Water/Fire is not yet recorded by this, but soon will be if I can wrap my head around it!)

This is far from complete but its very usable, I have not created a GUI for choosing what client to control what creature, or the code for returning to your last controlled body on the fly. Revived characters still do not get control of their character back as well, I will be looking into this if I can at some point.

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Wed Oct 11, 2017 9:49 pm
by nilanthanimosus
I have just updated the server code, experimental attempts at bug-fixing a particular crash (Set Enabled), server auto restart capable on crash, and a few bug fixes to my own code.

Updated handling of particles, you can configure to limit them or use a new debug command "Particles" to toggle them, improving server performance if used!

Fixed creature respawning. no longer will respawned fish be invisible to clients.

Also added new log additions, such as:
-live logging (ability to save every few lines - useful for servers using a website to read their logs using scripts!) and save to the same file (No more end round log duplication).
-Cutting hull
-Additional contained items in item movements listed (No longer will welding fuel diving masks confuse or elude you).
-Optional Visibility of creature damage vs other characters (Fish or player)
-Visibility of stun damage amount.

Added ability to see whom votes a submarine (As well as announce it) - feel free to name and shame (Or praise) your shuttle-voters.

Re: [0.6.1.4] Barotrauma Server Modification

Posted: Mon Oct 23, 2017 7:06 am
by nilanthanimosus
I'll be frank, I've got an update again yet do not fully recall the changes but here's a few:

-Increased the default max camera zoom and Debug Draw mode camera zoom.
-Bug fixes regarding a few settings, its recommended to remove the 'HullOxygen' and 'HullUnbreathable' settings if you are updating (They will be added back at proper defaults).
-Fixes to ordering of Debug Console Question prompts - on further input needed it is now correctly ordered.
-Added the Debug Draw oxygen and pressure text to standard draw, Later I may make either a setting or command to toggle this view instead.

-There is a method to block ranges of IP Addresses in a smarter method (To avoid blocking ISPs with a little homework), but only after a server is restarted, this is generally meant for preventing known VPN IP Blocks from connecting if you have too many issues with this, it runs on a separate thread as to avoid dragging down the server during its check but is still untested and not recommended.
-It is now possible to externally edit Ban lists and permissions while actively hosting the server.
-A number of ways bans are handled have been modified, it mostly acts the same but better informs the player of their duration/reasons and such if set to, Careful as this very easily overflows past the clients "OK" button if you activate all of the settings (Not harmful just looks silly).

-improved player status indicators, thicker borders and less bumpy movements as these fancy new widgets pulse a colour respective to the players current condition for the hosts view, as well as showing more detail in general (Even negatives!) if relevant.

-Some forms of fixes for old crashes, essentially the server is more stable now - ability for the server to self-restart on crash so your client hosted server is always definitely up.
-Hopefully greatly reduced occurrences of "Unknown Object Headers" for clients from husk infections, its more of a workaround than an actual fix but It does its job fine.

there is likely more to say but I will be honest I was not keeping track of my edits.

As you may have wanted, here is a jolly sailor having a generally bad day on negative health (Though the colours have changed slightly since):
Image