Barotrauma

Barotrauma

Visual Propellers
65 Comments
Ironbard  [author] 12 Jun @ 9:52am 
@Frogman
Oh my, that sounds extremely bothersome!
Hmmm... I suspect this is due to how submarines are stored within savefiles, and how I use/abuse the 'upgrade' tag to get my mod to work.

I think the only way to fix it is to create another mod which overrides the engines to use default settings - but I'm not sure if that will actually work. I'm also not sure how to test this, as I cannot replicate the issue on my end. : S
Ironbard  [author] 12 Jun @ 9:37am 
@Purpleskin Thank you for trying my mod!

Oh, that's interesting, when I made the mod I noticed that they disappear sometimes if you use too many propellers at once, but I never figured out what part of the code caused it to happen. I vaguely remember someone writing about this long ago on the Baro discord, about how it would become a problem in the future, but I can't seem to find the message anymore.

The problem with non standard engine sizes is a known issue. Sadly it is not something I can fix on my end. I've posted about it in the Github discussions three months ago. The discussion number is 15711.

Thanks again for trying my mod!
Frogman 18 May @ 8:30pm 
I think this mod is causing some issues with my game. Removing the mod or uninstalling it entirely, causes the engines in subs to become enlarged, covering most of the room, and even the reactor. Walking near the left end of the room will cause the character to violently jump up and down, causing damage, and in some cases killing the character entirely. I've tried to do a clean reinstall etc, without this mod, but it still seems to cause issues. I don't know how to fix it. When I reinstall and put the mod back, the game works normally. But I'd like to have my submarine without the propeller.
Purpleskin 6 May @ 10:08am 
Some strange things going on with the props, they only display at certain distances, disappear when i get close or to the left of them. Also non standard engine sizes move the prop and stop it lining up with the damage zone.
DEUS 10 Apr @ 4:31pm 
@Ironbard Okay i get it, still thanks for the answer! i will contact with author of Immersive Repairs
Ironbard  [author] 10 Apr @ 3:31pm 
@DEUS Ah I think I understand then, both mods override the default engines.
That would explain why it "breaks" differently depending on the load order as you described.

Your enthusiasm for this mod gladdens me, but what you ask is not as simple as you think. I don't even know what the "Oil system" is, much less what such a patch would require.

Immersive Repairs engine.xml code is currently more than 1000 lines, and I do not have the time or will to dig through that at this time.

Therefore I do not accept responsibility for creating a patch mod.
I suggest you ask Immersive Repairs author do to so instead.
DEUS 10 Apr @ 2:59pm 
Just make Oil system patch, thats all i ask, please!
DEUS 10 Apr @ 2:58pm 
@Ironbard Your mod just dont appear visual because immersive repairs have "custom" work engine, i mean with Oil system, if i place your mod above Immersive, Oil system GONE, if down below, visuals GONE, well...
Ironbard  [author] 10 Apr @ 2:57pm 
@Farbott, the mod should now be correctly updated. Let me know if that fixed it!
Ironbard  [author] 10 Apr @ 2:50pm 
@Farbott I think there's been an update recently, possibly today, so I have to update the mod, which I will get on to right now.
Ironbard  [author] 10 Apr @ 2:49pm 
@DEUS I don't know if I have the skills for that, but that does sound cool.
Ironbard  [author] 10 Apr @ 2:48pm 
@kellym
As far as I know the oxygen vents use a specific kind of decorative sprite for that; they don't animate like the propeller sprites, but actually rotate.
Farbott 7 Apr @ 6:44pm 
The propellers dont seem to appear on the submarine engines, is it only vanilla subs or am i having some weird problem?
DEUS 6 Apr @ 2:10pm 
Need immersive repairs support!
kellym 6 Apr @ 11:23am 
only up to one every few seconds? dam. thanks for the tip -- maybe il try something else.

Oxygen vents have fans inside them that spin, you can see it sometimes when sprite depths been manipulated. I thought if those could spin maybe a saw blade could too -- im looking more into it
Ironbard  [author] 4 Apr @ 3:54am 
@kellym
PS: Oh and thanks for the info regarding blp files! : D
Ironbard  [author] 4 Apr @ 3:52am 
@kellym

I was wondering about the same thing, but I don't think it will really work in the end.

As far as I know, the propeller damage is capped to 1 every few seconds; so even if it works, the overall damage will be very slow. I am also unsure if the damage can be applied to structures.

