How do you adjust Drop Rate

lootXChance (array) determines the chance for each loot slot - in my db for normal difficulty it says 95 (slot 1), 25 (slot 2).
So if the hero can drop 5 items, the first item slot will take the first value from each of these lootXChance and roll the dice. (loot1: 95; loot2: 905; roughly 1 out of 9 will use the first loottable).
The first loottable has epics and legendaries, and again with the weights the same as with determining the droptable. with the values (100 Epic & 3 Legendary) you would get 3 Legendaries out of 100 drops from that table (or 1 out of 33 - 3% chance to gain a legendary when this table is chosen, or whatever you want to call it :D).
and than the same for the second slot and the third (which is 0, so no legendary from there) the amount of slots is determined by those two equations (numSpawnMinEquation & numSpawnMaxEquation).

Also, I kinda want to make all quest rewards give a random legendary/epic item. My thought process is to copy the quest reward database that the final Act4 quest does (the one that gives you legendary item). Could you also help me with that?

you would have to change every quest reward inside the quest file - check out the guide for the quest editor stuff that should tell you everything you need to know about how to change the rewards :slight_smile:
you could add a new reward with the loottable used by the quest you referred to, its likely the same as the one for heroloot (records/items/loottables/mastertables/mt_hu_miscall_d01.dbr)
assuming you went through the guide’s quest section - add an action to the completion for the last step (with all the other rewards). from the list pick “GiveRandomItem” and use the legendary loottable (this is me assuming its the same being used for the reward of that other quest :))

Im typing all this quickly, so ask me something if you have to, Im hoping pointing you in the right direction is enough :slight_smile:

PS: epics should be in records/items/loottables/mastertables/mt_hu_miscall_c01.dbr