News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Dragon Warrior 1, 2 & 3 Hacking Discussion  (Read 148952 times)

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #220 on: July 06, 2020, 10:12:02 pm »
Ok, looks like that whole idea of creating the king/queen gendered opcode was a massive waste of effort. First of all, when you return the Golden Crown and become the new king of Romalia/Romaly, even if your hero character was female, the game now has the character coded as male. But I wasn't thinking straight regardless, because even if the character kept their gender through this event, having the sprite show up as the male king with the big ol' mustache, you would still have this dissonance when the character is addressed as queen. I'm sure it would take a nice chunk of new ASM code to have the game check your gender, and, if female, create the royal character with the queen/princess sprite and appropriate gender indicator.

I do think that this would be a really cool and worthwhile validation for female hero players. Hopefully, I'll be able to revisit the idea one day when my hacking skills have improved.
« Last Edit: July 06, 2020, 10:21:03 pm by Chicken Knife »

Choppasmith

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #221 on: July 06, 2020, 10:28:50 pm »
Ok, looks like that whole idea of creating the king/queen gendered opcode was a massive waste of effort. First of all, when you return the Golden Crown and become the new king of Romalia/Romaly, even if your hero character was female, the game now has the character coded as male. But I wasn't thinking straight regardless, because even if the character kept their gender through this event, having the sprite show up as the male king with the big ol' mustache--yet being addressed as queen--would have created a lot of cognitive dissonance. Obviously, it would take new ASM code to have the game check your gender and, if female, create the royal character with the queen/princess sprite and appropriate gender indicator.

I do think that this would be a really cool and worthwhile validation for female hero players. Hopefully, I'll be able to revisit the idea one day when my hacking skills have improved.

See, my issue is the remake script features a quite a hefty amount of unique dialog that the opcodes just won't cover, so I think I am  going to make two patches/scripts. One being a Default Male/Female option and the other being a Default Female/Non-binary Option. Since the Data Crystal has the sprite pointers, those should be easy to swap and I like people having options!  :laugh:

Since I know that's a thing now, I'm all the more inspired to do that!

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #222 on: July 07, 2020, 06:18:52 am »
See, my issue is the remake script features a quite a hefty amount of unique dialog that the opcodes just won't cover, so I think I am  going to make two patches/scripts. One being a Default Male/Female option and the other being a Default Female/Non-binary Option. Since the Data Crystal has the sprite pointers, those should be easy to swap and I like people having options!  :laugh:

Since I know that's a thing now, I'm all the more inspired to do that!
Hmmm, interesting idea to split into two versions. I don't think that would be suitable for my project, but it sounds like a good potential solution for yours. As you know, I've done some work with sprite pointers in this game. Do you think DQ3 has distinct entries in the sprite pointer table for the playable king versus the generic NPC king? If that's the case, your idea would be cool.

As for my way of handling this, in the end, I reverted back my [king/queen] changes, and I introduced a conservative improvement to the text. I don't like to add unique elements to the script unless they address a clear deficiency of the game. A previous example was having the puff puff girl in DQ2 hint to come back without the princess.

The straight translation here of saying yes to Romalia's king is: "Excellent! From this day forward, [name] will reign as the king of this castle!". But immediately after that, I'm adding the line: "Now, let's get you dressed up appropriately." After which, the game immediately transitions to your playable king character. I think that this smooths out the issue of female heroes to some extent, since it conveys that they are wearing a costume and playing a part. It becomes a little more comical and less awkward, hopefully.
« Last Edit: July 07, 2020, 02:30:39 pm by Chicken Knife »

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #223 on: July 19, 2020, 08:15:36 am »
Something driving me crazy in DQ3: The inventory screen supports item name lengths with 13 characters on top and 11 on the bottom, but the Vault and shop windows only support 12 on top, 10 on the bottom.

I was contemplating changing a couple items to shorter names until the issue became apparent for "Heavenly Gown of Water" (formerly Water Flying Cloth). We worked too hard on that name. It's too perfect. But having it show up in Maira/Kol as "Heavenly Gow of Water is really crap.

The original English release did have some of this, though. Sword of Destruction was chopped in Rimuldar.