Not sure if I understand your question re. oxygen vent saw sprites.
kellym 15 Mar @ 11:25pm 
warcraft3's blp files, yes, very similar to dds.

Would this spinning animation style work for saws? such as the mining crane structures? suppose you put a area of effect damage circle from an invisible always on zero force engine onto the mining crane, perhaps one with the saw blade deleted in place of a void space, would it be possible to create a saw sprite that spun like fans inside the oxygen vents? to create a kind of melee range sub ram weapon? the contraption im jerry rigging is not working out so well.
Kardagan 15 Mar @ 10:56pm 
@USKYSN 🤡🫵🏿🤡🫵🏿🤡🫵🏿ТОКС 🤡🫵🏿🤡🫵🏿🤡🫵🏿 :spg::spg::spg::spg::hvy_tank:
Nupaska 15 Mar @ 5:20pm 
@USKYSN, мод заменяет текстуру двигателя, в нем нет ничего что может сломать игру
Если игра сломалась то сама по себе
Найс репорт ошибки без самой ошибки
Ashie. 15 Mar @ 5:12pm 
твой обосранный мод сломал нахуй мне игру. я не могу не подключится на сервер, на котором есть этот мод; не зайти в ебаную игру, потому что сразу кикает с игры с ошибкой игры, рекомендуя пойти на гитхаб.
не умеешь делать моды нормально - съеби нахуй со стима.
Ironbard  [author] 15 Mar @ 12:57pm 
@kelly
Hey that's really cool! : D
The first two games I remember sucessfully modding were TES:III Morrowind, and Warcraft III.

Morrowind definitely used dds files for the textures, and I'm 99% sure that Warcraft III did for some as well.

It's been more than two decades, so I can't remember what tools I used for that though.
I reckon it must have been a bunch of community made tools/scripts, in addition to the Construction Kit CD included with the hardcopy of the game.
These days I rely mostly on GIMP/Blender for texturework.
kellym 15 Mar @ 12:43am 
Fascinating, I've done some work with dds:

tripledoubleyou.hiveworkshop.com/members/kellym0.183403/#xfmgMedia

it is the format of textures used by starcraft2, among other games. But where I personally became most familiar with them was in Starcraft2. SC2 sometimes used them in a method known as cubic where the texture could be copy pasted over and over at increasingly smaller pixel count which created an image within an image in the unused corner space until it was just 9 pixels, or sometimes it would be chopped up into the shape of a literal cube set for proper uv wrapping of sky boxes. Im not sure why they did this initially, but they stopped doing it around heart of the swarm, DDS supports exotic alpha channel settings, and can be used to do some pretty amazing stuff. Alot of textures i've ever made have always been dds. Perhaps that is why he is attempting to use them here now in barotrauma? I've always defaulted to png for barotrauma.
Ironbard  [author] 14 Mar @ 2:30pm 
@Numidyum I did some tests with DDS format, I cannot get the filesize to be as low. I also did a search in Barotrauma, and did not find any DDS formatted textures - so I'm not sure that they would have worked. All the same, thank you for your suggestion! You never know what might work ; )
Ironbard  [author] 14 Mar @ 2:26pm 
@trollface Hmmm... Rotation of propellersprites is not supported as far as I know, although you can rotate engines(output force is not rotated AFAIK).

I'm assuming these pirate ships are modded; is that correct?
WhiteBoy 14 Mar @ 1:28pm 
ive noticed small issue on pirate ships and wrecks where the propeller doesnt match the engine's rotation
Ironbard  [author] 14 Mar @ 1:01pm 
@Nupaska
Update to 3644RPM should be live now.
Ironbard  [author] 14 Mar @ 12:37pm 
@Nupaska
I see in that case, I do believe I can make an adjustment.

Increasing the animspeed attribute from the current "120" to "182.2", should yield the requested RPM of 3644. However - since it is merely a simple sprite animation, it won't actually blur and such as it would in real life. The propeller might even appear to be going backwards at certain speeds. At any rate, it is an extremely simple change to implement, so I will test it out now.
Ironbard  [author] 14 Mar @ 12:30pm 
@USKYSN Can you elaborate? I don't know the meaning of 0b.
Nupaska 14 Mar @ 9:09am 
@USKYSN, How is this a mod problem?
Ashie. 14 Mar @ 8:48am 
trash. every enter on server needs updating 0b/0b.
Nupaska 14 Mar @ 8:35am 
I didn't ask you to implement that equation, i just said that for whatever boat that calculator is for it tells you that to move 30km/h propeller needs to be rotating at 3644RPM, which is 1000 faster than what you did

Just make it look like it's actually pushing the sub

And according to that code sprite indeed animates faster at larger force
Ironbard  [author] 14 Mar @ 7:31am 
@Nupaska

This is the source code for the updates of the propellersprite:

partial void UpdateAnimation(float deltaTime)
{
if (propellerSprite == null) { return; }
spriteIndex += (force / 100.0f) * AnimSpeed * deltaTime;
if (spriteIndex < 0)
{
spriteIndex = propellerSprite.FrameCount - Math.Abs(spriteIndex) % propellerSprite.FrameCount;
}
else
{
spriteIndex = spriteIndex % propellerSprite.FrameCount;
}
}

The equations in your link are much more complex than that, so I don't think it's currently possible to get the accurate behaviour you are requesting.

Implementing the equations is beyond my skill, but if you have the skills for that, then you can add a discussion/suggestion on the Barotrauma github.
Ironbard  [author] 14 Mar @ 7:11am 
@Nupaska
Hello there! And thank you for constructive criticism and the great link!

Did you test the propellers thoroughly?

I've noticed they sometimes act very strangely in the beginning, just when the reactor sputters to life and the electrical grid is balancing out.

<propellersprite texture="%ModDir%/V12.png" sourcerect="0,0,1024,1024" columns="8" rows="4" animspeed="120" origin="0.5,0.5" depth="0.901" />

^This is the line in the XML that creates the animation.
The value of 120 for 'animspeed' is an arbitrary value that I chose - I thought looked good enough to begin with - but maybe I need to fine tune it.

However, I don't think the code currently supports a proper linkage of ship velocity to propeller speed.
kellym 13 Mar @ 12:11am 
your always welcome aboard the stingray to fight the 10 end worms at endtown with us
Ironbard  [author] 12 Mar @ 2:08pm 
@Kengored
I am honoured! Ø__^
Ironbard  [author] 12 Mar @ 2:08pm 
@kellym
: D I have one or two mods in progress which are similar in function to this one.
Kengored 12 Mar @ 9:54am 
peak
kellym 12 Mar @ 6:47am 
this is pretty cool
Ironbard  [author] 12 Mar @ 5:08am 
@LenaZzzz
YESSSSS!!! That enthusiasm improved my mood! Thank you! : D
LenaZzzz 11 Mar @ 9:58pm 
YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
Ironbard  [author] 11 Mar @ 7:05pm 
@lumen
Thanks to your question the mod should now also work on existing campaigns. o7
Ironbard  [author] 11 Mar @ 1:45pm 
@lumen
From some simple tests, it seems to not work for the active sub in an existing campaign. : C

The propellers load in and are functional, but their placement is wrong.
I tested both vanilla and modded subs; both had the same problem.

However, it does seem to work in every other respect; subs purchased in a campaign after the mod is installed have the correct propeller placement.

...

I don't know why it doesn't work for existing campaign subs - it could be connected to the propellersprite bug that I've reported on the Baro github - but it seems unlikely.

It could also be that I've configured something incorrectly. I'll see what I can do.
Ironbard  [author] 11 Mar @ 12:30pm 
@lumen
Ooh! That's a really good question!

I have not tested this, so I don't know.

I vaguely remember something about campaign subs being different - I think it was that they were embedded in the save file somehow. So that might complicate things.

I'll test it and get back to you!
lumen 11 Mar @ 8:21am 
Can I add this mod to an existing campaign?
Ironbard  [author] 10 Mar @ 11:50pm 
@Pagan's Crusade
I've heard people speak of the old propellers many times, but I think this might be the first time that I've actually seen them! Thanks for sharing! : D
Pagan's Crusade 10 Mar @ 8:41pm 
Nice to see this brought back. Some early versions of Barotrauma actually had animated propellers, but for some reason, the devs removed them from the game.

https://i.imgur.com/WKlfdsZ.png
Ironbard  [author] 10 Mar @ 8:14pm 
@I LIVE AGAIN
Bwahaha! Thanks for making me laugh! Ø__^
Ironbard  [author] 10 Mar @ 8:12pm 
@Numidyum Thanks for the suggestion! I'll look into DDS.