+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  What if there are no dialogue pointers?
Pages: [1]
Author Topic: What if there are no dialogue pointers?  (Read 1 times)
Magil
Guest
« on: April 24, 2010, 10:24:57 am »

Well, I'm currently investigating Dragon Quest VII. I've been concentrating on dialogue and font decompressing function, so I overlooked the dialogue pointers. Today I took a look at the code, and found the dialogues are actually hard-coded. That will definitely make the modification task much harder.

So does anyone ever encountered a similar situation like that?
Tauwasser
Guest
« Reply #1 on: April 24, 2010, 10:29:01 am »

First off, what do you mean with hard-coded? Really hard coded as in there is substantial asm for almost every text? Or just some tables etc?
I find it hard to believe that any rpg would hard-code text except on a few occasions, since there is so much text.

cYa,

Tauwasser
KaioShin
Guest
« Reply #2 on: April 24, 2010, 10:29:53 am »

Hard coded into the script code? Introduce a new control code that loads a pointer and then gets the text from wherever it points to. Then just insert that CC with pointers to your script into the script code everywhere. That way you can fit whatever script you want in the game without changing the size of the original scripting shit.
Magil
Guest
« Reply #3 on: April 24, 2010, 08:24:22 pm »

Quote from: Tauwasser on April 24, 2010, 10:29:01 am
I find it hard to believe that any rpg would hard-code text except on a few occasions, since there is so much text.

Here's an example.
Code:
;condition 1
80135DA4\tlui    a0, $8240 ;dialogue pack id 8240
80135DA8\tj      L135db8 [$80135db8]
80135DAC\tori    a0, a0, $1360 ;bit offset 1360

;condition 2
L135db0:\t; 80135DB0
80135DB0\tlui    a0, $8240 ; dialogue pack id 8240
80135DB4\tori    a0, a0, $1304 ;bit offset 1304

L135db8:\t; 80135DB8
80135DB8\tjal    func41c88 [$80041c88] ;call dialogue function: func41c88(a0)
80135DBC\tnop


The dialogues use Huffman compression, so the parameter holds bit offset to the line. I was thinking about a new pointer look-up table, if it is not too long.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC