Barotrauma

Barotrauma

View Stats:
A little help configuring a docking hatch for shuttle onto main sub
So I have been enjoying creating my own sub, and have also made my own shuttle. But I have run into an issue I don't seem to be able to find the answer to.

The main sub has its own main docking hatch, which is the automated docking hatch (has the 2 x AND components which i have wired both to the main subs terminal to toggle docking using the signal 1 outputs on both AND components).

I have done the same with the shuttle.

However, my shuttle docks at my second (not the main) docking hatch. I can get the shuttle to dock to my second docking hatch and it appears in the Test area attached to my sub. It is linked fine. But I can't board the shuttle use the docking hatch itself as it doesn't open.

I can't work out how I am supposed to wire the two docking hatches so that when the shuttle docks, the hatch opens. It stays shut and cannot be manually opened either as there are no buttons on the auto docking hatch of the shuttle.

Any tips? Would love a step by step method. My ideal situation would be to have the shuttle dock but the hatch in-between to be manually operated if possible. But if not, I can just put in a second hatch underneath.
< >
Showing 1-11 of 11 comments
Igni May 25, 2021 @ 12:23am 
+1, building my own sub as well, any solutions would be welcome!
shrekstyle May 25, 2021 @ 4:26am 
Dont use the automated docking hatch assembly.
Add a docking port and a hatch with buttons to the main sub and the shuttle..

On the shuttle wire the shuttles command terminal toggle_dock to the shuttles docking port toggle_state.

For a backup so not to undock without the doors being shut wire the shuttles command terminal toggle_dock to a signal component input with target=1 true=0 false=(leave blank).

Wire the signal components output to the shuttles hatch set_state, then wire the signal component into a wifi component input.

On the main sub add a wifi component and wire the output to the main subs docking hatch set_state.
Make sure both wifi are the same channel.

This will send a signal to both hatches to close if any are open when you undock, it wont lock the doors to any state so you can still open/close them yourself.
It wont automatically open the hatches when the shuttle is docked.
Its better to have them closed in-case of flooding while docked anyway.
Reece Draygan May 25, 2021 @ 4:28am 
Managed to rig a button -> OR component, which receives 2 signals - one from the button and the toggle docking from the terminal. The OR is configured to send a 1 when it receives either signal.
This OR gate outputs to the lower AND gate, which does open the hatch, but also detaches the shuttle (presumably the AND triggers the DELAY gate which then changes the Docking Hatch status).
So now I need to figure out how to not trigger the DELAY gate.
Surely, it shouldn't be this complicated to build an override for the hatch when the shuttle spawns attached to the sub. Presumably, the issue is that the hatch won't open because the sub never "docked" and thus the navigational terminal hasn't pressed toggle docking to trigger the states to change - but you can't get onto the shuttle to do this when it spawns at start of a round lol.
Reece Draygan May 25, 2021 @ 4:29am 
Originally posted by shrekstyle:
Dont use the automated docking hatch assembly.
Add a docking port and a hatch with buttons to the main sub and the shuttle..

On the shuttle wire the shuttles command terminal toggle_dock to the shuttles docking port toggle_state.

For a backup so not to undock without the doors being shut wire the shuttles command terminal toggle_dock to a signal component input with target=1 true=0 false=(leave blank).

Wire the signal components output to the shuttles hatch set_state, then wire the signal component into a wifi component input.

On the main sub add a wifi component and wire the output to the main subs docking hatch set_state.
Make sure both wifi are the same channel.

This will send a signal to both hatches to close if any are open when you undock, it wont lock the doors to any state so you can still open/close them yourself.
It wont automatically open the hatches when the shuttle is docked.
Its better to have them closed in-case of flooding while docked anyway.

This sounds like it might work! I will give it a go laters :D
shrekstyle May 25, 2021 @ 6:19am 
Also on the main sub wire the power system to docking port power.
On the shuttle wire the docking ports power to a relay power input then the relay power output to the shuttles power system.
This creates a one way power system to power/charge the shuttle.


Also to prevent power spikes with batteries add this to each battery on both sub and shuttle.

Wire the battery charge % out to a subtract component input 2.

A Memory component set to 100 to the subtract component input 1.

Subtract component output to a multiply component input 1.

A Memory component set to 10 to the multiply component input 2.

The Multiply component output wired to the battery set_charge_rate input.

Set the Multiply component to clamp min=0 max=100.

The batteries will reduce the charge rate slowly between 90%-100% preventing reactor over-volt power spikes.
Reece Draygan May 25, 2021 @ 10:39am 
Originally posted by shrekstyle:
Also on the main sub wire the power system to docking port power.
On the shuttle wire the docking ports power to a relay power input then the relay power output to the shuttles power system.
This creates a one way power system to power/charge the shuttle.


Also to prevent power spikes with batteries add this to each battery on both sub and shuttle.

Wire the battery charge % out to a subtract component input 2.

A Memory component set to 100 to the subtract component input 1.

Subtract component output to a multiply component input 1.

A Memory component set to 10 to the multiply component input 2.

The Multiply component output wired to the battery set_charge_rate input.

Set the Multiply component to clamp min=0 max=100.

The batteries will reduce the charge rate slowly between 90%-100% preventing reactor over-volt power spikes.

You sir are incredibly helpful; this was also an issue I was having trouble with. I had set up a battery array as follows;

Reactor --> 1st JB --> Relay (switched on) --> battery (x5) --> Relay (switched off) --> fed back to the second JB.

Each relay was wired to the Navi Terminal via the Toggle State pin - so when I wanted power the Captain hits the button on the terminal for the Battery Array which toggles the 1st relay off (stops feeding power to the batteries) but toggles the 2nd relay on so that it connects to the 2nd JB.

Seemed to work ok, but the batteries started to get fried. Presumably once they were fully charged the load dropped but power was slower to fall away, thus over voltage.

Going to have a play around with it again - was also trying to build in levers which could shut down certain juncton boxes if i needed to conserve power etc. Used relays infront of the JB, with a wired lever, but it just didn't work. Now i know that relays should never be in front of a JB but always behind...
Reece Draygan May 25, 2021 @ 12:00pm 
Originally posted by shrekstyle:
Dont use the automated docking hatch assembly.
Add a docking port and a hatch with buttons to the main sub and the shuttle..

On the shuttle wire the shuttles command terminal toggle_dock to the shuttles docking port toggle_state.

For a backup so not to undock without the doors being shut wire the shuttles command terminal toggle_dock to a signal component input with target=1 true=0 false=(leave blank).

Wire the signal components output to the shuttles hatch set_state, then wire the signal component into a wifi component input.

On the main sub add a wifi component and wire the output to the main subs docking hatch set_state.
Make sure both wifi are the same channel.

This will send a signal to both hatches to close if any are open when you undock, it wont lock the doors to any state so you can still open/close them yourself.
It wont automatically open the hatches when the shuttle is docked.
Its better to have them closed in-case of flooding while docked anyway.

Just gave the above a go and it still don't work... not sure what I am doing wrong.

It may be this bit that I am getting wrong -

"For a backup so not to undock without the doors being shut wire the shuttles command terminal toggle_dock to a signal component input with target=1 true=0 false=(leave blank).

Wire the signal components output to the shuttles hatch set_state, then wire the signal component into a wifi component input.

On the main sub add a wifi component and wire the output to the main subs docking hatch set_state.
Make sure both wifi are the same channel."

I am using the signal check component, with Target=1 and false being left blank, but there is no True option, only the Output option. Is that what you meant? Didn't seem to work either way.
With the wifi component, presumably I wire the signal check components "signal out" to the wifi components input? So the Signal check will have two wires to its one "signal out" - one to the hatch set_state and the other to the wifi input?
Reece Draygan May 25, 2021 @ 12:21pm 
Even tried not wiring either hatch for the shuttle or the sub. When testing each ship separately the hatches open as you would expect. But when docked together the shuttles hatch just will not open, even if it is not wired to anything at all... I really do not get it :-(
Reece Draygan May 25, 2021 @ 1:54pm 
Update - it ended up being a tiny gap between the two hulls or "no gap" - the door was actually open (not controlled by other wiring as the warning in red was stating), it was just that my dude could not cross the docking hatch cause there was no connected hull to cross... hours and hours it took me to realise.. lol
shrekstyle May 25, 2021 @ 2:12pm 
Originally posted by 2.FJgReece Draygan:
I am using the signal check component, with Target=1 and false being left blank, but there is no True option, only the Output option. Is that what you meant? Didn't seem to work either way.
With the wifi component, presumably I wire the signal check components "signal out" to the wifi components input? So the Signal check will have two wires to its one "signal out" - one to the hatch set_state and the other to the wifi input?
Yes thats right. so its all working?
I have been there with that gap thing just have to move the docking ports into the hull rooms a but more.
Last edited by shrekstyle; May 25, 2021 @ 2:15pm
Reece Draygan May 25, 2021 @ 2:15pm 
Yep works fine now lol. Even with the auto docking port on the shuttle and a normal/manual one on the sub. So I'll now incorporate your idea of using the wifi thing to make sure both door states are put to zero when the shuttle leaves. Thanks for your help!
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: May 24, 2021 @ 4:58pm
Posts: 11