Users browsing this thread: 1 Guest(s)
Patch: Restored Ability Names (Update)

#11
Posts: 3,966
Threads: 279
Thanks Received: 233
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
The function $510D take a spell ID in A as parameter. This is what the menu RAM list for $9D89 and after. There could be other problems but this might be one. You should use a debugger and check what byte it loads (LDA $7E9D89,X):

Code:
$9D89 Length of Item List (used for other lists too)
$9D8A-$9E88 Item List (positions in inventory)
  Find
Quote  

#12
Posts: 14
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 0
Status
Silence
Hello Silentenigma, i found a bug in your hack.
The learning rate of spells in the extra item menu is shifted.
Don't know if this was already in Angelo's patch.

[Image: NEAxMDI4MTE5MDM2QGU2YmVkOWNkNDVlM2VhM2E4...I3Mg==.jpg]

Greetz
  Find
Quote  
[-] The following 1 user says Thank You to Antamaru for this post:
  • SilentEnigma (02-25-2019)

#13
Posts: 732
Threads: 36
Thanks Received: 12
Thanks Given: 41
Joined: Jan 2016
Reputation: 6
Status
None
(11-09-2018, 01:10 PM)Antamaru Wrote: Hello Silentenigma, i found a bug in your hack.
The learning rate of spells in the extra item menu is shifted.
Don't know if this was already in Angelo's patch.

Greetz

That is possible to fix yourself. If you remove the colon and one of the two empty spaces after it, it'll shrink the string enough to fit in the space. Here's how it looks on my game where I did that. 

[Image: vNVVmB3.png]

Here's the code.

Code:
C3/5AF9: A2929E  LDX #$9E92     ; 7E/9E92
C3/5AFC: 8E8121  STX $2181      ; Set WRAM LBs
C3/5AFF: A9C1    LDA #$C1       ; Char: ":"
C3/5B01: 8D8021  STA $2180      ; Add to string
C3/5B04: A9FF    LDA #$FF       ; Space char
C3/5B06: 8D8021  STA $2180      ; Add to string
C3/5B09: 8D8021  STA $2180      ; Add to string
C3/5B0C: A9D7    LDA #$D7       ; Char: "×"
C3/5B0E: 8D8021  STA $2180      ; Add to string
C3/5B11: A5E0    LDA $E0        ; Learning rate
C3/5B13: 20E004  JSR $04E0      ; Turn into text
C3/5B16: A5F8    LDA $F8        ; Tens digit
C3/5B18: 8D8021  STA $2180      ; Add to string
C3/5B1B: A5F9    LDA $F9        ; Ones digit
C3/5B1D: 8D8021  STA $2180      ; Add to string
C3/5B20: 9C8021  STZ $2180      ; End string
C3/5B23: 4CD97F  JMP $7FD9      ; Draw string

The colon add at 5AFF along with the "add to string" command afterward, and one of the two "add to string" commands for the Space immediately after, are what you want to remove. Remove just one of the "add to string" commands for the space to leave one space between the Spell name and the "xLearn Rate" data. You don't want to just NOP out the commands, retype in the Hex and that'll give you room to add two spaces at the end of the string, invisible.

With those lines removed, it should look like this.

Code:
C3/5AF9: A2929E  LDX #$9E92     ; 7E/9E92
C3/5AFC: 8E8121  STX $2181      ; Set WRAM LBs
C3/5AFF: A9FF    LDA #$FF       ; Space char
C3/5B01: 8D8021  STA $2180      ; Add to string
C3/5B04: A9D7    LDA #$D7       ; Char: "×"
C3/5B06: 8D8021  STA $2180      ; Add to string
C3/5B09: A5E0    LDA $E0        ; Learning rate
C3/5B0B: 20E004  JSR $04E0      ; Turn into text
C3/5B0E: A5F8    LDA $F8        ; Tens digit
C3/5B10: 8D8021  STA $2180      ; Add to string
C3/5B13: A5F9    LDA $F9        ; Ones digit
C3/5B15: 8D8021  STA $2180      ; Add to string
C3/5B18: A9FF    LDA #$FF       ; Space char
C3/5B1A: 8D8021  STA $2180      ; Add to string
C3/5B1D: 8D8021  STA $2180      ; Add to string
C3/5B20: 9C8021  STZ $2180      ; End string
C3/5B23: 4CD97F  JMP $7FD9      ; Draw string

The spaces added at the end, I remember, are because the game covers up some text with the magic text in the Esper menu. I don't recall the details, though. You may or may not need them depending on what you're doing, check your Esper menus and see.
  Find
Quote  
[-] The following 3 users say Thank You to DrakeyC for this post:
  • Antamaru (11-14-2018), SilentEnigma (02-25-2019), Warrax (02-26-2019)

#14
Posts: 173
Threads: 23
Thanks Received: 20
Thanks Given: 6
Joined: Feb 2016
Reputation: 8
Status
Enlight
Antamaru, nice catch! Thank you. Yes, this would have been in Angelo's patch as well. Mea culpa!
DrakeyC, thank you very much for your solution! It looks nice. I will release an update incorporating your fix as soon as possible.

Edit:

This bug came up and was fixed during Angelo's original development, and I was tragically too lazy to read the whole thread back then.
The code at C3/5AF9 - C3/5B25, which generates the growth rate string, is shared between the Item submenu and the Skills>Esper submenu. To fix one trivially is to break the other.

