![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Admiral
![]() |
![]()
@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). |
![]() |
![]() |
![]() |
#2 | |
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
![]() Quote:
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. ![]() |
|
![]() |
![]() |
![]() |
#3 |
Admiral
![]() |
![]()
@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...... |
![]() |
![]() |
![]() |
#4 |
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
|
![]()
Sounds great, I think I'll leave this in your hands mate and concentrate on other avenues. Look forward to testing it
![]() |
![]() |
![]() |
![]() |
#5 | ||||
Hellas
![]() |
![]() Quote:
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:
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:
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:
![]() 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 |
||||
![]() |
![]() |
![]() |
#6 |
Admiral
![]() |
![]()
@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 |
![]() |
![]() |
![]() |
#7 | |
Hellas
![]() |
![]() Quote:
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 |
|
![]() |
![]() |
![]() |
#8 | |
Hellas
![]() |
![]() Quote:
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 |
|
![]() |
![]() |
![]() |
|
|