View Full Version : Changing AI ship gun ranges?
FightingSteel1
11-29-11, 03:59 PM
I'm trying to design some surface based single missions using playable ships and AI vessels, but can't quite get the game to work as I had hoped.
The main issue is getting AI ships to fire at halfway realistic ranges. In a test mission, with the playable North Carolina and a Kongo class, the Kongo acts like nothing is even going on until 7000 meters. It just goes waypoint to waypoint, then finally fires on me at about 7000. Accuracy isn't too much of a problem at the time being, but I can't get enemy ships to recognize and fire on my ships at a reasonable game distance. Something like 8-10 miles would be decent at least.
What can I do to get enemy vessels (primarily BBs) to recognize and then fire on other ships at a more reasonable range?
Karle94
11-29-11, 04:27 PM
I'm trying to design some surface based single missions using playable ships and AI vessels, but can't quite get the game to work as I had hoped.
The main issue is getting AI ships to fire at halfway realistic ranges. In a test mission, with the playable North Carolina and a Kongo class, the Kongo acts like nothing is even going on until 7000 meters. It just goes waypoint to waypoint, then finally fires on me at about 7000. Accuracy isn't too much of a problem at the time being, but I can't get enemy ships to recognize and fire on my ships at a reasonable game distance. Something like 8-10 miles would be decent at least.
What can I do to get enemy vessels (primarily BBs) to recognize and then fire on other ships at a more reasonable range?
Try taking the cfg files from one of my ships. That should make them fire long before you can.
Ducimus
11-29-11, 04:38 PM
/data/cfg/sim.cfg
FightingSteel1
11-29-11, 06:43 PM
/data/cfg/sim.cfg
Yeah, I was wondering about that, but what needs to be changed? I've tried setting AI Cannons to a higher max fire range, but they still don't fire at that set range.
Ducimus
11-29-11, 07:13 PM
When an AI opens fire is based on three things:
a.) max gun range as set in the sim.cfg file
b.) Max gun range as set in whatever gun model it happens to be. For example. Guns.sim. Probably located in data/library/shipparts or something like that
c.) If it visually see's it's target or not.
FightingSteel1
11-29-11, 10:29 PM
I got a hex editor to try to make sense of the guns.sim file. I found what looks to be the range for the 14" inch guns.
Any tips? I see two ranges listed. Is that a minimum and max? What kind of changes to these values should I try?
http://i397.photobucket.com/albums/pp55/vipe155/guns-1.jpg
use s3d editor once yo're ydentify what gun you want modify
FightingSteel1
11-30-11, 04:09 AM
use s3d editor once yo're ydentify what gun you want modify
Thanks for the suggestion.
I modified the main guns in the sim file, and now am getting 15" Bismarck to fire at me at 9100 yards. That's better than 7000, but not enough yet. It doesn't matter if I increase the gun settings more from here (it's still 9100 yards), so the ship must not be detecting me until then. What can I do to get the vessel to detect me at least as well as my own crew detects it? They see the Bismarck several minutes before.
Ducimus
11-30-11, 12:45 PM
Don't even bother with a hex editor when making changes to any sim/dat/zon/dsd/ files. S3D is probably better then an SDK in many respects.
If you want to edit a ships gun directly, look at its EQP file and see what 3d object node its calling on.
Then look for that node in one of the dat files. Hell S3D has a search function and can scan all files in an entire directory. Open the dat file, find the node, copy the parent ID, then open the sim file, search for same ID, It'll be a child ID somewhere. So it should plop you right to the appropriate entry in the sim file. Edi it to your heats content, save, etc etc.
FightingSteel1
11-30-11, 04:48 PM
Don't even bother with a hex editor when making changes to any sim/dat/zon/dsd/ files. S3D is probably better then an SDK in many respects.
If you want to edit a ships gun directly, look at its EQP file and see what 3d object node its calling on.
Then look for that node in one of the dat files. Hell S3D has a search function and can scan all files in an entire directory. Open the dat file, find the node, copy the parent ID, then open the sim file, search for same ID, It'll be a child ID somewhere. So it should plop you right to the appropriate entry in the sim file. Edi it to your heats content, save, etc etc.
I figured out how to edit the different gun ranges using S3D, and they are all set well past 9100 yards.
I guess the enemy ships aren't detecting me until somewhere around there, so what can I do to increase their detection range?
I figured out how to edit the different gun ranges using S3D, and they are all set well past 9100 yards.
I guess the enemy ships aren't detecting me until somewhere around there, so what can I do to increase their detection range?
program_files/ubisoft/sh4/data/library/AI_sensors.dat
copy file, open it with s3d, find ai_visual (node 6, i think) change range from 11000 m with your preffered value
save it and if you want it jsgme ready for future use save him in a corespondent folder tree egg Long Range Visual/Data/library/AI_sensors.dat copy Long Range Visual folder into MODS and you can activate him with JSGME
FightingSteel1
11-30-11, 06:17 PM
program_files/ubisoft/sh4/data/library/AI_sensors.dat
copy file, open it with s3d, find ai_visual (node 6, i think) change range from 11000 m with your preffered value
save it and if you want it jsgme ready for future use save him in a corespondent folder tree egg Long Range Visual/Data/library/AI_sensors.dat copy Long Range Visual folder into MODS and you can activate him with JSGME
I tried changing this value, but haven't gotten good results. I tried 15000m, and it actually reduced the range the enemy ship fired at me. In fact, anything above the default value (mine was at 9000 something) had the opposite effect.
I would like to get the enemy ships to detect me as well as my own crew detects ships. They see the enemy ship at about 7 miles (11,000 something meters) at the moment.
Ducimus
11-30-11, 06:55 PM
http://www.subsim.com/radioroom/showthread.php?t=111395
FightingSteel1
12-02-11, 12:05 AM
http://www.subsim.com/radioroom/showthread.php?t=111395
That is some informative information. Even so, I'm running into an issue. I adjusted some of the values in the sim.cfg, and got the Bismarck to detect and fire at me at about the same range as my own crew would fire back (about 14000 yards).
I can't say the same for the Japanese vessels. From the Yamato to the Fuso, they don't detect and fire until about 9500 yards. What is different between the Bismarck vs. the Japanese ships to have such a disparity in range? Does it have something to do with the individual ships files?
FightingSteel1
12-03-11, 10:37 PM
I'm testing a simple mission, Fuso vs. North Carolina, and Fuso maneuvers and engages my ship at 5 NM. I haven't gotten it to increase from there. I can't really tell if the ship isn't detecting me, or is waiting to get into firing range. 14" guns are set well above that range in the sim file, and here is that area of the sim.cfg:
[AI Cannons]
Max error angle=5 ;[deg]
Max fire range=20000 ;[m]
Max fire wait=8 ;[s]
[AI detection]
Lost contact time=30 ;[min]
[Visual]
Detection time=0.5 ;[s] min detection time.
Sensitivity=0.01 ;(0..1) min detection threshold double detection time.
Fog factor=0.5 ;[>=0]
Light factor=0.5 ;[>=0]
Waves factor=0.5 ;[>=0]
Enemy surface factor=1 ;[m2]
Enemy speed factor=1 ;[kt]
Thermal Layer Signal Attenuation=0.5
Anything that I have set wrong that would cause this? Is there something buried in the actual files for the individual ships that determine any of this?
Ducimus
12-05-11, 12:26 PM
That is some informative information. Even so, I'm running into an issue. I adjusted some of the values in the sim.cfg, and got the Bismarck to detect and fire at me at about the same range as my own crew would fire back (about 14000 yards).
I can't say the same for the Japanese vessels. From the Yamato to the Fuso, they don't detect and fire until about 9500 yards. What is different between the Bismarck vs. the Japanese ships to have such a disparity in range? Does it have something to do with the individual ships files?
Check this ships SNS file. Look at what visual sensor they are using. Sounds like they might be different. In TMO i added extra visual sensors. Some are freaking huge in radius, other's small. I applied these various visual sensors to what seemed logical. (IE big radius on battle ships, small on merchants).
RFB does the same thing i believe, as does RSRD. So if you have any mods installed (or previously installed), you might want to check your files to make sure.
Karle94
12-05-11, 12:40 PM
I'm testing a simple mission, Fuso vs. North Carolina, and Fuso maneuvers and engages my ship at 5 NM. I haven't gotten it to increase from there. I can't really tell if the ship isn't detecting me, or is waiting to get into firing range. 14" guns are set well above that range in the sim file, and here is that area of the sim.cfg:
[AI Cannons]
Max error angle=5 ;[deg]
Max fire range=20000 ;[m]
Max fire wait=8 ;[s]
[AI detection]
Lost contact time=30 ;[min]
[Visual]
Detection time=0.5 ;[s] min detection time.
Sensitivity=0.01 ;(0..1) min detection threshold double detection time.
Fog factor=0.5 ;[>=0]
Light factor=0.5 ;[>=0]
Waves factor=0.5 ;[>=0]
Enemy surface factor=1 ;[m2]
Enemy speed factor=1 ;[kt]
Thermal Layer Signal Attenuation=0.5
Anything that I have set wrong that would cause this? Is there something buried in the actual files for the individual ships that determine any of this?
Check this ships SNS file. Look at what visual sensor they are using. Sounds like they might be different. In TMO i added extra visual sensors. Some are freaking huge in radius, other's small. I applied these various visual sensors to what seemed logical. (IE big radius on battle ships, small on merchants).
RFB does the same thing i believe, as does RSRD. So if you have any mods installed (or previously installed), you might want to check your files to make sure.
Open the AI_Visual in the Library folder. Find AI_Visual and open the obj_sensor and change the settings there. I believe there also is a AI_Visual_Sensors. Do the same there, I donīt know if this file comes with mods or just a part of stock.
FightingSteel1
12-08-11, 11:48 AM
Check this ships SNS file. Look at what visual sensor they are using. Sounds like they might be different. In TMO i added extra visual sensors. Some are freaking huge in radius, other's small. I applied these various visual sensors to what seemed logical. (IE big radius on battle ships, small on merchants).
RFB does the same thing i believe, as does RSRD. So if you have any mods installed (or previously installed), you might want to check your files to make sure.
Just a little update to this question. Thank you everyone for your help. I found that the IJN BBs use AI_Visual as a sensor, while the Bismarck used BB_Visual. I think I will just switch any ships I use in my custom missions to their respective type, like BB_Visual, CA_Visual, etc. I now can get the firing performance I was looking for out of the surface ships.
Chickenpie65
03-04-12, 02:53 PM
I'm still having the same problem FighterSteel1 encountered,
even though I highly increased the gun range in all the files up to 35,000 meter, but the gun range actually seems to have worsened - it is only 5000 yards now and below... What am I doing wrong?
I edited the following files for visual sensors and radars:
AI_sensors.dat in \Silent Hunter 4\Data\Library
Sim.cfg in \Silent Hunter 4\Data\Cfg (for example I increased the Max fire range to =35000)
guns_radars.sim in \Silent Hunter 4\Data\Library\ShipParts
What did I forget?
Oh, and of course I changed the Iowa's gun range too, in the mod folder, the file containing is named "Deck_Gun_16Inch.sim" (is that the correct file to edit?) It has the ID 0xc067bf9f3ab70a36 (can anyone confirm this?)
and is located in \Silent Hunter 4\MODS\USA_Iowa\Data\Librar\USSubParts. The original gun range was 38720,0 then I increased it to 157720,0.
But it still didn't work... What am I missing?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.