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-19-11, 12:07 PM   #46
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
@reaper: the variable I talk about of course jumps frequently, because it is located on the stack, that means it is a procedure-local variable with restricted lifetime and will be overwritten frequently as soon as the procedure ends. But this isn't really a problem and can easily be solved. I still prefer patching sh3.exe, because the whole code for crew sensors is located there: range, precise range and so on - the whole crew sensor algorithm! will take some time to understand it. But that's the fun part of it. Additionally, patching the Sh3Sim.act file is more difficult since one needs to write position-independent code and take care for relocation fixups (DLL !).

But I don't want to influence you and your ideas - since I am never 100% sure whether I see things correctly. Thus, let us try two different approaches. This is better than none.

I want to do as few changes to the sensor algorithm as possible. My first attempt is simply to multiply the detection probability variable with a certain value (1.0 (= no change) for day - and maybe 0,1 (= more blind) for night).
Thanks for the info h.sie, still trying to figure out assembly and ollydebug. Only used to directly interfacing to sh3s memory locations.
So your insights are a great learning tool. Your method in most likely the best one with the multiply by a percentage by time of day to reduce contact distance for target spotted.
reaper7 is offline   Reply With Quote
Old 11-20-11, 10:32 AM   #47
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@Makman: I have a working hack that completely removes the randomness from visual detection. That means: As soon as the detection probability variable exceeds a certain, user-defineable threshold value, the ship is detected by the crew. This allows very detailed and easy analysis of the environment parameters influence on detection probability.

But it will take some time until completion......
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-20-11, 10:43 AM   #48
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Sounds great, I think I'll leave this in your hands mate and concentrate on other avenues. Look forward to testing it
reaper7 is offline   Reply With Quote
Old 11-20-11, 12:19 PM   #49
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by h.sie View Post
@Makman: I would not be that optimistic.

In 2008, I followed the development of OLC environment. OLC spent months to fine-adjust the light intensities of his environment in order to have realistic enemy sensor behaviour at daylight and at night (surface attacks possible). The light intensities are the heart of his work.

If you now adjust these light intensities to match your requirements for crew sensors, the enemy sensor adjustment could get worse.

I fear it won't be possible to adjust the env color / intensity to have both: well-adjusted enemy AND crew sensors at daylight and at night.

But hopefully I'm wrong. Good luck !
i think(not sure) i understand what you mean here H.Sie ,
you are talking for realistic enemy sensors behaviour ,right ? if yes then this is not problem becuase the light factor for AI seem to work ok .... i mean that i also had established the enemies visuals detect ranges with no problem at my visual sensors mod.
if i got you right you are 'worring' that if we 'fix' the own crew visuals (with light-colors adjustments at env) then this will effect(-mess) the enemies visuals also. well ,this is nothing to worry about becuase with the working light factor for AI (at sim.cfg) we could remake them more blind or more 'good' looking during night if we wish.
why i say ...''could'' ?
becuase all these(adjustments at ight-colors of environment) has no meaning after my last tests . my last tests shows that even the MINIMUM adjustments at sunlightColor and ambientlightcolor (..1-1-1 to both) are giving back totally random detect ranges .
some results with the 1-1-1 settings are :
1. 4400
2. 3000
3. 10500
4. 6800
5. 1400
6. NOT spoted
7. 4800
8. 4900
9. 7200
10. 3100
11. 12400
12. 3500

so i think that i will give up with the 'idea' that solution is at adjusting sunlightColor and ambientlightcolor values .
my thoughts so far is that the whole 'random' system is exactly where the game is suffering . this 'randomness' has no logical meaning at all ! (above pack of results ...min=not spoted and max=12400m).

so yes H.Sie a tool that totally eliminate this randomness will become very handy to 'understand' what is going on with the tweaks at sunlightColor and ambientlightcolor values , at sensors.cfg and at sensors.dat and we will be able to see if they have , indeed, any effect (and how much) in game.




