One of the big new features in Unnamed Update is the revamped loot system. I've been working on this for quite some time as part of other features I've been doing. The most visible change is that players will now get the new consumable crates in battlefield loot crates after enemy units are destroyed. Internally there have been a lot of changes.
Where there used to be just one loot table, there are now a number of them for various features within the game, and the loot you get from any particular loot table will change as players advance in level. I also reworked the way the game determines the value of units within the game so that more valuable units give more loot.
I took the last step with the planned changes to the loot system this week and made it so I can accurately specify the probabilities of getting any particular piece of loot. In the old system every loot item had a point value assigned to it. The loot system summed the point values of all the items in a loot table and picked a random number in that range to select the loot item for the player from the table. Once I had things such as Attribute Crates where I wanted them to have specific probabilities, this system fell apart because the probability for an item depended entirely on what other items were in the loot table.
To specify these new precise probabilities I initially used floating point numbers. It seemed the natural way to do it. Sum the probabilities, select a random in the range 0-1 and off you go. It turns out that floats are fraught with peril when you are concerned with the accuracy of an item's probability. The first problem I encountered was that if I had 11 items each with 1/11 probability of being chosen, the sum of the probabilities was actually a little bigger than 1?!? That's because floats can't accurately represent all numbers and addition compounds individual items' errors. The next problem I ran into is that floats only have 7 significant digits so any one-in-a-million super-rare items weren't going to work. In the end I ripped out the floats and went back to integers where every item in the table has a chance out of million. I also added a report so I can see all the loot tables in the game and it checks that none of the loot tables have total probabilities greater than 1000000/1000000. To help ensure those probabilities are accurate, loot is now running on a crypto-grade random number generator.
I'm still tweaking the loot system. At the moment players get loot a lot less often (fewer crates on the battlefield) however individual crates can have a lot of items in them. The loot system takes into consideration the player's Luck Attribute, if they have a luck consumable (not yet available) and in PvP, the level difference of the players. Double loot weekends are also now just a database value change away. On the server side, the old system for selecting loot wasn't very efficient, this new one is much faster.
We were unable to retrieve our cookie from your web browser. If pressing F5 once to reload this page does not get rid of this message, please read this to learn more.
You will not be able to post until you resolve this problem.