View Full Version : SH4 accuracy of AI guns for Iowa mod
widowmaker7
01-31-11, 01:21 PM
Ok I have searched quite a bit for how to adjust the accuracy of crew fired guns for the iowa mod (im not going for realism just quick fun)and I cant seem to find anything. Ive checked various guns_radars files and such but nothing I can tell affects the hit chance of the guns. If anyone knows how to make them actually hit something before it sails into me I would appreciate it, or if I missed a post saying how to other then the vague part of changing a huge file.
Thanks
polyfiller
01-31-11, 03:05 PM
Have a look for this part of sim.cfg (in folder data\cfg) ;
[AI Cannons]
Max error angle=1 ;[deg]
Max fire range=24000 ;[m]
Max fire wait=10 ;[s]
Guess which parts to modify ? Reduce the error angle, increase the max fire range..... note the above is from my modified version, I can't remember what the stock values are.
This is also a value in each guns.sim file under the [Fire] node ... look for max elevation and max travel tolerance.
widowmaker7
01-31-11, 04:11 PM
Ok i checked the guns fire tolerance. The sim.cfg file seemed to beef up enemy ships and im not sure it affected mine any at all.
polyfiller
01-31-11, 06:10 PM
OK, for your own crews effectiveness you need good crew / compartment efficiency also. See the below extracted from my HMS Rodney.upc
[UserPlayerUnit 1.Compartment 7]
CompartmentType= 2
StatusActive= No
ID= HMS_RodneyGunS
NameDisplayable= Deck Guns
Type=NULL
FunctionalType= ArtilleryRoom
MechanicalCoef= 0.5
ElectricsCoef= 0.5
GunsCoef= 0.9 ;0..1
WatchmanCoef= 0.5
WatchStandingCoef= 0.048
MaintenanceCoef= 0.0144
RepairsCoef= 0.072
ReloadingweaponCoef= 0.072
SleepCoef= -0.12
LeadersSlots=1
CrewMembersSlots= 3
EffciencyDenominator=2
EffciencyDenominatorBS=2
Hitpoints=20000
CrewExposure=0.7
EquipmentsExposure=0.1
WeaponsExposure=1.0
ExternalDamageZoneTypeID3D= 703
DamageDescription1= NULL, 0, 0.1, 0, 1, 1, small malfunction, 0, 0, NULL, 0.2, 0.4, 6
DamageDescription2= NULL, 0.1, 0.2, 0, 1, 1, small malfunction, 0, 0, NULL, 0.4, 0.4, 12
DamageDescription3= NULL, 0.2, 0.5, 0, 0, 1, major malfunction, 0, 0, NULL, 0.6, 0.4, 24
DamageDescription4= NULL, 0.5, 0.7, 0, 0, 1, equipment disabled, 0, 0, NULL, 0.8, 0.6, 500
DamageDescription5= NULL, 0.7, 1, 0, 0, 1, equipment disabled, 0, 0, NULL, 1, 2, 1000000
Note the figure of 0.9 for gunscoef. You can increase this to a figure greater than 1.0. When the original playable ships were being created by modders .... they were using stock sh4 values for compartment stuff ... so you'll probably find gunscoef down around 0.5. Take a look and let me know.
Actually .... just checked the original iowa mod from when I first dowloaded it ... guncoef = 0.2 in that ... so increase and see if it improves.
I have also used some crew special abilities to improve this .... however I have found the special abilities can cause some horrible CTD's so I tend to not use these.... reckon it's something to do with having crew who can make broken guns work conflicting with me having multiple guns declared in the ships upc file .... so that you can see / repair all main turrets, even if you can control only one.
Also check the trvel values in the Deck_Gun_16Inch.sim file in \data\library.
widowmaker7
01-31-11, 06:57 PM
[UserPlayerUnit 1.Compartment 7]
CompartmentType= 2
StatusActive= No
ID= GatoGunB
NameDisplayable= Fore Gun Deck
Type=NULL
FunctionalType= ArtilleryRoom
MechanicalCoef= 0.5
ElectricsCoef= 0.5
GunsCoef= 5550.2 ;0..1
WatchmanCoef= 0.5
WatchStandingCoef= 0.048
MaintenanceCoef= 0.0144
RepairsCoef= 0.072
ReloadingweaponCoef= 9.072
SleepCoef= -0.12
LeadersSlots=1
CrewMembersSlots= 3
EffciencyDenominator=2
EffciencyDenominatorBS=2
Hitpoints=999200
CrewExposure=0.7
EquipmentsExposure=0.1
WeaponsExposure=0.1
ExternalDamageZoneTypeID3D= 43
thats my file notice the rediculous value for gun crew and its still not very accurate tho it did help narrow it to the vacinity of target ship. my gun tolerances are .01 and my gunner is extremely skilled.
vanjast
02-01-11, 12:09 AM
Max fire wait=10 ;[s]
Interesting rate of fire... Maybe this is for a more modern Iowa.
The Bismark, then considered a very efficient gun platform, had a rate of fire of 25 seconds for it's main armament.
:)
polyfiller
02-01-11, 09:10 AM
Can you advise what the range is you are testing, and wheather conditions ? Is the Iowa rolling around much ?
On eother thing I tried is to increase shell speed in the guns.sim file .... but again this gave variable results.
widowmaker7
02-01-11, 10:36 PM
I am testing range from just outside pearl to the docked carriers and such on a sunny calm day to on a mission against IJN at long range to where i can just see the ship. They can usually sail right up to the ship before i can hit them and other times not. the seas have not been stormy but not always calm so its been a mix of weather conditions. i have the crew file set so they wont engage beyond the range of the guns.
The guns seem to work alright on enemy ships and medium to short range but at long range 22000 they cant seem to hit anything. the 16s are set for a range of 38500.
Edit: so im partially wrong i cannot seem to hit a destroyer sailing head on at 4000, he is pluggin away never missing me and i am destroying plankton by the billions.
Widow I'm having the same exact problem.I only got them set to 10,000 yards as per the Long Guns mod,but from 4,000 forward it's like 1 in every 20 shells is hitting the target.I've worked on the Guncoef and set it as high as 70000.0 and alas it's down to 1 in every 18.
I'm sitting stationary broadside at about 8,500 in calm seas off Wake and telling my gunners to aim for the waterline drops it down to about 1 in every 15.But that's still not acceptable considering 8,500 yards=4.8 miles.that's freaking point blank considering It's a Battleship!And an Iowa Class at that!
audessy
02-03-11, 09:56 PM
I'm in the middle of figuring it out. Stay tuned. So far with the Montana Class I'm getting about 1 hit every 2 or 3 salvos at a range of 16 KM. However, the Montana fires a salvo of 12 and I'm firing at a Yamato.
Currently I'm satisfied with this but I want to make sure in career mode that my crew's accuracy will continue to improve.
One thing you may want to try is:
1. Find the gun that your ship uses.
2. Find the .sim file it's data is in.
3. Expand wpn_cannon and go down to "fire".
4. Change trav_tolerance and elev_tolerance to 0.01.
That's good to hear!I'm glad were one step closer to figuring out this conundrum of sorts.hopefully we can get this figured out in the next few days.
now if you could perhaps give me some instructions on how to find said guns,I would be glad to assist with testing this.I really don't feel confident messing with SH4 files even if I do have them backed up.
widowmaker7
02-03-11, 11:28 PM
Audessy, i am now using the montana mod and my accuracy is much better then my attempted Iowa fix. I did tweak some files and seem to have the same accuracy in career as you, tho i have not done many missions to see if crew improves. I did however speed up my shells to 5760 for speed. Still confuses me why its so hard to adjust this aspect.
audessy
02-04-11, 12:04 AM
So, what I've laarned so far is that adjusting the crew's coef for the guns won't work.
The crew will only affect the player controlled cannon. No other turrets are effected by crew.
This becomes obvious when you see that the #1 turret reloads 5 seconds or more faster than the others.
The best effect I can find is in the gun's .sim file. Things I've noticed that help.
-Show_restr =True
-Restr_dist = 0.01
-Range = Set higher for shallow angles. A shallow angle of fall is more likely to strike a narrow target.
-trav_tolerance + elev_tolerance = lowest value is 0.01. Try to go lower and I think it defaults to a higher value. If set to 0 the cannons will not fire.
-muzzles = set all to 0. the shells will spawn inside of each other. at ranges under 10k your salvo spread should be extremely tight.
**Edit**
Setting trav and elev_tolerance to 0.000000001 seemed to have a noticeable affect. I sunk a yamato set to 5,000 hitpoints at 15km in about 1 hour game time.
@widowrat
If you get to it before I can, would you test to see if the special abilities for the sailors make a difference? There's 2 or 3 of them that affect the reloading and accuracy of the guns.
@Char
You need S3D. Silent3ditor it's actually called. It works for editing the files in the Data/library folder. It's best to look at the files that came with your Iowa. That will show you most of the files that affect your Iowa in game.
Karle94
02-12-11, 04:54 PM
In my Admiral Hipper mod I was able to sink a merchant 17000 meters away, in bad weather with a lot of movement. All I have done is to modify a few things in cfg files, placed the torpedo crew in the gun and linked the radar to the gun. I have also noticed that the smaller the gun, the more accurate it is. It was demonstrated to me as I was never able to get the same results in my H-39 as the ones I had in the Admiral Hipper.
polyfiller
02-12-11, 07:55 PM
Karle - what exactly do you mean when you say link radar to the gun ?
Karle94
02-12-11, 08:24 PM
Karle - what exactly do you mean when you say link radar to the gun ?
This is what I mean:
[UserPlayerUnit 1.FunctionalSubsystem 22]
ID= DeckGun
NameDisplayable= Deck Gun
FunctionalType= WeaponMainCannon
IDLinkFunctionalSubsystemSlots= DeckGun, 1, EqSlot43, 1
EqSlot43 is the radar.
polyfiller
02-15-11, 11:52 AM
OK folks, been trhough all the input on this thread and have done some testing with a mission which is 14km range, flat sea, good visibility, stationary target etc.
I found that linking radar to gun made no difference.
Reducing the trav & Elev tolerance in the guns.sim file had a minor effect.
Only thing I have found which had a major impact is to modify the special abilities file and make the sharpshooter increase accuracy by lot's (set at around 5000 in my files now) and I also removed the decrease reload time ability ... this can cause crashes when there is more than one gun turret delcared within a surface ships .upc file.
By doing many changes to the gun files, sim.cfg etc. I only managed to decrease the average sinking time for a merchant by about 1 minute (many tests). By messing with the special ability, I halved the sinking time (from around 20 minuts to 11 minutes) ... again multiple tests.
widowmaker7
02-16-11, 10:39 AM
Thanks for the research on this issue, you managed to figure out how to chop off a large chunk of time in sinking ships at great distances, much appreciated
Marcus7
07-02-12, 01:28 AM
What can you use to edit the upc and .sim files?
Gentlemen, Here is how to make the Guns on the Iowa have a realistic range and accuracy.
Step 1: Go to the config file, and in the data file go to CrewAI. In CrewAI change Cannon range 3=6000 to Cannon range=40000. This means guns classified long range, like those on the Iowa will have a rage of 40000 meters or about 25 miles. Then change Cannon Selection Range=8000 to Cannon Selection Range=40000, allowing you to target something 25 miles away in the usual fashion.
Step 2:Close the CrewAI config file saving the changes. Now open the config file titled Sim. In Sim change Max error angle=3 to Max error angle=1. Then Change
Max fire range=6000 to Max fire range=40000. Save then close SIM
Step 3: Star up the game select Iowa and enjoy blasting your enemies to smithereens from afar. Cheers.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.