LittleBear wrote:Nice. What about a "Pimp my Corolius" competation? As a suggested rule:- Post an OXP with a like_shiped Corolius with the texture attached to the renamed model and the role set to Corolius(0.5). That way with one entry half the Corolius Stations get one new texture, but if say 10 people put in Pimped Stations then 5% have WriterA's texture, 5% writerBs and so on. Any takers?
If the wiki is right, then this is not correct.
Wiki wrote:The game engine constantly calls for generic roles to populate the universe. In the example below the ship in question will be considered twice as often (2.0) when a trader is called for, only one quarter as often (0.25) when looking for a hunter, and as often as any other pirate ships when looking for a pirate.
Example:
Code: Select all
<key>roles</key>
<string>hunter(0.25) trader(2.0) pirate</string>
So if you want your new Coriolis to appear as often as the standard one (half of the time), you have to type
coriolis as a role. This means it gets into the pool of stations just like the standard Coriolis. And when the engine takes a station out of the pool, in order to put it in a system, it may choose either of them with the same probability.
If you type
coriolis(0.5) as a role, your ship will get into the pool only half as often as the standard Coriolis. So when the engine chooses from the pool, it will find the standard Coriolis twice as often as your station, resulting in a probability of 2/3 vs 1/3. If there is another entry in the pool with
coriolis(0.5), the overall probability will be 1/2 vs 1/4 vs 1/4 in favour of the standard Coriolis. And so on.
If you give your station the role
coriolis(2), you turn around the chances. Now your station enters into the pool twice as often as the standard Coriolis, so the probability of appearance will be 2/3 vs 1/3 in favour of your station. If there is another one with
coriolis(2), it will be 2/5 vs 2/5 vs 1/5 in favour against the standard Coriolis.
And the last case: If there is one custom station with role
coriolis(2) and another one with role
coriolis(0.5), the total probability of them being chosen from the pool will be 4/7 vs 2/7 (standard Coriolis) vs 1/7.
In general, the probabilities you may give to your station or ship, by assigning it in brackets to its role (like
coriolis(0.5)) represent a fraction, but you cannot determine what fraction, because the game has to calculate it first. All normal appearances of your role (without a number attached in brackets) represent a value of 1. And all these values have to be added first. So if there are 7 ships with the role
hunter, the total value is 7. Therefore the probability for each of them to be chosen is 1/7. If there are three more ships with a role
hunter(0.5), another two with
hunter(0.1) and one with
hunter(2), the sum will be 10.7, and things get more complicated, the least common denominator suddenly is 107, and the probabilities of the ships to be chosen is 10/107 vs 10/107 vs 10/107 vs 10/107 vs 10/107 vs 10/107 vs 10/107 vs 5/107 vs 5/107 vs 5/107 vs 1/107 vs 1/107 vs 20/107 (which is the same as 1/10.7, 0.5/10.7, 0.1/10.7 and 2/10.7 respectively).
EDIT: The general formula for determining the probability of a certain ship appearing when its role is called, can be expressed in the following formula:
Code: Select all
probability value of your ship
-----------------------------------------------------
sum of probability values of all ships with that role
Whenever there is no number in brackets in the role definition, the probability value of this ship is 1, if there is a number, it's this number instead of 1.
Anyway, the bottom line here is: If you want to have your ship or station appear as often as any other with the same role, just give it its role,
without adding anything in brackets.