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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 11-07-11, 05:26 PM   #1
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Thanks Mate, helps to be on the same mission for testing purposes

As per my post here in stieblers thread:
Quote:
Originally Posted by reaper7 View Post
Hi Stiebler got your PM and thanks for the info - hope I can figure my way around OllyDebug and find the relevant info .

Was at work today and had a thought that may be of Interest to you to add to your Asdic code.
It would be possible to make the sub harder to spot by ASDIC's when stopped and on the bottom by making MS = 80 or some relevant amount.

This would be great to add to the Defensive tactics when trying to escape destroyers when the sea floor is above crush depth.
Just bottom out and hide.
I already have the Variable for subspeed and could find the variable for depth under keel. So if both variable = 0 then MS = 80 .

So to add to your Original Figures
Depth > 150m: MS = 100 (m2, metres squared).
Depth >100m: MS = 150
Depth >50m: MS = 200
Depth < 50m: MS = 300.
DepthUnderKeel=0 Speed=0 MS=80

If your Interested in adding this to the code I'll send you the OllyDebug Code and memory locations.
Sorry for making more suggestions, just excited by your discovery
I have found the Variable for Sea-Depth and its a Static Address too Compared to usual DMA address with Pointers.

SH3Collisions.act+20550

Found the Variable for Depth under keel too but this only updates when the command is Issued, so may not be of use.

"sh3.exe"+001546C4 and 1 pointer offset 1C

Still using the Current Depth and the SeaDepth would suffice to know if the Sub in on the bottom. If Depth<=SeaDepth then apply Sensor adjustment.

Appears the SeaDepth Figure is Bang on if it read 111M then the seabed is 111M unlike the Depth under Keel command which applies an error to the Depth.
So therefore the sub can never dive deeper then the seaDepth value. so then if Subdepth=Seadepth, U-boat is on the seafloor.

Last edited by reaper7; 11-07-11 at 05:39 PM.
reaper7 is offline   Reply With Quote
Old 11-08-11, 04:01 AM   #2
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Regarding vampire nights

Using GWX 16km environment, I also was amazed how far my crew and I could see in dark night (sometimes > 10km), while the enemy is completely blind and cannot see me in 200m distance.

While "hacking" the visual sensors for my type VIIF wolfs, I made some discoveries regarding visual sensors: Assume there are the player sub P and two escorts A and B. Every second, every sensor of every ship looks at the other ships. The arrow -> means "looks at".

P->A
P->B

A->P
A->B

B->P
B->A

But: In the code I cannot see, which sensor currently is looking, since the sensor's name (e.g. AI_Visual) is stored elsewhere. Same discovery that Stiebler did with his ASDIC. I can only identify a sensor by its range value, e.g. 30000m for GWX AI-Visual.

At the beginning of every "look-process", first, the distance between the sensor and the current target object is used to calculate a certain variable, which directly affects detection probability, maybe it IS the detection probability. After that, other factors like light, fog and so on modify this variable. Not examined in detail.

Multiplying this variable with a factor 10 will raise detection probability accordingly. Factor 0,1 will lower detection probability.

It would be easy to adjust / modify this factor according to the sun position (day, night, afternoon).

2 problems remain:

1) ATM this modification can only be done for all sensors in common. I cannot differ between different sensors in a smart way - except for the "dirty solution" by identifying them by their range (which unfortunately differs between supermods). AND: While Uboat crew sensors must be made more blind during night, AI-sensors ARE already blind and should be made to see better. So it is necessary to differ between AI-Sensors and Crew sensors. Only dirty solution possible ATM (indentify by range).

2) Even if we can modify sensors in a smart way, the objects are still rendered to be visible for the player in the dark night. This would cause a dysbalance between the crew ability to see and the players ability - which currently is very well balanced, at least in my sh3-installation. I don't know how to change the rendering so that the objects also are made less visible during the night.
__________________
My Mediafire page: http://www.mediafire.com/hsie

Last edited by h.sie; 11-08-11 at 09:37 AM.
h.sie is offline   Reply With Quote
Old 11-08-11, 12:57 PM   #3
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by h.sie View Post
In the code I cannot see, which sensor currently is looking, since the sensor's name (e.g. AI_Visual) is stored elsewhere. Same discovery that Stiebler did with his ASDIC. I can only identify a sensor by its range value, e.g. 30000m for GWX AI-Visual.

Where can you see this Range value for each Sensor within Ollydebug.
I would like to see if I can find anything relating to them.

More eyes looking, you never know.
reaper7 is offline   Reply With Quote
Old 11-08-11, 01:38 PM   #4
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@makman: detection ranges indeed are random, since - every second - a detection probability is calculated (from distance, weather etc.) and random numbers are used in order to determine whether object is detected or not. this luckily leads to random detection ranges, otherwise the game would be boring.