Choppasmith

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #224 on: July 19, 2020, 02:49:09 pm »
Something driving me crazy in DQ3: The inventory screen supports item name lengths with 13 characters on top and 11 on the bottom, but the Vault and shop windows only support 12 on top, 10 on the bottom.

I was contemplating changing a couple items to shorter names until the issue became apparent for "Heavenly Gown of Water" (formerly Water Flying Cloth). We worked too hard on that name. It's too perfect. But having it show up in Maira/Kol as "Heavenly Gow of Water is really crap.

The original English release did have some of this, though. Sword of Destruction was chopped in Rimuldar.

Am I right in assuming there's space in the window itself, it's just cutting off item name length or are you telling me there's no space in the window itself?

If it's the former, you'll have to use the debugger in FCEU to find those string length values, if it's the latter, you might be able to find the window width values and widen it (and you'll probably still need to find those values) .
« Last Edit: July 19, 2020, 04:11:18 pm by Choppasmith »

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #225 on: July 19, 2020, 08:38:16 pm »
The Vault's problem is that it indents the second line by 3 tiles instead of the 2 tiles used by other menus, so using a 2-tile indent should solve the problem there; the shop windows, however, are only wide enough (after reserving room for borders, cursor, and item price) for 12 tiles on the first line and (12 - indent) tiles on the second line. If this is the only case where you need to cram 13 letters into 12 tiles, one option would be to make the class name abbreviations use normal letters and re-purpose the the HrSrPr... tiles as squishy tiles. If you have many places where you want to use more than 12 tiles, however, widening the menus might be a better option, though it'll probably involve a bit of work.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #226 on: July 19, 2020, 09:00:40 pm »
Thanks for the input guys.

That's true about the weird 3 character Vault indent. Looking at that rubbed me wrong regardless. I should be able to track down that data and hopefully tweak it. I assume that setting an indent value should be a single nybble or byte?

As far as squish tiles, I'm assuming that the item names in question would have to permanently make use of the squish tiles in every instance. The inconsistency using them only in those cases would be a bit bothersome. If the whole game was VWF, that's another story, but I don't plan on crossing that bridge. I could potentially cut down the incidents of this happening in shops from two to one by changing the Sword of Destruction to the Sword of Ruin. Something to contemplate.

Btw, you mentioned cannibalizing the class abbreviations, but what about the existing squish tiles located after the asterisk: BrMaBiMe. And then there is that weird cursive looking x that appeared after the "w". I already used that one for a tilde symbol for singing. Do you guys know if those are used for anything?
« Last Edit: July 20, 2020, 09:45:24 am by Chicken Knife »

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #227 on: July 20, 2020, 09:04:16 pm »
That's true about the weird 3 character Vault indent. Looking at that rubbed me wrong regardless. I should be able to track down that data and hopefully tweak it. I assume that setting an indent value should be a single nybble or byte?
Setting a breakpoint on the PPU address for the first (post-indent) letter of the second line of a Vault item and working backwards from there in a trace log will get you the ROM address that controls the Vault indenting pretty quickly; the indents for shop menus are controlled separately.

Btw, you mentioned cannibalizing the class abbreviations, but what about the existing squish tiles located after the asterisk: BrMaBiMe. And then there is that weird cursive looking x that appeared after the "w". I already used that one for a tilde symbol for singing. Do you guys know if those are used for anything?
Yeah, if you only need a couple of squishy tiles, using those instead would be a better plan anyway :).

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #228 on: July 21, 2020, 08:18:29 pm »
Setting a breakpoint on the PPU address for the first (post-indent) letter of the second line of a Vault item and working backwards from there in a trace log will get you the ROM address that controls the Vault indenting pretty quickly; the indents for shop menus are controlled separately.
Yeah, if you only need a couple of squishy tiles, using those instead would be a better plan anyway :).
Ok, I'd love to experience a breakpoint breakthrough, but I'll need some additional guidance here.

You say to write a breakpoint to the PPU address of the first letter after the triple indent. Let's use the Staff of Thunder as an example. I'm looking to write a breakpoint to "T". In FCEUX, if I go into PPU viewer, and I can't write any breakpoints, so that's not the way. Next, I go to the hex editor and select view view PPU memory. It's probably here. Except, I can't figure out where. If I do a search for the bytes that make up "Thunder", I can't find anything. If I try to search for a sequence of graphic tile bytes, that yields nothing too. No idea where to locate the T that I write a breakpoint to.

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #229 on: July 21, 2020, 10:17:23 pm »
Ah, I see. In that case, open up the Name Table Viewer and hover your mouse over that "T" in the Name Table Viewer window. Down in the properties section you'll see it has Tile ID 38 (hexadecimal), X/Y co-ordinates 25/10 (decimal, measured in tiles), and PPU address 2159 (hexadecimal; your numbers may vary depending on the PPU's current scroll position). The important part here is the PPU address; take that over to the Debugger and add a write breakpoint on that address in PPU memory. Back in the game, you'll get hits on that breakpoint as you open and close menus and that section of the screen gets redrawn. The code around where the breakpoint fires won't be terribly interesting since it's just a loop of copying stuff from RAM, but when combined with the Trace Logger, it'll stop you at exactly the right place to start backtracking from.

Spoiler:
More specifically, here:
Code: [Select]
$CAD7:BD 00 03  LDA $0300,X @ $0308 = #$38                   A:00 X:08 Y:07 S:DE P:nvUBdIzc
 $CADA:E8        INX                                          A:38 X:08 Y:07 S:DE P:nvUBdIzc
Breakpoint 0 Hit at $CADB: $2159:EP-W--
The code there is a simple loop copying data to the PPU starting from $0303; the trace log shows it writing #$77 (left border) and then four #$00 (1 space for the cursor column + 3 spaces for indent), so we'll search backwards to find where that data came from:
Code: [Select]
                              $C81C:B9 00 04  LDA $0400,Y @ $0405 = #$38                   A:00 X:08 Y:05 S:E1 P:nvUBdIzc
                              $C81F:9D 00 03  STA $0300,X @ $0308 = #$78                   A:38 X:08 Y:05 S:E1 P:nvUBdIzc
This one's another loop, copying data from $0400 to $0303, so we'll search backwards again:
Code: [Select]
                       $861E:BD FF 03  LDA $03FF,X @ $0425 = #$38                   A:12 X:26 Y:06 S:E8 P:nvUbdIzc
                       $8621:99 FF 03  STA $03FF,Y @ $0405 = #$78                   A:38 X:26 Y:06 S:E8 P:nvUbdIzc
Another copy loop, this time in reverse, but you can still see the rest of the line being copied, so keep going:
Code: [Select]
                         $870E:A6 77     LDX $0077 = #$25                             A:60 X:06 Y:00 S:E6 P:nvUBdIZC
                         $8710:E6 77     INC $0077 = #$25                             A:60 X:25 Y:00 S:E6 P:nvUBdIzC
                         $8712:B9 04 00  LDA $0004,Y @ $0004 = #$38                   A:60 X:25 Y:00 S:E6 P:nvUBdIzC
                         $8715:9D 00 04  STA $0400,X @ $0425 = #$00                   A:38 X:25 Y:00 S:E6 P:nvUBdIzC
This loop is more interesting - only the "Thunder" part gets copied, not the border or spaces. If you were trying to find out where the string came from in ROM, following $0004 would be the next step, but here we care about the position of the string, not its origin. The write offset within the buffer is controlled by X, which came from $0077, so let's follow that instead:
Code: [Select]
                        $827A:A5 77     LDA $0077 = #$1E                             A:00 X:1D Y:0C S:E7 P:nvUBdIZC
                        $827C:18        CLC                                          A:1E X:1D Y:0C S:E7 P:nvUBdIzC
                        $827D:69 07     ADC #$07                                     A:1E X:1D Y:0C S:E7 P:nvUBdIzc
                        $827F:85 77     STA $0077 = #$1E                             A:25 X:1D Y:0C S:E7 P:nvUBdIzc
