Talk:Lottery

Top prize for Unlucky Sims
Looking at the table, I don't see how prizes for Unlucky Sims top out at §100. The traits don't start affecting the prize chances until the §1,000 level is reached, and even then, it's +/- 5%. That leaves a 5% of winning §1,000, unless there are some other factors that affect the amount of the prize. Dharden (talk) 18:28, March 29, 2014 (UTC)
 * The code isn't very complicated, but it's a little confusing to explain in the article, so I tried to omit the details as it's too technical. How the game determines the outcome is actually more than what's just listed on the table.


 * Consider the winning chances aren't modified (no traits, no moodlet). First, all the weighted chances are summed up, so n = 30 + 25 + 15 + ... + 0.05 = 100. After that, a random number x is picked between 0.00 - 1.00. The random number that's picked determines the outcome of the reward:

Technically, if x is exactly 1.00, I believe you won't win any prize instead. The denominator is n, while the numerator is the prize's corresponding weighted chance, added by the preceding weighted chances and modified chances.

If the Sim has Unlucky trait, the result is a bit different. The denominator n is equal to the sum of base weighted chances, as well as the modifiers (this is applied to other factors as well, but in this case, the Sim only has Unlucky trait); n = 30 + 25 + 15 + 10 + (-5) + 7 + (-10) + 7 + (-12.5) + 5.95 + (-15) + 0.05 + (-10) = 47.5. And then x is picked between 0 and 1 again, and the outcome would be like this:

See, 55/47.5 is already greater than 1.00. Theoretically it's impossible to get past §100. And beyond §5,000 prize is logic error, so it's even more impossible.  Nikel  Talk  –  Vote!  06:37, March 30, 2014 (UTC)