@reaper: Set a break at Sh3Sim.act+017012, but use the unpatched one.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-08-11, 02:53 PM   #5
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by h.sie View Post
Regarding vampire nights

Using GWX 16km environment, I also was amazed how far my crew and I could see in dark night (sometimes > 10km), while the enemy is completely blind and cannot see me in 200m distance.

While "hacking" the visual sensors for my type VIIF wolfs, I made some discoveries regarding visual sensors: Assume there are the player sub P and two escorts A and B. Every second, every sensor of every ship looks at the other ships. The arrow -> means "looks at".

P->A
P->B

A->P
A->B

B->P
B->A

But: In the code I cannot see, which sensor currently is looking, since the sensor's name (e.g. AI_Visual) is stored elsewhere. Same discovery that Stiebler did with his ASDIC. I can only identify a sensor by its range value, e.g. 30000m for GWX AI-Visual.

At the beginning of every "look-process", first, the distance between the sensor and the current target object is used to calculate a certain variable, which directly affects detection probability, maybe it IS the detection probability. After that, other factors like light, fog and so on modify this variable. Not examined in detail.

Multiplying this variable with a factor 10 will raise detection probability accordingly. Factor 0,1 will lower detection probability.

It would be easy to adjust / modify this factor according to the sun position (day, night, afternoon).

2 problems remain:

1) ATM this modification can only be done for all sensors in common. I cannot differ between different sensors in a smart way - except for the "dirty solution" by identifying them by their range (which unfortunately differs between supermods). AND: While Uboat crew sensors must be made more blind during night, AI-sensors ARE already blind and should be made to see better. So it is necessary to differ between AI-Sensors and Crew sensors. Only dirty solution possible ATM (indentify by range).

2) Even if we can modify sensors in a smart way, the objects are still rendered to be visible for the player in the dark night. This would cause a dysbalance between the crew ability to see and the players ability - which currently is very well balanced, at least in my sh3-installation. I don't know how to change the rendering so that the objects also are made less visible during the night.
Hi h.sie,

Some comments:

1. the rendering issue (your monitor, your files at a once): Hitmann already said correctly that the rendering max distance at night (mainly) is also a matter of adjust on your monitor color/contrast/brightness and also dependent on what environment colors you are using. Almost all supermods try to delivery something already adjusted - but trust me, isn't equall for all because the monitor differences. So, we never will have something working very well for all users.

2. the type of environment 8k or 16km etc (scene.dat, env folder files): this is again making a fubar on the matter. Different fog distance settings, different waves size, different env colors, different sky textures - all this can produce different detections distances and different rendering points.

3. finally the sensors (sensors.dat, sensors.cfg , sim.cfg and AI_sensors.dat) : again we have a lot of different mods and different personal adjust here producing again different detections distances.

By the exposed above we can see that we don't need to delivery a real and total solution for all. What we need to delivery is a working&plausive night uboat crew visual detection. I mean, something that works as the AI_sensors.

We can't forget that the player sensors have two values (the precise range and the max range). To our intention we must use the max range settings.

I will suggest (if possible) to make the mod with two range options (that you could then easily detect on the code - needs to be exclusive non?), lets say: 8650 or 16250. This will be the trigger to the mod find the correct values just for player visual sensors and then make the cut based on the light of the environment.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 11-08-11, 03:01 PM   #6
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Continuing from above...

Then the problems about the moment that the object is rendered and the moment when the crew detects it ( a bit random as we talk above) can be then adjusted on the scene.dat (no hardfix needed) to each mod that wants to use the fix. At first I can't see another solution.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve

Last edited by Rubini; 11-08-11 at 03:47 PM.
Rubini is offline   Reply With Quote
Old 11-08-11, 03:40 PM   #7
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Excuse me by the followed posts. Hopes that this also could add knowing to the matter.

Yesterday at night I tried this:

1. Made a new settings on my Sensors.dat (16km now) changing my Visual sensor max range from 16000 to 7000 (The precise was also changed from 10000 to 5000). Mounted the file as a Night_sensor_mod.

2. Then, when the night comes I enabled the mod with JSGME in patrol (save/exit patrol/enabled the mod/reload patrol) and continues. All my visual contacts were now very proof and plausive, max detection more or less at 6800m max and I barely also could see the ships on the night horizon at same time (this was for nofog parcial clouds weather). I used 7000 because this is the distance at night that I can start to see things on my Sh3 settings/my monitor for this weather settings.

The idea here is just to try/test how the fix must work. Just cutting the max range setting based on the light of the environment. The fix must do this automatically without the need to save/exit/reload and in a more smooth way as the light goes and comes on the environment. The adjust on scene.dat is easily to be done later (if needed) by each player that want to use the fix (or the big mods can provide it) to match the night max distance visual sensor and the eye detectable rendering max distance.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini 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 06:36 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.