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


Default [wip]Visual sensor revamp for TMaru

I know its kinda silly to be tinkering with anything with a patch looming large, but i coudlnt restrain myself any longer, as the AI visual detection schema is driving me nucking futs.


D/L link
http://www.ducimus.net/sh4/release/T...isuals_1.03.7z
Quote:
-- Format wordrap

ver 1.03

//AirS_visual->MinSurface from -15 to -4.35


----------------------
ver 1.02

//AirS_visual from -38 to -15.

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

//ver 1.01

//AirS_Visual
- MinHeight from -18, back to 0
- MinSurface from 0 to -38


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






// AI visuals Test ver 1.0 for Trigger Maru


WHAT IT'S SUPPOSED TO DO:
a.) Adds additional visual nodes to assign to varying unit types, so visual detection is more dynamic in game.

b.) To make night surface attacks a little more feasible against merchants.

c.) To allow airplanes the ability to detect shallow submarines

d.) Extend visual range of capital warships.



HOW IT WORKS:
a.) adds a dat file that contains additional nodes for the game to use.

b.) Additional Visual nodes are as follows:
- 1.) M_visual. Max range of 6500 meters, assigned to merchants, and other misc non military units.

- 2.) F_Visual. Max range of 12,500 meters. Assigned to capital warships such as cruisers, carriers, etc.

- 3.) AirS_Visual. Max range of 21,000 meters. Assigned to aircraft. This node also has a min height of -10 meters. My Initial testing indicates that a
player can be detected while at periscope depth within a 6,000 meter radius of the unit equiped with this node. Below periscope depth, player is unable to be detected visually.

-4.) A_Visual. Unchanged, max range of 8,500 meters. Only warships use this node now.



KNOWN ISSUES:
- Max visual distances assigned to the node, do not reflect acutal sensor range in game. For example, 8500 meters equates out to 8,000 meters or so.


MISC ERRATA:
- Sensor information on the nav map has been renabled to better facilitate testing.

- sub marker has been renabled to better facilitate testing.

- If anyone provides feedback, do so in METRIC, not imperial.

- This version is a rough framework, and is not fine tuned. WIth what testing ive done, ive centered it around a 9KM visual sensor on the AI, with a 12KM max visual distance on the scene.dat. (in otherwords, close to stock settings)


CREDITS:
- skwasjer , for his amazing tool.
- NYGM, the dat file in this test modlet is based on NYGM's.
- Tater, This work is inspired by Taters work on the same thing.


Again, this is a WIP. It is not fine tuned. To install, just overlay it on top of TM.

Last edited by Ducimus; 10-30-07 at 05:53 PM.
Ducimus is offline   Reply With Quote
Old 10-27-07, 12:13 AM   #2
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

Did you make sure to arm the aircraft with bombs?

I have aircraft attack in test missions is why I ask. Some of the loadouts are bogus, though.

tater
tater is offline   Reply With Quote
Old 10-27-07, 12:19 AM   #3
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Quote:
Originally Posted by tater
Did you make sure to arm the aircraft with bombs?

I have aircraft attack in test missions is why I ask. Some of the loadouts are bogus, though.

tater
In the editor i did, but otherwise no. He didnt even strafe me. I ended up testing it by putting the AirS_visual sensor on a escort, park him (not docked), then travel underwater at him and see when he decides to move his ass and chase me down. Was around 5000, 6000 meters. Outside of that he didnt see me. I then cruised under him at 100 feet, and he never saw me. Went back up to periscope depth after i passed him, and i think he picked me up at 67 feet, at around 3,000, meters or so.

edit: using a min height of -12 meters, and i could get him to detect me at periscope depth from a range of 9,000 meters
Ducimus is offline   Reply With Quote
Old 10-27-07, 12:34 AM   #4
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

One very cool addition with air visuals messed with would be to start using plotted air searches. Meaning planes on the map following waypoints.

Then have the airgroups set to whatever, but have the airstrike changce near zero---but have the chance if the player is detected quite high.

Very few random aicraft encounters, but if a "scripted" patrol finds you...

tater
tater is offline   Reply With Quote
Old 10-27-07, 09:29 AM   #5
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

BTW, there are 2 very related things in the 1.4 changelog posted.

The 20km view distance, and perhaps more importantly the ability for ships to detect torpedos.

The latter could be a fundamantal change in the way visuals are handled, OTOH, it could also just be that they created a new "unit type" that can be spotted (a lot of the AI seems tied to Unit Type=).

It would be cool to know what the technique for wake detection is, perhaps it could be used for shallow subs...

