Im thinking of using gems as high value item you can trade in your briefcases for as a way of taking up less space and something to work towards
looking at the gem code it looks as if there is the same chance for them all to spawn rather then some more rare then others
if (_isMine) then { if((random 10) <= 4) then { _gems = ["ItemTopaz","ItemObsidian","ItemSapphire","ItemAmethyst","ItemEmerald","ItemCitrine","ItemRuby"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; };
Would the code below work to make it so each gem has a different spawn chance?
if (_isMine) then { if((random 20) <= 7) then { _gems = ["ItemTopaz"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; {else} if((random 20) <= 6) then { _gems = ["ItemObsidian"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; {else} if((random 20) <= 5) then { _gems = ["ItemSapphire"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; {else} if((random 20) <= 4) then { _gems = ["ItemAmethyst"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; {else} if((random 20) <= 3) then { _gems = ["ItemEmerald"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; {else} if((random 20) <= 2) then { _gems = ["ItemCitrine"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; {else} if((random 20) <= 1) then { _gems = ["ItemRuby"]; _gem = _gems select (floor(random (count _gems))); _selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]]; }; };