![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Ocean Warrior
![]() |
![]()
In an effort to liven up the brain dead escort behavior and affect some other things I've started to add items to the randomization file.
Can't grasp a few instructions though. Looked at examples in the file, googlized a bunch. Still confused. 1. In the instructions at the top of the randomization.cfg file it states from the "ChooseFrom" section "Set ChooseFrom to equal the number of different sets of data, or a higher number if you want to simulate percentage chance" Percentage chance of what ? 2. Some of the entries will have a header string "X% randomization" along with the "higher number representing a percentage chance" from #1 above. What does that mean ?
__________________
"Realistic" is not always GAME-GOOD." - Wave Skipper ![]() Last edited by John Pancoast; 01-06-21 at 04:27 AM. |
![]() |
![]() |
![]() |
#2 | |
Grey Wolf
![]() Join Date: Nov 2010
Location: Texas
Posts: 887
Downloads: 1823
Uploads: 0
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#3 |
Ace of the Deep
![]() Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
|
![]()
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 |
![]() |
![]() |
![]() |
#4 | |
Ocean Warrior
![]() |
![]() Quote:
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 ![]() 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. |
|
![]() |
![]() |
![]() |
#5 |
Ace of the Deep
![]() Join Date: Mar 2006
Posts: 1,138
Downloads: 147
Uploads: 12
|
![]()
Hi John,
yes, a semi-colon at the beginning of a line is for comments. To understand your example you have to know that you can change more values in a file with one 'set'/'block'. A 'set'/'block' is indicated by the 0_.... 1_.... , .... You can see the numbers 0_... to 8_... in your example. That means you have nine possible 'sets'/'blocks' which all change more than one variable (up to four variables). Nine (0,...,8) possible choices with ChooseFrom=90 means that every 'set'/'block'/event gets a 10% probability. As you can see the file is quite powerful. Actually, the only thing that is missing is that you could change parameters in different files in a coordinated/correlated way. That would allow you, e.g., to change values in a *.dat file and change the menu....txt in order to have a message appearing. I hope this is clear. Concerning your MnID question: I don't remember exactly, but I guess that I wanted to also disable the button in the GUI so that the player cannot use the GUI to still trigger the order. Best, LGN1 |
![]() |
![]() |
![]() |
#6 |
Ocean Warrior
![]() |
![]()
Ah, makes perfect sense now ! My error was thinking in terms of individual lines vs. blocks.
One other: the numbers [4] and {3] in my example after the "Attack Periscope Drops duration", etc. What are they describing ? Yes, I'm just realizing the powerful ability of the program's functions. Have changed a few minor things in the game already with it but this opens up all kinds of possibilities. Been using TimeTraveler's old program for the hex offset information. Also appreciate the information about your commands.cfg editing. Makes sense. Best, John
__________________
"Realistic" is not always GAME-GOOD." - Wave Skipper ![]() |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|