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 04-10-07, 02:27 PM   #1
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default [TEC] Adjusting the AI - cliff notes version

Disclaimer:
The following is a terse version of my understanding on how to adjust the AI. That is to say, this is how i think it works. Im not saying authoritively, that his is how it works. Although im obviously confident enough about my understanding of it to make this post.

This is a condensed version because i honestly dont have the time or motivation to write out the essay that this could become. So here's he cliffnotes speil in no particular order:


------------------------------------------

Adjusing the AI as a whole i feel is comprised of the following:

- crew rating in campaign files
- defines the minium sensor signal strength the AI will respond to, and accuracy.

- AI_sensor.dat
- defines the geometry of active/passive sonar
- Sim.cfg
- the real guts of it, defines the parameters to illicet a response from the AI

- depthcharges. sim/zon
- becomes important when a response from the AI has been succesfullly made.

----------------------------------

AI_sensor.dat

- JP hydrohpones are "type3" and "type93" with a P annotated on the end for passaive.

- JP sonar is the same, only with an A nnotated on the end for active.

- It's beleived when sensitity is set 0, the game uses the senstivity rating defined in the sim.cfg. Else, it uses the value in the AI_sensor.dat

- It is NOT neccessary to establsh a min range on active sonar due to the downward gemoetry of the beam. If you go deep enough, you'll get under the sonar.

- Max Elevation defines the doward angle of the beam, hence dictates how easy, or hard it is to get under that sonar types active beam.


----------------------------
SIM.CFG (stock examples being shown)
Quote:
[Mech]
Waves amplitude=0.2
Waves attenuation=0.75
Defines the height and trough of waves. Greatly effects visual sensors, and has many adverse side effects. USE GREAT CAUTION when playing with this variable. Frankly, i dont recommend touching it.
Quote:
[AI detection]
Lost contact time=15
Defines how long the AI will activly look for you after detecting you. Also dictates response from nearby AI units. When player is detected, the detecting AI broadcasts its discovery to all nearby units. If your within 15 mins reach, they will come to look. At 16 mins, if another detection of the player is not made by then, the AI will go back to what it was doing.


Quote:
[Visual]
Detection time=0.5
Sensitivity=0.01
Fog factor=1.0
Light factor=1.0
Waves factor=1.0
Enemy surface factor=400
Enemy speed factor=15
- Think of the AI as a traffic cop. To get a ticket, you must be in violation of certain rules. Likewise, for visual detection to occur, you must be in violation of certain parameters.

- speed factor in this case means that you must be doing 15 kts or more for the AI to notice you.

- Surface factor means how much surface area of your sub you must be presenting to the AI in order for him to notice you.

- Ive long suspected that for visual detection to occur, you must be breaking both of the above listed paremeters to get a response, but ive not conclusvly proved that. Its either A, or B, or All of the above, im not 100% positve.

- detection time. You must be exceeding the surface and speed factors for this amount of time to illiicet a response.

- Fog/light/wave factors. Think of them as enviormental dampeners, or how much the enviorment handicaps the AI. Smaller the number the less the handycap, the larger the number, the more the handycap.



Quote:
[Hydrophone]
Detection time=1
Sensitivity=0.03
Height factor=0
Waves factor=0.5
Speed factor=15
Noise factor=1.0
- Player noise is dicated by motor RPM. The more RPM, the more noise your making. and if in Silent running or not. Silent running behaves boolean. Its either on, or off.

-detection time, how long you can make alot of racket before the AI takes notice.

-speed factor in this case dictates how fast the AI can go, and still be able to use this sensor. At 16kts, he can no longer hear anything.

- noise factor seems to dictate how much of your motor noise the AI can hear at a given range. Arbitary numbers, 0.25 is quite sensitive, 1.0 is quite deaf.

- waves factor is your standard enviormental handycap. 0.5 being quite the handycap, 0.95 being barely a handycap at all.


Quote:
[Sonar]
Detection time=20
Sensitivity=0.03
Waves factor=0.5
Speed factor=20
Enemy surface factor=200
Lose time=30
- for player detection to occur (IE, to get the AI to ping), you must
A.) present him a favorable surface factor as defined by said variable
b.) be within his sonar cone as defined by the AI_sensor.dat
c.) be doing all of the above for the length of time specified by the detection time.

