SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 05-15-08, 09:58 AM   #1
ref
Grey Wolf
 
Join Date: Nov 2005
Location: Mar del Plata, Argentina
Posts: 871
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by akdavis
Quote:
Originally Posted by ref
Quote:
Originally Posted by Snaptrap
Quote:
Originally Posted by ref
Try changing the weapon type from AAgun to Cannon in the weapon sim file, at least in sh3 as long as it has AP/HE and AA shells it opens fire on both surface and air targets.

Ref
Any shell type can be used for this. The important thing is that the Crew AI understands that the gun can be used on either surface or air targets. I was going to do this once but left it out because the shells used in the AA guns were at maximum strength and only used to quickly dispatch annoying aircraft. It would've ended up doing the same for everything else too.
A human player can shoot any type of shell, the AI will only shoot if they have the correct type of shell for the different kind of targets, also if the weapon controller is set to AAgun they'll only shoot to airplanes, if it's set to to cannon they'll shoot at both kind of targets only if they have the correct ammo.

Ref
Sounds like a good place to start. Main problem will be adding AA ammo and squaring that with real ammo types. Can AA ammo be added to a gun in the sim file as well?
Yes, open the sim file with s3d, and look into the wpn_Cannon controller in the ammo_storage section, you'll also need to look in the shells dat file for the Id numbers of the ammo.

Ref
__________________
ref is offline   Reply With Quote
Old 05-15-08, 11:24 PM   #2
akdavis
Samurai Navy
 
Join Date: Mar 2005
Location: Fort Worth, Texas
Posts: 597
Downloads: 0
Uploads: 0
Default

Well, partial success. Changing the id to cannon did in fact allow them to engage surface targets, but now they won't engage air targets. Added AA ammo to all guns as indicated above. And the positions sometimes go wonky and won't allow manual control anymore, only panning view around independent of the gun mount.

If I knew I could consistently man the 40mm/37mm myself, I'd just change those, but without being sure I can turn it against aircraft, that might not be a good idea.
__________________
-AKD
akdavis is offline   Reply With Quote
Old 05-16-08, 12:29 AM   #3
Snaptrap
Eternal Patrol
 
Join Date: Oct 2007
Location: Alberta, Canada
Posts: 224
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by akdavis
Well, partial success. Changing the id to cannon did in fact allow them to engage surface targets, but now they won't engage air targets. Added AA ammo to all guns as indicated above. And the positions sometimes go wonky and won't allow manual control anymore, only panning view around independent of the gun mount.

If I knew I could consistently man the 40mm/37mm myself, I'd just change those, but without being sure I can turn it against aircraft, that might not be a good idea.
That's because it's not the proper method. The actual steps to get the result you're looking for is more of a pain to explain than it is to do. At the moment I'm busy updating my mod, but I can hel you out when I'm done.

You don't need AA shells either because some of the AA guns don't come with AA shells and they still attack air targets. An anti-aircraft shell is just a type of shell, and is not an indication of what it's specifically designed for. The AI will use any round that is selected/highlighted.
Snaptrap is offline   Reply With Quote
Old 05-16-08, 12:52 AM   #4
akdavis
Samurai Navy
 
Join Date: Mar 2005
Location: Fort Worth, Texas
Posts: 597
Downloads: 0
Uploads: 0
Default

I should have said that I changed the weapon type to cannon, not the ID, if that caused any confusion. Any help would be appreciated, as I see that changing only the weapon type has all sorts of weird side effects.
__________________
-AKD
akdavis is offline   Reply With Quote
Old 05-16-08, 04:29 PM   #5
Snaptrap
Eternal Patrol
 
Join Date: Oct 2007
Location: Alberta, Canada
Posts: 224
Downloads: 0
Uploads: 0
Default

After looking through the files, I've concluded that the game won't accept more than one controller type per object. I've done things like adding another controller to a weapon with a secondary function and it won't take. Only one of the controllers are accepted at a time.

I imagine this can be done, but when trying the most simple possibilities, I'm guessing it's more work than it's worth. You're probably better off manning the gun yourself.

May I ask why you want this anyway?
Snaptrap is offline   Reply With Quote
Old 05-21-08, 12:47 PM   #6
akdavis
Samurai Navy
 
Join Date: Mar 2005
Location: Fort Worth, Texas
Posts: 597
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by Snaptrap
After looking through the files, I've concluded that the game won't accept more than one controller type per object. I've done things like adding another controller to a weapon with a secondary function and it won't take. Only one of the controllers are accepted at a time.

I imagine this can be done, but when trying the most simple possibilities, I'm guessing it's more work than it's worth. You're probably better off manning the gun yourself.

May I ask why you want this anyway?
Oops, missed your answer here. Thanks for looking into it further.

Why: in the case of US submarines in the Pacific, the primary use of small arms and AA cannon on board the sub was not defense against aircraft, but in attacking in attacking boats and ships. I can't even bring to mind a single account of a 40mm being used on a sub with effect against a Japanese plane (no doubt there is one, however). But there are countless accounts of the 12.7mm/20mm/40mm weapons being used in conjunction with the deck gun (or sometimes alone if seas were to rough to man the deck gun) against Japanese shipping, especially coastal craft.

With U-boats, the AA guns were certainly far more important for defense against aircraft, but nonetheless, it was standard procedure to employ both the deck gun and the 37mm gun against a target during a surface (20mm weapons were to be used only with discretion).

But as it stands in SH, your AI gunners will not use any weapon other than the deck gun against an enemy ship. You can of course man an AA gun and use it against a surface target while the AI uses the deck gun, but if you have multiple AA guns, this still leaves some weapons totally unused in an engagement, plus you have to spend your time at the AA gun instead of captaining the ship from the bridge as is both proper and more realistic.

Now this doesn't really have a huge impact in the stock game, as the deck gun is so overpowered that you really need not worry about additional firepower. But if you play with a realism mod like Real Fleet Boat, the deck gun is toned way down, with long reloads and greatly reduced damage. Having all available weapons firing on a target under these circumstances can be decisive (and would be even more so with some improvements to damage models).

And all other considerations aside, it is just really awesome to observe from the bridge of your sub while all your weapons are being used at once against an enemy ship.
__________________
-AKD
akdavis is offline   Reply With Quote
Old 08-14-08, 07:37 AM   #7
Demonizer
Seaman
 
Join Date: Aug 2008
Posts: 39
Downloads: 12
Uploads: 0
Default

Well i just thought of this and had to take alook. Im pretty sure this is possible by adding new entries in the .sim files of the weapons. I added in another wpn_cannon entry and nodes etcetc and filled in the bits with the orginal wpn_cannon and made the settings all the same but set it to "AAgun" and the other one for the "Cannon" However it seems that each of the entries points to another set of nodes in the .dat file which i think might also have to be edited but i dont see why ti should... the thing is the game uses the parent id and stuff so you can add nodes together and so on but im not sure that the game allows too differnt nodes the AA fire and Cannon Fire to use the same parent id set in the .dat files. Im going to see what happens if i make a new entry node with the same settings but with a differnt ID then i think it might work as a dual purpose ground + air weapon and this could done for other weapons is well.

But thats if it works.

On another side of things i have been attempting to add a new sound for the 40mm.
So 20mm and 40mm have two differnt sounds, im not sure how to do this ive been playing about in the .dat files and the other files relating to the 40mm but so far no joy, so if anyone knows a thing or two about how to add a sound entries in would be helpful. Ive added the sound for example 40mm.wav into the sh.sdl but not sure on how to overide or get the game to use a custom selected file.

Will update as if i manage to find a way to have dual purpose weapons.
Demonizer is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.