Users browsing this thread: 1 Guest(s)
Class Names function

#11
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(06-15-2013, 02:13 AM)Rodimus Primal Wrote: it looks fine in the main menu, but is cut off from the top in the skills menu.

The problem is not with the code but probably with the strings positions in the skill menu. I had a quick look in bank C3, where the positions are,but I wasn't able to locate them. Angelo had it worked properly and Gi Nattak implemented this in his hack so they both probably could inform you better about the positions.
  Find
Quote  

#12
Posts: 2,549
Threads: 98
Thanks Received: 147
Thanks Given: 159
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Could/will any of you nice coders here please make an alternate version of this code so that it instead supports all 63 possible actors, so that each and every actor has their own class title? It would continue on in order like it currently does, just all the way up to 63 instead. Madsiur currently does not have the time for it and recommended asking here. I use some unused actor spots for guest characters in my hack and currently their titles are stuck on "Imp. Soldier", is the reason for this request.


We are born, live, die and then do the same thing over again.
Quote  

#13
Posts: 47
Threads: 7
Thanks Received: 5
Thanks Given: 5
Joined: Aug 2014
Status
None
Could/will any of you nice coders here to tell what class job name code for Edgar in metroidquest's FF6: T.E.C(THE ETERNAL CRYSTALS)?and also for the advance version of FFVI like "Magitek Elite" for Terra and such is the reason for this request.........please please anyone tell!?
  Find
Quote  

#14
Posts: 281
Threads: 18
Thanks Received: 13
Thanks Given: 8
Joined: Mar 2014
Reputation: 8
Status
None
Necropost!

Hey, so I was playing around with this and I've found a few bugs with it. Hopefully there are some people around who may be able to provide some insight.

1. Like someone noticed before, the class name display in the Skills menu is all kinds of screwed up. It is positioned between HP and MP and only partially visible. This seems to be a bug, rather than just faulty positioning data, from what I can tell.
2. The class name display obscures the "LV" on the Lineup menu (when selecting party members, on the airship for example). This seems reasonable, since those are displayed on the same line. Reworking the menu is needed, like SilentEnigma did with the updated Restored Ability Names patch.
3. There is no class name display on the Status submenu - even though the Status menu does show current statuses (like Float and Imp) after the character name. I'm not sure why. Anyone?

I was poking around because I was wondering what the problem was with the cut off class names in the Skills menu. This problem occurs with or without Catone's edits (which concern the positioning of the Status display in the main menu).
From what I understand, Madsiur's code makes use of the code to display a character's status ailment. It tacks on a routine to display class name if no status is found (like what was dummied out of FF6j).

This problem occurs seemingly because the Skills menu also calls code to display the character's status, but I don't know why exactly.

This is where the Skills menu calls the code to display the current Status:
Code:
C3/4EED: A0DD42   LDY #$42DD
C3/4EF0: A2504F   LDX #$4F50     (4F is the X position and 50 is the Y position)
C3/4EF3: 202734   JSR $3427      (display current status ailments)
Normally, a status icon is displayed in the lower left corner of the box that displays LV, HP, MP and equipped Esper. You can change the position of the status icon, but it won't affect the display of the class name, unfortunately.

A quick and dirty fix to the problem is to simply not display status in the Skills menu at all. Branch over the above code, or replace it with NOPs (or change its call to $34E5 instead, which is just an RTS).

Interesting note: The only good reason to show status in the Skills menu is to remind you that the reason you can't cast spells is because you're an Imp, but the portrait does that anyway. This may be a relic from an earlier design in which Mute was supposed to be an out-of-battle status. That may be why Echo Screen is usable out of battle, too.

UPDATE:

Okay, so after poking around a bit more, I can say that I was wrong and that faulty positioning data is (part of) the problem here.

A bit more information: Function $3427 in C3 is the function to determines which status, if any, to display. It is this function that Madsiur's code hooks in to. Going into this function, the Y register holds (16-bit) positioning data. These are the numbers Catone suggested changing to display class names properly in the main menu.

The data is a 16-bit number and I am not exactly sure about the format, but as far as I can determine, increasing this number simply makes the string display further right on the screen, eventually wrapping around to the next "row" below and starting again from the left. It also only seems to work properly in increments of two: in increments of one, the text string becomes garbled.

