I've looked into csharp-assembly code of 3.0.3+wm1+2 to see how this random thing works:
private void SetSeed()
float single = base.transform.position.x;
Vector3 vector3 = base.transform.position;
Random.seed = (int)(single + vector3.z) * GameState.s_playerCharacter.name.GetHashCode() + WorldTime.Instance.CurrentDay;
Chests are filled with loot when opening for the first time. For "randomizing" calculation, not only day of month matters, but also numeral hash of player character name, so differently named characters may get an "x" day(s) offset of loot, but still the same order of it.
If GameState character is the one currently selected, contents may be different when opened by characters with different names.
There doesn't seem to be any checks for difficulty, char level or stats anywhere.
Game engine uses seed to sort the order of loot list (not to select a single item from it), and assembly code adds first item from sorted list using some weird-looking code that checks weight of all "random" items.
Changing a single byte of default flag value in LootList:Evaluate() made all chests and corpses in the game to have all possible "random" loot at once. I can't point to the byte in original .dll bc reflexil changes the binary too much on any save.
Edited by digited, 18 August 2016 - 02:33 AM.