- stock, detection time being 20, alot of ground can be covered in that time by yourslf, or the AI. hence the AI is often not able to keep you within his sonar cone and presenting a favorable surface factor during that time. WHich is why you dont hear it ping a whole lot.

Depthcharges:sim/zon

SIM:
- fall speed, self explantiory

- depth percision, sets area at which DC will randomly explode when set at a given depth by the AI. FOr example, with a depth percision of 20, if the AI sets the DC to explode at 160feet, then the DC could randoly expldode anywhere between 140 feet and 180 feet. Default game setting is a depth percision of FIVE.

- explosion range, defines how much of the depth charge's shock wave you can feel. Does no damage. By raising this value, the closer the DC is, the more your boat will shake when it explodes DO not go overboard with this, as said shockwave can (if you set it high enough) acutally propell the boat in the water at high speeds. Rather humorous, but highly unrealistic.

ZON:
Min/Max EF
-defines min and max damage range.

- Min radius. Defines the area at which the depth charge will do full damage. Default i beleive is 4.5, meaning if the depth charge explodes within 4.5 meters of your sub, it does full damage.

- Max radius, defines outward radius that damage is applied by diminishing returns. Meaning if you have a depth charge at 4.5 min raadius and and a 40 max radius. this means that anywhere witin 4.5 meters the depth charge does its full damage. From 4.5 meters outward to 40 damage is still applied but less damage is applied to the player sub at 39 meters then at 5 meters. The farther away you are from the center of the explosion, the less damage it does. 4.5/40 is the game default.



Misc remarks on the AI in general:

- Does not ping without reason. (IE, be in sonar cone, presenting favorable profile to said sonar cone, and be doing both for X amount of time)

- Ai has two states. Normal and alert. You see it all the time. When alerted the threshold values are heightened in order to more easily illicet a response from the AI.

- The AI can only use active or passive at a singluar moment in time, it cannot do both. YOu see this all the time whenever you raise your periscope. WHen you do, your using yoru visual sensor, and your hydrophone contacts are tempoarly lost until you stop using your visual sensor (periscope). AI works the same way. A or B, it cannot do both at once.




Thats all i got, im out of time. Hopefully i didnt fat finger this and make a huge mistake somewhere.
Ducimus is offline   Reply With Quote
Old 04-10-07, 02:29 PM   #2
CaptainCox
Sea Lord
 
Join Date: Feb 2007
Location: A Swede in Frankfurt am Main
Posts: 1,897
Downloads: 4
Uploads: 0
Default

Now that is some heavy duty work man, I would put this in the Tutorial sticky. 100% ace!
__________________
CaptainCox is offline   Reply With Quote
Old 04-10-07, 02:43 PM   #3
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

Excellent, useful post.

tater
tater is offline   Reply With Quote
Old 04-10-07, 05:08 PM   #4
Redwine
Sea Lord
 
Join Date: Jan 2002
Location: San Martin de los Andes, Neuquen, , Argentina.
Posts: 1,962
Downloads: 9
Uploads: 0
Default

Quote:
Originally Posted by Ducimus

ZON:
Min/Max EF
-defines min and max damage range.

- Min radius. Defines the area at which the depth charge will do full damage. Default i beleive is 4.5, meaning if the depth charge explodes within 4.5 meters of your sub, it does full damage.

- Max radius, defines outward radius that damage is applied by diminishing returns. Meaning if you have a depth charge at 4.5 min raadius and and a 40 max radius. this means that anywhere witin 4.5 meters the depth charge does its full damage. From 4.5 meters outward to 40 damage is still applied but less damage is applied to the player sub at 39 meters then at 5 meters. The farther away you are from the center of the explosion, the less damage it does. 4.5/40 is the game default.
Hi Ducimus.... many many thankd for your effort..

I must to mention, i was thinking the same of the quote above, but during the long time discussion and research about SH III files, somo other people say it works diferent.

The depth chatge explosion has a determined value for each explosion, it is ransdom between the max and min efort.

Plus, its effort is efective at a random value between the max and min radius.

That was explaining why we had lot of damage in SH III.

In example, you can have by random, the max effort at the max radius... then you will have a killer depth charge at 40 meters wich is so unrealistic ans explains the terrible damage caused by depth charges exploding so far from the hull in SH III, sure it works the same here.

Not sure wich of both ways is correct, but may be better if the modder take in account both posibilities.




My comment to add for future modders is :

Do not attempt to adjust "real" values into the sim, the sim equipement doesnt works as in real life.... just attempt to reach the historical survival provability.
Redwine is offline   Reply With Quote
Old 04-10-07, 05:58 PM   #5
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Quote:
The depth charge explosion has a determined value for each explosion, it is random between the max and min efort.
True. I probably should have worded things more clearly if anyone got the impression of this not being the case.

Quote:
Plus, its effort is efective at a random value between the max and min radius.
Your correct. My take on it is this. If you have a min damage of 100, and a max of 200, and the game's random chance rolls a 175, then its the 175 that is being subjected to diminishing returns on the depth charges min/max radius. Again, i was in a hurry in typing the post, and its a minor detail really. I wanted to avoid getting into writing a 4 page eassay
Ducimus is offline   Reply With Quote
Old 04-19-07, 03:48 PM   #6
kakemann
Samurai Navy
 
Join Date: Feb 2007
Location: Pretty close to the big german cruiser Blücher in Norway
Posts: 568
Downloads: 29
Uploads: 0
Default

Ducimus!

I'm extremely thankful for this!

I have been annoyed by the DD's poor performance - and now i can do some research and testing of my own thanks to you.

I have tried to understand the use of the Sim.cfg file - but now I understand a lot more!

Happy hunting!
kakemann is offline   Reply With Quote
Old 04-19-07, 03:53 PM   #7
kakemann
Samurai Navy
 
Join Date: Feb 2007
Location: Pretty close to the big german cruiser Blücher in Norway
Posts: 568
Downloads: 29
Uploads: 0
Default

Quote:
Originally Posted by Ducimus

- crew rating in campaign files
- defines the minium sensor signal strength the AI will respond to, and accuracy.
Does this mean that this is were to take a closer look if you want to find out why some DD's perform better than others?

I mean that for instance, DD's following a task force usually seems more sensitive to hydrophone listening than the ones escorting merchants--

If someone knows which of these files that could be edited with success, would be great if you posted it here.

kakemann is offline   Reply With Quote
Old 04-19-07, 04:02 PM   #8
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

I have said campaign files modified in mod pack. You can D/L it and take a look at which ones. (Find and replace in wordpad - great mod tool)

As crew ratings go, theres 0 through 4.

0 is utterly retarded
1 is totally clueless
2 has something resembeling a clue
3 has a clue, and maybe even an idea.
4 is Bungo Pete's evil twin brother.


Which sensor's they use (depending on year) also effects their performance.
Ducimus is offline   Reply With Quote
Old 04-19-07, 04:22 PM   #9
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

^^^ in the stock campaign, every single merchant escort is 0 or 1.

So we have absurd (for early war when there were zero convoys, particularly) convoys with many ships escorted by an entire IJN Desdiv, yet these same fleet DDs are skill 3 or 4 in a TF, yet skill 0 or 1 with merchants---they are basically targets in every convoy, not escorts.
tater is offline   Reply With Quote
Old 04-19-07, 04:28 PM   #10
kakemann
Samurai Navy
 
Join Date: Feb 2007
Location: Pretty close to the big german cruiser Blücher in Norway
Posts: 568
Downloads: 29
Uploads: 0
Default

Quote:
Originally Posted by tater
^^^ in the stock campaign, every single merchant escort is 0 or 1.

So we have absurd (for early war when there were zero convoys, particularly) convoys with many ships escorted by an entire IJN Desdiv, yet these same fleet DDs are skill 3 or 4 in a TF, yet skill 0 or 1 with merchants---they are basically targets in every convoy, not escorts.
Tater, which file(s) and which line(s) are you looking in?
kakemann is offline   Reply With Quote
Old 03-06-11, 03:32 PM   #11
TorpX
Silent Hunter
 
Join Date: Sep 2010
Posts: 3,975
Downloads: 153
Uploads: 11
Default

I have a few questions here:

Quote:
Originally Posted by Ducimus View Post
Adjusing the AI as a whole i feel is comprised of the following:


- AI_sensor.dat
- defines the geometry of active/passive sonar
- Sim.cfg
- the real guts of it, defines the parameters to illicet a response from the AI
Can I assume that the AI_Visual_Sensors.dat is comparable?
What do you use to open these files?

Quote:
Originally Posted by Ducimus View Post
SIM.CFG (stock examples being shown)

Quote:
[Mech]
Waves amplitude=0.2
Waves attenuation=0.75

Defines the height and trough of waves. Greatly effects visual sensors, and has many adverse side effects. USE GREAT CAUTION when playing with this variable. Frankly, i dont recommend touching it.
Could you elaborate?
Quote:
Originally Posted by Ducimus View Post
Quote:
[Visual]
Detection time=0.5
Sensitivity=0.01
Fog factor=1.0
Light factor=1.0
Waves factor=1.0
Enemy surface factor=400
Enemy speed factor=15


- Think of the AI as a traffic cop. To get a ticket, you must be in violation of certain rules. Likewise, for visual detection to occur, you must be in violation of certain parameters.

- speed factor in this case means that you must be doing 15 kts or more for the AI to notice you.
This can't be right. They can spot me even at low speed?!?
Doesn't make sense.

Quote:
Originally Posted by Ducimus View Post
- Surface factor means how much surface area of your sub you must be presenting to the AI in order for him to notice you.

- Ive long suspected that for visual detection to occur, you must be breaking both of the above listed paremeters to get a response, but ive not conclusvly proved that. Its either A, or B, or All of the above, im not 100% positve.

- detection time. You must be exceeding the surface and speed factors for this amount of time to illiicet a response.

- Fog/light/wave factors. Think of them as enviormental dampeners, or how much the enviorment handicaps the AI. Smaller the number the less the handycap, the larger the number, the more the handycap.
Also, In my Sim.cfg file, there is:

Thermal Layer Signal Attenuation=2.0

This seems odd. I'm guessing this is from a mod and not stock. Why would visual detection have anything to do with the thermal layer?
TorpX is offline   Reply With Quote
Old 08-09-13, 01:28 PM   #12
Bubblehead1980
Navy Seal
 
Join Date: Apr 2009
Location: Florida USA
Posts: 6,922
Downloads: 550
Uploads: 42


Default

I know this is an older thread but am looking at the ijndepthcharges.zon file and its says the minef/maxef are hitpoints? Could someone explain the hit points? Im trying to make the depth charges a bit more realistic.
Bubblehead1980 is offline   Reply With Quote
Old 08-09-13, 02:27 PM   #13
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Bubblehead1980 View Post
I know this is an older thread but am looking at the ijndepthcharges.zon file and its says the minef/maxef are hitpoints? Could someone explain the hit points? Im trying to make the depth charges a bit more realistic.
that's a coomon setting for most things and it means:

minef = minimum effect range

maxef = maximum effect range

so I assume you are setting the explosive "bubble" size if you will with these settings.

setting the max effect too high on something like torpedoes will turn ships into swiss cheese looking above deck damage
  Reply With Quote
Old 08-09-13, 04:54 PM   #14
Bubblehead1980
Navy Seal
 
Join Date: Apr 2009
Location: Florida USA
Posts: 6,922
Downloads: 550
Uploads: 42


Default

Quote:
Originally Posted by Webster View Post
that's a coomon setting for most things and it means:

minef = minimum effect range

maxef = maximum effect range

so I assume you are setting the explosive "bubble" size if you will with these settings.

setting the max effect too high on something like torpedoes will turn ships into swiss cheese looking above deck damage


Well my aim is to make it so over time they beat the sub up.im tired of depth charges that are not that close causing bulkheads to collapse.I adjusted the radius for "full damage" and also the depth precision that kind of made them smart bombs it seemed.Neutered the hit points a little took much i think but may be on track.Really wish could make them historical but its not within the games ability.
Bubblehead1980 is offline   Reply With Quote
Old 08-10-13, 01:55 PM   #15
Webster
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

well if you are "tired of depth charges that are not that close causing bulkheads to collapse" then set the max range closer to the min range so its a tighter circle of damage but you get the same level of damage so an accurate hit will do the expected damage but if its off to the side it wont do much.

one thing to keep in mind is under water the shock wave created can do massive damage on its own so that's why you get so much damage from near misses in the game.

it takes time and a lot of testing but im sure you will get it figured out to your liking, just take lots of notes of everything because things like this you might start over several times using different settings or combinations of settings before you find the settings you find work best.

just try not to change hit points too much or you lose the damage you need from on target hits as you found out.
  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 04:32 PM.


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