Status
Not open for further replies.

Mokonzi

Former Developer
I've noticed in the setup of cards I've got, that when I buy a pack for a certain level with the percentage set at 600% , I end up with more of a chance of getting the first card or cards in the set, than the later ones.

A bug in the random calculation?
 
That's true, but seemingly the card in question that I keep getting (four out of a five card deck often) is 650% rarity... the next to highest in 23 cards of that level... I'm beginning to wonder if the percentage is working backwards...
 
IIRC there are issues if you don't set a rarity for *every* card in the pack.

If you only set the rarity for some then it throws off the equation. Could that be your issue?
 
It might be, not everything has a set rarity. But a lot of cards have a lower rarity (10% as compared to %650), how come they don't end up being picked? Will try setting a minimum rarity on all the cards later.
 
Mokonzi - The rarirty will step through each card in ascending order, and if none are found it'll loop back until it finds a card in the random level it's chosen. This is working as designed so cards further down the list are progressively harder to get combined with the % chances. I may implement some other alternartive random algorithms in the future to give users a choice as this method may not be there preference :)

Beyond that though, computers stink at random :D
 
Hmmm, in other words, I've got the rarity in reverse order... :D

I'll take another look at it tomorrow when I've had time to sleep enough to hopefully start thinking logically... :D

Thanks for the patience. :)

Edit:

"Ascending order", i.e. 10% is rarer than 600%?
 
Yes, 10% is rarer than 600%, the best way to think of it is:

"Your chance of getting this card is 10/1000" (Which is 1/100)
or
"Your chance of getting this card is 600/1000" (Which is 3/5)
 
Cool, that makes sense. I did notice the AdminCP says this about the card rarity:

The card rare value determines how rare a card is by chance. It is designed with the scale 0% - 1000% in mind, where 0% means it's extremely easy to obtain and 1000% means it's extremely rare. You do not need to enter % here, just the number.

You might need to adjust that... :)
 
Status
Not open for further replies.
Back
Top