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

Reply
 
Thread Tools Display Modes
Old 07-31-12, 06:18 PM   #1
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
No idea

during this afternoon I've been playing with a possible simplified model for armour/damage.

Given AP(S): shell's armour points and AP(B0): box's starting armour points, both >= 0, box's armour points after shell's impact is calculated as follows:

AP(B1) = MAX [AP(B0)* [1 - [C1 * AP(S) / AP(B0)] ^ C2); 0]

where C1 and C2 are two arbitrary positive constants we can use for "finetuning" the formula. Specifically:

C1 is the lower AP(B0) / AP(S) ratio at wich a shell would be enough to wipe out boxe's armour points with one single inpact (graph's gradient when C2=1).

C2 is the "exponential factor" of the formula. 1 for a linear hits number / Box armour points graph.

Every time a shell inpacts a box, the game should update its armour points, and when they are zeroed the box should start taking damage.

I have prepared a spreadsheet for changing the above mentioned parameters and seeing how they would affect the exponential curve. If you want to have a glance at it, I've uploaded it here:

https://rapidshare.com/files/2103822...lculations.xls
gotta love math and numbers I'll post the whole damage equation that SH5 is using here soon so you can see what they are doing

Quote:
Originally Posted by SilentOtto View Post
Hey TDW, this intrigued me (love numbers too!) so I did some magic googling and came out with something called Square Root Scaled Distance, related to... guess what? BLASTING! I found some formulae and long readings, but it seems on first read that it's used in blasting calculations, mining, etc. So it looks like that's the reason for the scaled distances and the sqr! Seems like blast effects diminish with sqr of distance, didn't get to the part of why the scaled distance but there it is!

These are a few examples of what I found, it's a bit late here, I can give it a second look tomorrow.

http://www.iseegoldenwest.org/tech.htm

http://www.sustainableaggregates.com...gandenergy.htm

http://www.sustainableaggregates.com...itoring_p2.htm
Interesting Will have to read over and see if it applies

On another note I found the main rendering loop in the exe file. I'm making a 'Render' patch that will allow you to:
- remove posteffects
- remove water droplets effects
- remove water leaks effects

These would mainly be used for troubleshooting but Sober may have an interest in the water droplets one. Maybe it will cure his smoke problem If it does it will be some good feedback so I can poke around more in PostEffects act file and maybe see why.
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 06:32 PM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.0.49.0 released. See post #1

This adds a new patch to SH5.exe that allows certain items from ever being rendered in the game.

@Sober - try enabling the water droplets one and see if your smoke problem stops

TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 07:43 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
You just made my day
It worked
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 08:08 PM   #4
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
Mostly , the smoke has stopped resetting IE: dissapeares when the water drops appear . The problem of the smoke rendering at the wrong spot still happens though . Ok well , it seems better than it was . I am sure if you open up the file FX_Update_0_0_19_ByTheDarkWraith\data\Library\TDW_ FXU_Zone_Smokes.dat with Goblin you can see the problem .
Excellent. At least the resetting has been fixed (for the most part). I'll mark that down to look into much later as to maybe figuring out why it happens when that render is enabled
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 08:19 PM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
Mostly , the smoke has stopped resetting IE: dissapeares when the water drops appear . Ok , it still dissapears a bit , it seems better than it was
Try adjusting the max particles number to a larger value and see if that helps
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 09:24 PM   #6
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by sober View Post
I dont think the problem is the smoke particles . I think the problem is the game doesnt like the way the file is structured . If i open the file TDW_FXU_Zone_Smokes.dat with goblin then it is red (something wrong ) . If i open TDW_FXU_Interior_Smoke.dat you can see that it opens correctly in Goblin . The GDS scene tree looks diffrent in the Smokes.dat compared to the TDW_FXU_Interior_Smoke.dat .
I'll take a look at it
TheDarkWraith is offline   Reply With Quote
Old 07-31-12, 11:26 PM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Anything look different in this screenshot



Hmm....crew is on deck while sub is decks awash...well yeah that would be a new patch I'm working on Appropriately named decks awash. You can take the sub down to ~7m depth before electric engines engage and crew disappears. The only thing I have left to do on it is 'unlock' the external hatch when decks awash so you can open/close it (so game doesn't always force it closed and locked).
TheDarkWraith is offline   Reply With Quote
Old 08-01-12, 01:30 PM   #8
Sepp von Ch.
Sea Lord
 
Join Date: Dec 2009
Location: In my U-552 and Tiger
Posts: 1,730
Downloads: 788
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post


crew is on deck while sub is decks awash....
Fantastic news! Many thanks! Looking forward to this fix!!!
__________________
U-552
Tiger
IDF
Sepp von Ch. is offline   Reply With Quote
Old 08-01-12, 06:47 AM   #9
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
gotta love math and numbers
More or less. All I know about maths dates back to my university years, when I was a student of science. Now I am forgetting a lot of notions, but I mostly retain the method

Quote:
Originally Posted by TheDarkWraith View Post
I'll post the whole damage equation that SH5 is using here soon so you can see what they are doing
do it, I'll look at it and see if I can understand anything

On a side note:
I see you like random variables as much as I do
I guess you're currently using pseudo-random numbers coming from an uniform distribution, since most programming languages got quick functions for generating them. Nevertheless normal distribution is by far the most common distribution as far as physics and natural events are concerned. Have you ever thought of using it?
There are some methods for converting "uniform" random numbers into "normal" ones. For example, here's a really easy method for doing it:

http://www.protonfish.com/random.shtml

In this example, the mean (Mu) would be the result of your formula before randomization, while you should choose wisely a realistic standard deviation value (Sigma) based on the amount of variation from the mean you want for the event you try to simulate.

Another conversion method, a bit more complex:

http://www.taygeta.com/random/gaussian.html
gap is offline   Reply With Quote
Old 08-01-12, 07:59 AM   #10
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
On a side note:
I see you like random variables as much as I do
I guess you're currently using pseudo-random numbers coming from an uniform distribution, since most programming languages got quick functions for generating them. Nevertheless normal distribution is by far the most common distribution as far as physics and natural events are concerned. Have you ever thought of using it?
There are some methods for converting "uniform" random numbers into "normal" ones. For example, here's a really easy method for doing it:

http://www.protonfish.com/random.shtml

In this example, the mean (Mu) would be the result of your formula before randomization, while you should choose wisely a realistic standard deviation value (Sigma) based on the amount of variation from the mean you want for the event you try to simulate.

Another conversion method, a bit more complex:

http://www.taygeta.com/random/gaussian.html
I'm using a kernel function that is present in the game to get the random number. I'll have to 'open up' this kernel function and see how it's getting the random number.

I'll post the zone (box) damage routine calculations when I get back from a job this morning
TheDarkWraith is offline   Reply With Quote
Old 08-01-12, 12:45 PM   #11
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
I'm using a kernel function that is present in the game to get the random number. I'll have to 'open up' this kernel function and see how it's getting the random number.
Try and see: I think that knowing the routine devs have put in place for generating random numbers is worth the time you would have to spend for discovering it!

Using gaussian distribution would allow us to model a wider range of outputs for some random events, keeping in the same time the probability of unlikely events reasonably low.

Quote:
Originally Posted by TheDarkWraith View Post
I'll post the zone (box) damage routine calculations when I get back from a job this morning
okay
gap is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 01:27 AM.


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