Comparing info on OpenTESArena's wiki and the info on UESP added by KShrimp in 2017 and the info is pretty close, but with a few missing pieces of information. (On UESP for Fire Daemon and Homoculus it says Loot=none, but that was a mistaken edit I made. They were originally blank. It looks like it was information that was simply overlooked or skipped at the time.)
My two questions are:- Why/How is gold different than the others?
- How is a Monster's Level considered for loot drops?
What I seem to know:OpenTESArena's wiki points to 0x3B135 as the start for the percent chance of monster loot drops using DWORDs for each monster. Comparing that to UESP's info and it matches up that a DWORD has 4 bytes and each byte represents a % chance for a monster to drop a certain type of loot. (Gold / magic item or potion / low quality item / magic armor or weapon) These are in the sort order for Monsters: (Rat, Goblin, Lizard Man, Wolf, Snow Wolf, Orc, Skeleton, Minotaur, Spider, Ghoul, Hell Hound, Ghost, Zombie, Troll, Wraith, Homonculus, Ice Golem, Stone Golem, Iron Golem, Fire Daemon, Medusa, Vampire, Lich).
After lining up the code with the monsters, we see that the first 4 bytes (DWORD) aren't used (at least not with the monster list) and the DWORD for RAT starts at 0x3B139. Ignoring the first byte for GOLD at the moment, you can simply convert the rest of the bytes from HEX to DECIMAL and they match KShrimps edits as % chance of those types of loot drops from those monsters.
The two oddities:- You can't just change the % chance of magic item for a RAT and get magic items. It also requires the rat's LEVEL to be raised.
- Monster Levels are single bytes starting at 0x42096 and are sorted by the monster list.
- %chance for GOLD is all wacky.
- I don't know how KShrimp arrived at those values
- Although in the code the %chance seems to increase with the monster difficulty, KShrimp's edit seem to reflect closer to what actually happens. From HEX 0..32 (DEC 0..50) the percent change increases. From HEX 32..64 (DEC 50..100) the percent chance decreases. Where a value equals a 50% chance for other items to drop, it is approximately a 25% max chance for GOLD drops and if the value is higher the %chance lowers from 25% down to 0%.