![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|||||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
08-07-12, 12:30 PM
|
#1 |
|
Black Magic
![]() |
Like I said I have code in place that has the AI crew pumping out flood water. That code was just a theory to practice to ensure the idea/code was sound. Now being of sound nature I can add the changes necessary to make it complete.
Here's my thinking: The pumps onboard the units will be able to pump equivalent to 20-30% damage (a random function will determine the % on every frame update thus giving some randomness to the pump amount). This will allow a compartment to accumulate flood water (allbeit at a lower rate than it would without pumps) until the crew fixes the damage to the compartment. The damage to the compartment is used in the formula by the game to determine amount of flood water to add to the compartment per frame update (it's actually per flood water timer update which is set at 5 seconds by the game). If the flood water level is > 65% of the compartment the crew abandons trying to pump out the water and lets the compartment flood full (sealing it off from other compartments). The crew will try and fix the damage to the compartment every frame update. A random function will determine whether they (crew AI) successfully decreases some damage to the compartment every frame update. If they are successfull then the max the crew can repair damage per frame is 0.003%. A random number will be generated (0-1.0 in value) and multiplied by 0.003 to get the amount of damage reduced in that frame update. These changes will allow flood water to accumulate in the compartment if damage is > 20-30% (random number). Once the crew manages to get the damage to the compartment repaired to a level that the pumps can remove the water then the flood water level will decrease in that compartment. This all together will give a nice curve of flooding versus time (starts out high and exponentially decreases over time as crew repairs damage). Say the damage to the compartment is 55% and the game calculates that the flood water level increase in that timer update is 0.17. Since the pumps can remove 20-30% of the water I'll take 0.17 * ( 1 - 20-30% random number) to get the amount of flood water to add in that timer update. Same applies to if damage is say 12%. Since 12% is < 20-30% random number then I'll take whatever the game calculates as the flood water level increase and negate it and pass it onto the function to update compartment water level thus decreasing the water level in that compartment. Now the game keeps track of the flood water level in the compartment at all times. Thus if the water level in the compartment gets to the water level at the hull flooding stops (as it should). This gives the crew the possibility of not exceeding the 65% damage threshold before having to quit trying to remove flood water. If you have any ideas for this please speak up. We can make this do just about whatever we want it to do
Last edited by TheDarkWraith; 08-07-12 at 12:46 PM. |
|
|
08-07-12, 01:04 PM
|
#2 | |
|
Seaman
![]() Join Date: Jun 2010
Posts: 37
Downloads: 366
Uploads: 0
|
Quote:
Allowable concentrations of toxic gases (harmful substances) in case of fire, Effect of water temperature and air personnel,and when the sub sank from damage to the critical depth is not on the ground, the crew will try and fix the damage all try to come up with a lot of emergency submarine |
|
|
|
08-07-12, 01:19 PM
|
#3 |
|
中国水兵
![]() Join Date: Mar 2010
Location: Scapa Flow, underneath a ferry
Posts: 272
Downloads: 125
Uploads: 0
|
The end patrol button not working (after every second patrol), is this something that you can work out in a future patch?
|
|
|
08-07-12, 01:46 PM
|
#4 |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Thinking out loud...
What was the maximum water pumping rate for WWII bilge pumps? How were they powered? I guess the most likely answer is through ship's propulsion engines. ![]() In this case pump's power should be a function of unit engine's max power, and consequantly a ship with her engines on flames shouldn't be able to manage her floodings at all. |
|
|
08-07-12, 01:54 PM
|
#5 | |
|
Navy Seal
![]() |
Quote:
|
|
|
|
08-07-12, 03:29 PM
|
#6 | |
|
Navy Seal
![]() Join Date: Nov 2005
Location: Houston, TX
Posts: 9,286
Downloads: 105
Uploads: 1
|
Quote:
__________________
They don’t think it be like it is, but it do. Want more U-boat Kaleun portraits for your SH3 Commander Profiles? Download the SH3 Commander Portrait Pack here. |
|
|
|
08-07-12, 04:40 PM
|
#7 | |
|
Navy Seal
![]() Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
|
Quote:
It refers to US subs drain system anyway. Indeed I can be wrong, but I doubt battery powered pumps could keep the pace with heavy floodings on larger ships.
|
|
|
|
08-07-12, 07:04 PM
|
#8 | |
|
Black Magic
![]() |
Quote:
This is why I thought it was prudent to bring this into discussion. I want to implement something that is accurate (as much as possible) and also realistic ![]() This AI crew damage control would only apply to AI units - not the player's sub. That means AI ships and subs and Aircraft. I can possibly filter out certain types if I can locate the pointer that points to the unit's type (i.e. 102, 104, 201, etc.). I have seen this pointer before now I just have to remember where I saw it! |
|
|
|
08-07-12, 09:18 PM
|
#9 | |
|
Navy Seal
![]() Join Date: Nov 2005
Location: Houston, TX
Posts: 9,286
Downloads: 105
Uploads: 1
|
Quote:
__________________
They don’t think it be like it is, but it do. Want more U-boat Kaleun portraits for your SH3 Commander Profiles? Download the SH3 Commander Portrait Pack here. |
|
|
|
08-07-12, 10:48 PM
|
#10 | |
|
Sailor man
![]() Join Date: Sep 2009
Location: Kings Bay, GA
Posts: 43
Downloads: 234
Uploads: 0
|
Quote:
I'd love to see a personnel brow from the bunker to the boat( that is cross-able) and or mooring lines pier side. I've often wondered why we weren't drifting away form the pier. I know its purely cosmetic, but wouldnt that be something.
__________________
"For every dive you must surface, or say hello to your maker, its depths we shouldn't stay" |
|
|
|
08-07-12, 01:40 PM
|
#11 |
|
Navy Seal
![]() |
This is for ships that we have attacked
![]() Not our u-boats
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