tater
tater is offline   Reply With Quote
Old 10-27-07, 10:01 AM   #6
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

Quote:
- 3.) AirS_Visual. Max range of 21,000 meters. Assigned to aircraft. This node also has a min height of -10 meters. My Initial testing indicates that a
player can be detected while at periscope depth within a 6,000 meter radius of the unit equiped with this node. Below periscope depth, player is unable to be detected visually.
One, does the 6000m radius include altitude?

Two, I think that 6000m might be too far for this. The problem is that planes will be found in all types of water, not just shallows.

An idea:

Make a few aircraft visual nodes. One for single engine planes to differentiate between them and crewed maritime patrol aircraft. The single seat might detect to PD, but only at very very short range. Perhaps less deep than 12 m, too. The idea would be setting the range such that if it was dead calm they could at some short range, but in even typical seas they could not. Another would be for crewed planes, and could detect at PD, but also VERY short range only. Very short, usually impossible die to sea state.

Another node will be the one that detects submerged subs most effectively. For argument, take it as the 6000m version you have now. We then BP-clone the desired maritime patrol planes and give them this visual, and probably shorter range---they'll also get depth charges as bomb load . Now there are 2 versions of of the Betty, H6K, and H8K. One with sensors that can pick up a PD boat at VERY short range, and the other at longer range. We then make special airgroups with the PD-detecting visual equipped planes, and place the bases such that they only cover SHALLOW WATERS.

We can then simulate the specific waters mattering. Anywhere near Java, etc, will be a nasty, dangerous place, for example. The mid pacific? Far less dangerous at PD.

Note that the PD-detecting airgroups can have a few regular planes in them, and the regular airgroups can have a few of the PD-detecting versions, too. Keeps everyone guessing.

tater
tater is offline   Reply With Quote
Old 10-27-07, 11:43 AM   #7
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Quote:
The 20km view distance, and perhaps more importantly the ability for ships to detect torpedos. The latter could be a fundamantal change in the way visuals are handled,
I think your right, that the 20KM distance will probaly change the way visuals are fundamentally handled. When testing with the 9KM , i think i ran into some of the problems you were encountering. It seemed like the variables in the sim.cfg didnt do as much as the range on the sensor itself. For example, a shorter max range, seemed to let me get in closer at night. I almost want to say some parmeters of the AI visuals seem, or feel hardcoded.

Torpedo detection, i think thats a hardcoded or code level change. Im not sure, but thats what my hunch is. I don't think it will effect the moddable files at all. If you remember version 1.1's sim.cfg, they were the exact same as stock SH3. And in SH3, the AI detected steam fish when they got in close. This is what makes me think the files we work with are irrelvant.


Quote:
One, does the 6000m radius include altitude?
Nope, it sure doesn't. Thats one reason why i started another patrol last night to test it out, and posted the files incase someone wanted to try it out. I have no idea what it might do at height, im not even sure if the game takes height into account at all.


Quote:
Two, I think that 6000m might be too far for this. The problem is that planes will be
Well the idea isn't to pester the player in shallow water, only to make him visible to aircraft if hes at periscope depth, which by all accounts is accurate. What im having trouble understanding is how the minheight is acutally working. What i mean is, periscope depth for a Tambor, gar, or gato is 18 meters. So why is -10 working? You'd think you'd need to set it at -18 or so. This has me wondering how the game measures depth.

From the bottom of the subs keel? It could be that at perisope depth, the AI is only seeing the conning tower. The surface area on that is probably what "trips" it at a given range. The effects of range and suface factor is another reason why im not terribly worried about height. Not to mention that planes travel so fast, that they might fly right by it before the detection time has expired. I may infact have to decrease the minsurface even more, but thats just tinfoil hat.


RE: Multiple aircraft nodes.
:hmm: not a bad idea you have there.
Ducimus is offline   Reply With Quote
Old 10-27-07, 12:03 PM   #8
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

Yeah, that makes sense (depth).

BP-cloning makes it not only easy to add new stuff, but the load required on the system isn't much.

I really think many of the air issues might be solved by many alternate types of planes. Right now I have CV airgroups with just a very few planes, and they are BP-clones with the range dropped to ~40km. That keeps the CAP actually flying CAP, and not super long-ranged maritime patrol.

