View Single Post
Old 07-26-07, 01:29 PM   #1
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default [tec] AI settings in TM 1.4

In testing the AI i've had such varied results trying to find the optium settings that i've decided it was best to just post what i did to the AI , my rationale behind it, and how to adjust it if you feel the AI is too hard.

How tough one thinks the AI should be will vary from person to person on what they want out of the game. Some will find the AI in Tmaru 1.4 too hard. If you found stock AI hard, then you most definatly will find Tmaru 1.4 extremely difficult. If your a seasoned sub sim'er then you may find yourself scoffing at the AI thinking to yourself, "ive seen worse then this", or you may find it "just right", it all varies.


First let me explain the biggest AI sensor which effects you the most. Active sonar. Active sonar comes in two varites, and for me to classify these, im going to fall back to allied classification so that the japanese sonar classification will be easier to understand.

The allies in SH3 and SH4 have two types of active sonar.
"Type 1XX" and "Q"

In the real world they scan around side to side, like a flashlight waving itself around in a dark room, and a ship could have multiple sonars equiped.



Obviously they differer in geometry. In SH3 and SH4, a ship can only have one active sonar equiped at any given time. It may be a Type1XX or it might be a Q sonar, and they do NOT scan around. They behave more like a stationary floodlight affixed to the front of the ship.

For the most part, the Type 1XX sonars are the standard sonar quiped. The Q sonars in SH3 tended to be of shorter range, but wider beam, and deeper in depth. In SH4, they seem rather generic looking at their stats.

Now then, ive told you the two types and what they do, but to fully realize this you have to examine their stats in SH4. The three most important stats im going to list are:

Max range ( in meters, otherwise self explanitory )
Max elevation, (downward angle of the beam in degrees, how deep it can go)
sensitivity (how touchy it is to recieving a contact)

Stock Allies Type 1xx settings
Quote:
Type 123A = max range of 1200 / Max Elevation of 100 / Sensitivity of 0.04
Type 128A = Max range of 1500 / max Elevation of 100 / Sensitivity of 0.05
Type 144A= Max range of 2000 / Max Elevation of 130 / sensitivity of 0.05
Type 147A= Max range of 2200 / Max Eevation of 155 / Sensitiviy of 0.07
Stock Japanese equvilant, is the Type93
Quote:
Type93-1A = Max range of 1000 / Max elevation of 100 / sensitivity of 0.05
Type93-3A = Max range of 1600 / Max elevation of 100 / sensitivity of 0.05
Type93-5A = Max range of 2200 / Max elevation of 100 / sensitivity of 0.05
Now the japanese equivlant is the Q sonar, (type3) i've not touched at all, its quite uber. But for a point of comparision to the type 93 sonar, so you can understand how they compare to the type 93:

Quote:
Type3-1A = Max range of 2200 / max elevation of 135 / sensitivity to 0.07
Type3-2A = Max range of 2500 / max elevation of 135 / sensitivity of 0.08
( On a side note, I'll give you two guess as to what bungo petes equiped with :rotfl: )


Now that i've laid the basis on what the stock sonar settings are so you can better understand the changes ive made, here they are:
Quote:
Type93-1A = Max range of 1200 / Max elevation of 108 / sensitivity of 0.05
Type93-3A = Max range of 1600 / Max elevation of 112 / sensitivity of 0.05
Type93-5A = Max range of 2200 / Max elevation of 120 / sensitivity of 0.05
In short, i made the early war sonar longer in range by 200 meters, and ive made them all a little deeper delving, but nowhere near as deep as the allies by comparision. The overall point of this change was to get the AI to ping more at deeper depths.



So with the changes to the AI_sensors.dat out of the way, ill explain what i did to the sim.cfg, and why i did it:

Quote:
[AI Cannons]
Max error angle=4
Default is 3. The number here is basicly the degrees at which the AI could be off when gunning at you. Default, he will be within + or - 3 degrees of his mark. Ive increased this to 4, so hes not quite as accurate.

Quote:
[AI detection]
Lost contact time=30
Default is 15. Lost contact time is a really interesting item. It a few things:

- how long the escort will look for you if alerted to your presence.

- how long you must remain undetected for him to give up and go away.

- How far away units will come to look for you if alerted by another AI unit. (example: if a AI unit detects you, it broadcasts your location. Any unit that is within 30 minutes treaveling distance will be vectored into your location. Unless contact is made within those 30 mins, at 31 minutes the unit will turn around and go "home". This is why if you've ever attacked a fishing boat or what not, it felt like they had a radio when planes showed up a little bit later.

Quote:
[Visual]
Light factor=2.0
Default is 1.7, i slightly increased this to reduce the AI's visual aquity at night. I did not use a bigger number because this variable also comes into play at dawn/dusk conditions. The game is really loose with its interprretation of dawn or dusk, and this variable could come into play as early as 6PM when the sun is barely even starting to set. I was conservative with this because i was afraid of making the AI too blind.

Quote:
[Hydrophone]
Noise factor=0.4 ----------->//default is 1
Thermal Layer Signal Attenuation=2.0 --------->// default is 3.0
noise factor of 1 is on the deaf side, noise factor of 0.10 is on the uber end. Prepatch 1.3 i was using a noise factor of 0.25, in this version i was a bit easier and increased it to 0.4 to split the difference. Thermal layer effectiveness reduction was because with passive sonar, it was too much like a klingon cloaking device.

Quote:
[Sonar]
Enemy surface factor=150--------> // default is 200
Thermal Layer Signal Attenuation=4.0 ------->// default is 5.0
Surface factor is in short, how much surface area you present to the AI for him to ping off of, before he gets a ping. Default is 200, in Tmaru 1.3 i made it 150. Think of this variable as to how much "slop" you can have when pointing your bow or stern at an approaching AI to minimize your profile. I did this as an attempt to get the AI to ping more.

Thermal Layer Signal Attenuation, default is 5, i made it 4 in Tmaru 1.3. As the sim.cfg comment states, " 1 means no signal reduction, 5 equals signal reduction to 20%"


One last item under the sonar section of the sim.cfg which bears mentioning is the Detection time.
Quote:
[Sonar]
Detection time=5
I did not touch this at all, im just going to explain it. Detection time here means how long you have to be in the AI's active sonar cone before he will start pinging. The orginal Sh4 default was 20 seconds. Tmaru 1.2 made this 10 seconds, patch 1.3 made this 5 seconds. Which i thought was rather harsh, even by my standards. So i went and tested it. What i concluded was that the hardcoded AI routines where changed such, that the escorts were zipping around every which way, at such a rate, that you wouldn't be in their sonar cone for 10 seconds, which will produce an AI that doesn't ping, or at least that was my fear. In testing on a convoy in a singleplayer mission i discovered that i wasnt getting pinged alot, or at least, not to my satisifcation, which lead me to change the surface factor a tiny bit, as an alternative to messing with this variable. If you want to play with this, my suggestion is to be conservative. 6 or 8 are numbers id try first.


Another bit of reading i would suggest is this:
http://www.ducimus.net/sh4/ai.htm

Hopefully this will help understanding of the AI in SH4, the adjustments made in Tmaru 1.4, and how to adjust it yourself if your unhappy with the AI in general. If you have feedback, do share, maybe we can nail down the perfect AI settings yet.

Last edited by Ducimus; 07-26-07 at 01:56 PM.
Ducimus is offline   Reply With Quote