When do the merchants change their inventory?

So as I go around doing quests, I notice that the merchants change their inventory since I last looked, what triggers this?


Solution 1:

Merchants have a basic inventory that never changes that consists of common and miscellaneous items, but their uncommon and up inventory changes.

I don't know the exact details, because it seems fairly random due to sometimes them changing when I leave for 1 second, and sometimes not changing for 10 minutes.

I'd hazard a guess at one of the following, and I'll clear this up once I've researched it more:

  1. It's similar to dead bodies despawning in that if you can't see them for a limited amount of time, then they despawn, maybe you just have to leave the immediate area for x amount of time.

  2. I think this is the more likely one, perhaps there's a hidden timer that causes them to change their inventory similar to the special deals in Borderlands. Say every 15 minutes the inventories change, whether that's 1 minute from when you see them, or 10 minutes from when you see them.

Solution 2:

It's based on the system time in some way. A quick Autoit script confirmed this. If anybody wants it, here's the autoit script to increase time and date by an hour each time you press CTRL+Z.

#include <Process.au3>

$month = 1
$day = 1
$year = 2011
$hour = 0
HotkeySet("^z", "IncreaseTime")

while True
    sleep(100)
WEnd

Func IncreaseTime()
    $hour += 1
    if $hour == 24 Then
        $hour = 0
        $day += 1
        if $day == 28 Then
            $day = 0
            $month += 1
            if $month == 13 Then
                $month = 1
                $year += 1
            EndIf
        EndIf
    EndIf
    _RunDOS("date " & $month & "-" & $day & "-" & $year)
    _RunDOS("time " & $hour & ":00.00.00")
EndFunc

EDIT: After I posted this, I realized it might be a good idea to mention that you should reset your system time and date back to the real time after you're done. If you don't, things like SSL may stop working. Just edit your time and synch with internet servers.