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//dow...o=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

- maybe if we modif some eqp file or maybe it is more complicate than that?