$77 += 7, huh? Let's see, after the end of the first line, there's 1 tile for the right border, 1 tile for the left border, 1 tile for the cursor column, a 3-tile indent, and then 1 tile to get to the "T", which is 7 tiles. What do you think would happen if we changed that 7 to a 6? :D

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #230 on: July 22, 2020, 08:12:33 am »
@abw, thank you for the continued information. Suffice to say I still get quite lost. Below, I'm going to paste what I noted in terms of everything I did along with all the questions I have. Hopefully this can help you help me overcome this hurdle.

$38 was the byte tile assignement

275B was my address of the black space before the T.

My Staff of Thunder was in the third position of the first screen.

On the right side of the debugger screen, I selected "Add" under the breakpoints box. For the address, there was a left and right box. I only filled out 275B in the left box. Marked "Write". Ticked off PPU Mem under Memory. Wrote "Indent" under Name.

Also running Trace Logger.

Initiates game, hits breakpoint as soon as I select "TAKE" in the VAULT menu.

Getting lists of code on the left side of the debugger app as well as with the trace logger. I'm not clear why both apps are needed when the content seems pretty similar.

I can see that the lines of code above the stop point are essentially the same between debugger info and trace logger info.

I'm confused about what a lot of the information represents. For instance, with debugger, the column that looks like "0F:CADB:8D 07 20". Not sure what that means. The STA command to the right makes sense.

Trace logger seems to display some more information. Perhaps that's the value. The first column that looks like f2393787 is consistent for hundreds of lines of code but the last digit changes a couple times. Not sure what that refers to. The next columns with A:AB X:12 Y:05 S:D7 P:NvUbdIzc would seem to show the active contents of the A/X/Y registers. But I'm not sure what the S and P refer to. Perhaps processor flags? But I'm used to seeing processor flag data represented by numbers, not letters. Middle column, we have the same info that appeared in the left column of debugger. On the right side, we see the code commands that I could probably figure out.

I assume that if I scroll up through both of these, I'll continue to see matching lines that take me back in time through the code cycle.

The notations you listed for the steps you copied above seem potentially helpful, but I think i need to get a better grasp of what I'm looking at before I can follow the logic. The documentation I've looked through for FCEUX tools tends to make a lot of assumptions about what the user already understands, and I haven't found it helpful. Hopefully the documenting of the reactions I experience while attempting to explore this stuff will help you more specifically pinpoint my knowledge gaps and what I need to grasp.
« Last Edit: July 22, 2020, 08:17:50 am by Chicken Knife »

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #231 on: July 22, 2020, 08:45:40 am »
Trace logger logs code that was actually executed during logging.

0F:CADB:8D 07 20
Bank ID:CPU address:opcode + operand

f2393787 - frame counter

S - stack pointer

P - processor status, uppercase letter means flag = 1, otherwise 0
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #232 on: July 22, 2020, 08:56:39 am »
That explanation was helpful. Thanks. I should have guessed that clever thing with the upper / lower case letters.

Trace logger logs code that was actually executed during logging.
Does the debugger do something different? Or is it just a matter of the trace logger data giving you more overall information?
« Last Edit: July 22, 2020, 09:31:34 am by Chicken Knife »

Cyneprepou4uk

  • Hero Member
  • *****
  • Posts: 504
  • I am the baldest romhacker
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #233 on: July 22, 2020, 09:48:23 am »
The debugger is a tool for inspecting and manipulating machine instructions and their execution (from fceux help). It's a main tool.

