Barotrauma

Barotrauma

Auto Operate Toggle Turrets
40 Comments
obsidianz 4 Jun @ 9:31am 
And it doesn't work, and not for your reason, it's broken in the vanilla version of the game too) HDD

They can't fix their own patch)HD
Agent Delta  [author] 4 Jun @ 8:20am 
I'm honestly not sure anymore, so much has changed now and I haven't updated this in a long time.
obsidianz 3 Jun @ 1:04am 
Does this mod still work?
I connect something, a turret, check the values ​​and it doesn't react to targets....
Agent Delta  [author] 15 Jul, 2024 @ 1:33pm 
Cool
Check out my Delta Maverick sub, if you like. It's a heavily-modified Barsuk with various added features specifically for solo pilots. Read the description and crack it open in the subeditor to see if there's any ideas you haven't already implemented or thought of.
The Seraph of Tomorrow 14 Jul, 2024 @ 11:15pm 
Who knows, maybe it's just user error on my end for not figuring it out. Though there sure isn't a guide on how so, that's on them either way.

Appricate the mob by the way, was able to use it as part of a person project to make a A.I. copilot, basically based on the Golden Age mods concept as the base. Can chat, Toggle auto-locks, Play music throughout the sub, turn on and off auto turrets (thanks to this mod), and maybe some other features once I learn how to do more with sub editing.
Agent Delta  [author] 14 Jul, 2024 @ 11:07pm 
...wow. I really thought they just implemented my idea practically verbatim.
Guess this mod will still see use for a while.
The Seraph of Tomorrow 14 Jul, 2024 @ 10:37pm 
Basically no, they added a toggle state pin to relays though not to turrets.

So in the base game I have no clue how to toggle the AO even though there are options saying it is suppose to be wire-able. So i got this mod instead that you made because it does add a pin I can just wire up to a wifi and call it a day,
Agent Delta  [author] 14 Jul, 2024 @ 10:18pm 
They originally weren't going to add it, but they ended up developing most of it and decided "sure I guess we'll add it", without putting too much effort into accessibility. They never really intended to fully incorporate AO into the main game but were ultimately persuaded by player interest.

In any case, do the vanilla turrets not just have a simple ON/OFF wiring pin for AO now? Is it still more complicated than that?
The Seraph of Tomorrow 14 Jul, 2024 @ 9:57am 
I am tempted to use this mod, as nothing in the game explains how to actually use the games built-in auto-operate toggle functionality. Idk why the devs add features without having any sort of site or guide to explain how the features work.
Agent Delta  [author] 18 Jun, 2024 @ 8:31am 
Yup, saw that that was coming out; thanks all for your support in this mod, glad to see the devs finally putting it to use themselves.
comjar 18 Jun, 2024 @ 7:11am 
Now with the update v1.5.7.0 you can do this in game without this mod
the update :
https://steamhost.cn/news/app/602960/view/6086132471878536207
Impatient 4 Feb, 2024 @ 12:47pm 
@Agent Delta
IMO the description is perfect now. Its informative and on the spot. I understand everything by reading the description alone. Great work!
Kaizer 1 Feb, 2024 @ 12:14pm 
Thanks. Sorry if I was being unclear - yes. I meant it wasnt inheriting properties like not targeting submarines, and presumably others. I can wire them up and get them working just fine. I include them on all the subs I make because it contributes to hubris which is a pillar the game (and also lets you run a sub with less people as they inevitably fall off towards the end of a campaign)
Agent Delta  [author] 1 Feb, 2024 @ 11:05am 
@Kaizer
Are you saying that the wiring all stayed when you changed the turret, but your custom Auto Operate settings didn't stick?
If that's the case, then once again, I think that would be a problem the devs would have to fix.
In fact, it looks like they've been thinking over this issue [github.com] for almost a year now. Apparently it's by design that new turrets and hardpoints don't inherit any properties of whatever they're replacing.

One of the devs posted to the linked issue thread just a few days ago so I will comment on it now and see if we can convince them to actually follow through on this.
Kaizer 31 Jan, 2024 @ 12:58am 
I really love this mod and incorporate it into every sub I make, but I ran into a particular bug recently. I wanted a sub to start without one of it's turrets, so I started it with a turret hardpoint but still set up the wiring appropriately. The weapon I got to replace the back gun works, but it didn't inherit the properties. In particular, I make it so my turrets don't target submarines to prevent them from targeting respawn shuttles. Is there any way to fix this behavior? I assume the same error would crop up if someone just swapped a hardpoint for another gun. I haven't extensively tested all the autoturret properties.
Agent Delta  [author] 26 Jan, 2024 @ 8:07pm 
I have reviewed and re-verified the code and functionality for this mod and completely re-written the mod description.

Let me know what you think.
Agent Delta  [author] 25 Jan, 2024 @ 4:14pm 
@Impatient
To be brutally honest, when I originally posted this mod, I really thought everyone would know what I was referring to when I said "Auto Operate". I also assumed that anyone bothering to look at a mod like this would already have a pretty intuitive understanding of the wiring and technicalities involved.

That being said, I had no idea at the time that this mod would be in any way popular, nor did I realize how this mod would appeal to such a wide variety of players. Furthermore, I thought for sure that the devs themselves would have implemented something like this by now and nobody would even care about my mod.

Given that this mod still gets visitors, comments, downloads, etc. on a semi-regular basis, I will attempt to update the description here in the next couple days.

Anybody reading after that time, let me know what you think.
Impatient 2 Jan, 2024 @ 7:10am 
I agree with some of the comments, that you need to improve the mods description. Unless I read the comments I had no clue what this mod does, why and how. And you keep explaining it in the comments repeatedly, instead of improving the mod description. ...

Start with the following headlines:
[ulist]
[*] What this mod does
(general explanation, without going into details)
[*] What is "Auto Operate"
(detailed explanation of AO and its history)
[*] How this mod works
(detailed explanation of how this mod works)
[*] Info for sub builders
[*] If you add this mod to an already started campaign ...
[*] If you add this mod before campaign start ...
[*] If you remove this mod from an already started campaign ...
[/ulist]

Make pictures (connection panel, wiring example, ...).
Add an item assembly with a wiring example.

I am writing this, because I think this is an interesting mod and that it deserves more attention.
Agent Delta  [author] 20 Sep, 2023 @ 2:08pm 
@CKBEPHOCBET
How Auto Operate actually works is totally controlled by the devs. The only purpose of this mod is to facilitate toggling Auto Operate on and off during normal sub operation; at the time of this mod's initial release, AO could only be toggled in the sub editor.

