Stiebler
03-21-08, 03:22 PM
From NYGM Research.
The arrival of some 70 new ships onto my SH3 set-up from IABL's New Merchant Fleet has given us the chance to resolve definitively one of the old mysteries of the game:
Does the order in which the ships are loaded (or their alphabetical names) affect how often they are generated when only the type, not the class, is specified in the campaign files?
There are only three rational ways in which the devs would have coded the random selections:
1. A truly random selection. If there are ten candidate ships, then generate a number randomly between 1 and 10 and use the ship randomly found. This represents absolutely basic, stock, coding, and it is hardly likely in fact that the talented devs would even consider any alternative. [A complication is that the devs might have assumed that there would never be more than the original number of merchants in the stock game, so would not allow a random number to be generated greater than that original number.]
2. The devs might provide a deliberate bias, by allowing, let us say, a 10% chance that the first ship encountered will be used. Otherwise, there is a 10% chance that the next ship will be used. Then a 10% chance that the third ship will be used, all the way down the list until the last ship encountered must be taken. This actually results mathematically in a declining probability of a ship being selected. For example, if the probability of the first ship being taken is 10%, the total probability of the second ship is actually 9%, the total probability for the third ship is 8.1%, and the probability of a tenth ship being taken is 3.87%. For this method to work, the ships must indeed be listed in some kind of order of desirability, probably alphabetically.
3. The third possibility is this, the first time a random ship is required, the first is picked from the list (of the ship type, for example, type=102). The second time, the second ship in the list is taken. The third time, the third ship. At some point there has to be a wrap-around of the pointer to start picking the 1st ship on the list again, after the last ship has been used.
I carried out a long IXD2 patrol down to Cape Town and back, full campaign mode, to test whether merchant ships were being generated randomly. The U-boat squatted on the randomly-generated routes for merchants of type=102 (British ships only), and I used all techniques (radar, god's-eye view) to locate them as they passed, changing to a different route each time, before returning to the earlier routes to find re-spawned ships. Thus each ship located was a completely isolated event. No sinking influenced what might appear next.
In total, I found (and sank) nine merchants, in alphabetical order as follows:
1 x L01B, 1 x M01B, 1 x M03B, 1 x M19B, 2 x NKGN, 1 x NKSQ, 2 x S01B. [The double-sunk ships did not appear in quick succession.]
The merchants of type 102 that might have been located on these routes were (in alphabetical order):
L01-L03B (3 ships), M01-M04B (4 ships), M06-M12B (7 ships), M14-M17B (4 ships), M19-20B (2 ships), M35B, NACG, NKGN, NKC3, NKLS, NKSMM, NKSQ, NKSS, NLL, NVV, S01-4B (4 ships).
Total = 34 ships.
It requires no degree in higher mathematics to see immediately that the single ships located by the U-boat appeared virtually randomly from the list of ships of type 102. There is no evidence at all that a list is being worked through, either systematically (option 3 listed above), or randomly (option 2). The statistical chance that at least one ship L01B and at least one S01B could both be encountered within nine ships as in option 2 is around 0.04%.
So we can conclude safely that the devs made the obvious and sensible choice, number (1) above. It is also quite clear that they did *not* restrict their completely random selection between ships to the maximum number already present in stock SH3.
Conclusion:
It doesn't matter how you name new ships added to SH3. They will still be selected completely randomly in the campaign files if only the type and not the class is specified.
[Edit: It would certainly be relevant to have added the *actual* order in which the ships were sunk:
L01B, S01B, KGN, KGN, KSQ, M01B, M19B, M03B, S01A]
Stiebler.
The arrival of some 70 new ships onto my SH3 set-up from IABL's New Merchant Fleet has given us the chance to resolve definitively one of the old mysteries of the game:
Does the order in which the ships are loaded (or their alphabetical names) affect how often they are generated when only the type, not the class, is specified in the campaign files?
There are only three rational ways in which the devs would have coded the random selections:
1. A truly random selection. If there are ten candidate ships, then generate a number randomly between 1 and 10 and use the ship randomly found. This represents absolutely basic, stock, coding, and it is hardly likely in fact that the talented devs would even consider any alternative. [A complication is that the devs might have assumed that there would never be more than the original number of merchants in the stock game, so would not allow a random number to be generated greater than that original number.]
2. The devs might provide a deliberate bias, by allowing, let us say, a 10% chance that the first ship encountered will be used. Otherwise, there is a 10% chance that the next ship will be used. Then a 10% chance that the third ship will be used, all the way down the list until the last ship encountered must be taken. This actually results mathematically in a declining probability of a ship being selected. For example, if the probability of the first ship being taken is 10%, the total probability of the second ship is actually 9%, the total probability for the third ship is 8.1%, and the probability of a tenth ship being taken is 3.87%. For this method to work, the ships must indeed be listed in some kind of order of desirability, probably alphabetically.
3. The third possibility is this, the first time a random ship is required, the first is picked from the list (of the ship type, for example, type=102). The second time, the second ship in the list is taken. The third time, the third ship. At some point there has to be a wrap-around of the pointer to start picking the 1st ship on the list again, after the last ship has been used.
I carried out a long IXD2 patrol down to Cape Town and back, full campaign mode, to test whether merchant ships were being generated randomly. The U-boat squatted on the randomly-generated routes for merchants of type=102 (British ships only), and I used all techniques (radar, god's-eye view) to locate them as they passed, changing to a different route each time, before returning to the earlier routes to find re-spawned ships. Thus each ship located was a completely isolated event. No sinking influenced what might appear next.
In total, I found (and sank) nine merchants, in alphabetical order as follows:
1 x L01B, 1 x M01B, 1 x M03B, 1 x M19B, 2 x NKGN, 1 x NKSQ, 2 x S01B. [The double-sunk ships did not appear in quick succession.]
The merchants of type 102 that might have been located on these routes were (in alphabetical order):
L01-L03B (3 ships), M01-M04B (4 ships), M06-M12B (7 ships), M14-M17B (4 ships), M19-20B (2 ships), M35B, NACG, NKGN, NKC3, NKLS, NKSMM, NKSQ, NKSS, NLL, NVV, S01-4B (4 ships).
Total = 34 ships.
It requires no degree in higher mathematics to see immediately that the single ships located by the U-boat appeared virtually randomly from the list of ships of type 102. There is no evidence at all that a list is being worked through, either systematically (option 3 listed above), or randomly (option 2). The statistical chance that at least one ship L01B and at least one S01B could both be encountered within nine ships as in option 2 is around 0.04%.
So we can conclude safely that the devs made the obvious and sensible choice, number (1) above. It is also quite clear that they did *not* restrict their completely random selection between ships to the maximum number already present in stock SH3.
Conclusion:
It doesn't matter how you name new ships added to SH3. They will still be selected completely randomly in the campaign files if only the type and not the class is specified.
[Edit: It would certainly be relevant to have added the *actual* order in which the ships were sunk:
L01B, S01B, KGN, KGN, KSQ, M01B, M19B, M03B, S01A]
Stiebler.