Logger is just an addition tool. However it can save you lots of debugging time if used wisely.
iromhacker.ru - NES ROM hacking tutorials for beginners. Please use Google Translate browser extension

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #234 on: July 22, 2020, 05:06:26 pm »
Looks like Cyneprepou4uk's got this covered; I'll just add that one of the benefits of a trace log is that it shows you how you got to a specific point, which is something the debugger is not good at (e.g. if the debugger snaps at a breakpoint, you can't be sure what the previous instruction was; maybe it was the instruction one line above the current line, maybe it was a jump/branch). Working backwards can also let you avoid lots of irrelevant breakpoint hits on addresses that are frequently used for things you aren't interested in. FCEUX's debugger is also not great at catching indirect uses; e.g. a RWX breakpoint on $80 does not fire for LDA ($80),Y.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #235 on: July 22, 2020, 11:01:09 pm »
Thank you, guys. Tonight I got pulled into some other activities (like putting my scripts through spell check software and... erm.. discovering some things.

@abw
Since I'm going to push out a new DQ2 update anyway, I wanted to include your Text Sound Off patch, mostly to get speaker notations consistently non-indented in the prologue. Not sure why I slept on that until now, but it seems like as good a time as ever to include it.

But here's the thing I'm stuck on: the $60 byte turns off the sound and auto-indent. Great. But how to I work that byte into table file when the left column in my table file is all binary, mostly 10 digit. Do I also need to represent $60 as binary? %01100000?

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #236 on: July 23, 2020, 09:15:26 am »
Well, ask yourself this: how does DW2's text engine work? It takes the next 5 bits of input, looks that up in the currently selected dictionary page, processes any control codes in the selected dictionary entry, and then returns the resulting string. So if you want to add a new control code, what do you need to do? Edit the dictionary so that the game is able to include it and update your table file to match the game's dictionary :P.

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #237 on: July 23, 2020, 09:22:40 am »
If all the entries are based on 5 bits of input, why are so many of the entries in the table file you initially set up for me 10 bits? Very confused about that.

But regardless, it sounds like I have to make another sacrificial lamb in the dictionary. I've already done a few of those, and whichever ones I've eliminated have always seemed to result in me taking a 20-30 character hit. I'm down to the wire on free characters, so if I'm going to do this, I'm going to have to think about tweaking more of the dictionary entries in a way that creates greater efficiency and saves me a surplus of characters. Some word searching to determine which strings of text product the most hits is probably the way to go.

All a lot of work for a bit of improved indentation formatting, but I've probably done more work for less if I'm being honest with myself.  :laugh:

abw

  • Hero Member
  • *****
  • Posts: 554
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #238 on: July 23, 2020, 08:10:52 pm »
If all the entries are based on 5 bits of input, why are so many of the entries in the table file you initially set up for me 10 bits? Very confused about that.
If you wanted to, you could change the 4 switch token labels into actual switch tokens and split that combined single table of 160 entries up into its 5 separate tables of 32 5-bit entries; I figured it was just easier to work with as a single table.

But regardless, it sounds like I have to make another sacrificial lamb in the dictionary. I've already done a few of those, and whichever ones I've eliminated have always seemed to result in me taking a 20-30 character hit. I'm down to the wire on free characters, so if I'm going to do this, I'm going to have to think about tweaking more of the dictionary entries in a way that creates greater efficiency and saves me a surplus of characters. Some word searching to determine which strings of text product the most hits is probably the way to go.
As with Choppasmith's dictionary, yours can be significantly optimized. Try the following based on your 1.11 patch; it should save you somewhere around 1700 bytes, enough to fit your entire script into the first script bank:
Code: [Select]
/%00000=[end-FC]\n
/%00001=.[end-FC]\n
/%00010=?’[FD][FD][end-FC]\n
/%00011=[.’][end-FC]\n
# 00100 is an intermediate end token, used to subdivide larger strings where the same function needs to be called multiple times with different values.
# E.g. in
# [name] [end-FF]threw away [name]'s [item] and gave [end-FF]the [item] to ghost of [name].[end-FC]
# the first [name] is the Prince of Midenhall's name, but the second and third [name] are the name of the dead party member whose items you are ransacking;
# similarly, the first [item] is the item you lose, but the second [item] is the item you gain.
/%00100=[end-FF]\n
%00101=
%00110=e
%00111=o
%01000=t
%01001=a
%01010=r
%01011=n
%01100=h
%01101=s
%01110=i
%01111=l
%10000=u
%10001=d
%10010=y
%10011=‘
%10100=f
%10101=m
%10110=g
%10111=c
%11000=w
%11001=[.’]
%11010=p
%11011=.
%11100=[switch to C0 table]
%11101=[switch to C1 table]
%11110=[switch to C2 table]
%11111=[switch to C3 table]

# C0 table
%1110000000=v
%1110000001=[wait]
%1110000010=b
%1110000011=,
%1110000100=[line]
%1110000101=I
%1110000110=k
%1110000111=[name]
%1110001000=’
%1110001001=T
%1110001010='
%1110001011=!
%1110001100=[FD]
%1110001101=W
%1110001110=?
%1110001111=H
%1110010000=S
%1110010001=M
%1110010010=Y
%1110010011=L
%1110010100=G
%1110010101=A
%1110010110=P
%1110010111=R
%1110011000=C
%1110011001=D
%1110011010=B
%1110011011=K
%1110011100=[..]
%1110011101=F
%1110011110=j
%1110011111=[item]

# C1 table
%1110100000=O
%1110100001=[number]
%1110100010=:
%1110100011=E
%1110100100=x
%1110100101=N
%1110100110=q
%1110100111=[no voice]
%1110101000=z
%1110101001=[(s)]
%1110101010=-
%1110101011=/A
%1110101100=J
%1110101101=U
%1110101110=[monster(s)]
%1110101111=[item-F9]
%1110110000=[cardinal #]
%1110110001=Z
%1110110010=V
%1110110011=[sun]
%1110110100=[star]
%1110110101=[spell]
%1110110110=[moon]
%1110110111= the
%1110111000= you
%1110111001=[.’][wait][line]‘
%1110111010= of
%1110111011= have
%1110111100= b
%1110111101=!’
%1110111110= is
%1110111111= that

# C2 table
%1111000000= to
%1111000001=The
%1111000010=ve
%1111000011=,
%1111000100=ing
%1111000101=Moonbrooke
%1111000110= will
%1111000111= and
%1111001000= Hargon
%1111001001=You
%1111001010=‘Welcome
%1111001011=Laurasia
%1111001100=here
%1111001101= with
%1111001110='s
%1111001111=descendants
%1111010000=[wait][line]
%1111010001=rince
%1111010010= for
%1111010011=treasure chest
%1111010100=[name]
%1111010101=Samaltria
%1111010110=I
%1111010111=Castle
%1111011000=this
%1111011001= from
%1111011010= a
%1111011011=ther
%1111011100=ke
%1111011101= are
%1111011110=Moon Fragment
%1111011111= has

# C3 table
%1111100000=What
%1111100001= journey
%1111100010= in
%1111100011=I'
%1111100100=lease
%1111100101=oof woof
%1111100110=ter
%1111100111=n't
%1111101000=rea
%1111101001= to
%1111101010=ight
%1111101011=But
%1111101100=return
%1111101101=[number] piece[(s)]
%1111101110=Rondarkia
%1111101111=Roto
%1111110000=eautiful voice
%1111110001= of
%1111110010=This
%1111110011=ed
%1111110100=ear
%1111110101=ome
%1111110110=ll
%1111110111=not
%1111111000= was
%1111111001=[.’][wait]
%1111111010=?’
%1111111011=curse
%1111111100=companion
%1111111101= it
%1111111110=Let us meet aga
%1111111111= must

Chicken Knife

  • Sr. Member
  • ****
  • Posts: 456
    • View Profile
Re: Dragon Warrior 1, 2 & 3 Hacking Discussion
« Reply #239 on: July 23, 2020, 09:20:14 pm »
After having just "optimized" my dictionary, entirely pleased with myself for freeing up 50 characters, now I'm here pulling my jaw up off the floor.

You have clearly bound your soul to a demon in exchange for these powers.

It would appear that I just have to plug all the entries into my dictionary and assign all the right spacing nybbles. This is a marvelous opportunity to never have to be concerned with space again in this game. I don't have words.  :woot!:




So I implemented your patch that fixes indenting. I inserted the $60 byte after the line before each new speaker I want indented correctly. In all cases but one, it's working fine. For this princess line, it for some reason isn't indenting her saying the word "father!". Can't figure this out. Here's the relevant lines from my atlas file.

King:[ ‘]My dear [name], I beg you to hide yourself down below[.’][wait][line]
[ ‘]If anything should happen to me, you must not grieve[.’][60][wait][line]
Princess:[ ‘]But father![' ][60][wait][line]
King:[ ‘]I will inform the king of Laurasia of our dire situation.[wait][line]Now, you must go![' ][end]

[60] is my way of representing the $60 dictionary entry in the table file.

« Last Edit: July 24, 2020, 08:00:42 am by Chicken Knife »