Users browsing this thread: 1 Guest(s)
Question About Dialogue Parsing

#1
Posts: 6
Threads: 3
Thanks Received: 0
Thanks Given: 2
Joined: Jul 2020
Reputation: 0
Status
None
I've been playing with FF6LE Rogue to experiment with event and map editing, and downloaded the source code to mod it to give me a window to extract and parse the event steps based on the event address given so I didn't have to reference a separate file, and I found that my dialogue table that I ripped from the ROM became off by one place starting at index 123 and would display the wrong line.

This happens when Kefka first visits Figaro Castle and Edgar talks to him.  I clicked on Kefka to check his event, and it says to display dialogue box 0x007C (124) = index 123.
[Image: pIFQ5Y5.png]

According to FF3usME, line 123 is this, which is what I was expecting:
[Image: c8ntzAD.png]
The "TROOPER: Allies? The Empire and this back-water, two-bit kingdom?!" line doesn't even appear in FF3usME, however it's there in my lookup table:
[Image: mbNsykc.png]
And it's there in the hex:
[Image: cSo4fxC.png]

So, my dialogue table is simply null-delimited, where it assumes a null (0x00) character indicates the end of a dialogue line and breaks them up accordingly.  However, because FF3usME is skipping this line (possibly because it's unreachable?) and it's not the correct line for the event, I was wondering how to find the actual dialogue index from the hex if it's not just "split by null terminator and then count".  I'm loading the same ROM file into both (FFIII US v1.0, headerless).
  Find
Quote  

#2
Posts: 132
Threads: 2
Thanks Received: 132
Thanks Given: 14
Joined: Apr 2015
Reputation: 18
Status
None
There's a dialogue pointer table at CC/E602 through CC/FE18 (right before the dialogue itself) that tells the game where each dialogue entry begins. Each pointer is two bytes, so you have to add either CD/0000 or CE/0000 to get the absolute address of the dialogue entry. It determines which bank (CD or CE) by comparing the dialogue index with the 16-bit value at CC/E600 (1574 in the US version). In other words, dialogue 0 through 1573 are in bank CD and 1574 through 3083 are in bank CE.

That's interesting that there's an unreachable dialogue entry hiding in there. From the context, it looks like that message was intended to follow directly after the previous one, so they must have accidentally put in a null-terminator instead of a new page. The Japanese version doesn't appear to have this issue:

Code:
Dialog entry 123:

エドガー「同盟を結んでいる\n
 わが国へも攻め込まんという\n
 勢いだな。\page
帝国兵「同盟?ねぼけるな!\n
 こんなちっぽけな国が!
  Find
Quote  
[-] The following 2 users say Thank You to Everything for this post:
  • Fast Moon (07-27-2020), madsiur (07-27-2020)

#3
Posts: 6
Threads: 3
Thanks Received: 0
Thanks Given: 2
Joined: Jul 2020
Reputation: 0
Status
None
All right, I regenerated the list based on the address pointers and it seems to be aligning better with what FFusME has.  For the curious, when I exported the script based on address pointers and compared it to the script based on null terminators, I found one other "missing" line:

[Image: 7lh93GO.png]

My confusion had also stemmed from the fact that despite having those extra lines, my array was still the same length as FF3usME's, but it turns out there's two duplicate array pointers in the pointer list, one for line 1421 and 1422 (TERRA: I remember it all... I was raised in the Esper World) and one for 1654 and 1655 (TERRA: I'm all right.  I'm sure peace is within our grasp!).  FF3usME has these lines duplicated at these indices as well.  So the two duplicate lines in the pointer version and the two "missing" lines in the null-terminated version had left me with the correct array length overall even if the content was wrong.

Thanks again for your help!
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite