U2 Hotel Clerk Fix

Another quality-of-life fix coming in the next Ultima 2 Upgrade is a change to the Hotel California clerk. Players eventually learn they should go to the clerk and offer gold. In exchange the clerk will raise a random stat by 4 points per 100 gold offered. However, players may notice that the clerk will sometimes not raise their stats but take your money anyway. The common workaround is to begrudgingly reload the game so as to not lose hard-earned gold. Players will then simply retry-and-reload as needed until a stat is raised. In v2.0 I’ve ensured the clerk will always simply raise a random stat and never just pocket your gold.

This is the assembly code in Ultima 2 that determines whether you get a stat boost or not:

call 5217     ; gets random number in al
and al,07     ; constrain to value 0-7
cmp al,06     ; compare al to 6
jb 3d8a       ; if al < 6, jump to stat boost logic
jmp 3cb6      ; otherwise (values 6 or 7), you get robbed

What’s happening here is that the game is using a random number between the values of 0-7 to determine the stat id. Since there are six stats, only values 0-5 are needed. But if you get a value of 6 or 7 you are out of luck and the clerk says the dreaded “Thank you very much!”.  So you essentially have a 75% chance of a stat upgrade. It does seem a bit unfortunate that the only reason for the 25% failure rate is because of the choice of logic used here.

I’ve changed this so that the random number is always generated using modulo. So, stat = rand % 6, which is essentially the remainder of a division operation.

call 5217     ; gets random number in al
mov ah,00     ; widen value to 16 bits
mov cl,06     ; divisor = 6
div cl        ; al = rand/6, ah = remainder
mov al,ah     ; use remainder for stat id

This fix ensures the clerk will never just pocket your gold and a stat will always be raised.

Ultimately, a better solve to this problem would be to allow the player to pick which stat they want raised for their money, which is something that’s done in nearly every Ultima game since. But that has a much greater complexity and will have to wait for now.

6 thoughts on “U2 Hotel Clerk Fix

  1. I’m not sure I like this fix myself. I think the intended outcome is for it not to always happen.

    It’s a really annoying mechanic, but it’s an original mechanic from the game that I think works as intended.

    I suppose that having this as an option as the autosave in the configuration of the upgrade patch, will be a good idea.

    1. Hey Natreg. First off, thanks for the feedback! I wanted to take some time to ponder this a bit before replying.

      There are many gameplay aspects of U2 that I feel are annoying in this way and IMHO are part of what contribute to it’s reputation. So, in the interests of improving the gameplay experience it was definitely my intention to make this part of the default behavior.

      You however make a good point about assuming intent. I think I was also biased in part by an inability to get the “Thank You Very Much” response from the Apple II re-release. However, I’ve since been able to replicate it.

      Anyway, while I don’t plan to get to it with this release, I expect to add an option to toggle this (and other planned gameplay fixes) individually. It’s going to be a long list. 😉

      1. Nice to hear that 😀

        Ultima II is really annoying sometimes, but I think the intended gameplay should be maintained. However having the option to turn certain aspects of the game on/off would be a great addition.

        Again, looking forward for the next version.

Leave a Reply

Your email address will not be published. Required fields are marked *