Quote:
Originally Posted by Rubini View Post
I can´t agree with you here Mak. I never saw any game with night so dark that you can´t see anything. I want realism, but I also want some fun, some playability. Deep dark nights is out if my interest because this is at first a game and I want to play it. As we know the broken sh3´s visual sensor at night give you so much irrealistic detections, this just need a fix, not need to be a very realistic one. You also know that with a reasonable ( just this) dark nights in sh3 you will not be able to see ships so far and i guees that this is enough for our intentions. It´s then just need to adjust what you can see with the new sensors (hardfix) detections night distance and we will have a really new game behaviour at night!

My vote, my ask, continues to be to a hard fix on player crew night visual sensor.
I´m ready to help h.sie in any test.

I don´t have NYGM installed on my system to make the tests that you asked me. But if it works, it will work at the stock game too. I will have a look and let you know my results
you don't understand me Rubini ! i don't try to convince anyone that dark envs are the best ! everybody have his own tastes and that is absolutely fine with me . i will create my env as i like it and you can have yours as you like it .
what i (tried) told you is that if you go for a non dark env then the ships will be vissible so your crew will see them ! i don't understand what you are running after : ships to be vissible but your crew not spotting them ? if you don't want ships to be visible you have to darken your env,more dark env,,shorter spoting distances.....i can't think any other way.

Quote:
Originally Posted by Hitman View Post
Well, yes and no. Yes it is true that sailing on a dark night you might not see the bow of your own ship, but the reason is that you see it pitched against dead black water. However, if you watch an object that is taller than you and is against the sky, that is a different thing and the ambience light might at least show you its silhouette -even if only by contrast.

I can't explain that, I have experienced it when sailing at night but it is difficult to describe. Simply consider two things of huge influence:

1) The ambient light level in the air

2) What you pitch the object against, i.e. the background.

The effect is quite weird because from a high merchant's bridge you would actually be able to spot an uboat at some distance because it is silhouetted against the sky, but as soon as it comes close, you are higher than him and will see it against the black water -where you don't stand a chance of spotting it even if very close!

I guess this is impossible to translate into the game
yes Alberto , i understand what you mean and MAYBE is not impossible !
have a look at this reflex map (just a very fast made one to understand the idea):


as ship is 'getting' into the black(not necesseraly 100% black) area and if we assume that the ship will be darked enough (to 'match' this black area) then will be very hard noticable by player . fog adjustments on far look sea maybe also help to do the 'trick'. maybe is...doable !
of course , players must 'forget' the free cameras...etc

Quote:
Originally Posted by h.sie View Post
@Makman: I have a working hack that completely removes the randomness from visual detection. That means: As soon as the detection probability variable exceeds a certain, user-defineable threshold value, the ship is detected by the crew. This allows very detailed and easy analysis of the environment parameters influence on detection probability.

But it will take some time until completion......
that GREAT H.Sie !!
completely removes the randomness ???.....just FANTASTIC !!!!
take your time mate,when you get it ready....immediatelly send it over !!
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 11-20-11, 01:29 PM   #50
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@makman: I'll give you the fix as soon as it is done, maybe 1-7 days.

The randomization works as follows (with some simplifications to make my description easier):

On a regulary basis, let's say every second, the detection probability p for a (currently undetected) object (in sensor range) is calcutated, based on the distance and environment parameters. Lets assume, it's dark and the distance is 15km and thus we get something like p = 0.000005.

Now, every second, a random number r between 0.0 and 1.0 is created. If r is smaller than p = 0.000005, then the ship is detected (and p is automatically set to a very high value, because detection probability for an already detected object is very high, of course).

According to the randomness, the moment when r < p occurs (detection), can happen at a distance of 15km, but it can also happen at 3km. But it is very unlikely at 15km and becomes more likely, the smaller the distance and the higher p is.

I agree with you that the influence of the random numbers on detection is unrealistically strong. I would expect a smaller distribution of detection ranges than the game gives us.

I offer to work on an hardcode fix that does the following:

1) reduce influence of randomness on detection range

