View Single Post
Old 01-07-21, 05:44 PM   #4
John Pancoast
Ocean Warrior
 
Join Date: Apr 2002
Location: Minnysoda
Posts: 3,183
Downloads: 490
Uploads: 4


Default

Quote:
Originally Posted by LGN1 View Post
Hi John,


SH3 Commander chooses with equal probability one number between 0 and the number of choose from. If the number is higher than the numbers you have given values to, then nothing is changed. With this you can adjust the probabilities for the different events.


Here's an example: You have a variable xABCD that has a value of 1 in the game. Now you would like to have that the variable stays equal 1 with a 50% chance, but with 25% probability changes to 2 and with 25% probability to 3.



In this case you set 'ChooseFrom=4' (because then every event has a 25% probability) and


0_xABCD=2
1_xABCD=3


Given this SH3 Commander changes the value to 2 if 0 is chosen, to 3 if 1 is chosen and does nothing if 2 and 3 are chosen.


You could achieve the same with:


0_xABCD=2
1_xABCD=3
2_xABCD=1
3_xABCD=1


I hope this is clear. If not please ask.


Best, LGN1

Hi LGN1,
Really appreciate the reply; your knowledge will be a big help. Lots of questions.
I understand the examples you made but here's where I get confused. One of the malfunction options, just chosen at random.

[Mal1:data\Library\Cameras.dat]
;1940 10% randomization <---- I take it this is just a comment line ?
ApplyToPeriod=19400101|19411231
ChooseFrom=90 <---How does 90 equate with the 24 items below ? I can't figure it out with the 10% randomization.
RndMidPat=1

0_x2ECD=20 ;Attack Periscope Drops duration[4]
0_x2EE2=20 ;Attack Periscope Blur duration[3]
1_x2ECD=37
1_x2EE2=37
2_x2ECD=60
2_x2EE2=60
3_x2ECD=3600
3_x2EE2=3600

4_x2ECD=37
4_x2EE2=37
4_x2AFC=18 ;Obs Periscope Drops duration[4]
4_x2B11=18 ;Obs Periscope Blur durarion[3]

5_x2ECD=3600
5_x2EE2=3600
5_x2AFC=18
5_x2B11=18

6_x2ECD=20
6_x2EE2=20
6_x302F=1.5 ;Zoom
6_x304E=1.5 ;Zoom

7_x302F=1.5
7_x304E=1.5

8_x302F=6.0
8_x304E=6.0

And as long as I have your attention , I found this post of yours in my searches and have a question about it too.(and really like the idea/damage report idea vs. hex offsets).

https://www.subsim.com/radioroom/sho...d.php?t=158782

Using this example at random, why does the MnID have to also be used vs. only the Key part of a command ?:

;----------Bold decoy failure begin-----------------------------------
[0:data\Cfg\Commands_en.cfg]
;Bold decoy is not working
;Chance: 10%
ApplyToPeriod=19390101|19450508
ChooseFrom=10
RndMidPat=1

0_Cmd200|MnID= ; Empty MnID
0_Cmd200|Key0= ; Empty command
;No warning. You only know after trying.


[0:data\Cfg\Commands_de.cfg]
ApplyToPeriod=19390101|19450508
ChooseFrom=10
RndMidPat=1

0_Cmd200|MnID= ; Empty MnID
0_Cmd200|Key0= ; Empty command

Hope all is well,
John
__________________
"Realistic" is not always GAME-GOOD." - Wave Skipper

Last edited by John Pancoast; 01-07-21 at 05:54 PM.
John Pancoast is offline   Reply With Quote