[0.7.0.1] Barotrauma Server Modification

A place to show off your mods and discuss modding Barotrauma.
User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

[0.7.0.1] Barotrauma Server Modification

Postby nilanthanimosus » Sat Aug 12, 2017 11:29 pm

This is a modification Solely for server hosts, it cannot be used as a client and will likely crash for single player (it CAN if not was meant for play-as and client GUI hosting however, this is definitely good for local hosting with friends).

It is also a little untested for dedicated usage (it should work for it though but no guarantees).

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.

Please note if you are updating and wishing to use 0.6.1.4 configs, delete the armor value settings or delete the settings file to get correct barotrauma vanilla armor behavior (Flat Reduction 1 -> 0, Absorption 0 -> 1).

Please be aware the date below is the current revision of the server modification, and is represented both in date and filename.
Download Link (04/12/2017 - Update 1): https://www.dropbox.com/s/557cdvizhemuixe/v0.7.0.1%20ServerMod%20Patch%2004122017-1.rar?dl=0

Instructions:
Simply extract the .rar and overwrite a copy (That you don't play with as a client) of barotrauma 0.6.1.4
Start the game once then close to generate the XML's, they will be added into the Data folder. have fun tweaking! :wink:
Last edited by nilanthanimosus on Mon Dec 04, 2017 9:13 am, edited 17 times in total.
Host of ARS (A Random Server)

User avatar
Fakyring
Class-D
Posts: 5
Joined: Mon Aug 14, 2017 11:22 am
Contact:

Re: Barotrauma Server Modification

Postby Fakyring » Mon Aug 14, 2017 11:50 am

Very cool mod, but why not all abilities are working?

User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

Re: Barotrauma Server Modification

Postby nilanthanimosus » Mon Aug 14, 2017 2:35 pm

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:
Host of ARS (A Random Server)

User avatar
Fakyring
Class-D
Posts: 5
Joined: Mon Aug 14, 2017 11:22 am
Contact:

Re: [0.6.1.4] Barotrauma Server Modification

Postby Fakyring » Tue Aug 15, 2017 11:32 am

There is also one bug: when shuttle is going to spawn the game crashs. I hope that it will be fixed near future

User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

Re: [0.6.1.4] Barotrauma Server Modification

Postby nilanthanimosus » Tue Aug 15, 2017 12:48 pm

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).
Host of ARS (A Random Server)

User avatar
Fakyring
Class-D
Posts: 5
Joined: Mon Aug 14, 2017 11:22 am
Contact:

Re: [0.6.1.4] Barotrauma Server Modification

Postby Fakyring » Wed Aug 16, 2017 11:35 am

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: https://pastebin.com/KV2B2Yrw

User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

Re: [0.6.1.4] Barotrauma Server Modification

Postby nilanthanimosus » Wed Aug 16, 2017 4:56 pm

: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.
Host of ARS (A Random Server)

User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

Re: [0.6.1.4] Barotrauma Server Modification

Postby nilanthanimosus » Sat Aug 26, 2017 12:38 pm

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.
Host of ARS (A Random Server)

User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

Re: [0.6.1.4] Barotrauma Server Modification

Postby nilanthanimosus » Wed Oct 11, 2017 9:49 pm

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.
Host of ARS (A Random Server)

User avatar
nilanthanimosus
Dr. Bright's Assistant
Posts: 26
Joined: Thu Aug 10, 2017 6:48 pm

Re: [0.6.1.4] Barotrauma Server Modification

Postby nilanthanimosus » Mon Oct 23, 2017 7:06 am

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
Host of ARS (A Random Server)


Return to “Modding”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest