Barotrauma

Barotrauma

Barotrauma Workshop
You can build your own submarines and monsters with in-game editors and share your creations with other players. Imagine and experiment.
spaceweezle 10 Nov, 2023 @ 1:43pm
Can you have a 3rd slot index for items?
I'm trying to make it so a diving suit requires two fuel sources and have it work with an auto-injector slot.

Problem I'm having is that there only appears to be a maximum of two slot indexes, so I can't actually define the slot for secondary fuel source.

To elaborate; I have 3 subcontainers, 1 oxygen, 1 auto-injector and 1 reactor fuel.
I linked a conditional to the suits power state "<Conditional Voltage="lte 0.5" />"

Also linked status effect -
<StatusEffect type="OnWearing" target="Contained,Character" Condition="-0.1" interval="1" disabledeltatime="true" targetslot="1" comparison="Or">
<Conditional IsDead="false" />
<RequiredItem items="reactorfuel" targetslot="1" type="Contained" />

That may be incorrect, I'm not sure. But I don't think it will work regardless if I can't link it to the correct slot index. Is such a thing even possible?
< >
Showing 1-15 of 20 comments
spaceweezle 10 Nov, 2023 @ 2:11pm 
Well I managed to add a 3rd slot index and it displays correctly as a rector fuel slot. It even drains as instructed via status effect.

Problem I have now is that it doesn't actually power the suit. It also drains fuel when the suit is powered off.
spaceweezle 10 Nov, 2023 @ 4:08pm 
I managed to get it so the suits powered state relies on reactor fuel. The fuel powers the suit but I can't figure out how to make it so the fuel only depletes when the suit is powered.

Tried all sorts of conditionals. I don't understand why the status effect outright ignores InWater conditional. I even tried switching from Onwearing to OnActive but that didn't work either.

I guess it works pretty much the way I want except for the fuel depletion. Probably something really basic I am missing.
Last edited by spaceweezle; 10 Nov, 2023 @ 4:09pm
spaceweezle 10 Nov, 2023 @ 7:25pm 
Got it sorted now.

All came down to my misunderstanding of how conditional comparisons work. I knew it was going to be something silly lol.
simsyu 20 11 Nov, 2023 @ 1:22pm 
Spaceweezled leveled up.
:barotrauma::ambition:
spaceweezle 11 Nov, 2023 @ 2:42pm 
Ding!

Quite insignificant but I feel proud to have worked that out. I'm not really good at this modding stuff so it was a major victory for me. :D
simsyu 20 11 Nov, 2023 @ 9:07pm 
You need to put a lot of skill points into self confidence if you want to achieve your goals.
:barotrauma::ambition:
Last edited by simsyu; 11 Nov, 2023 @ 9:08pm
spaceweezle 11 Nov, 2023 @ 10:55pm 
Originally posted by simsyu:
You need to put a lot of skill points into self confidence if you want to achieve your goals.
:barotrauma::ambition:

Hah! I must have rolled the Vagrant class because I have a major deficit of confidence points lol.

It wasn't actually a total victory. Apparently the method I used to get it working makes it so the suit itself also loses durability.

Mechanically I find that desirable. I just made it so lockers also repair the suit. Next I will probably look for a way to boost suit durability to better match the longevity of masterwork fuel rods. Maybe I can adapt the code from talents that boost maximum condition.
simsyu 20 12 Nov, 2023 @ 3:40am 
That's quite the expansion compared to your initial idea in such a short amount of time. As I'm not that well versed with modding Barotrauma, I'll set a list of general tips so that I didn't made an appearance here for naught.

There's 3 things to know when messing Barotrauma with your creativity:
-Do "less", 'cause you never know if you'll have some bright later on involving modifying your initial idea.
-Fighting against the game could result in breaking your idea with future game updates.
-Keep it intuitive, so people understand what's going on and don't hesitate to provide clear explanations.

And the important but optional fourth would be to communicate with other mod creators so that you could keep your mod compatible with others while making sure that there's enough "relevant" content to justify adding it to your mod list.
:barotrauma::ambition:
Last edited by simsyu; 12 Nov, 2023 @ 3:44am
spaceweezle 12 Nov, 2023 @ 4:34am 
Originally posted by simsyu:
That's quite the expansion compared to your initial idea in such a short amount of time. As I'm not that well versed with modding Barotrauma, I'll set a list of general tips so that I didn't made an appearance here for naught.

There's 3 things to know when messing Barotrauma with your creativity:
-Do "less", 'cause you never know if you'll have some bright later on involving modifying your initial idea.
-Fighting against the game could result in breaking your idea with future game updates.
-Keep it intuitive, so people understand what's going on and don't hesitate to provide clear explanations.

And the important but optional fourth would be to communicate with other mod creators so that you could keep your mod compatible with others while making sure that there's enough "relevant" content to justify adding it to your mod list.
:barotrauma::ambition:

Appreciate the input. I'd say I have a long way to go before I have anything worth uploading. I'm basically just dabbling at this point.

I did spend almost 200 hours making a submarine. Maybe I can upload that at some point. There's always just one more thing you want to add or fix. I feel like it could take another 200 hours.

Thanks for chiming in. I needed the encouragement and positivity. :)
spaceweezle 12 Nov, 2023 @ 4:20pm 
Well persistence finally paid off. The solution was far simpler than I thought initially.

I just added another status effect to counteract the suit degradation. With that you can have the suit degrade at any rate you want while retaining the original fuel depletion formula.

Also added conditionals to the power state of the suit that tells it to cut status modifiers when the suit drops below 1% durability.

There are probably more elegant ways to go about it, but at least it is functionally exactly what I wanted.
simsyu 20 13 Nov, 2023 @ 4:36am 
"It just works" - spaceweezle 2023
:barotrauma::ambition:
spaceweezle 13 Nov, 2023 @ 5:35am 
Lol! More like "I don't why it works, but it does"

I would probably invest more time into learning to mod this game but the engine integrity is just not there. It can barely handle processing your ship + a station, so I don't see any point adding anything substantial to it.

This is a reoccurring theme for me. All games I take an interest in always use crusty incompetent engines with zero headway. At least the shipbuilding is fun.
simsyu 20 13 Nov, 2023 @ 5:52am 
Originally posted by spaceweezle:
At least the shipbuilding is fun.
Tell this to my in-game hours.
:barotrauma::ambition:
spaceweezle 13 Nov, 2023 @ 7:24pm 
Originally posted by simsyu:
Originally posted by spaceweezle:
At least the shipbuilding is fun.
Tell this to my in-game hours.
:barotrauma::ambition:

Yeah it's crazy how many hours you can sink into making subs. I can appreciate the level of depth involved.

I think I wasted a good 10 hours just trying to comprehend the wiring system. It still confuses the hell out of me. :S
simsyu 20 13 Nov, 2023 @ 8:04pm 
The first thousand hours are essentially trial and error, toying and testing what you can create, how to obtain a same equivalent result with different processes, developing and polishing efficient process methods.
After that you'll feel free of boundaries, except that you're limited by the game itself, which is one heck of a nerve-wrecking boundary.
:barotrauma::ambition:
< >
Showing 1-15 of 20 comments
Per page: 1530 50