Log in

View Full Version : S-18 class Bug solved?


Mithrandir
08-27-09, 12:20 PM
Dear all,
I write this post to announce that it seems that I finally managed to solve a bug critical for the S-18 class submarine in SH4.
The fact that nobody before me have noticed this terrible bug (I searched a lot the forum but without any result) is clearly an indication that very few people use this old submarine class, so I think that my discovery will be of very low importance... Anyway it can be very useful for those people, like me, that still use it.
All started some time ago when, during a terrible surface combat between my S-18 and a Japanese destroyer, my Engine room was flooded and the diesel engines were damaged (not destroyed). I managed, in some way, to sink the destroyer and I started repairing my sub.
Diesel engines were repaired, the water pumped-out and the submarine was again shining new (except the hull that was damaged to a certain extent, of course!).
So I tried to return to base and... nothing, the sub was sitting in the water like a duck. All repaired but no propulsion power.
Furthermore, when I tried to submerge the sub sunk like a stone as when you have a compartment fully flooded, but all the water was pumped-out!!!
This situation was later experienced several times and all the times with the same result: need to reload a previous save.
I decided that it was necessary to find a solution...
Using S3ditor I discovered that the S-18 (the only sub with this bug) was also the only sub with a type 29 zone in the "subname.zon" file.
After reading a post on the forum on the zones in "subname.zon" file, I noticed that the effect of this zone is to stop propulsion in case of complete flooding of the parent.
This zone seems also not prone to repair and to water pumping, so is this zone that causes the bug.
I decided to remove the node of this zone from the zon file and I tested it in several combats (offering the stern to the enemy guns to let them hit the engine room): the sub behaviour in case of engine room damage and complete flooding was now perfect. The diesel engines can be damaged, repaired and destroyed and the sub, once repaired behaves normally for what concerns propulsion power and submerging.
More surprisingly: reloading one of the saved games with the sub struct in the ocean with no propulsion power after the engine room flooding, the problem disappeared and, after repairs it returned to sail perfectly!
Personally I think that the presence of zone 29 in the s18 class (only in the s18 class) is an error made when Ubisoft corrected a similar bug in all the other subs in one of their official patch.
May I ask if there is someone of you that still use the s-18 interested in testing this solution?
Bye,
Mith

vickers03
08-27-09, 01:10 PM
good find:rock: keep on modding:up:

polyfiller
08-27-09, 01:35 PM
I need to take a look at the S18 files to confirm something ..... the zone 29 SHOULD only have the effect you've found on a sub with one or two propellers .....I have used zone 29 in reverse on the TSWSM .... to provide ships with 3 damageable propulsion zones (many large ships had prot,starboard and centre turbine rooms)..... zone 29 will propell any propellers byond the first two, and will drive the first two regardless of whether or not zones 21 & 55 are present if there are two or less props (I think from memory) so if it gets flooded, it takes out all propulsion on a unit with two or less props. On a ship with four props ... it has the rather pleasant effect I was looking for for large capital ships.

Mithrandir
08-28-09, 12:29 AM
polyfiller,
I agree with you on the utility of this zone for ships, but putting it on a sub is, in my opinion, a mistake... And a confirmation to this seems to be the fact that in all othes US subs in the game this zone is not present!

Bye,
Mith

polyfiller
08-28-09, 06:41 PM
Yes, agreed ... it's a hangover from having "magic" zone number which impact the game in a way that can only be determined / changed via the main game engine code. Not sure if this was laziness on the part of the devs or a deliberate ploy to make modding difficult.

I know what my money would be on ;)

keltos01
08-29-09, 05:56 AM
Yes, agreed ... it's a hangover from having "magic" zone number which impact the game in a way that can only be determined / changed via the main game engine code. Not sure if this was laziness on the part of the devs or a deliberate ploy to make modding difficult.

I know what my money would be on ;)


could there be such "magic" or "evil" zone in the Uboot add-on ?

with the same numbers as the US zones my IJN Boats get damaged and sunk faaaar tooo easily.

could you take a look at my IBDM Polyfiller or maybe you already know ?

I know that Observer's uboot damage model uses fleetboat zones !

keltos

Rockin Robbins
08-29-09, 08:23 AM
I wonder.... If a real submarine were damaged by gunfire, could they repair holes in the hull and submerge normally? If engines were hit by 5" shells from a destroyer, is there any chance that engine would ever work again, or would it need replacement?

I'd say the devs got it right on the S-18 and the OTHER subs are all bugged.

Just the same, great detective work and find. Keep up the good work!

By the way, Ducimus has performed some similar work in the developement of Trigger Maru Overhauled 1.7 and 1.8 beta. You might look into that. He's emphasized unhooking parent and child relationships to make systems more repairable. Since I don't do it myself you'd have to talk to him over at Submarine Sim Central (http://forum.kickinbak.com) to swap actual useful information and techniques.

I'm just a small time modder and cheerleader, not a pro.

Edit: fixed the link!

GerritJ9
08-29-09, 08:55 AM
I saw exactly the behaviour Mithrandir describes last night on an S-18 class, coincidentally- engines repaired (both diesels and electric motors), yet no propulsion at all and sank like a stone when diving to use the electrics.
While hull damage may well make diving impossible until repaired, it should be possible to motor away on the surface if the machinery is intact/repaired.
Whether engines actually could be repaired or not would depend on damage level- IRL, "Damaged" could mean replacing a cylinder head, liner, piston or bearing shells for instance. "Destroyed" could mean a broken crankshaft, piece blown from the cylinder block casting or some other terminal and irreparable damage.
Getting back to base might well prove impossible eventually if you are stuck in the middle of hostile territory and can't submerge though........ but at least you could try!
And yes, I'd very much like to test this fix!

pythos
08-29-09, 11:33 AM
This is possibly a little off topic, but still deals with damaged subs acting more damaged than they appear.

It was my understanding that german subs could stay afloat, with one compartment flooded, and American boats two. But in SH4 if one compartment is flooded you sink like a stone.

Case in point. I got shelled and got my stern bulkhead destroyed, that resulted in this compartment flooding. I would think in real life that compartment would get closed off by watertight doors, and the boat would make way as best as it could to refuge, if not base.

In my case only the stern torpedo room was flooded no other. (The destroyer disappeared into the fog from whence it came and did not come back). I was dieseling along on the surface at flank, and effected repairs. Then my boat went down....bow first.

But the damage was in the stern.

I need to do more research about the compartment flooding, but if anyone knows can you provide answers?

Highbury
08-29-09, 11:47 PM
As my sig shows, I use the S-18s in pretty much all my Pacific careers :) I love the little thing. I'd be interested in looking at your fix.

If I may be so bold as to make a request, since you are poking around in S-18 files anyways... can you maybe try to figure out why it is the only sub in the game (or at least of all the ones I have tried, including modded U-Boats) that the radio does not cut out when submerged? It plays loud and clear no matter how deep.

Thanks! :up:

ETR3(SS)
08-30-09, 08:57 AM
Submarine Sim Central (http://www.subsim.com/radioroom/Working%20alongside%20church%20planters,%20sponsor %20churches,%20and%20associations%20in%20Missouri% 20to%20plant%20churches,%20Ken%20McCune%20knows%20 the%20importance%20of%20a%20shared%20vision%20to%2 0reach%20people%20with%20the%20Gospel.%20%20Collab oration%20and%20teamwork%20are%20keys%20to%20disco vering%20needs%20for%20new%20churches%20and%20the% 20best%20people%20to%20plant%20them.%20%20Your%20c ommitment%20to%20reaching%20people%20through%20the %20Cooperative%20Program%20is%20also%20key%20for%2 0Ken%20and%20his%20wife,%20SHYRE,%20passionately%2 0pursue%20lost%20people%20living%20in%20Missouri.% 20%20Your%20support%20helped%20equip%20Ken%20for%2 0this%20important%20ministry%20while%20he%20was%20 in%20seminary%20and%20new%20enables%20him%20to%20c arry%20out%20God%C3%A2%C2%80%C2%99s%20call%20on%20 his%20life.%20Please%20join%20Ken%20and%20Shyre%20 in%20asking%20God%20to%20plant%20and%20raise%20up% 2010%20healthy%20new%20churches%20in%20his%20area% 20this%20year.)
Your link seems a little...off:06:

Forbidden

You don't have permission to access /radioroom/Working alongside church planters, sponsor churches, and associations in Missouri to plant churches, Ken McCune knows the importance of a shared vision to reach people with the Gospel. Collaboration and teamwork are keys to discovering needs for new churches and the best people to plant them. Your commitment to reaching people through the Cooperative Program is also key for Ken and his wife, SHYRE, passionately pursue lost people living in Missouri. Your support helped equip Ken for this important ministry while he was in seminary and new enables him to carry out God’s call on his life. Please join Ken and Shyre in asking God to plant and raise up 10 healthy new churches in his area this year. on this server.

keltos01
08-30-09, 12:33 PM
Your link seems a little...off:06:


here :

http://forum.kickinbak.com/viewforum.php?f=69&sid=abd70e59e690c1baf26957bb29d8c759

keltos

Mithrandir
08-31-09, 07:46 AM
Hallo all,
I discovered another thing on the S-18.
It is the only sub in which the tag "is diesel-electric" in "subname.sim" is set to false. This is the reason why it recharges so slowly the batteries. Changed to true the recharge is much faster.

I would like to put the fix, JSGME-ready, on subsim forum for download, any suggestion on how to do this?

Bye,
Mith

ETR3(SS)
08-31-09, 08:27 AM
Hallo all,
I discovered another thing on the S-18.
It is the only sub in which the tag "is diesel-electric" in "subname.sim" is set to false. This is the reason why it recharges so slowly the batteries. Changed to true the recharge is much faster.

I would like to put the fix, JSGME-ready, on subsim forum for download, any suggestion on how to do this?

Bye,
Mith
There's two ways to do this. 1. You can give the file to someone with file uploading privileges for them to upload to the site or 2. you can go to the Downloads page and there is a link on the left side to "become one of the modmen" which is sending Neal a PM requesting upload ability.

Rockin Robbins
08-31-09, 11:59 AM
Your link seems a little...off:06:

Now THAT's what I call "off!" Let's see if we can change that. Let's try Submarine Sim Cental (http://forum.kickinbak.com). Testing...testing.....

It works!:D

Rockin Robbins
08-31-09, 05:53 PM
I was just trying to answer a question about FOTRS and was using my camouflaged S-18 to answer it. What a blast it is! I laid havoc to a convoy slowed down by night. Just about drained my batteries completely and emptied every torpedo in the boat. I LOVE the Sugar Boats. AVG Warhawk got me hooked for good!

pythos
08-31-09, 06:23 PM
The reason the S-18 did not have Diesel electric enabled is because IT IS NOT A DIESEL ELECTRIC sub. It has the same charging and propulsion system as the German U-boats, hence one engine provides charging amps, while the other propels the sub.

The S-18, and S-42 classes had VERY long charging times.

Source of info, Us submarines 1918-1945. Friedman.

Mithrandir
09-03-09, 12:58 AM
Ok, so I will leave "itsdieselelectric" to false! :)

Bye,
Mith