Anyway, properly positioning of the string in the Skills menu requires this change:
Code:
C3/4EED:    A09D43      LDY #$439D   (this positions the text string in the lower left corner of the LV/HP/MP/Equipped esper window)

This unfortunately reveals a new problem, that I think is best described by a picture. [Image: u41Urtsl.png]
Unfortunately, I have no idea what causes this, the same way I have no idea why the text gets cut off horizontally when something on the same "row" partially overlaps it.

Going into $3427, 16-bit X also holds positioning data, for the status icons. Interestingly, it is handled differently; the low byte is horizontal positioning and the high byte is vertical positioning.
Code:
C3/4EF0:    A2504F      LDX #$4F50   (this is the default position of the status icons; the lower left corner)
C3/4EF3:    202734      JSR $3427      (display current status ailments)
  Find
Quote  
[-] The following 1 user says Thank You to seibaby for this post:
  • Warrax (09-08-2017)

#15
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Worthy necropost!

I haven't played with that since I made the original post so I can't give any insight how to have a clean code. I realize I made a butchered job when doing this and mainly I didn't even bothered checking if everything was alright :/
  Find
Quote  

#16
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
(04-07-2016, 05:25 PM)Madsiur Wrote: Worthy necropost!

I haven't played with that since I made the original post so I can't give any insight how to have a clean code. I realize I made a butchered job when doing this and mainly I didn't even bothered checking if everything was alright :/

It's ok, we've all done it. We still like you.
  Find
Quote  

#17
Posts: 281
Threads: 18
Thanks Received: 13
Thanks Given: 8
Joined: Mar 2014
Reputation: 8
Status
None
Necropost again!

Having ducked around a bit more with menu stuff, I believe the issue arises from trying to display the text on the wrong BG layer. I think the 16-bit positioning data hold x and y positions for the first tile of a text string, and the value wraps around to the next BG layer (I'm not sure in which order).
  Find
Quote  

#18
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
(09-14-2017, 10:13 AM)seibaby Wrote: Necropost again!

Having ducked around a bit more with menu stuff, I believe the issue arises from trying to display the text on the wrong BG layer. I think the 16-bit positioning data hold x and y positions for the first tile of a text string, and the value wraps around to the next BG layer (I'm not sure in which order).

I recently got into Hex Editing (finally decided to give it a go) and was able to apply the code to display classes from Madsiur (thanks!) but yeah...display needs fixing in some sub menus so I'm very glad you decided to take a look at it again. I'm still a beginner with hex editing but I plan to do some tedious trial and error when I get some free time to fix the issue (it annoys me a lot, lol).
  Find
Quote  

#19
Posts: 208
Threads: 3
Thanks Received: 0
Thanks Given: 8
Joined: May 2013
Reputation: 0
Status
None
I've found that changing A0DD42 to A09D42 at offset C3/4EED will display the class correctly at his default location but since it's 12 characters, characters 9 to 12 will overwrite the word "HP" to the right even with blank characters.

Limiting class name to 8 characters would probably fix it when it's not located at the bottom. I'm curious to try actually, I know which lines to change but I have no clue what numbers I should replace with, anyone know?

Lines in questions in original code:
Code:
C3/F0B5:  A9 0C         LDA #$0C        (12 = class name length)

C3/F0B8:  8D 03 42      STA $4203       (multiply by 12)   <- Not sure about this one but hey, it's number 12 :P

C3/F0CA:  F0 02         BEQ $F0CE       (exit if we reached 12 letters)  

 
(04-06-2016, 01:50 PM)seibaby Wrote: A quick and dirty fix to the problem is to simply not display status in the Skills menu at all. Branch over the above code, or replace it with NOPs (or change its call to $34E5 instead, which is just an RTS).

I've found that doing this will indeed hide class name and status but this will also change the color of numbers from white to the same light blue as LV/HP/MP so changing position from A0DD42 (default) to A09D44 at offset C3/4EED seems to do the trick without causing issues.
  Find
Quote  

#20
Posts: 200
Threads: 1
Thanks Received: 10
Thanks Given: 0
Joined: Oct 2015
Reputation: 18
Status
None
if you're willing to do some shuffling, move level to the right, and put the 12-character class name on the same line as that.
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite