Twitter acquired Threader! Learn more

foone
+ Your AuthorsArchive @Foone Hardware / software necromancer, collector of Weird Stuff, maker of Death Generators. (they/them) ko-fi: ko-fi.com/fooneturing Oct. 22, 2021 2 min read

ALFRED!

ahh yes my favorite line from Batman Begins
"dialog ID not specified - please set NPC's message ID
no matching dialog found - please make an entry in dialog table"

it looks like this game wouldn't be hard to get the text from but getting all the portraits would mean playing through the whole game which I'm not sure I can handle right now

BATMANGEGINSBBGE69-

this game is playing weird tricks with pointers in the dialog boxes.
like, if I change the metadata of line A to the metadata of line B, instead of changing line A, it seems to make the game jump right to line B

me: hmmm maybe if I change this one byte I can get it to change the avatar?
the game: ÆÆÇÇÈÈÉÉÊÊËËÌÌÍÍÎÎ
me: ok thanks

it seems that each dialogue line is ending with a pointer back to itself?

WHY?

are they parsing the dialogue BACKWARDS?

anyway I think I may have figured out a way to make the game play the wrong dialogue
this doesn't let me change the portrait being showed, but I can just iterate through every valid dialogue in the game

yep
it's doing it backwards.

what the fuck, ... who made this thing?

Vicarious Visions!
WHAT THE FUCK, VICARIOUS VISIONS?

there's a pointer to the end of a dialogue script, and then the game follows a linked list BACKWARDS through the lines until it... somehow figures out it's at the first one, and then plays it from the last to the first, which is now the correct order

todo: figure out how it knows it's the first/last entry

I'm pretty sure, based on how this format works, the first line of dialogue in this game should be Batman screaming NETHERLANDS

yeah that looks right

what the fuck, alfred?

progress. I've now convinced Alfred to read me my line back in... dutch, I think?

unfortunately this has a downside: it proves that the portrait-to-use is not stored with the dialogue. That's a Batman line right there, but it's loading Alfred's portrait

back to the drawing board, better known as the screaming at hex editors board

line 1:
line 2:

so I think I found the metadata metadata metadata.
this think is links to links to links

MAYBE SOME OF THESE BYTES CHANGE THE FUCKING PORTRAITS

ALFRED?
WHERE ARE YOU?

I think I maybe figured out where the portrait pointers are stored

correction: pointer to a pointer to a portrait.
if not more

I have turned alfred into batman
this is a great success

BINGO! I can now iterate all the portraits.
Only minor downside: I have no idea who this is

this game understands the real hierarchy:
Alfred is portrait 0
Batman is portrait 1

progress.
here's the first 16

portrait 46 is THE BLOOD

here's all 38 images. I think there's only 38, they're all invalid after 37... at least the first 10 are. I should probably check at least 256 of them

112 is another BLOOD.
no more portraits discovered yet

159:
no batman
no thug
no dialogue
you're free
gotham is safe

the rain continues

PINKLAND

red and brown

checked 512 possible images and found these 43. seems that's all


You can follow @Foone.



Bookmark

____
Tip: mention @threader on a Twitter thread with the keyword “compile” to get a link to it.

Follow Threader