Barotrauma

Barotrauma

Automated turret Switching System
37 Comments
Max  [author] 24 Sep, 2024 @ 12:38pm 
The description answers this!
Scourge 13 Sep, 2024 @ 7:05am 
What does "left and right and gate outputs" mean? There is no wire output marked as gate on any component nor the periscope or turrets. What am I connecting to what here?
froggx 11 Apr, 2023 @ 1:35am 
I haven't gotten all the way done wiring this yet, but I was wondering about something I saw in the comments. Why are people asking about using negative angles or angles >360? Does barotrauma do math different than actual math does math?
LookinDapper 5 Aug, 2022 @ 8:52am 
how would you make it work with only two, step two has both AND gates going to the same Relay when i'm working with two guns
Max  [author] 24 Jun, 2022 @ 5:28am 
This was made a decent while ago, so new updates might have changed some of the logic.
Seamoose 24 Jun, 2022 @ 5:13am 
I had the issue with stuck turrets as well. I did some playing around with toggle lights and found that the signal they were sending from the regex was constantly on for the ones I had issues with. I haven't worked out exactly why this stops the switch, nor why only some get stuck on. My best guess would be that it instantly completes the 'And' check and switches right back?

There is an option to turn off the 'Continuous output' right above the expression input, and once I changed it I had no issues with stuck turrets. I'm relativity new to this game, so I don't know if the option for continuous outputs were a thing back when this was made.

Still not sure why this only effects some of the turrets though. (pretty consistently the left and bottom ones for me)
Max  [author] 5 Jan, 2022 @ 7:19am 
I haven't reviewed the system since the update when I uploaded it. So any number of things might have changed to make the system less reliable. You could try changing the Regex to Fambaa's proposal (see a couple comments down), as according to them this makes the turret switching more reliable and smooth.
Kaikai 4 Jan, 2022 @ 7:42pm 
Yeah I keep having a similar issue to the one Wilknkroff mentioned earlier. It works fine for a few turns, but then it just ends up stuck on a single gun. Any idea what causes that?
Max  [author] 30 Jun, 2021 @ 7:02am 
Thank you!
Ostross 30 Jun, 2021 @ 5:59am 
Extremely creative.
Operator 8 May, 2021 @ 11:48am 
I wonder what happens when an AI uses this set up XD
Guesswho 16 Apr, 2021 @ 5:25am 
i just moved what i wanted out of this folder:

C:\Program Files (x86)\Steam\steamapps\workshop\content\602960\1773974863\Mods\Edge Switchable Turrets\Content\Items\Assemblies

and put it here:

C:\Program Files (x86)\Steam\steamapps\common\Barotrauma\Content\Items\Assemblies

as i also couldnt find it anywhere ingame
Bucketsmith 17 Jan, 2021 @ 7:06am 
But this makes the guns unable to fire straight along the hull, as you would be switching to other turrets!
Wilknkroff 8 Oct, 2020 @ 3:03pm 
I try it ans it works for a few turns then suddenly it doesn't work anymore it remains blocked on a single turret I don't understand
fambaa 12 Jun, 2020 @ 1:11pm 
Sorry to bother you again but I found something out about RegEx that makes the gun switching much smoother and more reliable.
Instead of typing ^350 for the angle I used ^[3][5][0-9] to get a bit of a range. Im still trying to find the correct expression to make the shown negative angles be recognized, Im not much of a programmer. What I did find useful to set up the angles tho is to put a text label infront of the gun to see which angles it spits out. Keep in mind that you want the position_out from periscope into a delay block because otherwise it will be too jitterish to read in the flowing water.
Hope that helps some people out there who want to use your mod. Cheers
fambaa 11 Jun, 2020 @ 11:06am 
The System wont recognize values in the RegEx which are either negative or bigger than 360. For example -145 or 450.
As long as the game doesn't support proper angles in that way its very very finnicky to set up some angles with the drag nodes. And it doesn't help that the models of the guns get randomly flipped around.
I just recently started to build a ship so I don't know what many components are capable of, its very different from real life.