2) make crew visual sensors (question: also periscopes?) more blind at night
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-20-11, 01:38 PM   #51
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by h.sie View Post
@makman: I'll give you the fix as soon as it is done, maybe 1-7 days.

The randomization works as follows (with some simplifications to make my description easier):

On a regulary basis, let's say every second, the detection probability p for a (currently undetected) object (in sensor range) is calcutated, based on the distance and environment parameters. Lets assume, it's dark and the distance is 15km and thus we get something like p = 0.000005.

Now, every second, a random number r between 0.0 and 1.0 is created. If r is smaller than p = 0.000005, then the ship is detected (and p is automatically set to a very high value, because detection probability for an already detected object is very high, of course).

According to the randomness, the moment when r < p occurs (detection), can happen at a distance of 15km, but it can also happen at 3km. But it is very unlikely at 15km and becomes more likely, the smaller the distance is.

I agree with you that the influence of the random numbers on detection is unrealistically strong. I would expect a smaller distribution of detection ranges than the game simulates.

I offer to work on an hardcode fix that does the following:

1) reduce influence of randomness on detection

2) make crew visual sensors (also periscops?) more blind at night
just make something 'clear' for me H.Sie,
is the tool we are talking about(for the tests) TOTALLY ELIMINATE the propability ?
if not....can you make one that TOTALLY eliminate the propability ? this is the best (outopic) for checking adjusting values . we need a tool that our crew will spot ALWAYS at SAME distance the target if we change nothing at parameters.
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 11-20-11, 01:52 PM   #52
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by h.sie View Post
....

2) make crew visual sensors (question: also periscopes?) more blind at night
i think that both must 'follow' the same formula for detection

ok some very detail should be that when sub is on surface and scope is extended should give at scope more 'vissibility' than crew but on the other hand when sub is submerged with scope extended then this should give to scope less 'vissibility' than crew . thats why i believe that a good copromise should be to 'follow' the same formula
[max zoom at scope (x6) is close to bino's historic zoom (x7,1) so i am 'dealing' crew and scope as having the same zoom power]
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 11-20-11, 01:52 PM   #53
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
@makman: I'll give you the fix as soon as it is done, maybe 1-7 days.

The randomization works as follows (with some simplifications to make my description easier):

On a regulary basis, let's say every second, the detection probability p for a (currently undetected) object (in sensor range) is calcutated, based on the distance and environment parameters. Lets assume, it's dark and the distance is 15km and thus we get something like p = 0.000005.

Now, every second, a random number r between 0.0 and 1.0 is created. If r is smaller than p = 0.000005, then the ship is detected (and p is automatically set to a very high value, because detection probability for an already detected object is very high, of course).

According to the randomness, the moment when r < p occurs (detection), can happen at a distance of 15km, but it can also happen at 3km. But it is very unlikely at 15km and becomes more likely, the smaller the distance and the higher p is.

I agree with you that the influence of the random numbers on detection is unrealistically strong. I would expect a smaller distribution of detection ranges than the game gives us.

I offer to work on an hardcode fix that does the following:

1) reduce influence of randomness on detection range

2) make crew visual sensors (question: also periscopes?) more blind at night
Well worked out h.sie, that explains the changes in memory variable I was seeing.

Quote:
Originally Posted by makman94 View Post
just make something 'clear' for me H.Sie,
is the tool we are talking about(for the tests) TOTALLY ELIMINATE the propability ?
if not....can you make one that TOTALLY eliminate the propability ? this is the best (outopic) for checking adjusting values . we need a tool that our crew will spot ALWAYS at SAME distance the target if we change nothing at parameters.
I think what H.sie is suggesting would be better than totally eliminating randomness, to reduce it to very small amount. (currently to large a random variance)

So during a dark night your crew in stock (Made up figures) could detect a contact anywhere between 1000M and 5000M.
With a reduced randomness that could be changed from 1000M to 1500M.
Whereas if eliminated altogether they would always detect at 1000M.