If you've got a problem with how Auto Operate works (who it targets, how it tracks, etc.), then take it up with the devs or find a different mod that implements it in their own way.
If you don't understand how to toggle AO with this mod installed, even after reviewing my instructions above, then I can try to explain more.
CKBEPHOCBET 19 Sep, 2023 @ 1:47pm 
DOES NOT work - The author needs to make a mockup with a button and connections to clearly show that the gun fires automatically at specified targets, for example a person without any sensors, etc.
[]Herz[] 24 Jul, 2023 @ 8:49am 
what bothers me about the bots is that you can't command them, first aim and shoot, with a "sure" hit. They shoot eagerly, e.g. with the railgun, instead of aiming at the target and holding it, or calculating the trajectory and then firing. They just shoot wildly and sometimes not at all when it matters, e.g. when the latcher attacks, then they should shoot as much as they can, but don't do it.
Romario 24 Jul, 2023 @ 12:12am 
I mean, how do I make it so that the turret can be turned on and off?
Romario 23 Jul, 2023 @ 11:37pm 
And if I want to make the automatic operation of the turrets on the switch, then how do I do it?
Agent Delta  [author] 30 Apr, 2023 @ 11:35pm 
As explained above, you can either set the internal memory component's internal value to "1" in the subeditor or in-game by passing any non-zero signal to set-state.
Does this help?
Super General Super Klod 30 Apr, 2023 @ 9:47pm 
I'm sorry but I can't seem to figure out how to even get auto-operate to work in the first place. From my understanding shouldn't the gun (once hooked up to power) shoot at whatever enemy type i designate once auto operate is on? I can't seem to get it to work and I can't find anything on it.
Agent Delta  [author] 19 Apr, 2023 @ 6:14pm 
Scratch that, after some consideration, I decided it would just make more sense if the pins read "set_state" and "state_out" since they basically work that way, even though it's still a memory component underneath.
Agent Delta  [author] 19 Apr, 2023 @ 4:07pm 
I'll update the description to make this a little more clear.
Agent Delta  [author] 19 Apr, 2023 @ 4:06pm 
@obsidianz - Yes, as I tried to explain in the description, you have to treat it like set_state, not toggle_state. If you're using a button then, just like you described, the AO turns on and stays on because you just keep sending a "1" every time you press the button.
Use something like a lever instead, which sends "0" when up and "1" when down, or hook the button to toggle_state on a relay component and connect the relay's state_out to the turret's signal_in instead.
obsidianz 19 Apr, 2023 @ 5:47am 
To be able to implement the On / Off function?)
And then through the button it turns on but does not turn off) XD
死于鼻孔太黑 (⊙●●⊙ 18 Apr, 2023 @ 2:02am 
working perfectly wonderful:) thanks:moralefist:, hope dev will fix the power bug soon
Agent Delta  [author] 17 Apr, 2023 @ 8:01pm 
@Tech-Priest - Currently, without any mods, Auto Operate can only be turned on for a turret in the submarine editor, meaning it can't be enabled on vanilla subs. Furthermore, once you get in-game with an AO-enabled turret, there's no way to turn Auto Operate off. Generally, this isn't a huge problem, but I've already been in more than one than one situation where I want the bots/AO to stop firing the turrets immediately because the AI is just slightly stupid.
This mod addresses all that, allowing Auto Operate to be toggled on and off on literally any in-game turret, including vanilla/pre-existing ones.
Agent Delta  [author] 17 Apr, 2023 @ 8:00pm 
@Tech-Priest - Before version 1.0, people made various mods for getting turrets to shoot by themselves, generally involving a bunch of wiring magic with a bunch of invisible motion detectors or something like that.
Along with the rest of the content in 1.0, the devs finally released their own version of this: Auto Operate. When a turret has Auto Operate enabled, it aims and shoots at anything it considers an enemy entirely on its own. The only thing it can't do for itself is reload ammo.
The Seraph of Tomorrow 17 Apr, 2023 @ 7:40pm 
Call me what you will, but what does this mod do?
More specifically what is "Auto Operate"?
Agent Delta  [author] 17 Apr, 2023 @ 5:07pm 
As for the images, I only stuffed in the ones the game complained about. Most of the filepaths start at the root and therefore had no problems, but some expect the files to be in the same folder as the XML, hence the included images. I could probably rewrite every non-complete filepath, but that sounds like extra work with basically no payoff.
Battle Engineer 17 Apr, 2023 @ 2:52pm 
it doesnt effect performance, just adds file size.
also you dont need the images in there as the textures should already lead back to the weapons file but again, doesnt effect performance just file size of the download lol
Agent Delta  [author] 17 Apr, 2023 @ 1:08pm 
@Fe^Fi-Fo_Fum=( - Implemented and tested hardpoint wiring and memory components. Let me know if anything else is missing.
Agent Delta  [author] 17 Apr, 2023 @ 11:55am 
@Fe^Fi-Fo_Fum=( - Yes, I think I can implement this on empty turret hardpoints as well. I didn't think about it at first, but now I can see how it would be helpful to have the AO wiring already in place on a hardpoint so it'll carry over to a swapped turret later.
Agent Delta  [author] 17 Apr, 2023 @ 11:48am 
@Battle Engineer - Yeah, it just made it slightly easier to break things up and read that way in my editor. Do you know if one way or the other makes any difference on performance?
Battle Engineer 17 Apr, 2023 @ 8:01am 
just so you know, you dont need an override for each item, you can have one at the start and 1 at the end so the over ride raps the whole list
死于鼻孔太黑 (⊙●●⊙ 17 Apr, 2023 @ 2:13am 
very nice, but can this happen to hardpoint too? so one of the bug of auto operate can be fix. and I can start on my new sub. well upgrade first then swim out to connect wire is also an option,,, sound bit of funny too:check_mark: