Jump to content

[MOD] BetterDocking


WASP103

Recommended Posts

BetterDocking


 

A mod for Avorion that enforces a system wide don't drink and fly policy for tradeship pilots.

 


 

What it does:

  • Prevents traders from crashing into stations (and other things) at all costs. (Please share findings with me in case that you can actually make them fly into things again)
     
  • Prevents traders from wreaking havoc over your station in case you're currently editing it and "accidentally" delete their desired docking port in the process.
     
  • Prevents traders from pushing stations across the whole system. Won't happen again.
     
  • Traders now use the docking port closest to their entry point to the system, distributing load over all docking ports
     
  • Traders who just take too long, now jump out of the sector again in order to prevent Kessler Syndrome

 

 

What it does not:

Enforce aforementioned policy. They still do what they want... It's just that their autopilot got a decent upgrade now :P

 

 

Verification:

 

Over the course of several days of testing, data was gathered for camparison. Latest results show a significant reduction of docking accidents: V1.0.4 is down to one accident per ~600 Docking maneuvers (your mileage may still vary depending on station and ship hulls)

 

Verification Spreadsheet

 

BetterDocking was also verified on several public servers that run the mod:

 

If you want your server to be listed here as well, please PM me.

 

 


 

 

 

 

 

 

 

 

 

 

 

 


special thanks

A big shoutout to Dirtyredz for a lot of support and help with Avorion modding. Also check out his awesome mods and server tools!


Link to comment
Share on other sites

This is an awesome mod the Rusty Servers have been using it for a while now and we really enjoy our ships not ramming into stations.

 

Ive often looked at fixing this myself but always seem to get a headache when dealing with these kinds of mods, Many thanks to WASP103 for taking charge on such an annoying part of avorion.

 

This mod really should be in the Vanilla game.

Link to comment
Share on other sites

Excellent! I've been rammed by Traders docking into the stations in unfortunate ways in the past way too often.

 

Do you know by any chance whether this more proper docking procedure also reduces the risk of Traders running into you (the player ship) while you are docked / near a docking port but not docked? I haven't quite yet figured out in which scenarios Traders ram into you while you are near a dock port, though I imagine it's the latter - near a port but not currently docked.

However, I don't know if docks being used by the player actually register as "occupied" and therefore will not be used by AI Traders, or whether there's no such check in place.

 

I'm assuming from skimming through the code a little, that this does not add checks to see whether anything else except the expected dock port is in the way - but correct me if I'm wrong: that would be even more awesome; not only proper docking, but proper collision checking on the way to that dock, as well? Count me in on something like that!

Link to comment
Share on other sites

Hmm so just to clarify, what I mention in this post has been resolved using this mod, for the docking behaviour specifically?

 

Is there an easy way to port this same collision checking over to craft assigned to Escort and/or Salvage operations? I've been running into silly problems with craft getting stuck running these Orders (as mentioned in the post I linked to).

 

I tried quickly seeing how to edit the Escort scripts myself, but it seems that it's locked behind an API wall I can't access - or maybe I misunderstand how that works?

Link to comment
Share on other sites

Hmm so just to clarify, what I mention in this post has been resolved using this mod, for the docking behaviour specifically?

 

Is there an easy way to port this same collision checking over to craft assigned to Escort and/or Salvage operations? I've been running into silly problems with craft getting stuck running these Orders (as mentioned in the post I linked to).

 

I tried quickly seeing how to edit the Escort scripts myself, but it seems that it's locked behind an API wall I can't access - or maybe I misunderstand how that works?

 

This mod uses the builtin collision checking while flying towards the end of the docking strip (the path of lights) and away from the docking port.

In Order for the ship to get close enough to the docking port, I had to fall back to a method of movement without the builtin collision checking within those landing lights. On this final approach, I've implemented a means of collision checking with the docking port AND the station itself, but not with other surrounding objects.

Otherwise in weirdly shaped stations, the freighter would stop far away from docking ports in order to avoid "collisions" with the bounding boxes/spheres of said stations.

So as long as you stay out of landing strips, you should be absolutely fine.

 

Two more things that got improved versus vanilla behaviour is that now a freighter will use the collision avoidance movement on the way back to the end of the docking lights after its transaction, so you and other approaching freighters should be quite safe at least from collisions with departing ships.

The other thing that helps a great deal with collision avoidance is that now each freighter uses the docking port that is nearest to its position when entering a sector. Vanilla always used a single, fixed docking port for freight traffic.

 

The problem you describe in the other post mainly originates from that builtin collision prevention system. If the ship detects that it can't move to any direction without colliding with something, it will simply refuse to move. (eg: little fragments of salvage reaching into the ships' current bounding box/sphere) A solution for that behaviour could be implementing a "brute force" method after a certain time of immobility. Brute force meaning deactivating the collision detection and moving out of the debris field, even if collisions might occur.

Link to comment
Share on other sites

  • 8 months later...

Congratulations, You just revived a year old thread.  ;D

 

and you are not polite neither helpful ...

as there is no explanation in the first post, where to put all the files, this question may come up!

 

 

Hello,

 

where do i have to copy the files on a self hosted server?

Thanks in advance

inside the zip file, there's a folder "better docking". go inside. you will find two folders "data" and "mods". these must be copied to your Avorion directory.

but be careful, as this thread is indeed over a year old, the mod may be unfunctional meanwhile.

 

Link to comment
Share on other sites

 

and you are not polite neither helpful ...

as there is no explanation in the first post, where to put all the files, this question may come up!

 

 

 

Thank you very much, i will give it a try. Is there maybe a similar mod which is more up to date?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...