Ultima Online Five on Friday Q&A
-
Category: News ArchiveHits: 834
The way that Luck factors into loot distribution has been addressed many times, but never has any dev team member ever explained what actually happens *after* a Luck roll is successful. So: What really happens when a character's Luck roll is successful? We know that loot amounts and intensities go up, but by how much? And what decides by how much?
Wow. Finding the answer to these two questions has been an adventure. I'm going to answer them both at the same time, since they're connected.
First off, you should know that this discussion is focused on the monster loot generation system. Every monster (every mobile, really) in the game has the opportunity to have a basic set of loot available when it dies. These loot tables are assigned to each type of monster in a set of predefined files, which contain the type of loot available and the range of item property intensities to add on to them. It is possible to generate loot outside these files, and some systems (like the Doom artifact system) take luck into consideration when making rewards. However, for the sake of these two questions, I'm going to ignore everything but how normal loot generation actually works.
Luck, in this way, can affect:
Number of items
Number of properties on items
Intensity of properties
A (luck roll) is defined as a roll against a chance of 1:100.
Before this roll is done, your luck is modified to fit that scale, so your luck directly converts to a percentage of chance that your luck will modify the loot.
The formula is: chance = round(luck ^ (5/9)). Results are rounded to the nearest whole number.
Luck Chance
0 0%
100 13%
200 19%
300 24%
400 28%
500 32%
600 35%
700 38%
800 41%
900 44%
1000 46%
1100 49%
1200 51%
1300 54%
1400 56%
1500 58%
And so on
This chance is evaluated as the RNG versus your luck. So if it rolls 30, and you have a luck result of 56, you win. The RNG can roll from 0 to 99, then tests whether its roll is less than your result.
I can officially verify that it's impossible to (roll over) with too much luck, and not get anything.
Number of Items
Within each loot definition for the monster, there are a total number of items that it can potentially create. This is random, ranging from one to the max number available.
The luck roll can add one more item to each definition, if that number doesn't exceed the max.
For example, let's make up a case where we have two loot definitions:
The first definition has jewelry, max 3. It rolls between 1 and 3. Alas, the result was 1. You only get a bracelet.
If you make your luck roll here, this will increase by one. You now get two items.
The second definition has weapons and armor, max 3. It rolls between 1 and 3. The result was 3. Thus, you might get a bow, a shield, and a mace.
You already rolled 3 (the max), so luck is ignored.
Number of Item Properties
The same thing described above works exactly the same for the number of properties on an item.
Item Property Intensities
Finally, the luck roll also modifies the actual intensity of any magic property, as long as it doesn't exceed the property's max.
This part is somewhat tricky. Every loot definition has an intensity range attached. This actually modifies the range available compared to the item property's actual range.
For instance, Damage Increase has a range of 1 to 50. A loot definition might declare an intensity range of 0.25 to 0.3. This would mean that the available range for DI is really 13 to 15 for that item.
The initial intensity is a random number within that range. In our case, let's choose 14.
If we make our luck roll, our intensity is increased by 10% of the *item property's max value*. So, 10% of 50 is 5. Our result is 19. However, that's outside of that nice 13 to 15 range we established: it'll cap at 15.
And that's how luck affects the loot tables!
I think it's broken though. Not in the actual code, but in all the thousands of loot table definitions. A huge portion of them don't even allow players to have more than one item from a loot definition, negating the entire point of luck! That's not even beginning to cover the actual intensity range definitions. I'm willing to bet that the loot tables themselves are the ultimate cause of luck not working properly, and need to be reviewed.
-Draconi