That small random figure would make for more realistic human observation and not be to robotic in nature.
reaper7 is offline   Reply With Quote
Old 11-20-11, 01:57 PM   #54
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by reaper7 View Post
....
That small random figure would make for more realistic human observation and not be to robotic in nature.
i am talking for the tool that we will use at developing the mod John !
of course the randomness will be getted back AFTER the completion of mod !
i agree with you that we need some little randomness for realistic purposes BUT we don't need it for testing purposes.
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 11-20-11, 02:05 PM   #55
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by makman94 View Post
i am talking for the tool that we will use at developing the mod John !
of course the randomness will be getted back AFTER the completion of mod !
i agree with you that we need some little randomness for realistic purposes BUT we don't need it for testing purposes.
Got ya, yes for a test tool it should be set for 0 to help with the environmental setup.

@h.sie In your testing have you seen a way to set the Initial detection range or can you set a certain range to yield a very high probability factor.
Eg to set anything from 1000M to 0M to very high and any thing from 1001M up to low probability.
In order to get past the stock detection range.
reaper7 is offline   Reply With Quote
Old 11-20-11, 02:09 PM   #56
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

@makman:

- yes, totally elimination of randomness for testing purposes).
- and reduction of randomness for final mod.

@reaper:

- Currently I can only use the detection probability p as a trigger for detection. Say, if p > 0.01, a ship is detectd. This always happens at the same distance, when I eliminate randomness.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 11-20-11, 02:12 PM   #57
makman94
Hellas
 
Join Date: Jul 2008
Posts: 2,325
Downloads: 182
Uploads: 7


Default

Quote:
Originally Posted by h.sie View Post
@makman: yes, totally emimination of randomness (for testing purposes).
...PERFECT !!!
whenever you are ready !!
__________________
Knowledge is the only thing that nobody can ever take from you...



Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods
makman94 is offline   Reply With Quote
Old 01-06-12, 11:31 AM   #58
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Bump!

Any news at night visual sensors issue hard fix?
I will reinstall my tools and modded Sh3 on my new PC this weekend (after some months away from sh3) and this is the most important issue that is not yet fixed, IMHO.
I will have some free time and will be happy to test/help on this fix.

Salute mates!
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 01-06-12, 11:49 AM   #59
h.sie
Admiral
 
Join Date: Jul 2008
Posts: 2,192
Downloads: 131
Uploads: 0


Default

Makman and me are working in the background.

I wrote a hardcode fix that makes detection probability visible as a value for makman, and I also totally removed randomness from detection probability, so that the influence of environmental parameters on detection probability can now be analysed much easier. Results are now 100% reproduceable, that means, an enemy ship will now be detected at exactly the same range if one does several tests with the same mission. Saves a lot of time, since no more statistic experiments necessary.

There was also a weird effect on detection probability - caused by the direction the crew looks. The devs maybe wanted to model the influence of the sunlight (one cannot see well when looking into the sun) but this effect also is present in full strength, if no sun is visible, and even at dark night. This effect I also (temporarily) disabled for better analysis of the other environmental parameters.

Makman is now doing some analysis with the fix. I think he'll contact you.
__________________
My Mediafire page: http://www.mediafire.com/hsie
h.sie is offline   Reply With Quote
Old 01-06-12, 12:19 PM   #60
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
Makman and me are working in the background.

I wrote a hardcode fix that makes detection probability visible as a value for makman, and I also totally removed randomness from detection probability, so that the influence of environmental parameters on detection probability can now be analysed much easier. Results are now 100% reproduceable, that means, an enemy ship will now be detected at exactly the same range if one does several tests with the same mission. Saves a lot of time, since no more statistic experiments necessary.

There was also a weird effect on detection probability - caused by the direction the crew looks. The devs maybe wanted to model the influence of the sunlight (one cannot see well when looking into the sun) but this effect also is present in full strength, if no sun is visible, and even at dark night. This effect I also (temporarily) disabled for better analysis of the other environmental parameters.

Makman is now doing some analysis with the fix. I think he'll contact you.
Very good news h.sie!
I will wait manos' contact while I install all my old sh3 stuff.
__________________
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:13 AM.


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.