Flags flown in and out of harbors, yes. At sea, no, unless you were near friendly shores, in which case you wanted anyone who saw you to know you're friendly. On a surface warship you can't hide, so it was a long-standing tradition to announce your national orientation for all to see. In modern warfare ships were readily identifiable anyway, just from their shape. On a submarine the object was to dive anytime anything was spotted, and it was considered disrespectful to submerge with the flag flying, it was never flown at sea.
Anyway, here's the mod:
http://files.filefront.com/RB+7b+Fla.../fileinfo.html