So adding a few different AI_Sensor hard-coded skill levels is EASY. Put 1 of each plane in an airgroup, and 3 different AI sensors, and you have 3 different "skill levels" of AI capability under your control (plus crew skill levels). The same can be done with ships. The only problem there is adding new ships, even BP-clones adds to the rec manual (exception is if you make your own type up, but no escorts can be a made up type, they won't attack with DCs).

Still, I like the idea of making a new type, like UnitType=16, and BP cloning a bunch of the larger than DD ships to it. You'd instantly have 2 versions of each ship, and you could make some the stock unit type, others the new unit types with different everything.
tater is offline   Reply With Quote
Old 10-27-07, 01:07 PM   #9
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Quote:
So why is -10 working? You'd think you'd need to set it at -18 or so. This has me wondering how the game measures depth.

From the bottom of the subs keel? It could be that at perisope depth, the AI is only seeing the conning tower. The surface area on that is probably what "trips" it at a given range. The effects of range and suface factor is another reason why im not terribly worried about height. Not to mention that planes travel so fast, that they might fly right by it before the detection time has expired. I may infact have to decrease the minsurface even more, but thats just tinfoil hat.
I believe the game computes the amount of surface (Using the surface factor as correction) of the 3D model that is INSIDE the detection area of a sensor. Probably setting 18 metres depth would make the sim compute the whole sub hull, conning tower and periscope shears, while 10 metres make it only compute what falls in that area, and less would only make it compute the periscope that rises above, effectively making it as hard to spot as if nothing else was visible (Like viewed from a destroyer f.e.):hmm:
__________________
One day I will return to sea ...
Hitman is offline   Reply With Quote
Old 10-27-07, 01:54 PM   #10
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

I bet that is correct, hitman.
tater is offline   Reply With Quote
Old 10-27-07, 01:56 PM   #11
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Air visual needs more work. They're flying right by me as close as 2,000 - 3,000 meters and not seeing me.

detection time in sim.cfg is 0.5, or half a minute. I have to be exposed to them for 30 seconds in order to be detected. Maybe they're flying too fast and are not in the locale for that long, which is most likely the cause.

So i need to extend the time im exposed, without upping the detection time in the cfg because that effects ALL nodes, not just this one.


:hmm:

So my options are:
increase Sensitivty in node?
Lower the minheight to increase radius of exposure?
Use minsurface variable in node properties, assuming the game uses that value over whats in the sim.cfg?

edit:

Only logical thing to do at this point is increase the surface area exposed via lowering the min height to -18 and see what happends.
Ducimus is offline   Reply With Quote
Old 10-27-07, 02:13 PM   #12
tater
Navy Seal
 
Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
Default

You can also just increase the range, right?

The plane needs to be in range for a longer time period. Set the max range ridiculously high.

A BB should have a horizon range at ~35,000m. Make a planes max detection range 99,999 and see what happens

tater
tater is offline   Reply With Quote
Old 10-28-07, 12:09 AM   #13
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Something isnt right with the AirS_visual node. Maybe its the enviormental variables, but for some odd reason, its behaving like patch 1.2. They are simply not seeing me. At the time it was 15 kt winds with a light fog, but as close as they came, they should have seen me regardless.


I know this node works,because i put it on a warship, and it detected me fine. But place it on a plane, and all of a sudden its not working. I'll have to try experimenting with the surface factor and sensitivty in the node itself.
Ducimus is offline   Reply With Quote
Old 10-28-07, 01:16 AM   #14
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

More testing. I set the min height back to 0, and he detects me again. Not sure why. Ive also noticed that regardless of max visual distance or if i use the default AI visual node or not, i still get detected (Ie, he turns towards me) at about the same distance.

Im beginning to think this is a function of surface factor, sensitivity, or wave factor (saved game is in 15 kt wind, light fog).

I'll have to try with a lower wave factor, and lower surface factor and see if he spots me sooner. Failing that, trying a sensiivty of say 0.03, or 0.05.

edit: Not to self, try using a surface factor of 30 or 35 for starters, and go up or down from there. Also, lower the living hell out of the wave factor, to say 0.5 or 0.75
Ducimus is offline   Reply With Quote
Old 10-28-07, 03:41 AM   #15
Hitman
Pacific Aces Dev Team
 
Hitman's Avatar
 
Join Date: Sep 2002
Location: Spain
Posts: 6,109
Downloads: 109
Uploads: 2


Default

Quote:
I know this node works,because i put it on a warship, and it detected me fine. But place it on a plane, and all of a sudden its not working.
Since the obvious difference is the heigth of the observer, why don't you try to script a plane that flies very low (At the same heigth as the BB visual node is located) and see what happens? The other reason for this could be the speed :hmm:
__________________
One day I will return to sea ...
Hitman 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 10:45 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.