It appears that Angelo dealt with this problem by realigning the spell list in the Esper menu. I, unaware of his reasons, thought the change looked unnecessary; so in order to improve the menu's appearance, I proceeded to revert his solution without realizing it.

Below is my new solution to fix the bug in the Item submenu, while still getting the most out of the Esper submenu. The " :" will always be added to the string; however, depending on which submenu is active, it will either be placed at the beginning (Esper menu) or at the end (Item submenu, invisible).
 
Code:
  C3/5AFF: A9 01         LDA #$01       ; Submenu I.D. for "Skills"
  C3/5B01: 20 E2 F0      JSR $F0E2      ; Jump to new subroutine $F0E2
  C3/5B04: 8D 80 21      STA $2180      ; Add to string
  C3/5B07: A9 D7         LDA #$D7       ; Char: "×"
  C3/5B09: 8D 80 21      STA $2180      ; Add to string
  C3/5B0C: A5 E0         LDA $E0        ; Learning rate
  C3/5B0E: 20 E0 04      JSR $04E0      ; Turn into text
  C3/5B11: A5 F8         LDA $F8        ; Tens digit
  C3/5B13: 8D 80 21      STA $2180      ; Add to string
  C3/5B16: A5 F9         LDA $F9        ; Ones digit
  C3/5B18: 8D 80 21      STA $2180      ; Add to string
  C3/5B1B: A9 00         LDA #$00       ; Submenu I.D. for "Items"
  C3/5B1D: 20 E2 F0      JSR $F0E2      ; Jump to new subroutine $F0E2
  C3/5B20: 9C 80 21      STZ $2180      ; End string
  C3/5B23: 4C D9 7F      JMP $7FD9      ; Draw string

New subroutine - Conditionally appends ": " to growth rate string, then loads char value for Space:
Code:
  C3/F0E2:   CD 2C 02    CMP $0220    ; Does current submenu I.D. equal accumulator value?
  C3/F0E5:   D0 0A       BNE $F0F1    ; If not, skip appending string
  C3/F0E7:   A9 C1       LDA #$C1     ; Char: ":"
  C3/F0E9:   8D 80 21    STA $2180    ; Add to string
  C3/F0EC:   A9 FF       LDA #$FF     ; Space char
  C3/F0EE:   8D 80 21    STA $2180    ; Add to string
  C3/F0F1:   A9 FF       LDA #$FF     ; Space char
  C3/F0F3:   60          RTS          ; Return

The updated patch uses 18 additional bytes of free space compared version 1.1.

The new version 1.2 can be found here.


Cheers!
Quote  
[-] The following 1 user says Thank You to SilentEnigma for this post:
  • Antamaru (03-06-2019)

#15
Posts: 14
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 0
Status
Silence
Hey there, i found another one.

The window that holds the spell name ist too short for Poisona.


[Image: NEAxMDI4MTE5MDc3QDAxMWJkN2M0MmQzMjk4NWYy...gwMA==.jpg]

Greetings Smile
  Find
Quote  
[-] The following 1 user says Thank You to Antamaru for this post:
  • SilentEnigma (11-29-2019)

#16
Posts: 3,966
Threads: 279
Thanks Received: 233
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(11-26-2019, 05:50 PM)Antamaru Wrote: The window that holds the spell name ist too short for Poisona.

You can't really fix this one unless you strip off the icon from the name for that perticular menu and name :/
  Find
Quote  

#17
Posts: 14
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 0
Status
Silence
(11-28-2019, 03:20 PM)madsiur Wrote: You can't really fix this one unless you strip off the icon from the name for that perticular menu and name :/

I did it by overlapping the box like in the use-item menu.
  Find
Quote  

#18
Posts: 3,966
Threads: 279
Thanks Received: 233
Thanks Given: 56
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(11-28-2019, 06:45 PM)Antamaru Wrote: I did it by overlapping the box like in the use-item menu.

That's the best workaround IMO, something I had not think of in the first place.
  Find
Quote  

#19
Posts: 173
Threads: 23
Thanks Received: 20
Thanks Given: 6
Joined: Feb 2016
Reputation: 8
Status
Enlight
(11-26-2019, 05:50 PM)Antamaru Wrote: Hey there, i found another one.

The window that holds the spell name ist too short for Poisona.

Hi Antamaru, thanks for the catch. I have actually known about this one for some time, but had taken a similar attitude  as Madsiur on it.

Lengthening the box is definitely most appropriate.

The patch has been updated to v1.3, attached below.
In addition to lengthening the box, I also shortened the item name box on the use-item screen by one unit. It seemed to encroach on the character name a little too much in the original.

Thanks for getting me moving on this one!


Attached Files
.zip  RestoredAbilityNames_v1.3.zip (528.85 KB, 12 downloads)
Quote  

#20
Posts: 14
Threads: 2
Thanks Received: 0
Thanks Given: 0
Joined: Dec 2017
Reputation: 0
Status
Silence
(11-29-2019, 11:31 AM)silentenigma Wrote: In addition to lengthening the box, I also shortened the item name box on the use-item screen by one unit.

I also shortened the "Owned:" and the "MP cost" box and lengthened the big status box in by one unit my project.
  Find
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite