Author Topic: Item descriptions  (Read 5084 times)

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Item descriptions
« on: January 24, 2013, 09:33:46 AM »
Turns out item descriptions are a simple range check and subtraction. The reason the "Caller's Magic Orb" description isn't shown? They test if the item value is less than $E7, not $EB.

Code: [Select]
$01/A7BA C9 CE       CMP #$CE                A:03CE X:0000 Y:D8E8 P:eNvMxdIzc
$01/A7BC 90 2B       BCC $2B    [$A7E9]      A:03CE X:0000 Y:D8E8 P:envMxdIZC
$01/A7BE C9 E7       CMP #$E7                A:03CE X:0000 Y:D8E8 P:envMxdIZC
$01/A7C0 B0 27       BCS $27    [$A7E9]      A:03CE X:0000 Y:D8E8 P:eNvMxdIzc
$01/A7C2 38          SEC                     A:03CE X:0000 Y:D8E8 P:eNvMxdIzc
$01/A7C3 E9 CE       SBC #$CE                A:03CE X:0000 Y:D8E8 P:eNvMxdIzC
$01/A7C5 20 B4 87    JSR $87B4  [$01:87B4]   A:0300 X:0000 Y:D8E8 P:envMxdIZC


$01/A7C8 BF 00 AE 0F LDA $0FAE00,x[$0F:AE00] A:0300 X:0000 Y:D8E8 P:envMxdIZC
$01/A7CC 85 45       STA $45    [$00:0145]   A:0301 X:0000 Y:D8E8 P:envMxdIzC
$01/A7CE A2 2A AE    LDX #$AE2A              A:0301 X:0000 Y:D8E8 P:envMxdIzC
$01/A7D1 F0 0C       BEQ $0C    [$A7DF]      A:0301 X:AE2A Y:D8E8 P:eNvMxdIzC
$01/A7D3 E8          INX                     A:0301 X:AE2A Y:D8E8 P:eNvMxdIzC
$01/A7D4 BF 00 00 0F LDA $0F0000,x[$0F:AE2B] A:0301 X:AE2B Y:D8E8 P:eNvMxdIzC
$01/A7D8 D0 F7       BNE $F7    [$A7D1]      A:0345 X:AE2B Y:D8E8 P:envMxdIzC
$01/A7DA C6 45       DEC $45    [$00:0145]   A:0300 X:AE2C Y:D8E8 P:envMxdIZC
$01/A7DC D0 F3       BNE $F3    [$A7D1]      A:0300 X:AE2C Y:D8E8 P:envMxdIZC
$01/A7DE E8          INX                     A:0300 X:AE2C Y:D8E8 P:envMxdIZC
$01/A7DF 9B          TXY                     A:0300 X:AE2D Y:D8E8 P:eNvMxdIzC
$01/A7E0 A9 0F       LDA #$0F                A:0300 X:AE2D Y:AE2D P:eNvMxdIzC
$01/A7E2 A2 54 00    LDX #$0054              A:030F X:AE2D Y:AE2D P:envMxdIzC
$01/A7E5 20 E4 82    JSR $82E4  [$01:82E4]   A:030F X:0054 Y:AE2D P:envMxdIzC

Code: [Select]
$01/A7BA C9 CE       CMP #$CEItem value to start showing descriptions for.

Code: [Select]
$01/A7BE C9 E7       CMP #$E7Item to stop showing descriptions for.

Code: [Select]
$01/A7C2 38          SEC
$01/A7C3 E9 CE       SBC #$CE
Subtracts $CE from the item value. Change this to be the same as your starting item.

Code: [Select]
$01/A7C8 BF 00 AE 0F LDA $0FAE00,xItem description assignment table offset. (SNES LoROM Slow ROM) One byte per item.

Code: [Select]
$01/A7CE A2 2A AE    LDX #$AE2AStart of item descriptions in bank - 1. Each description is terminated with $00.

Code: [Select]
$01/A7D4 BF 00 00 0F LDA $0F0000,xBank to load the item descriptions from.

So yeah, simple stuff, explains how J2e was able to give everything descriptions in their translation. I always assumed it would be more involved. They still did more work on top of that (their description hack uses a pointer table and supports using positioning on the string. This supports it too, but $00 will cause the string to terminate, which isn't an issue in J2e's hack.)
« Last Edit: January 24, 2013, 09:47:29 AM by Dragonsbrethren »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Item descriptions
« Reply #1 on: January 24, 2013, 01:16:42 PM »
This would be a nice patch fix for the bug...
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Item descriptions
« Reply #2 on: January 24, 2013, 01:19:22 PM »
Wow this is great! I would love for there to be space to allocate for the entire gambit of items. however what you have here looks really good on its own.

