Log in

View Full Version : [TEC] SH5.exe patches to fix bugs and add functionality


Pages : 1 2 3 4 5 6 [7] 8 9 10 11 12 13 14

Tord Hoppe
03-14-13, 01:59 AM
Thanks Fifi, that solved it. Since I pointed the patcher to the main SHV folder I shouldn't enable it as a mod. Now I just need to get the settings correct. I'm not sure about number 7, it says something about making the tool stand out but not what tool? All tools have two entries which is one for when you draw it and another for when you draw another mark. Some of the tool marks change colour again when I deactivate the map tool altogether. A bit of trial and error to look forward to. :)

TheDarkWraith
03-14-13, 03:17 PM
v1.0.76.0 released. See post #1

starting with v1.0.76.0 added new patches to the SH5.exe that will disable the Orbit Listener and disable intro movies. There is also a new patch for the SH_NClient.dll that will disable the Orbit Listener completely. By enabling all patches related to Orbit Listener the game will no longer synch save games, no more CTDs because it couldn't reach the client, and the game will not quit because of any problems with Orbit Listener. It should also stop the annoying please wait while saving at the worst times (should no longer save anything during the game).

I've cracked so much of this exe now it's not even funny :D I was looking for something else and stumbled upon this so I made new patch files for it :salute:

NOTE: this does not disable the copy protection in the game (Orbit Listener). Uplay browser will still start. This just stops the game from reporting to the server every so often thus preventing slowdowns and possible CTDs.

:|\\

volodya61
03-14-13, 03:21 PM
v1.0.76.0 released. See post #1

Thank you :yeah:

THE_MASK
03-14-13, 03:24 PM
Fantastic ,thankyou .

lynx
03-14-13, 03:34 PM
¡Bravo! thank you.:salute:

gap
03-14-13, 03:44 PM
well done! Thank you :yeah:

keysersoze
03-14-13, 04:14 PM
Thank you! you rock TDW :rock:

Fifi
03-14-13, 04:22 PM
That's really cool! :rock:

Targor Avelany
03-14-13, 04:26 PM
v1.0.76.0 released. See post #1

starting with v1.0.76.0 added new patches to the SH5.exe that will disable the Orbit Listener and disable intro movies. There is also a new patch for the SH_NClient.dll that will disable the Orbit Listener completely. By enabling all patches related to Orbit Listener the game will no longer synch save games, no more CTDs because it couldn't reach the client, and the game will not quit because of any problems with Orbit Listener. It should also stop the annoying please wait while saving at the worst times (should no longer save anything during the game).

I've cracked so much of this exe now it's not even funny :D I was looking for something else and stumbled upon this so I made new patch files for it :salute:

NOTE: this does not disable the copy protection in the game (Orbit Listener). Uplay browser will still start. This just stops the game from reporting to the server every so often thus preventing slowdowns and possible CTDs.

:|\\

THANK YOU THANK YOU THANK YOU!!!!!

YAY!!! I have so much happy emotions right now, that I probably will be running crazy at work right now!!!!!!! :yeah: :rock::rock:

This is an awesome thing, bud. It also will mean that I can test my changes in game so much faster!!!!!!!! :sunny:

gap
03-14-13, 04:38 PM
@ Fifi & Targor

your comments are totally ou of place here... :nope:

...this is the "thank you" thread, please stick to the rules :O:

Targor Avelany
03-14-13, 04:49 PM
@ Fifi & Targor

your comments are totally ou of place here... :nope:

...this is the "thank you" thread, please stick to the rules :O:

oh, sorry. Corrected :O:

gap
03-14-13, 04:57 PM
oh, sorry. Corrected :O:

:rotfl2:

Fifi
03-14-13, 06:19 PM
I changed for new patcher (desabing all options with old one before) and now each time i activate your Orbit Listener things, game crashes at the end of loading mission.
I tried with all my saved missions, even the bunker save, same crash...
So i deactivate the Orbit things, and i'm able to access game only in my last bunker save :doh:

So i guess it's not working correctely with my Uplay (btw offlined with its tools), or maybe i had to restart brand new career?

Anyway, i restarted last mission as i can't do other way with new patcher :haha: and i completely deleted old one from PC.
I never ran the debug utility, so i can't tell what's happening :oops:

THE_MASK
03-14-13, 06:32 PM
Using the latest patcher v1.0.76.0
Enabled with the jsgme , copied the EXE,sim,collision and SH_NClient.dll to the folder and patched those then enabled with the mod enabler .
Loaded the latest save which is mid patrol , save number 120 .
Everything loads and i can continue with my patrol .

Fifi
03-14-13, 06:53 PM
Using the latest patcher v1.0.76.0
Enabled with the jsgme , copied the EXE,sim,collision and SH_NClient.dll to the folder and patched those then enabled with the mod enabler .
Loaded the latest save which is mid patrol , save number 120 .
Everything loads and i can continue with my patrol .

Hey, wait...i think i didn't copy the SH_NClient.dll inside the patcher! :hmmm:
Have to try again! :D

Fifi
03-14-13, 07:15 PM
Nope, still not working :nope:

Now i have a popup window saying the game lost connection (even offline!) and have to wait for better internet connection, or leave game...

I tried re activating Uplay internet connection (online), but same result.
Though, game isn't crashing now...

Fifi
03-14-13, 08:41 PM
Well, i've adjusted many sound files and command files and others files that are working great...don't want to start over again...so it's gonna be fine without the Orbit stuff enabled in patcher! :haha:

TheDarkWraith
03-14-13, 11:30 PM
Well, i've adjusted many sound files and command files and others files that are working great...don't want to start over again...so it's gonna be fine without the Orbit stuff enabled in patcher! :haha:

Shouldn't have any problems with the Orbit Listener patches. You did install all of them? What version of the game do you have? DVD?

I tested the patches with DVD version and all is well. Haven't seen the saving thing during any of my game time since I installed the orbit listener patches. Can anyone else confirm this :06:

Game boots right up into main game menu without that annoying synchronizing saves popup at the beginning :D

Fifi
03-14-13, 11:46 PM
Yes, i installed all of them, and running SH5 with Uplay...

When i launch game, i don't get anymore the annoying synchroniser window before accessing main game screen, so it's working fine that way, but after launching saved mission (or bunker) i get this weird popup window telling me game needs internet connection (even offline with Uplay setting tools)...

THE_MASK
03-15-13, 01:01 AM
Yes, i installed all of them, and running SH5 with Uplay...

When i launch game, i don't get anymore the annoying synchroniser window before accessing main game screen, so it's working fine that way, but after launching saved mission (or bunker) i get this weird popup window telling me game needs internet connection (even offline with Uplay setting tools)...I didnt have the patcher working before . Now i do and i get the sane message . I have the dvd . I cannot load a save , i will try with the sync save settings on and see if that makes a diffrence .

