Log in

View Full Version : [REQ]Disable Deck Gun by bad Weather


charognard
03-01-11, 03:47 AM
Can someone tell me, or release a little mod for desable deck gun use ( crew or captain ) by bad weather like in GWX ? It d be a good improvement to the game realism.

Ps : Can someone tell me too, where i can find the external torpedo reload time value ? Thx in advance :)

THE_MASK
03-01-11, 04:13 AM
I think scripting would be the go for not manning the deck gun in bad weather .
C:\Ubisoft\Silent Hunter 5\data\Scripts\AI\Crew\man_the_deck_gun

I cannot script but it might be as simple as

strategy MAN_THE_DECK_GUN(wp)

if Wp:IsGoodWeather() then
#Wp:ExecuteCommand( "Man_the_deck_gun" );
else
if Wp:IsBadWeather() then
Wp:ScriptCompleted();

I have no idea really .

charognard
03-01-11, 04:16 AM
I can rigth some php or html pages... but script no ^^, well if someone can release it, i ll be grateful

stoianm
03-01-11, 05:13 AM
Vikinger made a mod where you can use the deck gun in all condition... maybe you can modif and you can make to react to suit you taste (there are cfg files not scripts so i think you are ok with these files):

here:
http://www.subsim.com/radioroom//downloads.php?do=file&id=1564

@TDW i understood that later in the war years the subs were not carring a deck gun to improuve speed and other uboat performance

can be done something like this in sh5:hmmm: - maybe if we modif some eqp file or maybe it is more complicate than that?

Rongel
03-01-11, 05:28 AM
Vikinger made a mod where you can use the deck gun in all condition... maybe you can modif and you can make to react to suit you taste (there are cfg files not scripts so i think you are ok with these files):This mod changes the StormConditions parameter (StormConditions=15,1.0;max wind speed [m/s], max rain intensity [0,1]). But you can already man the guns in bad weather. It seems that modifying this line doesn't have any effect at all. In previous games the deck watch changed raincoats on in a storm conditions but this doesn't work in SH 5.

stoianm
03-01-11, 05:34 AM
This mod changes the StormConditions parameter (StormConditions=15,1.0;max wind speed [m/s], max rain intensity [0,1]). But you can already man the guns in bad weather. It seems that modifying this line doesn't have any effect at all. In previous games the deck watch changed raincoats on in a storm conditions but this doesn't work in SH 5.
i looked inside... i did not tested the mod to see if it work or not... i was suposed if for example you will put wind 0 then your crew man is not using deck or flank gun:hmmm: - so it not affect at all the behavior of crew for dek and flank gun:hmmm:

Rongel
03-01-11, 05:43 AM
i looked inside... i did not tested the mod to see if it work or not... i was suposed if for example you will put wind 0 then your crew man is not using deck or flank gun:hmmm: - so it not affect at all the behavior of crew for dek and flank gun:hmmm:I have tested it using StormConditions=1,1.0 and several other values, but no, they still man the gun and stand by it even when the wind is blowing 15 meters per sec.

Weird thing is that I remember maybe two times that there has been a log text "Cannot man the deck gun, too rough seas" or something. So it's super rare and I really don't know what it means, is there a working code buried somewhere down there that every once in a while manages to work, I don't know.

stoianm
03-01-11, 05:47 AM
I have tested it using StormConditions=1,1.0 and several other values, but no, they still man the gun and stand by it even when the wind is blowing 15 meters per sec.

Weird thing is that I remember maybe two times that there has been a log text "Cannot man the deck gun, too rough seas" or something. So it's super rare and I really don't know what it means, is there a working code buried somewhere down there that every once in a while manages to work, I don't know.
i think the solution is where sober sugested but i have not programing skills for scripting... maybe somebody else... should be not so complicate:hmmm:

Sepp von Ch.
03-01-11, 05:07 PM
@TDW i understood that later in the war years the subs were not carring a deck gun to improuve speed and other uboat performance

can be done something like this in sh5:hmmm: - maybe if we modif some eqp file or maybe it is more complicate than that?

Hello stoianm,

I use Magnum´s great mod Open Horizont with the campaign 1943-45 (http://www.subsim.com/radioroom/showthread.php?t=178257) and when I use VIIC/41, I have in bunker a option "enable the deck gun" (standard is VIIC/41 U-Boat without the deck gun). I love this option because on 14 November 1942, the BdU ordered the removal of deck guns from type VII U-Boats to compensate the weight of the increased Flak armament (not the case for submarines in Arctic ocean).
Because I constantly move in the North Atlantic, I do not have on my VIIC/41 U-boat the deck gun asi in real life.

stoianm
03-01-11, 05:09 PM
Hello stoianm,

I use Magnum´s great mod Open Horizont with the campaign 1943-45 (http://www.subsim.com/radioroom/showthread.php?t=178257) and when I use VIIC/41, I have in bunker a option "enable the deck gun" (standard is VIIC/41 U-Boat without the deck gun). I love this option because on 14 November 1942, the BdU ordered the removal of deck guns from type VII U-Boats to compensate the weight of the increased Flak armament (not the case for submarines in Arctic ocean).
Because I constantly move in the North Atlantic, I do not have on my VIIC/41 U-boat the deck gun asi in real life.
:D - thanks - i use magnum mod also but i did not know - and he did not told me:O:
very cool - i will try that:up:

mobucks
03-07-11, 12:09 PM
I had a

"Cannot use deck gun weather too rough" Report yesterday,
we all know you can use DG regardless of weather, but it seems this report is spoken when trying to issue command to man/fire deck gun, while the gun is completely submerged by for example a tall wave.

Im no programmer, but it seems a call is made to see if decgun is submerged before allowing AI to use it. This seems to happen in real time, as the gunners will stop for a second if a huge wave rolls over them and continue when the wave is past.

Perhaps a timer can be added to this function? Meaning, if deckgun gets submerged, the crew cannot use it for X seconds, till hopefully another large wave covers it, continuing the cycle.

Anyone more knowledgeable willing to shed some light on if the above is possible, what files to look at, ect?

[EDIT] Oops looks like Sober already awnsered where and what to do, so lets work on a script! Im lookin at other scripts seeing if i can canibalize anything relevant.

stoianm
03-07-11, 12:13 PM
I had a

"Cannot use deck gun weather too rough" Report yesterday,
we all know you can use DG regardless of weather, but it seems this report is spoken when trying to issue command to man/fire deck gun, while the gun is completely submerged by for example a tall wave.

Im no programmer, but it seems a call is made to see if decgun is submerged before allowing AI to use it. This seems to happen in real time, as the gunners will stop for a second if a huge wave rolls over them and continue when the wave is past.

Perhaps a timer can be added to this function? Meaning, if deckgun gets submerged, the crew cannot use it for X seconds, till hopefully another large wave covers it, continuing the cycle.

Anyone more knowledgeable willing to shed some light on if the above is possible, what files to look at, ect?
A good friend of mine writted me this:
,,I just changed that setting (timedelay for bad weather) to 1 sec and my crew un-maned the gun with a big wave:up:

Note: this will also switch of your radar:nope: ''

i did not tested yet but i supouse is working as he described

Trevally.
03-07-11, 12:43 PM
Yes, there in an option in TDW Ui .PY where a time delay was introduced
to prevent large wave switching off the radar. This also stopped
the very annoying habit of your engines switch back and fore from
battery.

The setting is at 5 seconds. If you change this the deck gun will
unman in bad weather but you will aslo get the above things.

You can also stop the radar and battery switching by having a
TC of more than 32.

Rongel
03-07-11, 02:59 PM
Thanks for the info, didn't know this!

However, I tested this but it had no effect at all. It may be because I didn't disable and re-enable TDW's Ui mod, I just edited the useroptions.py and saved it again (EDIT: I mean that I edited the useroptions.py in SH5/data/scripts/menu- folder!). I thought that this would be enough normally, but I may be wrong. Any other results anyone?

Even if this works, it's not a perfect solution, so new script to fix this would be awesome. Too bad I can't help, don't know anything about it.

Trevally.
03-07-11, 03:16 PM
Thanks for the info, didn't know this!

However, I tested this but it had no effect at all. It may be because I didn't disable and re-enable TDW's Ui mod, I just edited the useroptions.py and saved it again. I thought that this would be enough normally, but I may be wrong. Any other results anyone?

Even if this works, it's not a perfect solution, so new script to fix this would be awesome. Too bad I can't help, don't know anything about it.

I tested this in a historical mission (had to reload to get the wave height to take effect) and each big wave sent crew off the gun.

There is a lot of script about the deckgun in "C:\Ubisoft\Silent Hunter 5\data\Scripts\Menu\Page layout" :-



item.Name == "WA Man the deck gun":
if crewondeckmode == ManDeckGunMode:
if PL_UnderWater:
Game.SubmarineCommands.ExecuteCommand( "Deactivate_deck_gun_team" )
SetCrewOnDeckMode( WatchCrewMode )
item.VisibleBitmapIndex = BitmapIndex_NotAvailable
else:
item.VisibleBitmapIndex = BitmapIndex_Selected
else:
if PL_UnderWater:
item.VisibleBitmapIndex = BitmapIndex_NotAvailable
else:
item.VisibleBitmapIndex = BitmapIndex_NotSelected


So any change to this would really need to come from TDW as this page is updated a lot.

mobucks
03-07-11, 06:57 PM
Indeed, big waves in vanilla do send crew off gun, but you can keep re-ordering them back on, or if you are controlling gun, they will come back again automaticly. In reality, the guncrew would be gone forever.

The behavior I seek is if waveheight/wind exceeds X, than message "Cannot man the deck gun, too rough seas" or whatever, and no crew goes to deckgun. It would not be related to the sub bow catching a big wave.

Going to keep looking at files.

Rongel
03-08-11, 02:46 AM
I tested this in a historical mission (had to reload to get the wave height to take effect) and each big wave sent crew off the gun.Ok, great! As soon as I finish my patrol I'll reinstall TDW's UI. This is better than nothing.

Mobucks, it's nice to know that deck gun is under work. Sometimes I think I'm the only one raving about it! My attempts to destabilize the deck gun are now on hiatus, because I want to keep my sanity. Well, I managed to limit the stabilization so you have to wait that the boat is leveled. Zoom view is still magically fixed on horizon.