Great work Dragonsbrethren!

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Item descriptions
« Reply #3 on: January 24, 2013, 01:37:35 PM »
This would be a nice patch fix for the bug...
I don't believe in releasing one byte patches, sorry.

Wow this is great! I would love for there to be space to allocate for the entire gambit of items. however what you have here looks really good on its own.
There probably is enough space, provided you don't go overboard with unique descriptions. If I ever work on another large scale project, I'd probably rewrite the routine entirely (not to the extent J2e did, which was overkill) to read the description table for every item but compare the description byte to $00, using that to bypass drawing rather than limiting it to a certain range. (A combination of both could work too, but would take more space.)

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Item descriptions
« Reply #4 on: January 24, 2013, 01:52:23 PM »
This would be a nice patch fix for the bug...
I don't believe in releasing one byte patches, sorry.

Sometimes the great fixes are simply just that... one byte.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Item descriptions
« Reply #5 on: August 27, 2013, 08:01:12 PM »
I posted this on TCRF but never bothered here. Here are GameGenie codes for the fix:

38C3-AFA9: FF4/Easy
38C8-A7A9: FF2

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Item descriptions
« Reply #6 on: August 27, 2013, 08:04:26 PM »
I completely forgot about this, (despite posting on it a while back), that seems like a very easy thing to incorporate into the editor I would imagine and would love to see that done. Granted it is easy enough to go into hex to change it, but everything's easier with an editor, haha.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Item descriptions
« Reply #7 on: August 27, 2013, 08:08:57 PM »
I'm still thinking about doing that all items expansion patch, I've got a bit of a prototype here. If I do, maybe Pinkpuff will be willing to detect it and integrate expanded description assignments into the editor.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Item descriptions
« Reply #8 on: August 27, 2013, 08:16:39 PM »
Now that you mention it, that's some of the only text the editor can't edit at the moment, isn't it? Things like "Caller's Orb" aren't in the editor, or aren't anymore (I swear they used to be...?). Though yes, having items descriptions for everything would lend itself to a creative flair in describing the weapons.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Item descriptions
« Reply #9 on: August 27, 2013, 08:26:30 PM »
I thought descriptions were in too, but it looks like you're right. They're really simple to edit, there's a table of one byte assignments which correspond to the string number. I know one of Zyrthofar's editors can do them.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Item descriptions
« Reply #10 on: March 21, 2014, 12:19:01 PM »
What would be the offsets for these locations in ROM (headered)?

 :edit: Never mind I figured them out myself.
« Last Edit: March 25, 2014, 06:54:02 AM by Pinkpuff »
Let's dance!

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Item descriptions
« Reply #11 on: July 13, 2016, 08:36:54 PM »
I know I'm necroposting this, but was this ever implemented into FF4kster?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Item descriptions
« Reply #12 on: July 14, 2016, 11:30:08 AM »
I meant to respond to your comment on the ff4kster thread, but I think I forgot to hit send.

You can have and edit as many as 60 item descriptions in the Messages editor, but be aware that the amount of space devoted to them is miniscule (probably originally just needed a few kanji per description in FFIVJ).

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 347
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Item descriptions
« Reply #13 on: July 14, 2016, 12:28:31 PM »
I meant to respond to your comment on the ff4kster thread, but I think I forgot to hit send.

You can have and edit as many as 60 item descriptions in the Messages editor, but be aware that the amount of space devoted to them is miniscule (probably originally just needed a few kanji per description in FFIVJ).

You can also use squishtiles AND icons (if placed in the blank area of the font graphics) to save space.

Example: in my hack I switched up the status healing around so just 3 items take care of the whole spectrum. One of them heals basic things like Poison/Mute/Blind, so I copy n pasted said icons to some blank space in the font so the item description reads, "Cures (poisoned icon) (Mute Icon) (Blind Icon).

Just DON'T EVER PUT A SQUISHTILE OR ICON ON VALUE A4 OF THE FONT!! As far as I've seen that's the only value that'll really mess anything up in the editor.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Rodimus Primal

  • Siren
  • *
  • Posts: 80
  • Gender: Male
    • View Profile
Re: Item descriptions
« Reply #14 on: July 14, 2016, 09:53:20 PM »
That's fine but I'm more so looking at item descriptions for the items that were once dummied content. The one guy on RHDN with the patching issue didn't know what a Red Fang was.