I got a few guns sort of working, but Im ripping my hair out with these deadzone setups on the guns.
Nice work tho.
A_Peculiar_Bird 19 May, 2020 @ 8:19am 
the submarine-box can't be found
can you provide an example of the expressions and outputs to switch between two turrets
one which covers up to -160 degrees to the left and a turret to the left which covers up to 330 on the right
Max  [author] 1 May, 2020 @ 8:15am 
You might have incorrect angles or your regex filter might be too wide (accepts too many angles).
Comrade Da 1 May, 2020 @ 4:01am 
Out of curiousity, does anyone have the system switch while the camera is zooming from the periscope to the default viewpoint?
Max  [author] 30 Apr, 2020 @ 8:21am 
Let me know if you need any more help! Feel free to hop on to the official Discord server and ping me for live support!
Comrade Da 30 Apr, 2020 @ 8:18am 
Whoops, I'm a doughboy idiot, I was typing my expressions into Output instead of expressions. See, it was rather basic.
Comrade Da 30 Apr, 2020 @ 8:10am 
I feel like I'm doing something really basic wrong here. Should there be quotation marks around the expression?

I have an angle 180-ish as my set up, and doing 180 ^180 or even ^18 as my trigger amount doesn't seem to do anything. My ship is slowly being covered in diagnostic text boxes
Max  [author] 30 Apr, 2020 @ 7:47am 
You can play around with this site, @Comrade Da:
https://regex101.com/
Comrade Da 29 Apr, 2020 @ 10:35pm 
I don't know much about regex. Could I have an example of the string I should put?
☠Millennium☠ 12 Aug, 2019 @ 2:22pm 
Well with cameras it's excellent thing.
Max  [author] 15 Jul, 2019 @ 9:18am 
@asm987:

Ah, Mose's mod, I know the guy. We'll try to fix it.

The automated turret is on hold for now, I reached around 600 logic components just to make it sort-of work, I need to rethink my maths on it. A lightweight version of it works for a 0° to 45° firing arc, but that's likely to confuse users since they'll think it works for a full 360°.
asm987 15 Jul, 2019 @ 9:14am 
@madmax3004 // This is the mod that causes conflict(?) with yours.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1799315641
I notified him as well.

Also can you upload the schematic of automated turret on workshop? I saw your work on discord and that was pretty amazing.
Max  [author] 15 Jul, 2019 @ 9:09am 
@asm987:
Have you installed any workshop submarines lately? The workshop uploader seems to have broken and new files are misconfigured. Try disabling newer submarines/workshop items and enabling this first, then enable subs/items one by one until you find the culprit and post a comment on their submarine.

If that doesn't fix it, please tell me and I can try to help you more.
asm987 15 Jul, 2019 @ 9:02am 
it says "cannot enable workshop item the file Data/ContentPackages/ContentPackages.xml would be overwritten by the item" and does not load.
Max  [author] 14 Jul, 2019 @ 11:50am 
It is an assembly @Ghostown
Ghosty 14 Jul, 2019 @ 8:24am 
Isnt this supposed to be saved as an assembly?
Max  [author] 11 Jul, 2019 @ 9:02am 
@=ISZ=Spyro117

It is literally what you have to do to get it working though. Have you read everything? In the description I've also mentioned that there is a working demo you can refer to if you need to see how I wired it up for myself.

If you need any more help, feel free to come to the official discord and ping me in the subs channel.
Spyro117 11 Jul, 2019 @ 7:45am 
thats not as helpful as you think
Max  [author] 11 Jul, 2019 @ 5:28am 
@=ISZ=Spyro117

The how-to is in the description
Spyro117 10 Jul, 2019 @ 3:13pm 
how you get this to work?
Max  [author] 23 Jun, 2019 @ 6:26pm 
@Seejay

I haven't tested it with bots, I doubt it works flawlessly, but honestly - if they end up turning into the turret deadzone to try and aim at bots, this could work.
Seejay 23 Jun, 2019 @ 3:28pm 
does it work with the bots? so they shooting at the aliens with the right turret?