Download

Understanding item quality generation

Following this post, Tutorial: Understanding Arbitrary Item Quality - Unreal Engine Forums
I wanted to build a simulator for item quality generation. However, to do that I miss some information.
the post above explains how to calculate it for a gven CAQ, IQM and X value. However, it does not explain how to get such values, starting from the allowed ranges.

For IQM and CAQ, one has allowed ranged for IQM and CQM. Does the game just generate a random number in this range, with flat uniform probablity?
Regarding X, again the post stats that the range is {0, AIQ*RRO}, is this also generated with random uniform probability in this range? This would look odd to me, as it would lead to very large probabilities to get low quality items even in the best crates of the game.

Following the example in that post, for the riot shield, and using
CQM min = 3.25
CQM max = 4.0
of the deep sea loot crate, and using
IQM max = 1.25 (as in the post)
IQM min =1.25 (no idea of what is the correct value, just assuming the best case)

and assuming CAQ, IQM and X are all generated with flat uniform distribution, I get (by generating 10.000 items randomly with my code)
Probability for primitive riot shield: 43%
Ramsh: 12%
Apprentice: 18%
Journeyman: 18%
Mastercraft: 8%
Acendant: 0% (impossible, as stated in the post above)

Is this really correct?