Opened 3 years ago

Closed 3 years ago

#12503 closed defect (fixed)

ULTIMA8: Resurrection Book contains Wrong Text

Reported by: cefotaxime Owned by: mduggan
Priority: low Component: Engine: Ultima
Version: Keywords: original
Cc: cefotaxime Game: Ultima VIII: Pagan

Description

There is a open book entitled 'resurrection' at the first story of the Monastery, which contains the text about 'intervention'.

Attachments (2)

K-002.jpg (159.7 KB ) - added by cefotaxime 3 years ago.
K-003.jpg (128.2 KB ) - added by cefotaxime 3 years ago.

Download all attachments as: .zip

Change History (9)

by cefotaxime, 3 years ago

Attachment: K-002.jpg added

by cefotaxime, 3 years ago

Attachment: K-003.jpg added

comment:1 by mduggan, 3 years ago

Will check it out. Do you happen to know if the original game has the same behavior?

comment:2 by mduggan, 3 years ago

I took a look at the usecode. It seems to be a bug in the original game script, I'm interested if it's triggered by the original game too.

Here's the part that prints the description:

    0B70: 0F    calli       04h 0011h (uword Item::getQuality())
    0B74: 6E    add sp      -04h
    0B76: 5E    push        retval
    0B77: 0A    push byte   65h
    0B79: 24    cmp
    0B7A: 51    jne     0026h   (to 0BA3)
    0B7D: 59    push        pid
    0B7E: 0D    push string "Intervention "
    0B8F: 6B    str to ptr
    0B90: 40    push dword  [BP+06h]
    0B92: 0F    calli       08h 0049h (process Item::bark(char* str))
    0B96: 65    free string [SP+04h]
    0B98: 6E    add sp      -08h
    0B9A: 5E    push        retval
    0B9B: 54    implies     01 01
    0B9E: 12    pop     temp
    0B9F: 53    suspend
    0BA0: 52    jmp     02A6h   (to 0E49)
    0BA3: 40    push dword  [BP+06h]
    0BA5: 0F    calli       04h 0011h (uword Item::getQuality())
    0BA9: 6E    add sp      -04h
    0BAB: 5E    push        retval
    0BAC: 0A    push byte   66h
    0BAE: 24    cmp
    0BAF: 51    jne     0026h   (to 0BD8)
    0BB2: 59    push        pid
    0BB3: 0D    push string "Resurrection "
    0BC4: 6B    str to ptr
    0BC5: 40    push dword  [BP+06h]
    0BC7: 0F    calli       08h 0049h (process Item::bark(char* str))

So book type 0x65 should be Intervention, and book type 0x66 should be Resurrection.

But then further down in the bit that actually opens the book:

    1680: 0F    calli       04h 0011h (uword Item::getQuality())
    1684: 6E    add sp      -04h
    1686: 5E    push        retval
    1687: 0A    push byte   65h
    1689: 24    cmp
    168A: 51    jne     0013h   (to 16A0)
    168D: 59    push        pid
    168E: 4B    push addr   [BP-02h]
    1690: 57    spawn       00 02 0577:1B74 (SGBOOK::1B74)
    1697: 5E    push        retval
    1698: 54    implies     01 01
    169B: 12    pop     temp
    169C: 53    suspend
    169D: 52    jmp     02B8h   (to 1958)
    16A0: 40    push dword  [BP+06h]
    16A2: 0F    calli       04h 0011h (uword Item::getQuality())
    16A6: 6E    add sp      -04h
    16A8: 5E    push        retval
    16A9: 0A    push byte   66h
    16AB: 24    cmp
    16AC: 51    jne     0013h   (to 16C2)
    16AF: 59    push        pid
    16B0: 4B    push addr   [BP-02h]
    16B2: 57    spawn       00 02 0577:1B74 (SGBOOK::1B74)
    16B9: 5E    push        retval
    16BA: 54    implies     01 01
    16BD: 12    pop     temp
    16BE: 53    suspend
    16BF: 52    jmp     0296h   (to 1958)
    16C2: 40    push dword  [BP+06h]
    16C4: 0F    calli       04h 0011h (uword Item::getQuality())
    16C8: 6E    add sp      -04h
    16CA: 5E    push        retval
    16CB: 0A    push byte   66h
    16CD: 24    cmp
    16CE: 51    jne     0013h   (to 16E4)
    16D1: 59    push        pid
    16D2: 4B    push addr   [BP-02h]
    16D4: 57    spawn       00 02 0577:1D26 (SGBOOK::1D26)
    16DB: 5E    push        retval
    16DC: 54    implies     01 01
    16DF: 12    pop     temp
    16E0: 53    suspend
    16E1: 52    jmp     0274h   (to 1958)

So both 0x65 and 0x66 spawn the same book contents (SGBOOK::1B74, "The spell of Intervention ... "), but then a *second* branch for 0x66 spawns the true Resurrection book contents (SGBOOK::1D26, "The Spell of Resurrection").

I expect that the same bug existed in the original game and there's actually no way to get the correct text here, but if the original behaves differently I'd be really interested because it means we're not executing the usecode exactly as the original.

comment:3 by cefotaxime, 3 years ago

Dos game shows the same behavior, right. So I'm afraid there's no way to fix this bug as you mentioned.

comment:4 by mduggan, 3 years ago

Thinking about it, I can actually hack the original text in as a workaround, as much of a hack as it would be it might be nice to restore the original text, since someone went to the trouble of writing it!

I'll leave this ticket open to do that.

Version 0, edited 3 years ago by mduggan (next)

comment:5 by digitall, 3 years ago

Keywords: original added; resurrection removed
Priority: normallow
Summary: a mismatch between the book title and the textULTIMA8: Resurrection Book contains Wrong Text

The keywords are used to mark various types of bugs including "original" meaning this occurs in the original engine and thus is a lower priority... though nice to get fixed.

comment:6 by mduggan, 3 years ago

Fixed this in 29e07a483e57759e43389cf30cd02bc0c9f30321. It needs an updated ultima.dat to work, but with that it should display the originally intended text.

I fixed English, French, and German versions. Japanese doesn't have this bug in the usecode interestingly, and Spanish I don't have a copy to check.

comment:7 by mduggan, 3 years ago

Owner: set to mduggan
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.