Targor Avelany
03-15-13, 01:34 AM
Works great.
the only thing that seems to not work for me atm is the camera on lifeboats (as you can imagine I'm doing and abundance of test with them atm).
I will test that feature more when I come back next week and post dbgview logs.

hitmanuw
03-15-13, 02:16 AM
i have the same problems als the other guys i can't load my save games ....
i have the DVD version of the game ...

dem
03-15-13, 03:02 AM
[4768] d3d_antilag: d3d9.dll unloaded
[6044] SH_ServerOrbitProtocol.cpp (111): Failed to read packet from client.
[3508] ..\..\..\..\..\..\..\..\..\P4ws\massgate-MAIN\massgate\uplay_pc\2.1\live\shared\libs\servic es\src\services\GameKeeperImpl.cpp(261) : Product id '3' all processes terminated

THE_MASK
03-15-13, 03:14 AM
The remove logo and intro patch works , thought i would report that :up:

THE_MASK
03-15-13, 03:59 AM
Another thing that might be helpful is when i enable the orbiter patches and the game wont load a save game but leaves a message about losing connection . When i go back into the game and look at the save files the game saves a game save called autosave_on_disconnect .

dem
03-15-13, 05:27 AM
The remove logo and intro patch works , thought i would report that :up:

Another thing that might be helpful is when i enable the orbiter patches and the game wont load a save game but leaves a message about losing connection . When i go back into the game and look at the save files the game saves a game save called autosave_on_disconnect .


As above for me to

Fifi
03-15-13, 05:46 AM
When i go back into the game and look at the save files the game saves a game save called autosave_on_disconnect .

Correct :yep:

hitmanuw
03-15-13, 07:27 AM
When i go back into the game and look at the save files the game saves a game save called autosave_on_disconnect .

Same here ....

BigWalleye
03-15-13, 09:15 AM
I'm fairly new to SH5. Played a lot of SH4, and go all the way back to plain old SH. Tried your patcher, and it looks to be a great approach to modding. I have verified that most patches seem to work fine. But have had no success with single-engine control. U and N keys do nothing, and I key brings up the journal. Have tried to plow through previous pages of this thread, but haven't found anything helpful. Any suggetsions or links would ba appreciated.

Now I have tried your latest release, and am getting the same results as others have reported. Don't get the "syncing" splash, but can't start a saved game. Will this patch perhaps only work properly when a new career is started?

BTW, does single engine mode only affect the speed and noise output, or does it generate a turning moment also? Don't know for sure if U-boats did it, but fleet boats regularly used one shaft back full and the other ahead full to drastically reduce the turning radius.

UPDATE: Nope, starting a new career doesn't seem to work for me either. Still get the "Unable to sync" message.

TheDarkWraith
03-15-13, 11:38 AM
found the problem with the Orbit Listener and the career saves. Testing the change now. Should have new patcher version available soon :up:

TheDarkWraith
03-15-13, 11:57 AM
v1.0.77.0 released. See post #1.

Fixed problem with disabled Orbit Listener and not being able to load career saves. The problem was I forgot to include one change that I had made to my .exe when developing this :-?

I tested it (all patches dealing with Orbit Listener enabled) and worked fine with all my career saves and with single missions. Can someone else confirm this on their end also :06:

:|\\

hitmanuw
03-15-13, 12:49 PM
v1.0.77.0 released. See post #1.

Fixed problem with disabled Orbit Listener and not being able to load career saves. The problem was I forgot to include one change that I had made to my .exe when developing this :-?

I tested it (all patches dealing with Orbit Listener enabled) and worked fine with all my career saves and with single missions. Can someone else confirm this on their end also :06:

:|\\


Habemus TheDarkWraith :rock: :rock:

works fine now

dem
03-15-13, 12:51 PM
Habemus TheDarkWraith :rock: :rock:

work fine now
Works ok for me now

Thank you :yeah:
Dem

BigWalleye
03-15-13, 01:39 PM
Works fine for me, too. Can load saved games off-line with no problem.

But I still can't get the independent engine patch to work. I'm sure I'm missing something obvious.

volodya61
03-15-13, 01:44 PM
But I still can't get the independent engine patch to work. I'm sure I'm missing something obvious.

Do you use New UIs v7.2.0?

BigWalleye
03-15-13, 02:12 PM
No, I don't have it and I am unable to locate it. Have and am using v7.1.0, which is probably why I can't get the patch to work. Where can I download v7.2.0? Thanks for the help.

volodya61
03-15-13, 02:49 PM
No, I don't have it and I am unable to locate it. Have and am using v7.1.0, which is probably why I can't get the patch to work. Where can I download v7.2.0? Thanks for the help.

Yes, you are right.. you can use this feature only using v7.2.0..
here is last version - http://www.subsim.com/radioroom/showpost.php?p=1931676&postcount=9311
here is patch for this version - http://www.subsim.com/radioroom/showpost.php?p=1993104&postcount=9572

also you should enable this patch in the OptionsFileEditorViewer app..

Fifi
03-15-13, 04:00 PM
Fixed problem with disabled Orbit Listener and not being able to load career saves. The problem was I forgot to include one change that I had made to my .exe when developing this :-?


Thanks for the quick fix.
Now it works fine :up:

THE_MASK
03-15-13, 04:35 PM
Everything working here:up:

BigWalleye
03-15-13, 04:56 PM
All is good! Everything works. Thank you, Volodya, for the quick and accurate help. And many thanks to The Dark Wraith, for this and all his wonderful stuff! :yeah:

redpiano
03-22-13, 02:49 PM
Still no Steam patch? :wah: :wah:

Tonci87
03-22-13, 02:54 PM
He can´t make a Steam patch because he doesn´t own SH5 on Steam. He doesn´t have the Steam sh5.exe

Targor Avelany
03-22-13, 03:31 PM
He can´t make a Steam patch because he doesn´t own SH5 on Steam. He doesn´t have the Steam sh5.exe

I also believe that steam might have a way to check their .exe files. Not sure, but i think that was another reason for this.

redpiano
03-22-13, 03:59 PM
Uhh well Il2 mods use a custom exe file and I play those on steam just fine, you can launch the game without steam using custom exe's.

If TDW is willing to make a steam patch I would be happy to purchase him a steam copy, I really want those damn magnetic detonators to work.

gap
03-22-13, 04:41 PM
If TDW is willing to make a steam patch I would be happy to purchase him a steam copy, I really want those damn magnetic detonators to work.

For the same amount of money you could purchase yourself a non-steam version of the game. Same cost for you, but no waste of time for TDW, who could focus on new cool patches rather than having to figure out steam exe's addresses :03:

My two cents, indeed :salute:

redpiano
03-22-13, 05:04 PM
*grumble grumble* Non-steam, pfft!

BigWalleye
03-22-13, 07:19 PM
The Steam approach, like so much "Cloud-based software" these days, is to lease you the capabilities of their software, not the software itself. You do not own a copy of the code and they retain not only the rights, but the executable. Because you do not own the software, you have to use what they have agreed to supply, not what you might want. If you lease a car, you can not have the motor ported, bung out the cylinders, and hang on an aftermarket blower. That pretty much voids the lease. You have to return the car as stock as you got it, because it never was your car. There are advantages and disadvantages to this approach. You have just discovered one of the big disadvantages.

I really agree with gap. Spring for a stock copy of the game. It's not a lot of cash and you apparently can afford it since you offered to buy one for TDW. Then you can do whatever you want to your own game. But you are limited in what you can do as long as you remain in the Steam ecosystem.

BTW, I would be concerned that there is a risk of running afoul of the Steam DRM system if you try to modify their executable code. They may feel that is prima-facie evidence of intent to pirate their code and shut down your entire Steam account. There are anecdotes to that effect on the SH4 forum and other places. And, again anecdotally, I understand that there is not much of an appeals process. YMMV.

redpiano
03-22-13, 07:50 PM
Unless something really special is going on with SH5 that isn't happening with other games in the steam library I see no reason why it can't be done. As I said, many games that are heavily moddable have been modded using an exe besides steam's, I do this with ArmA 2 and I do this with IL2 1946. I haven't been banned for using modified exe's soooooo no.

I'm not willing to give up the benefits of steam just to fix the magnetic detonator.

volodya61
03-22-13, 08:09 PM
I'm not willing to give up the benefits of steam just to fix the magnetic detonator.

It's your choice.. there are many other important fixes you will never get for the steam copy of the game..

Glock30Eric
03-23-13, 02:22 PM
103 pages!!! Oh man forget it, I am not going to read all through.

Can you summarize how I could install a mod to have a wolf-pack in SH5?

Targor Avelany
03-23-13, 02:34 PM
103 pages!!! Oh man forget it, I am not going to read all through.

Can you summarize how I could install a mod to have a wolf-pack in SH5?

you can just read the first page? or even just teh first post where all the changes are described...

Just saying...

Trevally.
03-23-13, 02:35 PM
103 pages!!! Oh man forget it, I am not going to read all through.

Can you summarize how I could install a mod to have a wolf-pack in SH5?

Follow this guide and select the wolfpack fixes http://www.subsim.com/radioroom/showthread.php?t=197960:up:

TheDarkWraith
03-26-13, 12:04 AM
Great news TDW you are still working on the Patcher :yeah:
one question: any news about fixing a broken patch AI Crew Damage Control?

Still working on it. Trying to get the effects to stop when damage is fixed.

Still working on the carriers launching planes when they detect a contact. Just working out the bugs in it currently.

Also working on keeping destroyed units in the game (currently they sink to bottom and sit for some time then disappear through the bottom). I've narrowed down to what is causing the sinking through bottom but I'm trying to find where the game says yes, you can ignore max depth for location (ocean bottom) and continue on deeper. When the unit gets to >= 500m the game removes it.

Also trying to keep aircraft from being removed from game when their HPs are 0. I want to see them crash into water, break up, and sink to bottom.

v1.0.78.0 released. See post #1

starting with v1.0.78.0 added new patches to the SH5.exe that enable user to select color of the calculated torpedo impact time and added lots of new render patches (disable longitude lines, disable lattitude lines, disable view cone, disable torpedo line, disable torpedo line numbers, disable rendering of units (except player's sub) when at high zoom levels, disable rendering of units (except player's sub) when at low zoom levels, disable rendering of player's sub at high zoom levels and disable rendering of unit detection circles). All these new disables can be found under the Render patches.

These new disables will override any game settings.

:|\\

hitmanuw
03-26-13, 03:24 AM
i found something strage when ill enable the Orbit Listener and enable intro movies from tdw patch and ill start a new career the progress bar still empty i can shink how many ships i want it's stay empty can't finish the mission and when ill play with the Orbit Listener disable and disable intro movies in TDW patch it's show ....
PS. i had this problem with tdw patch TDW_GenericPatcher_v1_0_77_0

My mod list ist:

Accurate German Flags
RemoveLogoIntroTheDarkWraith
sobers game loading tips V5 SH5
DBM Background Video
SteelViking's Interior Mod V1.2
SteelViking's Interior Mod V1.2.2 Patch
DynEnv v2.9 - 1. Main Mod
DynEnv v2.9 - 5.c Ambient Settings - Darker Nights-No Murky Waters
DynEnv v2.9 - 12. Sounds
Small_trees_SH5_V1
sobers smoke screen V1 SH5 (DynEnv compatible)
sobers water splash anim SH5
sobers best ever fog V22 SH5
sobers base sky mechanics V1
sobers better terrain v3 SH5
sobers waves mod V11 05032013
sobers more trees SH5
sobers see thru wake fix
SH5_7A_Conning_Fix
Fuel Gauge WoGaDi_SteelViking's Interior
Equipment_Upgrades_Fix_v1_4_byTheBeast
Equipment_Upgrades_Fix_v1_4_Patch_1 (available by date) V8 by sober
#Equipment_Upgrades_Fix_v1_4_Patch_1_HotFix
EUF_UBoat_FX_v0_0_3_ byTheBeast
SH5 Longer Repairs v.1
FX_Update_0_0_21_ByTheDarkWraith
AI_sub_crew_1_0_2_TheDarkWraith
NewUIs_TDC_7_1_0_ByTheDarkWraith
NewUIs_TDC_7_1_0_alt_officer_wounded_by_Torpedo
NewUIs_TDC_7_1_0_RadCapTools_0_2_alpha
Manos Scopes-patch for 5x4
IRAI_0_0_39_ByTheDarkWraith
IRAI_0_0_39_ByTheDarkWraith_Patch_1
IRAI_0_0_39_Inertia_Damage
R.E.M_by_Xrundel_TheBeast_1.2
R.E.M. - hydrophone mute for player fix (TDW compatible)
Cerberus62 Corrected Depth Charge Projector 1.0
NOZAURIO'S SKIN (Standar No Emblem) v-1.1.0
OPEN HORIZONS II_full v2
OHII v2 Mission Fix WA
Expanded Navies by Cybermat47 v.1.0.0
FREE SPECIAL Abilities
MightyFine Crew Mod 1.2.1 Alt faces
MCCD_1.04_MFCM_1.2.1_compatible
Speech fixes and additions (german version)
sobers green crew training V4 SH5
TDW FX Fix for Sobers chimney smoke
Church's Compass Dials Mod v2.2 - Option Two
OH II Minefield map for TDWs Ui
sobers NO water drops V1
smaller flags for Warships 1_0b
Trevally Tutorial - All v0.2(for OHIIv1.3)
Trevally Automated Scripts v0.6
Trevally Harbour & Kiel Canal Pilot v2.9
MadMaxs_SH5_Subdiesel (mono) v2
sobers hud sounds V1 SH5
EQuaTool 01.01 by AvM - Large Style
Warfox deck crew always whispering SH5 German Version
gap - HD 1 deg Scope Bearing v 1.0
Shadow Improvement ModLR
sobers bad weather deck gun V5 SH5
Grossdeutscher Rundfunk

gap
03-26-13, 09:16 AM
v1.0.78.0 released

Thank you TDW :salute:


Still working on the carriers launching planes when they detect a contact. Just working out the bugs in it currently.

Also working on keeping destroyed units in the game (currently they sink to bottom and sit for some time then disappear through the bottom). I've narrowed down to what is causing the sinking through bottom but I'm trying to find where the game says yes, you can ignore max depth for location (ocean bottom) and continue on deeper. When the unit gets to >= 500m the game removes it.

Also trying to keep aircraft from being removed from game when their HPs are 0. I want to see them crash into water, break up, and sink to bottom.

Can't wait for them :yeah:

BigWalleye
03-26-13, 10:43 AM
Thanks, TDW, for all the hard work. Reverse engineering someone else's code is a frustrating and difficult job.

TheDarkWraith
03-26-13, 01:54 PM
Thanks, TDW, for all the hard work. Reverse engineering someone else's code is a frustrating and difficult job.

When it's what you do for a living I would agree. When it's your hobby it's totally different - it's FUN! It's like a constant evolving riddle. Unlocking one piece opens up more riddles :D

It's a lost black art, mostly only government agencies and a few professionals have the skills to RE software, much less change/add functionality to it. I taught myself everything just from reading books and experimenting.

Tonci87
03-26-13, 02:36 PM
When it's what you do for a living I would agree. When it's your hobby it's totally different - it's FUN! It's like a constant evolving riddle. Unlocking one piece opens up more riddles :D

It's a lost black art, mostly only government agencies and a few professionals have the skills to RE software, much less change/add functionality to it. I taught myself everything just from reading books and experimenting.

I think we should rename this thread to "Silent Hunter 5.5"

You are doing a great job TDW.

volodya61
03-26-13, 03:09 PM
Since this is the "Thank you" thread as mentioned by Gap earlier
Thank you TDW, sir :salute:

gap
03-26-13, 03:15 PM
Since this is the "Thank you" thread as mentioned by Gap earlier
Thank you TDW, sir :salute:

Well said Volodya :03: :haha:

THE_MASK
03-26-13, 04:51 PM
I have a ctd on loading a save game with the new rendering patches when i click on the navigation map icon . This save game was a save with all the rendering patches enabled . I just tried disabling one by one and it seems to be the sub rendering patches . Does it have something to do with real navigation ?

TheDarkWraith
03-26-13, 05:18 PM
I have a ctd on loading a save game with the new rendering patches when i click on the navigation map icon . This save game was a save with all the rendering patches enabled . I just tried disabling one by one and it seems to be the Disables rendering of units except players sub (all the time) . Does it have something to do with sunk ship icons ?

I wondered about that one. Maybe I should remove it from patch list :06: There are other render patches that do the same thing it did :hmmm:

TheDarkWraith
03-26-13, 05:33 PM
Here's a question/something to test:

Can you totally drain the batteries? I mean does battery level ever go to 0% and you lose propulsion? Looking at the game code here (just stumbled onto it :D) it suggests that if current battery capacity < 0.001 then set current battery capacity to 0.001 thus meaning you can never deplete the batteries fully :hmmm: Can someone test this and report on it :06:

Fifi
03-26-13, 05:52 PM
You are right TDW!! :o
Flank speed underwater, i fall to 2% (and never can go under this value) but speed finally fall to 1 knot...and i can navigate submerged for ever! (unless i have no more CO2)
So batteries never can stop...this is a major bug you have to fix IMO!! :up:

gap
03-26-13, 05:58 PM
Here's a question/something to test:

Can you totally drain the batteries? I mean does battery level ever go to 0% and you lose propulsion? Looking at the game code here (just stumbled onto it :D) it suggests that if current battery capacity < 0.001 then set current battery capacity to 0.001 thus meaning you can never deplete the batteries fully :hmmm: Can someone test this and report on it :06:

You are right TDW!! :o
Flank speed underwater, i fall to 2% (and never can go under this value) but speed finally fall to 1 knot...and i can navigate submerged for ever! (unless i have no more CO2)
So batteries never can stop...this is a major bug you have to fix IMO!! :up:

Maybe this is a life buoy devs left in the code for us :hmm2:

TheDarkWraith
03-26-13, 06:14 PM
You are right TDW!! :o
Flank speed underwater, i fall to 2% (and never can go under this value) but speed finally fall to 1 knot...and i can navigate submerged for ever! (unless i have no more CO2)
So batteries never can stop...this is a major bug you have to fix IMO!! :up:

Assembly code doesn't lie :D

Maybe this is a life buoy devs left in the code for us :hmm2:

Unrealistic. Time to patch this out :yep: I'm looking for a battery drain curve and so far I'm not finding it. Appears devs have simple battery drain - linear. Real life this is an exponential curve where the curve falls off quickly towards the end of the battery's capacity (ex-Navy Nuke EM here :smug:) . Looks like have to code that in if I can't find it also.

gap
03-26-13, 07:08 PM
Unrealistic. Time to patch this out :yep: I'm looking for a battery drain curve and so far I'm not finding it. Appears devs have simple battery drain - linear. Real life this is an exponential curve where the curve falls off quickly towards the end of the battery's capacity (ex-Navy Nuke EM here :smug:) . Looks like have to code that in if I can't find it also.

some typical charge/discharge curves for lead acid batteries (the ones used on U-boats), in case you needed for them: :03:

http://www.ibt-power.com/Lead_acid_tech/lead_acid_tech.html#
http://www.yuasaeurope.com/en-gb/industrial/products/npl/

The graphs available from the above links are relative to modern batteries, indeed, but hopefully they didn't change that mutch since WWII :hmmm:

Fifi
03-26-13, 07:45 PM
Time to patch this out :yep:

Good luck with it! I'm sure you'll offer a nice fix as usual :yep:
Luckily you are here :sunny:

TheDarkWraith
03-26-13, 08:10 PM
Good luck with it! I'm sure you'll offer a nice fix as usual :yep:
Luckily you are here :sunny:

Oh I just stumbled onto a gold mine that I've been waiting to discover :D

alright put your thinking caps on :know:

Here's the problem: the below defines how the game gets the speed in knots from ordered speed (ordered speed in range -1.0 to 1.0). I can't figure it out :-?

VIIC submerged (12m) with no snorkel so using electric engines. Ordered speed set to 0.1. Current speed is 0 knots:

Loads something dealing with engine into XMM1 (3.913995) <----- what is this number? This number is something dealing with the electric engines
multiplies XMM1 by ordered speed (0.1) - ordered speed in range -1.0 to 1.0
XMM1 now equals 0.3913995
compares 0.0 to XMM1
If after then do something with it - ours is before so it's good
compares XMM1 to 0.0
if before or equal then jump - ours is after so:
loads XMM2 (1.0) into a stack variable
compares XMM0 (0.0) to XMM1
loads XMM1 into XMM0 (XMM0 now equals 0.3913995)
if after then do something - ours is before so it's good
loads constant 0.333333 (1/3) onto top of floating point stack
adds XMM2 (1.0) to XMM0 (0.3913995) thus XMM0 now equals 1.3913995
divides XMM0 by 559500.0 <---- what is this number? This number is something dealing with the electric engines
XMM0 = 2.486862e-06
multiplies XMM0 by 7432.328 <---- what is this number? This number is something dealing with the electric engines
XMM0 = 0.01848318
multiplies XMM0 (0.01848318) by XMM1 (0.3913995)
XMM0 = 0.007234306
multiplies XMM0 (0.007234306) by XMM1 (0.3913995)
XMM0 = 0.002831504
raises XMM0 to the 0.3333333 power (why the 0.3333333 power?)
XMM0 = 0.1414726026023053196
multiplies XMM0 by 30.99133 <---- what is this number? This number is something dealing with the electric engines
XMM0 = 4.3844245387299654350 which is the new speed of the sub in knots
multiplies XMM0 by direction (1.0 = forward, -1.0 = reverse) - we are going forward
saves XMM0 to engine's speed in knots memory address

Anyone make any sense of this :06:

I need to figure this out so I can try and code in something that decreases the engine's efficiency (wear) over time (time being career)

gap
03-26-13, 08:57 PM
Sorry, I have no idea about those numbers :doh:

but I have noticed that in describing the whole process you used often the words before and after as if you were sure that the discussed variables are times. Is it so, or am I misunderstanding your reasoning? :hmm2:

gap
03-26-13, 09:04 PM
Totally off topic (well, actually the topic is that I finally catched you online :O:), can you please look at this issue with the twin M42 gun, when you get time for it?

http://www.subsim.com/radioroom/showpost.php?p=2023037&postcount=1940

I suspect that the problem could be in some hardcoded gun camera or tooltip assignation, as it only appears when walking close to the gun. :hmmm:
Otherwise the gun works perfectly. If you want, I can send you my files making the gun available as armament upgrade.

TheDarkWraith
03-26-13, 09:54 PM
Sorry, I have no idea about those numbers :doh:

but I have noticed that in describing the whole process you used often the words before and after as if you were sure that the discussed variables are times. Is it so, or am I misunderstanding your reasoning? :hmm2:

Sorry, assembly language speak. When something is TESTed it sets flags in the FLAGS register of the CPU. You can then check those flags to manage execution. In this case two XMM values (for this argument consider them float values) are TESTed. Then the game code checks to see if value 1 is before (<), equal (==), after (>), etc. value 2 and if so execution jumps to some other place.

BigWalleye
03-27-13, 06:52 AM
I have a ctd on loading a save game with the new rendering patches when i click on the navigation map icon . This save game was a save with all the rendering patches enabled . I just tried disabling one by one and it seems to be the sub rendering patches . Does it have something to do with real navigation ?

What he said. Except that disabling Render Patch 7 does not correct the problem for me. Disabling all render patches does, as does rollback to v1.0.77.0. I have not yet fault-treed the render patches to isolate the cause. Concerned there might be more than one, and did not have time to test all combinations. I will do so later.

Vanilla
03-27-13, 06:56 AM
1/3 power (cube root) is to give lesser speed increase at greater speed orders. That is - less and less efficiency (speed increase) at greater and greater PS applies. Just look at the plot of the cube root.
NB: Cube root works well both for positive and negative ordered speeds as compared to even roots (that is why it is not square root - 1/2 power).
http://www.analyzemath.com/Graphing/cube_root_graph_1.gif

I will give my full analysis later, I am at it at the moment. My wild guess so far is that it is xmm2 you should tinker with to lower or increase the engine 'efficiency'.

Vanilla
03-27-13, 08:22 AM
Ok, here is the analysis:

Let's first derive the formula implied in the code:

speed = 30.99133 x cube_root[ (7432.328 / 559500) x (XMM2 + ordered_speed x XMM1) x (ordered_speed x XMM1)^2 ]

or:

speed = 30.99133 x 0.23683266 x cube_root[ (XMM2 + ordered_speed x XMM1) x (ordered_speed x XMM1)^2 ]

We can try to simplify it further but if we just insert this formula into excel/calc we will get to the following values (we drop the negative values since we cannot see what what is done with those from the code excerpt given):

0 0,00000
0,1 4,38442
0,2 7,55932
0,3 10,58301
0,4 13,54768
0,5 16,48260
0,6 19,40030
0,7 22,30711
0,8 25,20658
0,9 28,10086
1 30,99133
Now we can see that the speed goes way higher than expected max 12 knots. There should be some mechanism that limits either the speed or the orders. My guess that the game actually limits the order by 0,4 this gives 13,6 knots -- close to the max speed.
The other thing to see is that the combination of constants 3.913995 (xmm1) and 7432.328/559500 works so that the max speed at order 1.0 will be equal to the constant given later in the code (30.99133) if we change this number to, say, 20, the speed at 1.0 setting will be also 20 with speeds at other settings changing accordingly (@TDW this can be the answer to your question), at 0.4 setting the speed will be 8.7 knots.
What is puzzling is XMM2 which changes almost nothing. If we set it to 0 the max speed (30.99) will change only by 2 knots to 28 and the speed at 0.4 will be 11.49. Why this xmm2 variable is needed at all?

To put some logic into the formula here is my thinking:


1/3 power (cube root) is used to make the curve that match reduced efficiency at greater power.
The 3.913995 number is the conversion coefficient for either PS or RPMs to knots. That is, for example 'we get 3.913995 knots per each 100 RPMs increase if we assume 100% efficiency.
The 30.99133 is theoretically possible max speed the sub can achieve. (Though it is puzzling why it is so huge? Surface speed with all the upgrades? Still too much).
xmm2 is a puzzle
The 7432.328 and 559500 are there just to balance the equation.

LemonA
03-27-13, 08:22 AM
american u-boat 1944: speed vs. duration
http://img.xrmb2.net/images/842508.jpeg (http://img.xrmb2.net/images/842508.jpeg)
Formular y = 2.402133918·10^-6 x^6 - 2.480632527·10^-4 x^5 + 1.022176849·10^-2 x^4 - 2.159633693·10-1 x^3 + 2.53236561 x^2 - 18.08338354 x + 115.6332116

Battery capacity of type vii C maybe found in commanders handbook

some other info here
http://www.uboat.net/technical/batteries.htm
and her3
http://sourceforge.net/apps/trac/derleitendeing/wiki/VIIbatteries

NYGM or GWX3 (SH3) have totally different calculations.
Ex. With ordered submerged speed 6 kts the battery lasts longer than 23 hours but the speed droppes off sharply etc.

TheDarkWraith
03-27-13, 09:23 AM
1/3 power (cube root) is to give lesser speed increase at greater speed orders. That is - less and less efficiency (speed increase) at greater and greater PS applies. Just look at the plot of the cube root.
NB: Cube root works well both for positive and negative ordered speeds as compared to even roots (that is why it is not square root - 1/2 power).
http://www.analyzemath.com/Graphing/cube_root_graph_1.gif


that makes perfect sense :D Thank you :up:

Ok, here is the analysis:

Let's first derive the formula implied in the code:

speed = 30.99133 x cube_root[ (7432.328 / 559500) x (XMM2 + ordered_speed x XMM1) x (ordered_speed x XMM1)^2 ]

or:

speed = 30.99133 x 0.23683266 x cube_root[ (XMM2 + ordered_speed x XMM1) x (ordered_speed x XMM1)^2 ]

We can try to simplify it further but if we just insert this formula into excel/calc we will get to the following values (we drop the negative values since we cannot see what what is done with those from the code excerpt given):

0 0,00000
0,1 4,38442
0,2 7,55932
0,3 10,58301
0,4 13,54768
0,5 16,48260
0,6 19,40030
0,7 22,30711
0,8 25,20658
0,9 28,10086
1 30,99133
Now we can see that the speed goes way higher than expected max 12 knots. There should be some mechanism that limits either the speed or the orders. My guess that the game actually limits the order by 0,4 this gives 13,6 knots -- close to the max speed.
The other thing to see is that the combination of constants 3.913995 (xmm1) and 7432.328/559500 works so that the max speed at order 1.0 will be equal to the constant given later in the code (30.99133) if we change this number to, say, 20, the speed at 1.0 setting will be also 20 with speeds at other settings changing accordingly (@TDW this can be the answer to your question), at 0.4 setting the speed will be 8.7 knots.
What is puzzling is XMM2 which changes almost nothing. If we set it to 0 the max speed (30.99) will change only by 2 knots to 28 and the speed at 0.4 will be 11.49. Why this xmm2 variable is needed at all?

To put some logic into the formula here is my thinking:


1/3 power (cube root) is used to make the curve that match reduced efficiency at greater power.
The 3.913995 number is the conversion coefficient for either PS or RPMs to knots. That is, for example 'we get 3.913995 knots per each 100 RPMs increase if we assume 100% efficiency.
The 30.99133 is theoretically possible max speed the sub can achieve. (Though it is puzzling why it is so huge? Surface speed with all the upgrades? Still too much).
xmm2 is a puzzle
The 7432.328 and 559500 are there just to balance the equation
I will play around with the values to try and verify/figure out what this XMM2 variable is doing :up: This is a great puzzle. I love trying to figure out why a programmer made the code the way they did. This one is one of those hmmmm types :yep:
I have to see if those same constants hold true when the sub is surfaced and using diesels for engine power. If so this could answer why the 30.99133 contant.

gap
03-27-13, 10:10 AM
Brilliant deductions, guys :yep:

TheDarkWraith
03-27-13, 01:25 PM
@Vanilla: I think you are correct in that the speed in knots from the calculation is the theoretical maximum speed in knots by that engine alone. I did more testing:

VIIC surfaced (5m) with no snorkel using diesel engines (both available):

zeroes out XMM0
loads 1.0 into XMM2
Loads something dealing with engine into XMM1 (9.115489) <----- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
multiplies XMM1 by ordered throttle (0.3) - ordered speed in range -1.0 to 1.0
XMM1 now equals 2.734647
compares XMM0 (0.0) to XMM1
if before or equal then jump to *1*
saves -1.0 to stack variable
jumps to *2*
*1* compares XMM1 to XMM0 (0.0)
if before or equal then jump to *3*
loads XMM2 (1.0) into stack variable
jumps to *2*
*3* loads XMM0 (0.0) into stack variable
*2* compares XMM0 (0.0) to XMM1
loads XMM1 into XMM0 (XMM0 now equals 2.734647)
if before or equal then jump to *4*
changes sign of XMM0
*4* loads constant 0.333333 (1/3) into ST0
adds XMM2 (1.0) to XMM0 (2.734647) thus XMM0 now equals 3.734647
divides XMM0 by 2387200.0 <---- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
XMM0 = 1.564447e-06
multiplies XMM0 by 2840.155 <---- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
XMM0 = 0.004443270
multiplies XMM0 (0.004443270) by XMM1 (2.734647)
XMM0 = 0.1215077
multiplies XMM0 (0.1215077) by XMM1 (2.734647)
XMM0 = 0.332280667
raises XMM0 to the 0.3333333 power (1/3 power) - a function is called to do this and it returns the value in ST0
ST0 = 0.321490681
multiplies ST0 by 50.26548 <---- this number is a constant and does not change with ordered throttle settings. This number changes to a different value when using electric engines
ST0 = 16.15988339 which is the new theoretical maximum speed of this engine in knots at this throttle setting
multiplies ST0 by stack variable
saves ST0 to engine's theoretical maximum speed in knots at this throttle setting to memory address

Notice the constants do not change with different throttle settings. They do change with engine type though (diesel or electric) so that further provides proof. The ordered throttle is the value defined in the unit's .cfg file under [EngineProperties]. I believe that lowering the value highlighted in yellow (or the one in cyan) over the player's career will account for engine wear over time. Agree :06: I'm going to check to see if the game continually writes to this memory value or if it's static (only wrote to at game start).

TheDarkWraith
03-27-13, 03:21 PM
what if this number isn't the theoretical maximum speed of the engine in knots but rather the RPM of that engine's shaft (in the water) :06: The constants could be related to gearing reduction.

Anyone have any figures on what the RPM of the shafts were at different bells for the subs?

TheDarkWraith
03-27-13, 03:40 PM
it doesn't dictate the shaft's RPM but it does play a part in it somehow :hmmm: Just watched it from external cam. Changed the cyan value to half what it was and speed didn't drop to half it's value (sub's actual speed) but only dropped a few knots. Shaft RPM changed considerably though.

TheDarkWraith
03-27-13, 06:27 PM
There are some things that just totally crack you up. While decoding more items out of SHSim.act I came across where it sets the minumum battery capacity allowed (0.001). The offset of this in the SHSim.act (when viewed in debugger) was 0x21BFE....BFE....get it? :har: Coincidence :o

keysersoze
03-27-13, 06:53 PM
what if this number isn't the theoretical maximum speed of the engine in knots but rather the RPM of that engine's shaft (in the water) :06: The constants could be related to gearing reduction.

Anyone have any figures on what the RPM of the shafts were at different bells for the subs?

Not sure if this is still relevant, but according to uboatarchive.net (for a VIIC), here is the max rpm for both the MAN and GW diesels.

Forward
Flank - 471 rpm
Full - 435 rpm
Standard - 340 rpm
One-Third - 275 rpm
Slow - 180 rpm

Reverse
Flank - 285 rpm
Full - 215 rpm
Standard - 160 rpm
One-Third - 110 rpm
Slow - 55 rpm

This information is from page 17. It is referring specifically to turning radius at different speeds, but in the note at the bottom of the charts, it says "RPM are valid at the moment of running into the turning circle and during the steady turning condition of the boat are accordingly lower."

More general propulsion information can be found on page 118. There's also some great stuff on battery discharge rates on p. 133.

EDIT: sorry, here's the link:
http://www.uboatarchive.net/Manual.htm

CaptBones
03-27-13, 08:03 PM
ALCON may have found the information already, but...

The shaft RPM tables are on pg 14 of the Type VIIC manual at uboatarchive.net. There are also some photos at uboat.net of U-995's engine order telegraphs and RPM-speed table placards.

The engine RPM and shaft RPM are the same in the case of the subject U-Boats. The propulsion plants were (are, actually...as far as the surviving museum boats go) direct-drive with reversible diesel engines and propulsion motors; there are no reduction gears.

THE_MASK
03-27-13, 08:24 PM
I think that maybe the orbit listener patches are interfering with the game . I noticed that the ship sunk progress bar doesn't fill anymore . I disabled the orbit patches and then noticed that any save games I had with the orbit patches enabled were not there in the save game load page . cheers .

TheDarkWraith
03-27-13, 10:55 PM
I think that maybe the orbit listener patches are interfering with the game . I noticed that the ship sunk progress bar doesn't fill anymore . I disabled the orbit patches and then noticed that any save games I had with the orbit patches enabled were not there in the save game load page . cheers .

ah so there more to it than meets the eye :hmmm: What happens if you only enable the main loop ones :06:

THE_MASK
03-27-13, 11:25 PM
ah so there more to it than meets the eye :hmmm: What happens if you only enable the main loop ones :06:I will do some testing tonight .
The TDW_SH_NClient_Patch.s5p saved games seem to be working . Loading and saving with either the patch applied or not , all the save games are there every time .
I will now try the Disable orbit listener checks in main game loop .
I will first determine which patch makes save games disappear and then I will check the progress bar not filling up .
I disabled all the orbiter patches and now the progress bar fills up during the campaign .
I enabled the SH_NClient patch and the progress bar didn't fill up .
I then disabled the SH_NClient patch and reloaded the save game and I got a CTD on torpedo impact on an enemy ship .
I cannot remember what I did next to be honest . I think I loaded a previous save and then saved a new save and then deleted the save which would have been used with the enabling and disabling of the patches . I was able to sink the ships with the torps using my current save that wasn't used when disabling and enabling the patches . I wasn't game enough to touch the other 2 orbiter patches , as I just completed north western approaches for the 2nd time in 3 years real time .

Fifi
03-28-13, 12:30 AM
It's affecting the saved game, but also the OHII working...as i said in OHII thread (with the discover of Sober).
With Orbiter stuff enabled, OHII tonnage mission loading bars aren't working anymore, furthermore i don't know if mission can be completed!
As soon as i desabled all Orbiter options and restarted a career, tonnage bars are fonctioning again :yep:

hitmanuw
03-28-13, 02:07 AM
i have say that tonnage mission loading bars aren't working anymore here
http://www.subsim.com/radioroom/showpost.php?p=2031409&postcount=1554 end i sent a pm to TDW 2 or 3 day ago ....

Vanilla
03-28-13, 06:47 AM
it doesn't dictate the shaft's RPM but it does play a part in it somehow :hmmm: Just watched it from external cam. Changed the cyan value to half what it was and speed didn't drop to half it's value (sub's actual speed) but only dropped a few knots. Shaft RPM changed considerably though.

All the constants (except 'max_speed' cyan constant) are there just to make the curve look like they wanted. Here is the plot of linear relation, simple cube root without all the constants (max_speed constant is still there) and the devs' curve (for electric engines). Why they needed it so -- I have no idea.
http://72ag.org/72ag_pilots/public/terror/speed_plots.JPG

Vanilla
03-28-13, 06:52 AM
it doesn't dictate the shaft's RPM but it does play a part in it somehow :hmmm: Just watched it from external cam. Changed the cyan value to half what it was and speed didn't drop to half it's value (sub's actual speed) but only dropped a few knots. Shaft RPM changed considerably though.

:doh:
That is very weird! My guess is that this code determines RPM + RPMs effectiveness in terms of speed, this means that we doesn't see the whole algorithm but just some random bit of it.

TheDarkWraith
03-29-13, 05:07 PM
:doh:
That is very weird! My guess is that this code determines RPM + RPMs effectiveness in terms of speed, this means that we doesn't see the whole algorithm but just some random bit of it.

I have more data on this....but I ran into something really juicy that I had to follow so I'll come back to this later.

Now for the juicy thing: I was looking for something that would point me to where all the dials were updated. After some poking around I found some code that iterates over all the dials (only way I knew I found it is because the loop counter variable on the stack was continually compared against the number of dials on every iteration). I was then able to see the size of each dial in bytes and how the game accesses them (really simple - loop counter variable X each dial size + pointer to start of dials = current dial). Then I traced down everything accessing the dial's base address and mapped it out. The ScriptManager provided the dials enumeration so I knew how to find a particular dial. Now I'm watching to see where in the code it's resetting some of the TDC dials to 0 when you use the stadimeter :cool:

Dignan
03-29-13, 08:59 PM
I have more data on this....but I ran into something really juicy that I had to follow so I'll come back to this later.

Now for the juicy thing: I was looking for something that would point me to where all the dials were updated. After some poking around I found some code that iterates over all the dials (only way I knew I found it is because the loop counter variable on the stack was continually compared against the number of dials on every iteration). I was then able to see the size of each dial in bytes and how the game accesses them (really simple - loop counter variable X each dial size + pointer to start of dials = current dial). Then I traced down everything accessing the dial's base address and mapped it out. The ScriptManager provided the dials enumeration so I knew how to find a particular dial. Now I'm watching to see where in the code it's resetting some of the TDC dials to 0 when you use the stadimeter :cool:

I wait with cautious optimism :yep: this is still one of my biggest complaints about the tdc

TheDarkWraith
03-30-13, 11:50 AM
I wait with cautious optimism :yep: this is still one of my biggest complaints about the tdc

this is one of the biggest bugs in SH5 next to the mast height bug. How these made it through QA is beyond me :nope:

I'm also looking into the mast height bug.

@gap - looks like I found a way to call functions in other dlls easily. I found a function in ScriptManager that allows the assembly code to 'fire' a command to all the loaded scripts. The loaded scripts can easily catch this command. The 'fired' command allows you to pass parameters with it also. The scripts can also 'fire' commands to the game passing arguments also. This is excellent because I can write code in C# (hell of a lot easier) to read in your idea your group is working on. A script can load this DLL and communicate with it (again much easier writing Python than assembly!). The script updates the game (and whatever assembly code I write for your idea) by sending new command(s) (whatever I name them) to the game. The game won't understand the commands and will ignore them because it only recognizes what is hard coded in so it will pass them to my command parser assembly code who will divy it out to the correct function. That function will read in the arguments passed with the command and do whatever it needs to do with them. If the function needs to send data back to the script it 'fires' off a command passing the needed information with the command. The script intercepts this command reads the data. Cycle repeats if necessary.

I'm still figuring out how to 'fire' commands using the ScriptManager correctly. I can 'fire' commands no problem, the problem is I don't understand how the parameters for the command are created (something with ScriptManager again) and finally attached to the command (ScriptManager again). Once I figure that out two way communication between game and external DLL via script will be a snap and will open the door up for more opportunities :D If I can write code for the game in C# I can a) be much faster at it and b) do MUCH more because it's easier to code in C#

Ran into another juicy thing I couldn't turn down - how to access all the menu items in game (think menu editor). I mapped it out and now have the ability to access any menu item and change it. The great thing is while decoding this most of all the pieces of the puzzle I was missing finally fell into place. I couldn't figure out how the game organizes everything. Was everything in a continual linked list? Where there multiple linked lists? Those questions baffled me. I now know that it's a tree structure with each limb of the tree a linked list. Each linked list item can point to another linked list (a limb of that limb - a child). Everything needed to render/update/etc. is contained in each linked list item via pointers. There are tables of function pointers and each table corresponds to rendering, updating, etc. The game just iterates over the tree, accessing each table, and calling functions in those tables. If a feature is not available the entry in the table will call a function that simply returns back to the caller. Actually pretty typical design with a few enhancements.

:|\\

Tonci87
03-30-13, 12:55 PM
this is one of the biggest bugs in SH5 next to the mast height bug. How these made it through QA is beyond me :nope:

I'm also looking into the mast height bug.

@gap - looks like I found a way to call functions in other dlls easily. I found a function in ScriptManager that allows the assembly code to 'fire' a command to all the loaded scripts. The loaded scripts can easily catch this command. The 'fired' command allows you to pass parameters with it also. The scripts can also 'fire' commands to the game passing arguments also. This is excellent because I can write code in C# (hell of a lot easier) to read in your idea your group is working on. A script can load this DLL and communicate with it (again much easier writing Python than assembly!). The script updates the game (and whatever assembly code I write for your idea) by sending new command(s) (whatever I name them) to the game. The game won't understand the commands and will ignore them because it only recognizes what is hard coded in so it will pass them to my command parser assembly code who will divy it out to the correct function. That function will read in the arguments passed with the command and do whatever it needs to do with them. If the function needs to send data back to the script it 'fires' off a command passing the needed information with the command. The script intercepts this command reads the data. Cycle repeats if necessary.

I'm still figuring out how to 'fire' commands using the ScriptManager correctly. I can 'fire' commands no problem, the problem is I don't understand how the parameters for the command are created (something with ScriptManager again) and finally attached to the command (ScriptManager again). Once I figure that out two way communication between game and external DLL via script will be a snap and will open the door up for more opportunities :D If I can write code for the game in C# I can a) be much faster at it and b) do MUCH more because it's easier to code in C#

Ran into another juicy thing I couldn't turn down - how to access all the menu items in game (think menu editor). I mapped it out and now have the ability to access any menu item and change it. The great thing is while decoding this most of all the pieces of the puzzle I was missing finally fell into place. I couldn't figure out how the game organizes everything. Was everything in a continual linked list? Where there multiple linked lists? Those questions baffled me. I now know that it's a tree structure with each limb of the tree a linked list. Each linked list item can point to another linked list (a limb of that limb - a child). Everything needed to render/update/etc. is contained in each linked list item via pointers. There are tables of function pointers and each table corresponds to rendering, updating, etc. The game just iterates over the tree, accessing each table, and calling functions in those tables. If a feature is not available the entry in the table will call a function that simply returns back to the caller. Actually pretty typical design with a few enhancements.

:|\\


Wow, just wow.

You are really a master at reverse engineering.

TheDarkWraith
03-31-13, 08:57 PM
I wait with cautious optimism :yep: this is still one of my biggest complaints about the tdc

No more cautious optimism needed...I did it and more :rock:

I'll have 2 new patches coming here soon. One fixes the broken stadimeter problem (the mast height always being 20.0) and the other one fixes the problem with the TDC AOB and Speed dials being reset to 0 when you use the stadimeter :D The nice thing about the second patch is switching TDC dials out of auto mode and back to manual mode (or vice versa) causes no dial jumping or movement (as long as TDC is on) :rock:

:|\\

THE_MASK
03-31-13, 10:25 PM
This game just got a whole lot better :woot:

TheDarkWraith
04-01-13, 01:29 AM
v1.0.79.0 released. See post #1

Starting with v1.0.79.0 added two new patches to the SH5.exe: broken stadimeter fix and a patch that fixes the problem of the TDC AOB and Speed dials resetting when TDC is on and stadimeter is used

The broken stadimeter fix patch will use the mast height data specified in the unit's .cfg file.

For those of you using my UIs mod I will be releasing an updated version here soon. The reason is because of these new patches I can remove many items from the mod and free up memory for other things :D With these patches enabled do not press the red buttons on the AOB or speed dials anymore. They are not to be used and will be removed in updated version :salute:

Finally two of the biggest bugs of the game have been squashed :rock:

Sartoris
04-01-13, 05:56 AM
Amazing!

Thank you, TDW, you're a miracle worker! :yeah::woot:

BigWalleye
04-01-13, 06:30 AM
TDW, you da man! Nothing more frustrating than fixing someone else's crappy code. Never tried to do it on a disassembled version, but that must be ten times worse! Thanks for all your hard work.

hitmanuw
04-01-13, 06:30 AM
long live TDW :rock::woot:

TheDarkWraith
04-01-13, 09:48 AM
Here's something interesting I found in the exe:

HideParticlesNearView:
"Activate/deactivate with Ctrl+P (in order to avoid NVIDIA problem)"

I never recall having any problems and I have an nVidia card :hmmm:

Dignan
04-01-13, 01:57 PM
Awesome! Can't wait to try it.

Cthulhus
04-01-13, 03:17 PM
Hello,

I have a small problem, I install and patched all files for GenericPatcher (the 4 s5p files like TDW_SH_NClient_Patch.s5p).

All patches has been applied (true) but for the "patch" Close/Open sub doors on Battlestations activated/deactivated (ability - F7 key).

That CTD the game ...

What's is wrong ?

Thanks for your help guys and keep under water :)

Fifi
04-01-13, 03:28 PM
Finally two of the biggest bugs of the game have been squashed :rock:

Fantastic! You rocks :rock:

Tonci87
04-01-13, 03:53 PM
Hello,

I have a small problem, I install and patched all files for GenericPatcher (the 4 s5p files like TDW_SH_NClient_Patch.s5p).

All patches has been applied (true) but for the "patch" Close/Open sub doors on Battlestations activated/deactivated (ability - F7 key).

That CTD the game ...

What's is wrong ?

Thanks for your help guys and keep under water :)

Disable the Battlestation patch and then enable it again.
NEVER use this near or in a port.

Cthulhus
04-01-13, 04:40 PM
Disable the Battlestation patch and then enable it again.
NEVER use this near or in a port.

Thanks that work now ! I see on the patch that now I can use the right or/and the left engine. How can I manage that ?

Cthulhus
04-01-13, 04:48 PM
Thanks that work now ! I see on the patch that now I can use the right or/and the left engine. How can I manage that ?

Found, sorry :
http://www.subsim.com/radioroom/showthread.php?t=181433&page=103

So, need to wait for the new UI v7.2.0

Fifi
04-01-13, 05:12 PM
So, need to wait for the new UI v7.2.0

Tiens, le voila!:
http://www.mediafire.com/download.php?0efd42uxcx5oxvf

Cthulhus
04-01-13, 05:26 PM
Tiens, le voila!:
http://www.mediafire.com/download.php?0efd42uxcx5oxvf

One question regarding the new UI v7.2.0. Why it's not listed on the main download section of SubSim ? The "current" version is v7.1.0 ...

Any idea ??

Et merci l'ami pour le lien :)

Targor Avelany
04-01-13, 05:28 PM
One question regarding the new UI v7.2.0. Why it's not listed on the main download section of SubSim ? The "current" version is v7.1.0 ...

Any idea ??

Et merci l'ami pour le lien :)

You can find 7.2 on the forum.

Reason it is not main: it was released as a test version and TDW said that he hasn't fixed all of the things that he wanted with it and didn't want to release an incomplete version.

Cthulhus
04-01-13, 05:34 PM
OK thanks, and you installed it ? It's stable enough for you ?

Targor Avelany
04-01-13, 05:53 PM
OK thanks, and you installed it ? It's stable enough for you ?

I haven't played the game (actual campaign) for over 6 month :)
I've been primarily messing around with files.. so, I have no idea. volodya, I believe, have been using it and reported no problems, but sober mentioned he had some... So...

Txema
04-01-13, 06:28 PM
TheDarkWraith,

Thank you very much for these new patches.

Fantastic work !!!

:salute:

Txema

Fifi
04-01-13, 06:43 PM
OK thanks, and you installed it ? It's stable enough for you ?

I used it for a while, but now i'm back with 7.1.
7.2 is stable and running almost fine for me.
Decks awashed is working very good.
Separated engines are working but some problems when ordering speed with the needles, and many times had to click twice the icons for orders to works...(like for periscope depth)
I don't have those troubles with 7.1, so i prefer 7.1 :03:

THE_MASK
04-02-13, 02:24 AM
Does anyone know if there is still a problem with the progress campaign bar not filling with the orbit patches ?

BigWalleye
04-02-13, 06:33 AM
AFAIK, there is. TDW didn't mention anything about it in the posts releasing v79. So I'm assuming he hasn't gotten time to fix it yet. Didn't want to risk messing up a perfectly good campaign to find out. Playing offline with the Listener enabled, I haven't been bothered by any web-spawned interference. Wish I could disable the account-sharing check, though. I run several installs, and sometimes like to share the same in-port save. Checker catches me. But turning it off impacts OHII also.

hitmanuw
04-02-13, 07:13 AM
Does anyone know if there is still a problem with the progress campaign bar not filling with the orbit patches ?


the problem is not solvet .... i tested last night

Cthulhus
04-02-13, 02:17 PM
Does anyone know if there is still a problem with the progress campaign bar not filling with the orbit patches ?

I selected the orbit patches but can you tell me what is it ? Right now, they are activated and a think that now that my mission progress bar don't progress... So, this is maybe the reason? I was on the designated area and sunk two ships and one was a carrier and I was disappointed when I saw the progress bar...

If the "orbit patches" are not so important, I'll turn then off...

hitmanuw
04-02-13, 03:04 PM
I selected the orbit patches but can you tell me what is it ? Right now, they are activated and a think that now that my mission progress bar don't progress... So, this is maybe the reason? I was on the designated area and sunk two ships and one was a carrier and I was disappointed when I saw the progress bar...

If the "orbit patches" are not so important, I'll turn then off...


i have all orbit disabled and work fine teka a look on this screen

237

Cthulhus
04-02-13, 03:07 PM
i have all orbit disabled and work fine teka a look on this screen

237

Yes that is what I said

Fifi
04-02-13, 03:48 PM
Hum...had to deactivate the AOB fix in latest TDW patch.
It didn't fix anything here :o...was kind of a mess instead!
Meaning when setting an AOB angle with the rotating stuff, for some reason it doesn't want to keep my setting...whatever i do (even clicking the TDC red icon).
Back the "old way" without the AOB fix, it's working again :hmmm:

The stadimeter fix seems to work though...

EDIT: maybe i had to change the patcher in bunker?...i did it in mission, and reload a save.

Cthulhus
04-02-13, 04:14 PM
EDIT: maybe i had to change the patcher in bunker?...i did it in mission, and reload a save.

To be sure, all changes needs to be made on bunker... You can do that on patrols for mods only concerning the textures for example.

That is just my point of view. Doing this will remove all doubts.

Fifi
04-02-13, 04:46 PM
Yes, but patcher isn't really a mod, and i use it as a standalone app...

gap
04-02-13, 05:29 PM
@gap - looks like I found a way to call functions in other dlls easily. I found a function in ScriptManager that allows the assembly code to 'fire' a command to all the loaded scripts. The loaded scripts can easily catch this command. The 'fired' command allows you to pass parameters with it also. The scripts can also 'fire' commands to the game passing arguments also. This is excellent because I can write code in C# (hell of a lot easier) to read in your idea your group is working on. A script can load this DLL and communicate with it (again much easier writing Python than assembly!). The script updates the game (and whatever assembly code I write for your idea) by sending new command(s) (whatever I name them) to the game. The game won't understand the commands and will ignore them because it only recognizes what is hard coded in so it will pass them to my command parser assembly code who will divy it out to the correct function. That function will read in the arguments passed with the command and do whatever it needs to do with them. If the function needs to send data back to the script it 'fires' off a command passing the needed information with the command. The script intercepts this command reads the data. Cycle repeats if necessary.

I'm still figuring out how to 'fire' commands using the ScriptManager correctly. I can 'fire' commands no problem, the problem is I don't understand how the parameters for the command are created (something with ScriptManager again) and finally attached to the command (ScriptManager again). Once I figure that out two way communication between game and external DLL via script will be a snap and will open the door up for more opportunities :D If I can write code for the game in C# I can a) be much faster at it and b) do MUCH more because it's easier to code in C#

Excellent news TDW, thank you for sharing them :yeah:

I have released the first version of my "U-boats log generator":

http://www.subsim.com/radioroom/showpost.php?p=2035363&postcount=49

I wish you to have a look into it, and give us your suggestions on what you think you can do or you cannot do with its outputs.

At this stage it will be easy to add/remove/modify any data input by adjsuting the spreadsheet, but once the guys will start collecting information, revising the logs one by one would be equivalent to start again from zero :yep:

Cthulhus
04-02-13, 05:44 PM
Yes that is good ! More to come :)

TheDarkWraith
04-03-13, 11:48 PM
v1.0.80.0 released. See post #1

Starting with v1.0.80.0 added a new patch to SHSim.act: AI subs no longer cause your crew to speak and or place messages in the messagebox when they are diving and/or recharging batteries

Yes, it's time to put to rest that annoying bug of AI subs causing your crew to speak on their behalf when diving and/or recharging batteries :rock: God that annoyed me to no end :nope:

@gap - will look when I get back home. Out of the country currently :D

TheDarkWraith
04-03-13, 11:52 PM
Hum...had to deactivate the AOB fix in latest TDW patch.
It didn't fix anything here :o...was kind of a mess instead!
Meaning when setting an AOB angle with the rotating stuff, for some reason it doesn't want to keep my setting...whatever i do (even clicking the TDC red icon).
Back the "old way" without the AOB fix, it's working again :hmmm:

The stadimeter fix seems to work though...

EDIT: maybe i had to change the patcher in bunker?...i did it in mission, and reload a save.

Did you have the TDC on? If you are letting the AI do the torpedo calculations for you (TDC off) then don't enable this patch. This patch is for those who manually calculate their firing solutions (thus meaning plotting and inputting their data into the TDC dials). This patch is for those that don't use the round circles on the torpedo line (TDC off)

THE_MASK
04-04-13, 12:50 AM
v1.0.80.0 released. See post #1

Starting with v1.0.80.0 added a new patch to SHSim.act: AI subs no longer cause your crew to speak and or place messages in the messagebox when they are diving and/or recharging batteries

Yes, it's time to put to rest that annoying bug of AI subs causing your crew to speak on their behalf when diving and/or recharging batteries :rock: God that annoyed me to no end :nope:

@gap - will look when I get back home. Out of the country currently :DAwesome patch , it was annoying the hell out of me as well .

Cthulhus
04-04-13, 03:00 AM
Thanks TheDarkWraith! What are your next works on the SH5.exe ?

Fifi
04-04-13, 06:38 AM
Did you have the TDC on? If you are letting the AI do the torpedo calculations for you (TDC off) then don't enable this patch. This patch is for those who manually calculate their firing solutions (thus meaning plotting and inputting their data into the TDC dials). This patch is for those that don't use the round circles on the torpedo line (TDC off)

I don't use the 123 circles. I collect all data and put it in the officer window.
Never touch anything else :hmmm: Also the TDC button is usually red...

TheDarkWraith
04-07-13, 03:26 AM
v1.0.81.0 released. See post #1

Starting with v1.0.81.0 revised the SHCollisions AI Crew Damage Control patch. The patch now takes crew veterancy level, unit's HPs ratio, and unit's type into consideration. Most effects will stop when crew fixes damage to the zone (box) :rock:. I'm still looking for a few controllers so that I can stop them all.

I have more to add to this AI Crew Damage Control patch. Right now it's functional but has much more room for improvement :D

:|\\

Sartoris
04-07-13, 04:21 AM
Great news, thank you!:yeah:

Captain73
04-07-13, 02:21 PM
After installing the v1.0.81.0 if I switch on the strategic map, I see CTD! :hmmm:

TheDarkWraith
04-07-13, 07:35 PM
After installing the v1.0.81.0 if I switch on the strategic map, I see CTD! :hmmm:

Don't know what to tell you. I have all my patches enabled and have absolutely no problems at all. I would try re-enabling all patches with stock files and see what happens.

Trevally.
04-08-13, 02:34 AM
Thanks TDW and I like your new avatar although I think of you more like this

https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSi6nXIcTSJ0jVbffbyq3mjoGdhnf8Zk hsn3zmU_BUP1ne3ypaz

:D

Captain73
04-09-13, 12:57 PM
Don't know what to tell you. I have all my patches enabled and have absolutely no problems at all. I would try re-enabling all patches with stock files and see what happens.
Set v1.0.74.0, everything works fine! :06:

TheDarkWraith
04-13-13, 10:33 AM
Are there any other stock bugs left to fix :06: Besides the AI one where sometimes a unit gets stuck to you what's left to fix? I think I've pretty much patched out all the stock bugs.

What about enhancements? Any ideas on enhancing any of the stock features/commands? :hmmm:

Work still continues on the carriers launching airplanes. Right now I'm trying to create my own controller for the game that will handle the carriers and airplane launching/patrolling.

Swat
04-13-13, 11:17 AM
Wow... I'd remember this day. In OHII thread Trevally just said he 'ran out of steam' (suggesting OHII is perfect more or less - AND INDEED IT IS!) and you are asking now if there's anything else to be fixed by you and your skills. After how long guys? Four years of your PHENOMENAL and FANTASTIC work, is that right? These two posts came on the same day and I'd say thanks to your skills, enthusiasm and patience you've brought SH5 VERY CLOSE TO PERFECTION ! And I thank you for that very much, what you and other modders have achieved after such a long period of time, when you brought this game from unplayable into the best subsim ever made.

T.H.A.N.K. Y.O.U. ! ! !

PS. yes, AI would still need some tweaks, wishing you best of luck TDW.
Edit: you've patched more than stock bugs, you've patched people's lives. Everyone was so looking forward to the new SH and what a disappointment it was. You've brought it to the state where it was supposed to be some four years ago...

TheDarkWraith
04-13-13, 11:37 AM
Thanks TDW and I like your new avatar although I think of you more like this

https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSi6nXIcTSJ0jVbffbyq3mjoGdhnf8Zk hsn3zmU_BUP1ne3ypaz

:D

Gandalf? Hmmm....nah, he's way older than I. I can walk without a staff :D Great movies though! Books were even better :yep:

How's the revised AI crew damage control working out? I'm still looking for a few controller's 'signatures' so that I can 'turn them off' and thus stop their effects when the AI crew has repaired damage.

@Swat - it may seem strange to you but I find great enjoyment in picking something apart, finding it's flaws, and putting it back together with my changes. I guess it's the personal satisfaction part that I find the great enjoyment in. All I know it's a total blast to me to take someone else's work and improve it 10 or 100 fold :cool:

SH5 has so much potential that we've only begun to scratch the surface of what one can do with it.

Targor Avelany
04-13-13, 11:49 AM
Gandalf? Hmmm....nah, he's way older than I. I can walk without a staff :D Great movies though! Books were even better :yep:

How's the revised AI crew damage control working out? I'm still looking for a few controller's 'signatures' so that I can 'turn them off' and thus stop their effects when the AI crew has repaired damage.

@Swat - it may seem strange to you but I find great enjoyment in picking something apart, finding it's flaws, and putting it back together with my changes. I guess it's the personal satisfaction part that I find the great enjoyment in. All I know it's a total blast to me to take someone else's work and improve it 10 or 100 fold :cool:

SH5 has so much potential that we've only begun to scratch the surface of what one can do with it.

Awesome to hear on the improvements!

Have you checked the reported problems with Orbit Launcher and campaign not working properly?

TheDarkWraith
04-13-13, 11:57 AM
Have you checked the reported problems with Orbit Launcher and campaign not working properly?

I'm looking into it. Problem is I've so heavily modified my sh5.exe that things like that that are supposed to work on you all's computer's without problems is not working. So I have to look over all the changes I made to mine to see how it/they could be causing the problem(s) you all are having.

Tonci87
04-13-13, 12:00 PM
How about improving IRAI? :O:

TheDarkWraith
04-13-13, 12:03 PM
How about improving IRAI? :O:

Funny you should bring that up. I've been 'watching' the AI routines to see how the code controls the AI. I'm looking for things like how do the commands in the .aix files get 'called' in the exe and act files. I design test missions that force the AI to take a specific action so that I can see the 'code trace' and what's going on. Once I understand how all these aix files, commands, and code together then I should be able to take the AI to the next level.

Tonci87
04-13-13, 12:05 PM
Funny you should bring that up. I've been 'watching' the AI routines to see how the code controls the AI. I'm looking for things like how do the commands in the .aix files get 'called' in the exe and act files. Once I understand how all these aix files, commands, and code together then I should be able to take the AI to the next level.

Now you got me exited. A good AI is the foundation for a good game.

Sartoris
04-13-13, 02:05 PM
Funny you should bring that up. I've been 'watching' the AI routines to see how the code controls the AI. I'm looking for things like how do the commands in the .aix files get 'called' in the exe and act files. I design test missions that force the AI to take a specific action so that I can see the 'code trace' and what's going on. Once I understand how all these aix files, commands, and code together then I should be able to take the AI to the next level.

Great to hear that!:up:

Fifi
04-13-13, 03:43 PM
Funny you should bring that up. I've been 'watching' the AI routines to see how the code controls the AI. I'm looking for things like how do the commands in the .aix files get 'called' in the exe and act files. I design test missions that force the AI to take a specific action so that I can see the 'code trace' and what's going on. Once I understand how all these aix files, commands, and code together then I should be able to take the AI to the next level.

SH5 AI isn't working like in SH4?
Not the same codes and/or routines?
Ducimus made a great job with AIs in SH4 (TMO), probably the best ever in an SH, and would be awesome to get same result in SH5 imo.
Japanese aren't smarter than British after all! :haha:
On side note, you made already a fine job with IRAI :O:

gap
04-15-13, 01:04 PM
What about enhancements? Any ideas on enhancing any of the stock features/commands? :hmmm:

Here are a couple of ideas:

- decoding/debugging weather generation routines;
- making U-boat equipments subject to failure, randomly or on the base of improper usage.

Tonci87
04-15-13, 01:09 PM
Here are a couple of ideas:

- decoding/debugging weather generation routines;
- making U-boat equipments subject to failure, randomly or on the base of improper usage.


Oh no not randomly..... :down:
On the base of improper usage? :up:

volodya61
04-15-13, 01:20 PM
- making U-boat equipments subject to failure, randomly or on the base of improper usage.

maybe time in patrol/in the sea?

gap
04-15-13, 01:28 PM
Oh no not randomly..... :down:
On the base of improper usage? :up:

yes indeed. On the other hand being mathematically sure that engines will blow up exactly after x consecuitive hours of "extreme speed" sailing wouldn't be too realistic. :03:

maybe time in patrol/in the sea?

There are accounts of U-boats returning to base just after sailing, due to technical failures. Again, everything is matter of random probablities:

proper equipment usage/short patrol duration = low failure chance
improper equipment usage/long patrol duration = high failure chance

volodya61
04-15-13, 01:59 PM
proper equipment usage/short patrol duration = low failure chance
improper equipment usage/long patrol duration = high failure chance

Yes, indeed.. this is the best decision.. make sense.. :up:

Macardigan
04-16-13, 04:26 AM
The current mission bar not updated when a vessel sink patches Orbit activated.

I see that others have this problem.

good hunting.

---------------------------------------------
Spanish:

A mí tampoco se me actualiza la barra de misión cuando hundo un barco con los parches de Orbit activados.

Ahí queda eso.

buena caza.





-----------------
My sh5 mod:
RPM Hydrophone Merchants 1.1 http://www.subsim.com/radioroom/showthread.php?t=203716
Download Link: http://www.mediafire.com/?2sh52pajek4jsmg (http://www.mediafire.com/?2sh52pajek4jsmg)

keysersoze
04-16-13, 03:16 PM
Here are a couple of ideas:

- decoding/debugging weather generation routines;
- making U-boat equipments subject to failure, randomly or on the base of improper usage.

:agree:

I love these ideas. I think everyone would like to see less "medium fog" in the game, and a further decoding of the weather patterns would no doubt be very useful for gap's great DynEnv mod. As for equipment failure, I believe h.sie's hardcoded fixes for SH3 added failure when the diesels were run at flank speed for long periods. I really miss this feature in SH5. Other mechanical failures would add a nice dose of realism.

gap
04-16-13, 05:53 PM
:agree:

I love these ideas. I think everyone would like to see less "medium fog" in the game, and a further decoding of the weather patterns would no doubt be very useful for gap's great DynEnv mod.

:yep:


As for equipment failure, I believe h.sie's hardcoded fixes for SH3 added failure when the diesels were run at flank speed for long periods. I really miss this feature in SH5. Other mechanical failures would add a nice dose of realism.

Another malfunction related to improper usage, could be scopes getting damage if raised while cruising at high speed, but I am sure there are many other failures like these which we can think of...

keysersoze
04-16-13, 06:20 PM
Another malfunction related to improper usage, could be scopes getting damage if raised while cruising at high speed, but I am sure there are many other failures like these which we can think of...

Good idea. That would provide some incentive to slow down before raising the periscope. Some other random ideas that come to mind:


Diesel problems: already mentioned, but diesel malfunctions were almost ubiquitous
Jammed dive planes: simple malfunctions or the consequence of diving at high speed
Tube runners: torpedoes that begin actively "running" but are not ejected from the torpedo tube; this was a serious and very dangerous situation
Circle runners: torpedo malfunctions and circles back toward the U-boat
Jammed/frozen ballast vents: U-109 had her vents frozen shut while operating off Canada and was unable to dive for some time
Electrical shorts: a very common problem associated with DC attacks; it would be cool if the interior lighting could also be knocked out
Compromised pressure hull: usually the result of sabotage or dockyard mistakes; this would drastically reduce safe diving depth

gap
04-16-13, 06:32 PM
Some other random ideas that come to mind:

...


Another idea: torpedo doors not opening/closing. IIRC this one was a common reason for premature patrol endings. :03:



Circle runners: torpedo malfunctions and circles back toward the U-boat


I think that circle runners are already modelled in game. :up:

keysersoze
04-16-13, 06:38 PM
Another idea: torpedo doors not opening/closing. IIRC this one was a common reason for premature patrol endings. :03:


Good suggestion. Fuel leaks were another common problem that could result from poor maintenance, sabotage, or DC attack. Not only would this malfunction decrease range, but it would also give the U-boat's position away in calm seas due to the tell-tale wake of fuel oil trailing behind the boat.


I think that circle runners are already modelled in game. :up:

:o I guess I need to start watching my torpedoes more closely....

gap
04-16-13, 06:58 PM
Fuel leaks were another common problem that could result from poor maintenance, sabotage, or DC attack. Not only would this malfunction decrease range, but it would also give the U-boat's position away in calm seas due to the tell-tale wake of fuel oil trailing behind the boat.

Another good one :sunny:

:o I guess I need to start watching my torpedoes more closely....

Have you enabled Rongel's Torpedo malfunctions test v 2 (http://www.subsim.com/radioroom/showpost.php?p=1935329&postcount=1) already? :03:

keysersoze
04-16-13, 07:09 PM
Have you enabled Rongel's Torpedo malfunctions test v 2 (http://www.subsim.com/radioroom/showpost.php?p=1935329&postcount=1) already? :03:

No, I haven't that probably explains why I haven't seen any circle-runners.

gap
04-16-13, 07:13 PM
No, I haven't that probably explains why I haven't seen any circle-runners.

Also make sure you have enabled TDW's torpedo failures patch when using the aforementioned mod :know:

volodya61
04-17-13, 03:21 AM
I think that circle runners are already modelled in game. :up:
Have you enabled Rongel's Torpedo malfunctions test v 2 (http://www.subsim.com/radioroom/showpost.php?p=1935329&postcount=1) already? :03:
Also make sure you have enabled TDW's torpedo failures patch when using the aforementioned mod :know:

I have never seen (more than a year) circle-runners in the game.. at least in the campaign mode..
I saw it once in the single mission..
I have enabled the patches - Torpedo dud fix and Magnetic detonators rang defects - since their release..
With regard to Rongel's torpedo malfunctions, I haven't had much time for its full testing..

Tonci87
04-17-13, 03:30 AM
Guys stop it, I want to enjoy my patrol, not rage because some piece of equipment broke in a critical situation :O:

gap
04-17-13, 08:00 AM
With regard to Rongel's torpedo malfunctions, I haven't had much time for its full testing..

I am sure Rongel increased circle-runner's chance :03:

Guys stop it, I want to enjoy my patrol, not rage because some piece of equipment broke in a critical situation :O:

The more the rage for unforeseen accident, the more the enjoyment when everything goes as expected :)

gap
04-17-13, 08:47 AM
what if this number isn't the theoretical maximum speed of the engine in knots but rather the RPM of that engine's shaft (in the water) :06: The constants could be related to gearing reduction.

Anyone have any figures on what the RPM of the shafts were at different bells for the subs?

Not sure if this is still relevant, but according to uboatarchive.net (for a VIIC), here is the max rpm for both the MAN and GW diesels.

Forward
Flank - 471 rpm
Full - 435 rpm
Standard - 340 rpm
One-Third - 275 rpm
Slow - 180 rpm

Reverse
Flank - 285 rpm
Full - 215 rpm
Standard - 160 rpm
One-Third - 110 rpm
Slow - 55 rpm

...


Yesterday I stumbled upon this other uboatarchive.net page:

http://www.uboatarchive.net/KTBNotesPropulsion.htm

What is good about it, is that it correlates telegraph speed orders with RPM's and speeds in knots empirically measured aboard a captured VIIC boat, for both diesel and electric propulsion. The information reported is compatible, though not identical, with the one pointed by keysersoze.

I have plotted on a graph RPM's and their resulting speeds. I was expecting some sort of logarithmic curve, similar to a torque curve (the higher the rpm, the more drag and cavitation, the lesser efficiency, etc.). To my surprise, diesel rpm/speed coordinates are fitted (with a R2 value of 0.9977) by a straight line. The same goes for the electric propulsion curve, though with a bit lesser R2 value (0.9818), and with five points out of six aligned with a straight line crossing the axis origin. Removing the one misaligned point gives an R2 value of 0.9991, which makes me to think of a measurement/reporting error :hmmm:

http://img407.imageshack.us/img407/3299/rpmspeeds.jpg

Vanilla
04-17-13, 03:29 PM
@TDW,

There are some other bugs that are still there: the crew scripting is very buggy. The most obvious would be non-working crash_dive command. It is never called. Rubini used Rescue_survivors script to work around the problem but it would be nice if the script worked as supposed. To illustrate here is an excerpt from \data\Submarine\NSS_Uboat7a\crew_commands.txt:
// Crash_dive currently not getting triggered
// Added Rescue_Survivors command and MCCD modifications by Rubini

Crash_dive 1 1 4 ( CR_CHIEF = crashd_CHIEF, CR_VALVE = crashd_VALVE, CR_HELM = crashd_HELM, CR_SO_01 = crashd_SO )
[.....]
Rescue_Survivors 1 1 4 ( CR_CHIEF = ccrashd_CHIEF, CR_VALVE = ccrashd_VALVE, CR_HELM = ccrashd_HELM, CR_SO_01 = ccrashd_SO )
[.....]
As you can see the Crash_dive command should cause some crew members to follow crashd script (which lies in crash_dive.aix file) but this Crash_dive command is never triggered. Rubini reworked the menues so that Rescue_Survivors command is given instead of Crash_dive so the crashd script could be called.

I would love to add to that the annoying bug of animation orientation. I am not sure if you can remember that but there are two numbers in animation scripts that suppose to give initial and final orientation of the crew member's animation but they don't work.

It would be also awesome if some methods to get current time, date, and weather as well as some kind of timer and a random number were available in crew scripts as they are in ship AI scripts, currently all these things like battlestations, watches changes or changing to bad-weather outfit are next to impossible to mod-in since crew scripts have no knowledge of what's going on outside or inside the boat. There are many other problems with crew scripting like bad pathfinding, no knowledge of other members proximity, hard-coded turning animation (that uses only 90 degree slow turns), etc. etc. since the crew modelling was just half or 1/3 done when the games was released, but those methods I mentioned are of prime importance.

TheDarkWraith
04-18-13, 04:21 PM
Another malfunction related to improper usage, could be scopes getting damage if raised while cruising at high speed, but I am sure there are many other failures like these which we can think of...

This one is near the top of my list to do. Problem is I haven't found/figured out where the damages are stored at yet.

gap
04-18-13, 04:39 PM
This one is near the top of my list to do. Problem is I haven't found/figured out where the damages are stored at yet.

I wish you good luck with this one. :up:

On the topic of possible new patches, in SH5 general forum a French speaking member has asked about a patch making sinking ships not to disappear as soon as they touch the seabottom. This is not the worst SH5 flaw indeed, but since I know you have already looked into this problem, do you have any news about it?

TheDarkWraith
04-18-13, 04:44 PM
I wish you good luck with this one. :up:

On the topic of possible new patches, in SH5 general forum a French speaking member has asked about a patch making sinking ships not to disappear as soon as they touch the seabottom. This is not the worst SH5 flaw indeed, but since I know you have already looked into this problem, do you have any news about it?

I know where in the code it adds the depth offset to the unit to make it sink through the bottom and keep going till it's at 500m at which time the game removes it. Problem is I haven't figured out what is triggering this negative depth offset value. Once I can find that I can stop the units from sinking through the bottom. Before I can figure that out I have to find the code that says unit hit the bottom - don't let it go through the bottom first.

TheDarkWraith
04-18-13, 04:51 PM
A link to the SH_N_Client patch has been placed at post #1. I'll ensure it's in the next version :salute:

Fifi
04-18-13, 04:55 PM
As to give you my only request with your patches and mods:

I'd love to see SH5 keeping marks (ruler etc) when saving/reloading.
SH3 and 4 do this, don't see why SH5 can't!
As well as destroyed marks...the NewUIs ones never worked here (or very few times) and nothing to be done here to make it work correctly (even boat's log activated) :wah:
I'd love to keep tracks of my adventures with those stupid little icons, and i'd love to get back stock destroyed icons each time i save/reload!

Cherry on the cake would be game saving current weather too...but that's an other story :haha:

EDIT: sorry, didn't see your reply in other thread! lol

gap
04-18-13, 05:23 PM
I know where in the code it adds the depth offset to the unit to make it sink through the bottom and keep going till it's at 500m at which time the game removes it. Problem is I haven't figured out what is triggering this negative depth offset value. Once I can find that I can stop the units from sinking through the bottom. Before I can figure that out I have to find the code that says unit hit the bottom - don't let it go through the bottom first.

I see :yep:

On a side note, have you seen the graph at page #1665? I wonder which rpm/speed curve is coded in game.

Setting a realistic curve (especially for electric propulsion) is going to impact the optimal silent speed for evading enemy attacks. This is supposing that, as in rela life, enemy detection in game is affected by propeller's rpm, rather than by speed per se.

According to the article mentioned in the above post, the most silent running speed was at about 90 rpm, which should correspond to the second slowest speed order in U-boat speed telegraphs: "Langsame Fahrt".

Also note that speed orders for diesel propulsion (expressed as a fraction of the maximum speed/rpm) had a different "spacing" among them than their equivalent for electric propulsion:

Diesel Electric
KF 0.34 0.20
LF 0.54 0.39
HF 0.62 0.54
2xHF 0.80 0.69
GF 0.95 0.80
AK 0.98 0.97
3xAK 1.00 -

As far as I can see, SH5 uses the same settings ([EngineProperties] in NSS_Uboat7*.cfg) for both diesel and electric propulsion. I wonder if you could patch the game to use different ratios for them :hmm2:

TheDarkWraith
04-19-13, 12:10 AM
v1.0.83.0 released. See post #1

Added more support code to each patch file. Fixed bug in sh5.exe when writing DestroyedUnits.ini file. Added new entries to the DestroyedUnits.ini file. YOU NEED TO OPEN EVERY PATCH FILE PROVIDED SO THAT THE FILE ASSOCIATED WITH THE PATCH GETS IT'S NEW/UPDATED SUPPORT CODE.

Added new torpedo failures to the SHSim.act file.

ENSURE YOU REMOVE ALL OLD PATCHES FIRST!

TheDarkWraith
04-19-13, 01:14 AM
As far as I can see, SH5 uses the same settings ([EngineProperties] in NSS_Uboat7*.cfg) for both diesel and electric propulsion. I wonder if you could patch the game to use different ratios for them :hmm2:

I can probably do something for this. I would make it so that a file is read that contains all the data for every sub. So take all the engine properties for every sub and copy them into a file. Add a header to each one like so [x] where x is the sub's classname from it's cfg file. Adjust the values to what you want and post a link to it.

volodya61
04-19-13, 03:20 AM
v1.0.83.0 released. See post #1

Good news :yeah:

Unfortunately destroyed marks doesn't show up in my game when I'm using the NewUIs (at all), so I was forced to restore the stock destroyed marks texture..
I hope with this new patch everything will show up as expected :up:

TheDarkWraith
04-19-13, 08:11 AM
Good news :yeah:

Unfortunately destroyed marks doesn't show up in my game when I'm using the NewUIs (at all), so I was forced to restore the stock destroyed marks texture..
I hope with this new patch everything will show up as expected :up:

Not yet. When I release the next version of my UIs mod and the Generic Patcher then the destroyed marks will be fixed :up:

gap
04-19-13, 09:40 AM
I can probably do something for this. I would make it so that a file is read that contains all the data for every sub. So take all the engine properties for every sub and copy them into a file. Add a header to each one like so [x] where x is the sub's classname from it's cfg file. Adjust the values to what you want and post a link to it.

I am still collecting more information on the topic, but I am close to have a complete framework of it, and I plan to post in short time the cfg file suggested by you.

For a start, from a table at p. 21 of the Cumulative Edition of the British interrogation reports (http://www.uboatarchive.net/CumulativeEdition.htm), I got confirmation that the "misaligned" point in the graph posted at post #1665 (electric propulsion), is due to a mistyping. R.p.m. at Langsame Fahrt were 112, and not 90, as wrongly reported in this document (http://www.uboatarchive.net/KTBNotesPropulsion.htm). :know:

The correct rpm/speed chart for type VIIC U-boats is therefore:

DIESEL
speed order rpm speed
========================================
Kleine Fahrt 161 6.10 kts
Langsame Fahrt 263 9.63 kts
Halbe Fahrt 310 10.98 kts
2x Halbe Fahrt 404 14.24 kts
Große Fahrt 469 16.73 kts
Äußerste Kraft 485 17.29 kts

ELECTRIC
speed order rpm speed
========================================
Kleine Fahrt 60 1.50 kts
Langsame Fahrt 112 3.00 kts
Halbe Fahrt 160 4.10 kts
2x Halbe Fahrt 200 5.23 kts
Große Fahrt 233 6.10 kts
Äußerste Kraft 280 7.40 kts

...and this is the new graph, showing a perfect rpm/speed linearity for both diesel and electric propulsion:

http://img823.imageshack.us/img823/9991/rpmspeeds1.jpg

This is what British had measured on captured boats... the Kriegsmarine manual for U-boat Type VII C (http://www.uboatarchive.net/Manual.htm) (p. 14), reports slightly different figures:

DIESEL
speed order rpm max speed min speed
================================================== =======
Kleine Fahrt 180 7.20 kts 7.00 kts
Langsame Fahrt 275 10.20 kts 10.00 kts
Halbe Fahrt 340 12.40 kts 12.00 kts
2x Halbe Fahrt 396 14.60 kts 14.00 kts
Große Fahrt 435 16.30 kts 16.00 kts
Äußerste Kraft 471 17.70 kts 17.50 kts
3x Äußerste Kraft 480 18.10 kts 17.90 kts

ELECTRIC
speed order rpm max speed min speed
================================================== =======
Kleine Fahrt 55 2.30 kts 1.50 kts
Langsame Fahrt 110 4.50 kts 3.00 kts
Halbe Fahrt 160 6.30 kts 4.50 kts
2x Halbe Fahrt 215 8.20 kts 6.00 kts
Große Fahrt 250 9.30 kts 7.00 kts
Äußerste Kraft 285 10.5 kts 8.00 kts
3x Äußerste Kraft 300 11.00 kts -

Their graph is a bit more confusing:

http://img526.imageshack.us/img526/8962/rpmspeeds2.jpg

Max speed points for both diesel and electric propulsion are substantially aligned on the same straight line, wereas min speed values can be interpolated by two lines whose gradients are similar to the ones seen in the previous graph, with electric propulsion having a lesser slope than diesel propulsion (0.0262-0.0280 vs. 0.0357-0.0366). This makes me to think that the max speeds reported for each speed order are sort of theoretical values. What do you think guys? :hmm2:

volodya61
04-19-13, 10:10 AM
Not yet. When I release the next version of my UIs mod and the Generic Patcher then the destroyed marks will be fixed :up:

Not as great as I thought, but still good news :up:

:salute:

a17tares
04-19-13, 10:27 AM
@TDW

I just realized that you are using two different TDWUtils.dll's in NewUIs_TDC_7_3_0_ByTheDarkWraith (10.03.2013 8KB) and TDW_GenericPatcher_v_1_0_83_0 (08.09.2011 7KB). Maybe this is of any significance for the problems some of us are encountering? By the way disabling Orbit Launcher in the SH_NClient Patch but not in SH5 Patches seems to get rid of the campaign progress bug. But I'm not sure yet about the effect on CTDs.

volodya61
04-19-13, 10:34 AM
@TDW

I just realized that you are using two different TDWUtils.dll's in NewUIs_TDC_7_3_0_ByTheDarkWraith (10.03.2013 8KB) and TDW_GenericPatcher_v_1_0_83_0 (08.09.2011 7KB). Maybe this is of any significance for the problems some of us are encountering? By the way disabling Orbit Launcher in the SH_NClient Patch but not in SH5 Patches seems to get rid of the campaign progress bug. But I'm not sure yet about the effect on CTDs.

Just don't install Generic Patcher as a mod.. it's a standalone app.. if you want you can install .exe and .act files as a mod.. not the patcher itself..

TheDarkWraith
04-19-13, 12:35 PM
@TDW

I just realized that you are using two different TDWUtils.dll's in NewUIs_TDC_7_3_0_ByTheDarkWraith (10.03.2013 8KB) and TDW_GenericPatcher_v_1_0_83_0 (08.09.2011 7KB). Maybe this is of any significance for the problems some of us are encountering? By the way disabling Orbit Launcher in the SH_NClient Patch but not in SH5 Patches seems to get rid of the campaign progress bug. But I'm not sure yet about the effect on CTDs.

It will only make a difference if you overwrite the NewUIs one with the Generic Patcher one. You will most likely CTD as it will be missing some functions. When I build the patcher app it's supposed to 'pull in' the latest versions of those DLLs I set it to reference to. I'll have to look and see why Visual Studio is not doing this :hmmm:

Good news on the Orbit Launcher :up: Should cure the CTDs also because since the Orbit Launcher is now a null pointer (with the SH_NClient patch enabled) SH5 code will skip over anything to do with it (including pings). Have a look in the DbgView output. If you don't see anything related to ping or orbit launcher then SH5 is 'jumping over' anything to do with the SH_NClient.

Vanilla
04-19-13, 01:24 PM
...
Max speed points for both diesel and electric propulsion are substantially aligned on the same straight line, wereas min speed values can be interpolated by two lines whose gradients are similar to the ones seen in the previous graph, with electric propulsion having a lesser slope than diesel propulsion (0.0262-0.0280 vs. 0.0357-0.0366). This makes me to think that the max speeds reported for each speed order are sort of theoretical values. What do you think guys? :hmm2:

I believe that both sources are more than credible. A linear speed-RPM dependency is normal for propellers in water (as opposed to air) for an example look at this chart (http://continuouswave.com/whaler/reference/graphics/propellerTestGraphs/4BLADE_Series.png) and we here are talkin about very low RPMs at which this linearity would be even more pronounced. Let linearity here not confuse you: water, as opposed to air, is almost incompressible at these speeds that is why propellers are not loosing much of their effectiveness. It would be way more interesting to see speed-P.S. charts where there would be a lot more 'curviness'. As in terms of max-speed: I would go with British repots since German ones most probably give a brand-new boat specs as opposed to the British 'old-boat' ones and while at the moment we don't have a possibility to 'degrade' engines' performance we better set it slightly lower straight from the start.

gap
04-19-13, 03:53 PM
I believe that both sources are more than credible. A linear speed-RPM dependency is normal for propellers in water (as opposed to air) for an example look at this chart (http://continuouswave.com/whaler/reference/graphics/propellerTestGraphs/4BLADE_Series.png) and we here are talkin about very low RPMs at which this linearity would be even more pronounced. Let linearity here not confuse you: water, as opposed to air, is almost incompressible at these speeds that is why propellers are not loosing much of their effectiveness. It would be way more interesting to see speed-P.S. charts where there would be a lot more 'curviness'. As in terms of max-speed: I would go with British repots since German ones most probably give a brand-new boat specs as opposed to the British 'old-boat' ones and while at the moment we don't have a possibility to 'degrade' engines' performance we better set it slightly lower straight from the start.

Thank you for your clarifications, Vanilla, they make perfect sense :up:

Talking about min/max speeds reported in the second set of data, the one taken from the Germanan manual, after having a closer look into the aforementioned source I have discovered what they are for. Diesel engine speeds are relative to two different (sea ?) conditions, named A and B. As for Electric propulsion speeds, max speeds apply to surface navigation, thus the big difference with min speeds (due to the extra drag caused by boat's superstructure and armament during submerged navigation). Unfortunately, I don't think the game takes the above factors into consideration.

Concluding, given the linear proportionality between r.p.m. and speeds, I think that the best way to set EngineProperties relative to each speed order, is calculating them from rpm's, as rpm'sr are lesser affected by disturbance factors (such as weather conditions, drag, etc.) compared to navigation speeds. In order to do it, we need to know maximum operative rpm's. The "U-boat Information for U-boat Type VII C" reports the following figures for both M.A.N. and G.W. Diesel engines (pp. 118, 124)

Full load: 470 RPM
Overload: 480 RPM
Maximum load: 490 RPM

Coparing the two sources I have recently mentioned, I think the "Maximum load" was the theoretical maximum speed that an engine in operational conditions wouldn't have been pushed to. Therefore I would set max diesel rpm to 485. As for Electric motors, this limit had to be a bit higher than 300 RPM, though I couldn't find any explicit mention to it in the sources I have consulted so far.

Using the above figures (480-485 and 300 rpm's) as reference, we should set EngineProperties as follows:

According to British Admiralty records:

[Diesel]

AheadSlow=0.33
AheadOneThird=0.54
AheadStandard=0.64
AheadFull=0.97
AheadFlank=1.00

[Electric]

AheadSlow=0.20
AheadOneThird=0.37
AheadStandard=0.53
AheadFull=0.78
AheadFlank=0.93


According to specs reported by the German manual:


[Diesel]

AheadSlow=0.37
AheadOneThird=0.57
AheadStandard=0.71
AheadFull=0.91
AheadFlank=0.98

[Electric]

AheadSlow=0.18
AheadOneThird=0.37
AheadStandard=0.53
AheadFull=0.83
AheadFlank=0.95


Note that I have not included backward speed orders yet. The German manual lists their respective rpm's, but not their resuting speeds. I ignore if propeller's hydroninamic efficency is the same in both ways, and I am therefore hesitant in homolgating reverse rpm's with backward speeds the same way I did with astern speed orders; nonetheless, assuming that propellers work the same way in both directions, we would have: :hmm2:

[Diesel]

BackSlow=-0.37
BackStandard=-0.43
BackFull=-0.52
BackEmergency=-0.82

[Electric]

BackSlow=-0.18
BackStandard=-0.37
BackFull=-0.53
BackEmergency=-0.83

volodya61
04-20-13, 09:18 PM
Hi TDW :salute:

As I mentioned in the NewUIs thread, I returned to the game after a short break and tested today all new patches since the version 1.0.75..

short report:

1. Render Patches
Change12 - Disables rendering of torpedo line
not working at all..

http://s19.postimg.org/mo8gu2ebj/image.jpg (http://postimg.org/image/mo8gu2ebj/) . http://s19.postimg.org/roaifr9bz/image.jpg (http://postimg.org/image/roaifr9bz/)

2. TDC AOB and Speed dials fix
Change3 - Fixes TDC Speed dial resetting
Change4 - Fixes TDC Speed dial resetting

When these two changes are enabled auto targeting is not working.. Changes 1 and 2 (AOB dial fixes) are working correctly..

3. Fixes torpedo circle runner chance
This patch is not working correctly or, on the other hand, it is working better than excellent :D.. all eleven torpedoes each test have their 100% chance to be a circle runner :)..

http://s19.postimg.org/dx61djke7/image.jpg (http://postimg.org/image/dx61djke7/)

Other torpedo patch - Checks for torpedo rudder jam on initial turn - is working properly, one circle runner torpedo for every two-three tests..

http://s19.postimg.org/y39jcfg1r/image.jpg (http://postimg.org/image/y39jcfg1r/)

4. Revised AI Crew Damage control seems is working correctly so far, but this patch requires much more testing as it happened the last time :yep:..

PS: not tested Orbit Listener patches, there is reason :)..

gap
04-21-13, 05:41 AM
WOW Volodya, congratulations on your good testing work :salute:

volodya61
04-21-13, 06:06 AM
WOW Volodya, congratulations on your good testing work :salute:

Ooops..
Thank you for reminded me, Gap.. I again forgot to ask http://s19.postimg.org/qbw15hmgv/facepalm.gif

TDW, do we still need AI Crew Damage Control Revised Zones.cfg when using AI Crew Damage Control patch?

hitmanuw
04-21-13, 08:33 AM
Hi TDW :salute:

As I mentioned in the NewUIs thread, I returned to the game after a short break and tested today all new patches since the version 1.0.75..

short report:

1. Render Patches
Change12 - Disables rendering of torpedo line
not working at all..

http://s19.postimg.org/mo8gu2ebj/image.jpg (http://postimg.org/image/mo8gu2ebj/) . http://s19.postimg.org/roaifr9bz/image.jpg (http://postimg.org/image/roaifr9bz/)

2. TDC AOB and Speed dials fix
Change3 - Fixes TDC Speed dial resetting
Change4 - Fixes TDC Speed dial resetting

When these two changes are enabled auto targeting is not working.. Changes 1 and 2 (AOB dial fixes) are working correctly..

3. Fixes torpedo circle runner chance
This patch is not working correctly or, on the other hand, it is working better than excellent :D.. all eleven torpedoes each test have their 100% chance to be a circle runner :)..

http://s19.postimg.org/dx61djke7/image.jpg (http://postimg.org/image/dx61djke7/)

Other torpedo patch - Checks for torpedo rudder jam on initial turn - is working properly, one circle runner torpedo for every two-three tests..

http://s19.postimg.org/y39jcfg1r/image.jpg (http://postimg.org/image/y39jcfg1r/)

4. Revised AI Crew Damage control seems is working correctly so far, but this patch requires much more testing as it happened the last time :yep:..

PS: not tested Orbit Listener patches, there is reason :)..

nice collors how u made it ?

volodya61
04-21-13, 10:27 AM
nice collors how u made it ?

I will PM you a bit later so as not to spam in the thread :)..

TheDarkWraith
04-23-13, 12:41 PM
Hello from Portland :D Got diverted to the main Intel site in Portland for some work for the next two weeks. On the plane flight I managed to generate some code that prevents destroyed ships/subs from sinking through the ocean bottom. The sinking through ocean bottom is actually two problems: the SH5 code does two things with destroyed ships/subs:
- the actual problem of the unit falling through the ocean bottom is because of a timing issue in the code. One part of the code is updating the unit's depth with a new - offset every frame update while another part of the code checks to see if it's under ocean bottom every 5-6 frame updates (which then adds a small offset to try and raise it above the ocean bottom when it finds it below - problem is this small offset addition isn't large enough to counter all the - offsets from the previous frame updates). Once the destroyed sub/ship reached 500m in depth the game would finally remove it. I have code to fix the falling through ocean bottom problem now.
- the other problem with destroyed ships/subs is that there is a deletion timer set to 30.0 seconds. After the destroyed sub/ship hits the sea floor then a deletion timer is started. Once 30.0 seconds is up the destroyed sub/ship is removed from the game. I have code to override this now. The new code reads a memory value that:
- if set to a value less than 0 will cause the unit to never be deleted
- if set to a value >= 0 will cause the unit to be deleted after the deletion timer = value.

There are a couple of small problems I'm still working out on the new code. One is the unit will slightly bob up and down on the sea floor with the new code. I have to modify the new code so that when the unit contacts the sea floor it 'sinks' in just a little and thus doesn't bob up and down. The other small problem is the effects are continually played (destroyed noise and bubble effects) if the unit is set to never delete. I'm still looking for a couple of controllers so that I can disable them when the unit hits the ocean bottom.

Now the great thing about the new code is the game still treats the unit as an active unit in the game - meaning you can still collide into it and it will cause damage, it can be picked up as a contact by destroyes and escorts thus providing a false contact (them thinking it's a sub).

I'm still looking for the code that deletes airplanes immediately when their HPs are <= 0 :salute:

Tonci87
04-23-13, 02:30 PM
Hello from Portland :D Got diverted to the main Intel site in Portland for some work for the next two weeks. On the plane flight I managed to generate some code that prevents destroyed ships/subs from sinking through the ocean bottom. The sinking through ocean bottom is actually two problems: the SH5 code does two things with destroyed ships/subs:
- the actual problem of the unit falling through the ocean bottom is because of a timing issue in the code. One part of the code is updating the unit's depth with a new - offset every frame update while another part of the code checks to see if it's under ocean bottom every 5-6 frame updates (which then adds a small offset to try and raise it above the ocean bottom when it finds it below - problem is this small offset addition isn't large enough to counter all the - offsets from the previous frame updates). Once the destroyed sub/ship reached 500m in depth the game would finally remove it. I have code to fix the falling through ocean bottom problem now.
- the other problem with destroyed ships/subs is that there is a deletion timer set to 30.0 seconds. After the destroyed sub/ship hits the sea floor then a deletion timer is started. Once 30.0 seconds is up the destroyed sub/ship is removed from the game. I have code to override this now. The new code reads a memory value that:
- if set to a value less than 0 will cause the unit to never be deleted
- if set to a value >= 0 will cause the unit to be deleted after the deletion timer = value.

There are a couple of small problems I'm still working out on the new code. One is the unit will slightly bob up and down on the sea floor with the new code. I have to modify the new code so that when the unit contacts the sea floor it 'sinks' in just a little and thus doesn't bob up and down. The other small problem is the effects are continually played (destroyed noise and bubble effects) if the unit is set to never delete. I'm still looking for a couple of controllers so that I can disable them when the unit hits the ocean bottom.

Now the great thing about the new code is the game still treats the unit as an active unit in the game - meaning you can still collide into it and it will cause damage, it can be picked up as a contact by destroyes and escorts thus providing a false contact (them thinking it's a sub).

I'm still looking for the code that deletes airplanes immediately when their HPs are <= 0 :salute:

Totally awesome!

gap
04-23-13, 05:01 PM
...I managed to generate some code that prevents destroyed ships/subs from sinking through the ocean bottom...

Now the great thing about the new code is the game still treats the unit as an active unit in the game - meaning you can still collide into it and it will cause damage, it can be picked up as a contact by destroyes and escorts thus providing a false contact (them thinking it's a sub).

:rock:

I'm still looking for the code that deletes airplanes immediately when their HPs are <= 0 :salute:

Can't wait for it. As we are at it, please don't forget to check what is preventing planes from dropping bombs with the latest IRAI version :03:

Jace11
04-23-13, 09:10 PM
The circle runner patch works, and I've combined it with the rudder jam (which is essentially the same thing?) but it's overall frequency is very high. I'm getting far more than 2.5%, anecdotally, it's nearly 40 to 50%. Whether this is affected by gyro angle, or your torpedo man's skills I don't know...

Mysterius
04-27-13, 09:54 AM
Hello,

I have applied all patches using the generic patcher on sh5.exe and the .act files and my game crashes when using the periscope.

As far as i know, everything else is working as intented, but when accessing the attack periscope by clicking on it, the game crashes without any error message.

Any guess?

volodya61
04-27-13, 10:48 AM
I have applied all patches using the generic patcher on sh5.exe and the .act files and my game crashes when using the periscope.
....
Any guess?

Try to disable the patches one by one and see/test what happens in the game.. :yep:

Choum
04-28-13, 04:22 AM
The circle runner patch works, and I've combined it with the rudder jam (which is essentially the same thing?) but it's overall frequency is very high. I'm getting far more than 2.5%, anecdotally, it's nearly 40 to 50%. Whether this is affected by gyro angle, or your torpedo man's skills I don't know...

Same problem 50-75% of my torpedo make circle.

volodya61
04-28-13, 05:07 AM
I'm getting far more than 2.5%, anecdotally, it's nearly 40 to 50%. Whether this is affected by gyro angle, or your torpedo man's skills I don't know...
Same problem 50-75% of my torpedo make circle.

Take a look at my test-report above - http://www.subsim.com/radioroom/showpost.php?p=2044536&postcount=1684 (http://www.subsim.com/radioroom/showthread.php?p=2044536#post2044536)

Fixes torpedo circle runner chance patch is not working correctly..

Fifi
04-28-13, 05:30 AM
I agree, those patches aren't working as intented.
Way too much torpedos circling (lately all of 4 fired :doh:) and still have AI crew damage control desabled...as well as magnetic detonator range defects giving me way too much premature torp explosions :yep:

volodya61
04-28-13, 05:49 AM
I agree, those patches aren't working as intented.
Way too much torpedos circling (lately all of 4 fired :doh:) ...

Not those..
one of them - Fixes torpedo circle runner chance
the second one - Checks for torpedo rudder jam on initial turn - works correctly.. one circle runner of 25-30 torpedoes.. :yep:

Mysterius
04-28-13, 10:45 AM
Try to disable the patches one by one and see/test what happens in the game.. :yep:


Thank you Volodya, I found the problem :).
I activated by accident the fix that removes certain items from the game (don't remember the actual name).

Without it, it works !

volodya61
04-28-13, 11:00 AM
Thank you Volodya, I found the problem :).
I activated by accident the fix that removes certain items from the game (don't remember the actual name).

Without it, it works !

Glad to hear..
Perhaps your find will be helpful to someone else :up:

TheDarkWraith
04-29-13, 02:46 AM
For those that would like to test out the ships and subs not falling through the sea floor and disappearing patch as I currently have it it's available here: http://www.mediafire.com/?mtzrgbs5b34844u

There are two patches for it: one is located in the SHCollisions patch and the other is located in the SHSim patch

It's not perfect yet but it's functional :D

volodya61
04-29-13, 04:50 AM
Thanks TDW :up:

I'll test these new patches and report back.. soon..

TheDarkWraith
04-29-13, 10:06 AM
Thanks TDW :up:

I'll test these new patches and report back.. soon..

The circle runner and rudder jam on initial turn are not one and the same. The circle runner causes the torpedo to turn in a circle immediately after it fires. The rudder jam on initial turn causes the torpedo to turn in a circle after it completes it's initial turn (approx. 100-150m after leaving the tube).

I'll look to see why the % chance is so high sometimes. I haven't experienced a 40-50% rate :hmmm:

Were the subs able to make their torpedoes circle runners if they wanted to? I could see a use for intentional circle runners :yep:

What I'm curious to know about the units falling through sea floor patches is what happens to the units sitting on the sea floor when you save/reload? Do they disappear? Are they healthy again?

TheDarkWraith
04-29-13, 10:14 AM
TDW, do we still need AI Crew Damage Control Revised Zones.cfg when using AI Crew Damage Control patch?

I would recommend it :yep:

volodya61
04-29-13, 10:15 AM
The circle runner and rudder jam on initial turn are not one and the same. The circle runner causes the torpedo to turn in a circle immediately after it fires. The rudder jam on initial turn causes the torpedo to turn in a circle after it completes it's initial turn (approx. 100-150m after leaving the tube).

I realized this at once.. but.. (below)

I'll look to see why the % chance is so high sometimes. I haven't experienced a 40-50% rate :hmmm:
Were the subs able to make their torpedoes circle runners if they wanted to? I could see a use for intentional circle runners :yep:

When I tested all the new patches (report post at the previous page), I noticed that failure chance not even 40-50% but almost 100% sometimes..

EDIT:
I would recommend it :yep:

OK.. Thanks :up:

TheDarkWraith
04-30-13, 12:33 AM
When I tested all the new patches (report post at the previous page), I noticed that failure chance not even 40-50% but almost 100% sometimes..

I went back and looked over the patch for the circle runner fix. One thing I found is that it doesn't take effect until the torpedo makes it's initial turn. This made the rudder jam on initial turn patch obsolete and thus has been removed. The other interesting thing is if the torpedo doesn't make any turns (just goes straight ahead) then the circle runner chance is set to 0%. If the torpedo makes just a 1 degree turn then the circle runner chance is applied. Thus I have revised the circle runner fix patch. Now you will get a truly random % chance of a circle runner. The problem with the old code was I thought MSVCR90.rand returned a 32 bit number in EAX - it actually returns a 16 bit number in EAX. Thus my code was incorrect. Now the code reflects a max 16 bit number being returned from MSVCR90.rand :salute:


v1.0.85.0 released. See post #1

Starting with v1.0.85.0 added patch to SHSim.act and SHCollisions.act that stops destroyed ships and subs from falling through the sea floor and disappearing (1st draft of this patch - more work to do on it). Removed patch Rudder jam on initial turn from SHSim.act. Revised patch Fix circle runner chance in SHSim.act

:|\\

Fifi
04-30-13, 12:55 AM
Good job TheDarkWraith :yeah:
Will test it very soon with my new campaign!

Fifi
04-30-13, 03:32 AM
:hmmm:
Patch Fix circle runner chance still giving me many circling torpedos...
Fired 4, 2 were circling!

About destroyed ships falling through the sea floor and disappearing, my last one disappeared before reaching ground. Maybe because it was too deep? :hmm2:

Still can't use the TDC AOB and Speed dials fix. It's a real mess here, cause i'm using the officer dialog window to enter datas, and it's not working when i set AOB. Have to switch the red button to green back and forth to enter datas each time. And when green, the solution line doesn't follow the boat course even with the right speed entered...
Usually, i enter datas in window when button is red. And all works fine. Maybe i'm not using it as intended?

The broken stadimeter patch fix seems ok though.

And last, the magnetic detonator range defects is still giving me way plenty of torpedos exploding before boat. Sometime (could say very often) it's the whole load of torpedos exploding before hitting boat :nope:

volodya61
04-30-13, 04:03 AM
Still can't use the TDC AOB and Speed dials fix. It's a real mess here, cause i'm using the officer dialog window to enter datas, and it's not working when i set AOB. Have to switch the red button to green back and forth to enter datas each time. And when green, the solution line doesn't follow the boat course even with the right speed entered...
Usually, i enter datas in window when button is red. And all works fine. Maybe i'm not using it as intended?

This is a cut of my report-post -


2. TDC AOB and Speed dials fix
Change3 - Fixes TDC Speed dial resetting
Change4 - Fixes TDC Speed dial resetting

When these two changes are enabled auto targeting is not working.. Changes 1 and 2 (AOB dial fixes) are working correctly..

And last, the magnetic detonator range defects is still giving me way plenty of torpedos exploding before boat. Sometime (could say very often) it's the whole load of torpedos exploding before hitting boat :nope:

Premature detonation is a normal practice when using the magnetic detonators in a rough sea..

Fifi
04-30-13, 04:50 AM
Premature detonation is a normal practice when using the magnetic detonators in a rough sea..

Depending what you call rough sea...:D
It happens in all kind of sea here, even calm :hmmm:

volodya61
04-30-13, 05:24 AM
Depending what you call rough sea...:D
It happens in all kind of sea here, even calm :hmmm:

OK, then another argument.. in the early WWII magnetic detonators practically/almost didn't work.. this issue was fixed later.. I don't remember the exact dates..

Macardigan
04-30-13, 06:02 AM
Thank you Volodya, I found the problem :).
I activated by accident the fix that removes certain items from the game (don't remember the actual name).

Without it, it works !


Render Patches: Remove certain items from ever being rendered in the game.

I have activated only "change 1, change 2 and change 3" (inside render patches)

* If active any more then I have CTD when I enter the NAVMAP. (map).

I use real_navigation.

TheDarkWraith
04-30-13, 07:19 AM
:hmmm:
Patch Fix circle runner chance still giving me many circling torpedos...
Fired 4, 2 were circling!

About destroyed ships falling through the sea floor and disappearing, my last one disappeared before reaching ground. Maybe because it was too deep? :hmm2:

2 were circling out of 4 is perfect :D If you look at the torpedoes .sim file the circle runner chance is set to 50% for the early years :salute:

If it disappeared before reaching ground that means it was >= 500m in depth. I left that part of the code alone since you can't take your sub that deep.

I'll take a look at the code for magnetic detonators again. It's possible I made the same assumption about MSVCR90.rand returning a 32bit number when it actually returns a 16bit number.

Tonci87
04-30-13, 08:07 AM
2 were circling out of 4 is perfect :D If you look at the torpedoes .sim file the circle runner chance is set to 50% for the early years :salute:

If it disappeared before reaching ground that means it was >= 500m in depth. I left that part of the code alone since you can't take your sub that deep.

I'll take a look at the code for magnetic detonators again. It's possible I made the same assumption about MSVCR90.rand returning a 32bit number when it actually returns a 16bit number.


Oh so you get more reliable torps as the war advances? That is cool.

TheDarkWraith
04-30-13, 09:07 AM
Looking over the magnetic detonators again. I did make the same assumption about MSVCR90.rand returning 32bit number instead of 16bit number. I'm revising the code.

Another interesting thing has shown itself while looking over the code for magnetic detonators. Did you know that the torpedo could detonate upon firing if the magnetic detonator is active and the wave height is within the parameters of the premature chances defined in the torpedoes .sim file? I see the code for it but the devs 'dumbed it down' so it RARELY ever happens. Time to fix this :D This will make you think twice about switching to magnetic detonators with large wave heights :yep:

gap
04-30-13, 09:23 AM
Another interesting thing has shown itself while looking over the code for magnetic detonators. Did you know that the torpedo could detonate upon firing if the magnetic detonator is active and the wave height is within the parameters of the premature chances defined in the torpedoes .sim file? I see the code for it but the devs 'dumbed it down' so it RARELY ever happens. Time to fix this :D This will make you think twice about switching to magnetic detonators with large wave heights :yep:

:o

maybe give it an higher chance... but not 100% :03:

P.S: any news on the RPM/boat's speed curve, and about separate speed ratios for diesel/electric propulsions?

http://www.subsim.com/radioroom/showpost.php?p=2043933&postcount=1683

volodya61
04-30-13, 09:37 AM
I have activated only "change 1, change 2 and change 3" (inside render patches)
* If active any more then I have CTD when I enter the NAVMAP. (map).
I use real_navigation.

In my experience - render patches: 1, 2, 3, 8, 9 are always enabled.. never had CTD's when testing other Сhanges in campaign mode..
Perhaps you should start a new campaign after enabling other changes.. :06:
Perhaps you can't using other Changes enabled and Real Navigation together.. :06:

volodya61
04-30-13, 09:39 AM
Patch AI units falling through seafloor test report :)

1. Scapa Raid

Two hours after sank -

http://s19.postimg.org/p4pwimwan/SH5_Img_2013_04_30_14_05_45.jpg (http://postimg.org/image/p4pwimwan/) . http://s19.postimg.org/4ymejr0n3/SH5_Img_2013_04_30_14_06_06.jpg (http://postimg.org/image/4ymejr0n3/) . http://s19.postimg.org/498o4i6f3/SH5_Img_2013_04_30_14_06_32.jpg (http://postimg.org/image/498o4i6f3/) . http://s19.postimg.org/wampi7bpb/SH5_Img_2013_04_30_14_06_42.jpg (http://postimg.org/image/wampi7bpb/)

http://s19.postimg.org/4ecfe6dq7/SH5_Img_2013_04_30_14_07_06.jpg (http://postimg.org/image/4ecfe6dq7/) . http://s19.postimg.org/lg59g9slb/SH5_Img_2013_04_30_14_07_18.jpg (http://postimg.org/image/lg59g9slb/) . http://s19.postimg.org/qg2po7y7z/SH5_Img_2013_04_30_14_07_42.jpg (http://postimg.org/image/qg2po7y7z/) . http://s19.postimg.org/l5xqwxdz3/SH5_Img_2013_04_30_14_07_50.jpg (http://postimg.org/image/l5xqwxdz3/)

http://s19.postimg.org/e3ztaqadb/SH5_Img_2013_04_30_14_08_26.jpg (http://postimg.org/image/e3ztaqadb/) . http://s19.postimg.org/ug9v0goov/SH5_Img_2013_04_30_14_08_42.jpg (http://postimg.org/image/ug9v0goov/) . http://s19.postimg.org/oti3gqbjz/SH5_Img_2013_04_30_14_09_16.jpg (http://postimg.org/image/oti3gqbjz/) . http://s19.postimg.org/b13ol3ksf/SH5_Img_2013_04_30_14_09_22.jpg (http://postimg.org/image/b13ol3ksf/)

http://s19.postimg.org/8xt9dfkzj/SH5_Img_2013_04_30_14_09_48.jpg (http://postimg.org/image/8xt9dfkzj/) . http://s19.postimg.org/bt6ckaozj/SH5_Img_2013_04_30_14_10_15.jpg (http://postimg.org/image/bt6ckaozj/)

Last screen shows the severed stern of the ship that sank three kilometers from here.. :06:

To be continued :)

volodya61
04-30-13, 09:40 AM
Ten hours after sank -

http://s19.postimg.org/tyjaycohr/SH5_Img_2013_04_30_14_29_08.jpg (http://postimg.org/image/tyjaycohr/) . http://s19.postimg.org/6ycnm0qnz/SH5_Img_2013_04_30_14_29_22.jpg (http://postimg.org/image/6ycnm0qnz/) . http://s19.postimg.org/8fy3xkven/SH5_Img_2013_04_30_14_30_18.jpg (http://postimg.org/image/8fy3xkven/) . http://s19.postimg.org/3wqgpt2wv/SH5_Img_2013_04_30_14_31_27.jpg (http://postimg.org/image/3wqgpt2wv/)

http://s19.postimg.org/nfv1z61of/SH5_Img_2013_04_30_14_33_14.jpg (http://postimg.org/image/nfv1z61of/) . http://s19.postimg.org/ow6khb4lb/SH5_Img_2013_04_30_14_33_41.jpg (http://postimg.org/image/ow6khb4lb/)

After ten hours some ships have disappeared.. some migrated.. some I wasn't able to find the post-migration.. :)

2. The patch also has a negative effect on the subnets -

the patch is enabled

http://s19.postimg.org/gsu5hdywv/SH5_Img_2013_04_30_04_28_59.jpg (http://postimg.org/image/gsu5hdywv/) . http://s19.postimg.org/6k1obkav3/SH5_Img_2013_04_30_15_02_41.jpg (http://postimg.org/image/6k1obkav3/)

the patch is disabled

http://s19.postimg.org/fudsf3lkv/SH5_Img_2013_04_30_16_45_00.jpg (http://postimg.org/image/fudsf3lkv/) . http://s19.postimg.org/5ycpfgfsv/SH5_Img_2013_04_30_16_45_11.jpg (http://postimg.org/image/5ycpfgfsv/)

At the moment I don't see sense to enable the patch because some ships in ten hours migrated from a place of sinking farther than 5-6 km.. how far are they able to migrate in a week? :D

Requires further improvements :D

PS: revised circle runner patch will be tested later :salute:

TheDarkWraith
04-30-13, 09:47 AM
:o

maybe give it an higher chance... but not 100% :03:

Actually I'm trying to fix a problem that doesn't really exist. The problem is the data entered in the torpedoe's .sim file :nope: If you look at the notes at the bottom for each entry some will say percentage but the value for it is a whole number :huh: :nope: Whoever made the .sim file for the torpedoes didn't know what they were doing :timeout: A percentage is a value from 0.0 to 1.0. Some of the failure 'percentages' are 50 for example when they should be 0.5 :shifty: What a freakin mess :nope:

TheDarkWraith
04-30-13, 09:51 AM
At the moment I don't see sense to enable the patch because some ships in ten hours migrated from a place of sinking farther than 5-6 km.. how far are they able to migrate in a week? :D

Requires further improvements :D

I said it wasn't perfect yet. If the sea floor is not level when the unit contacts it then the unit will 'walk' on the sea floor until it enters into a valley or ends up on level ground.

I can fix the problem with the subnets and the patch. I just have to check the unit's type first to see if the patch applies to it or not :salute:

gap
04-30-13, 09:53 AM
@ Volodya

Man, I will sponsor you for the "Beta Tester of the Century" Subsim Award, if ever they will introduce such a contest :up: :D

gap
04-30-13, 09:57 AM
Actually I'm trying to fix a problem that doesn't really exist. The problem is the data entered in the torpedoe's .sim file :nope: If you look at the notes at the bottom for each entry some will say percentage but the value for it is a whole number :huh: :nope: Whoever made the .sim file for the torpedoes didn't know what they were doing :timeout: A percentage is a value from 0.0 to 1.0. Some of the failure 'percentages' are 50 for example when they should be 0.5 :shifty: What a freakin mess :nope:

Yes, Rongel had told me something about those discrepancies, when he worked on his Torpedo Failures Patch. :-?

I said it wasn't perfect yet. If the sea floor is not level when the unit contacts it then the unit will 'walk' on the sea floor until it enters into a valley or ends up on level ground.

Apparently friction is not simulated in game :doh:

I can fix the problem with the subnets and the patch. I just have to check the unit's type first to see if the patch applies to it or not :salute:

Brilliant :up:

Tonci87
04-30-13, 09:59 AM
Looking over the magnetic detonators again. I did make the same assumption about MSVCR90.rand returning 32bit number instead of 16bit number. I'm revising the code.

Another interesting thing has shown itself while looking over the code for magnetic detonators. Did you know that the torpedo could detonate upon firing if the magnetic detonator is active and the wave height is within the parameters of the premature chances defined in the torpedoes .sim file? I see the code for it but the devs 'dumbed it down' so it RARELY ever happens. Time to fix this :D This will make you think twice about switching to magnetic detonators with large wave heights :yep:


:o

Oh ****....

Just out of interest, how deep should the torp run to prevent beeing triggered by the waves?

Scümbagfuhrer
04-30-13, 10:01 AM
Hello, since my steam version of the game doesn't accept this patcher, what if I used the downloaded uplay version of this game, is it same with the retail version? so this patcher will work correctly?

TheDarkWraith
04-30-13, 10:02 AM
Oh this gets even better :nope: Has anyone ever seen torpedo gyro problems in game? I can answer that based on the code I see - NO! The torpedoe's .sim file's gyro problems chance says it's value is a percentage (and the value is a percentage - 0.3). This is fine. What isn't fine is the code gets a random number and scales the random number to a value between 0 and 100. Hmm, let's see....a value between 0 and 100 compared to a value between 0 and 1.0...almost will never happen :nope: This is one huge freakin mess :dead:

The solution is easy but it's not. The solution is to add code to check every entry in the torpedoe's .sim file to ensure it's a percentage (0.0 to 1.0). If it's > 1.0 then scale to 0.0 to 1.0. Then change code (where needed) when random number is retrieved to scale it to a value between 0.0 and 1.0. This way failure checks will actually work.

TheDarkWraith
04-30-13, 10:08 AM
:o

Oh ****....

Just out of interest, how deep should the torp run to prevent beeing triggered by the waves?

Actually I just decoded the whole function for this and it doesn't detonate the torpedoe upon firing. What it does is increase the arming distance and something else (not sure what the something else is - the something else replaces a HUGE number with a very small number in a memory address of the torpedo :hmmm:)

volodya61
04-30-13, 10:09 AM
I said it wasn't perfect yet...

I remember.. and therefore need to test it so you can make it better and better :up:

Man, I will sponsor you for the "Beta Tester of the Century" Subsim Award, if ever they will introduce such a contest :up: :D

:oops:

gap
04-30-13, 10:13 AM
Oh this gets even better :nope: Has anyone ever seen torpedo gyro problems in game? I can answer that based on the code I see - NO! The torpedoe's .sim file's gyro problems chance says it's value is a percentage (and the value is a percentage - 0.3). This is fine. What isn't fine is the code gets a random number and scales the random number to a value between 0 and 100. Hmm, let's see....a value between 0 and 100 compared to a value between 0 and 1.0...almost will never happen :nope: This is one huge freakin mess :dead:

The solution is easy but it's not. The solution is to add code to check every entry in the torpedoe's .sim file to ensure it's a percentage (0.0 to 1.0). If it's > 1.0 then scale to 0.0 to 1.0. Then change code (where needed) when random number is retrieved to scale it to a value between 0.0 and 1.0. This way failure checks will actually work.

Wouldn't be easier if we corrected the wrong torpedo failure settings manually? :hmmm:

volodya61
04-30-13, 10:14 AM
Hello, since my steam version of the game doesn't accept this patcher, what if I used the downloaded uplay version of this game, is it same with the retail version? so this patcher will work correctly?

Yes, the Patcher will work correctly with the regular downloaded version..

volodya61
04-30-13, 10:17 AM
Wouldn't be easier if we corrected the wrong torpedo failure settings manually? :hmmm:

Perhaps Rongel have already done this :06:

TheDarkWraith
04-30-13, 10:19 AM
Wouldn't be easier if we corrected the wrong torpedo failure settings manually? :hmmm:

Yes but that doesn't stop somebody from entering an incorrect value (because they don't read the notes). Adding code to anticipate end-user making errors is good programming. Ubisoft should take some notes here :yep:

Some of the code is incorrect also. Where the notes say the value is a percentage the code is checking against a value from 0 to 100. The code has to be corrected and code added to check for user mistakes.

Nothing pisses me off more than seeing 'kiddy code' :stare: There is 'kiddy code' all over the torpedo's code to reduce the % chance of failures. This has got to go :cool:

gap
04-30-13, 10:27 AM
Nothing pisses me off more than seeing 'kiddy code' :stare: There is 'kiddy code' all over the torpedo's code to reduce the % chance of failures. This has got to go :cool:

I agree. I hope that Rongel is reading our discussion :up:

volodya61
04-30-13, 03:21 PM
Revised circle runner patch test-report -

:hmmm:
Weird thing happened to me today.. looks like revised patch is not working at all.. don't know what happened in Fifi's game, why he was still able to see circle runner torpedoes..

Okay..
single tube shooting - total 100 - circle runner 0
salvo shooting - total 100 - circle runner 0

(100 - because VIIA has 10 bow torpedoes)

PS: and I have checked four times.. patch was enabled..

Fifi
04-30-13, 05:24 PM
Interesting posts here, and thanks again TDW for your hard work looking into codes :yep:

To resume my torp issues (with DUD torp option checked of course):

- when all TDW patches concerning torpedos activated, i get whole load exploding before hitting (with default magnetic + impact), or many circling ones (TDW said 50% is historicaly good for early war?...:wah:)
Not to say i can stay docked, because this way only my deck gun will work and be useful! :haha:

- when all patches activated except magnetic detonator range defects, only get about 50% circling - to me it's a lot for the VII load capacity...and so maybe OHII tonnage requirements should be decreased to match historical accuracy, if we have historical torp failure! Otherwise it seems impossible to me to success mission tonnage with only half torp load efficacity.

- when magnetic detonator range defects + circle runner chance fix deactivated, get all torpedos working and destroying each time, not even one DUD... at any hitting angle :hmmm:

In regard of SH5 actual gameplay with OHII, in regard of type VII torp load capacity, i would say getting only 20% torp defect (either premature explosion or circling) is way enough to me :yep:
Not for cheating, but sometime historical accuracy has to be adjusted for gameplay! Just my 2 cents...

EDIT:
Just realised/remembered i don't have FX/data/library/torpedoes_g7a-e anymore...because i wanted the stock torpedo hitting splash back...maybe it's related to my observations above...
In fact my game even modded is still using the vanilla torpedoes_g7a-e!
Maybe TDW could look into his FX/torpedoes_g7a-e, to see what is taking away the stock torp splash from any distance, so i can use it again...

Fifi
05-01-13, 02:06 AM
EDIT:
Just realised/remembered i don't have FX/data/library/torpedoes_g7a-e anymore...because i wanted the stock torpedo hitting splash back...maybe it's related to my observations above...
In fact my game even modded is still using the vanilla torpedoes_g7a-e!
Maybe TDW could look into his FX/torpedoes_g7a-e, to see what is taking away the stock torp splash from any distance, so i can use it again...

:Kaleun_Party:

New Update!...since i brought back original FX Update torpedoes_g7a-e file (modified for the splash effect http://www.subsim.com/radioroom/showpost.php?p=2049583&postcount=1), i reactivated all TDW patches relating to torpedos magnetic defect and circle chance ---> all seems to work fine again! :yeah:

In my last test in historical mission, on 11 torpedos fired, 3 were circling (i think this mission test called MS20 take place in 1942 though).
Anyway, i like that! I don't have anymore the whole load of torp premature exploding :sunny:
Still have to test in my career though...but fingers crossed!

TheDarkWraith
05-01-13, 02:41 AM
In my last test in historical mission, on 11 torpedos fired, 3 were circling (i think this mission test called MS20 take place in 1942 though).
Anyway, i like that! I don't have anymore the whole load of torp premature exploding :sunny:
Still have to test in my career though...but fingers crossed!

Your happiness is going to be short lived. Once I release the overhaul to the torpedoes you are going to hate historical accuracy/modeling :yep: Gyro problems (course deviations) and depth keeping problems now work correctly :D I've also added a little randomization to the torpedo speed (+- up to 5% of speed selected) and a little randomization to the max range at speed (+- up to 5% of max range at speed). Being an Engineer I know everything has a tolerance. I hate that everything in the game is so 'perfect'. Torpedoes do not travel at a constant speed through the water. Their speed increases/decreases due to current/waves/etc. No two torpedoes are exactly alike in real life but to this game they are. I'm slowly changing this. I've removed all the 'kiddy factors' from the game so there's no dumbing down any of the failure chances. I've also added patches that allow you to disable many of the special abilities related to torpedoes (increase max range and increase speed for some). Still working on it though :salute:

7thSeal
05-01-13, 05:10 AM
I have a slight feeling those 6000-7000m shots are going to be much more difficult before long. :D

volodya61
05-01-13, 05:33 AM
- when all patches activated except magnetic detonator range defects, only get about 50% circling - to me it's a lot for the VII load capacity...and so maybe OHII tonnage requirements should be decreased to match historical accuracy, if we have historical torp failure! Otherwise it seems impossible to me to success mission tonnage with only half torp load efficacity.

I said - 'weird thing happened to me today' :hmmm:
The patch started working after refit :06:
I don't know why but the patch didn't work with torpedoes were loaded before the patch was enabled.. :hmmm:

I'll retest it right now using stock torpedoes and FX Update torpedoes..

volodya61
05-01-13, 06:31 AM
The patch started working after refit :06:

It was not a refit..
The patch is working unstable..
Sometimes it's not working at all, like in my early tests..
Sometimes after full reload the game (from desktop) it starts to work.. but not correctly..

first load
total - 50, circle runner - 50

second load
total - 50, circle runner - 34

third load
total - 50, circle runner - 0

fourth load
total - 50, circle runner - 31

fifth load
total - 50, circle runner - 1

Fifi
05-01-13, 06:38 AM
I'll retest it right now using stock torpedoes and FX Update torpedoes..

You mean that leaving bunker first time with stock torp load could react differently to the patch, than with a fresh refit?
If so, it's a good find, and as turn around in the waiting of a fix, we'll have to exit bunker, fire all torps in harbor, and hit the refit button before leaving for mission! :haha::hmmm:

HUNterkarabiner
05-01-13, 06:39 AM
Oh this gets even better :nope: Has anyone ever seen torpedo gyro problems in game? I can answer that based on the code I see - NO! The torpedoe's .sim file's gyro problems chance says it's value is a percentage (and the value is a percentage - 0.3). This is fine. What isn't fine is the code gets a random number and scales the random number to a value between 0 and 100. Hmm, let's see....a value between 0 and 100 compared to a value between 0 and 1.0...almost will never happen :nope: This is one huge freakin mess :dead:


Yes, many times we've seen bad torpedoes. Hot torpedo = (gyro problem?), seized up, early detonation.

volodya61
05-01-13, 06:41 AM
You mean that leaving bunker first time with stock torp load could react differently to the patch, than with a fresh refit?

No.. look at my last test-report..

Fifi
05-01-13, 06:46 AM
Ah, ok, we posted together same time so i couldn't read it :)

Result is weird for sure :-?

Mikemike47
05-01-13, 09:29 AM
Disabling the F7 Battlestations command opens all sub doors except one. The door between the cook and engine room compartments does not reopen. All other subdoors reopen.

I can click the door between the cook and engine room to open or close it using the mouse. Enabling the F7 Battlestations command closes all subdoors, including the door between the cook and engine room.

Sorry, TDW, I did not write about this sooner. It has been there for quite a few patch versions.

I saw the following: "starting with v1.0.39.0...........- Note: There are 2 doors I haven't got working correctly yet but all the others work excellent."

Perhaps it has been forgotten about or bigger issues to work on. Thanks everybody for working on the rudder and circle torpedo issues lately.

P.S. I, too, have seen auto TDC not working properly as stated in the last few days posts.

TheDarkWraith
05-01-13, 02:21 PM
I finally have completed all the code changes for the torpedoes :rock: Wow, that was a nightmare :shifty:

The torpedoes sim file will need to be updated. The code assumes ALL values whose notes say percent or percentage are in the range of 0.0-1.0 (being 0% - 100%). If someone wants to take on the updating of the torpedoes sim file that would be great :up: Using the stock torpedoes sim file will result in strange things happening with the new torpedoes code patches :yep: I'll be releasing new version of patcher here soon :salute:

Another note: regarding impact angles for the dud chances: the code assumes a perpendicular hit as 90 degrees and a glancing shot (or parallel hit) as 0 degrees. Here is an example of correct entries:
http://www.subsim.com/radioroom/picture.php?albumid=669&pictureid=6594

TheDarkWraith
05-01-13, 02:30 PM
v1.0.86.0 released. See post #1

Starting with v1.0.86.0 revised all the torpedo failures in the game. The code will now follow what the torpedo's .sim file says. The code assumes all values in the torpedo's sim file whose comments say percent or percentage are in the range 0.0-1.0 (0% - 100%)

No whining about the failures with the torpedo's now :D The code (game) will now follow what is specified in the torpedo's sim file. If you don't like the high failure rates then edit the torpedo's sim file :yep:

I also rewrote the whole torpedo impact checking code for the game. The old code was severely flawed and my previous patch to fix it was just a Band-Aid. The new code is robust and works great!

:|\\

Choum
05-01-13, 02:33 PM
thanks :up:

volodya61
05-01-13, 02:54 PM
I finally have completed all the code changes for the torpedoes :rock: Wow, that was a nightmare :shifty:

That's great :yeah:
Thank you :salute:

The torpedoes sim file will need to be updated. The code assumes ALL values whose notes say percent or percentage are in the range of 0.0-1.0 (being 0% - 100%). If someone wants to take on the updating of the torpedoes sim file that would be great :up: Using the stock torpedoes sim file will result in strange things happening with the new torpedoes code patches :yep: I'll be releasing new version of patcher here soon :salute:

I be able.. what needs to do/to edit? exactly?
I could to update stock and FX Update torpedoes .sim files.. and also magnetic detonators range 4m for stock and FX Update..

Fifi
05-01-13, 02:57 PM
Thanks :rock:


I also rewrote the whole torpedo impact checking code for the game. The old code was severely flawed and my previous patch to fix it was just a Band-Aid. The new code is robust and works great!


What do you mean with the rewrote of torpedo impact?
The efficiency of torpedo or the visual effects? :hmmm: