On the chance to drop, this is now in.
Code: Select all
chancedrop = static_cast <float> (rand()) / (static_cast <float> (RAND_MAX / 100));Code: Select all
chance = (float)rand()/((float)(RAND_MAX))*100;What does the static cast actually do? I also brought in a random seed. One thing I found was that the loottable never resorts. So things at the top of the loot will always have a higher chance does that make sense? Unless you sort the loot table drops at every roll, those at the top have a higher chance. If you have a list of 20 items to be dropped unless you resort, those at the bottom may never drop. I hope that makes sense? I seem to remember bringing in chrono and using the time as a random seed.