FF6 Hacking
Changing the MP Needed in battle window - Printable Version

+- FF6 Hacking (https://www.ff6hacking.com/forums)
+-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html)
+--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html)
+--- Thread: Changing the MP Needed in battle window (/thread-3152.html)



Changing the MP Needed in battle window - mrTentacle - 02-27-2016

Hi all!

Long time lurker, I'm working on fixing an old ff6 translation.


How do you change the mp "Needed" text from the magic menu in battle?

Found this bit over at datacrystal:


Code:
Data: "nnn/nnn MP needed"
C1/4A37: 08       (0)
C1/4A38: 08       (0)
C1/4A39: 08       (0)
C1/4A3A: 15       (/)
C1/4A3B: 08       (0)
C1/4A3C: 08       (0)
C1/4A3D: 08       (0)
C1/4A3E: 08       (0)
C1/4A3F: 08       (0)
C1/4A40: 08       (0)
C1/4A41: FF191AFF ( MP )
C1/4A45: FF161717181718 ( Needed)
C1/4A4C: 0202
C1/4A4E: 0202
C1/4A50: 0202
C1/4A52: 0202
C1/4A54: 0202
C1/4A56: 0002
C1/4A58: 0200
C1/4A5A: 0002
C1/4A5C: 0202
C1/4A5E: 0202
C1/4A60: 02

16 17 17 18 17 18
N    e    e    d    e    d

Changing these values is really weird, can't find anything beyond 0-9 and the letters NMPX.

Any help is appreciated


RE: Changing the MP Needed in battle window - madsiur - 02-28-2016

You are right. The "MP needed" string has its own limited table. I'm not sure what you could do to able to modify this, like using the same functions that the menus strings and be able to use more characters. I'm kinda illiterate when it comes to how the game handles fonts/string.

Code:
08=0
09=1
0A=2
0B=3
0C=4
0D=5
0E=6
0F=7
10=8
11=9
12=M
13=H
14=P
15=/
16=N
17=e
18=d
19=M
1A=P
FF=



RE: Changing the MP Needed in battle window - dn - 02-28-2016

The only answer I can think of would be to make it use the same routine (or a copy thereof) used for character names.


RE: Changing the MP Needed in battle window - mrTentacle - 12-22-2016

I'm back on this again, is it known how/where the table is set?
I've confirmed that it uses the regular fixed size font, but for some weird reason not the entire thing just these few letters.

The code
http://datacrystal.romhacking.net/wiki/Final_Fantasy_VI:ROM_map/Assembly_C14
search for:
Data: "nnn/nnn MP needed"


RE: Changing the MP Needed in battle window - madsiur - 12-22-2016

The game make the conversion when loading ATB characters at C1/40CB. At the same time it load the FWF letters of the "Display MP" table (C1/3FD5). By replacing FWF letters ID taken from the reference table (see below) and changing the data you posted, you can form a new word. In the same logic, relocating this table could allow you to expand it with other code modifications. Digits (MP display) are not treated here.

Code:
Data: ATB characters in the FWF
C1/3FCB:    B4
C1/3FCC:    B5                
C1/3FCD:    B6
C1/3FCE:    B7
C1/3FCF:    B8
C1/3FD0:    B9
C1/3FD1:    BA
C1/3FD2:    BB
C1/3FD3:    BC
C1/3FD4:    BD

C1/3FD5:    8C     ;M
C1/3FD6:    87     ;H
C1/3FD7:    8F     ;P
C1/3FD8:    C0     ;/
C1/3FD9:    8D     ;N
C1/3FDA:    9E     ;e
C1/3FDB:    9D     ;d
C1/3FDC:    8C     ;M
C1/3FDD:    8F     ;P
C1/3FDE:    FF     ;<space>
C1/3FDF:    FF     ;<space>

Reference Table
Code:
80=A
81=B
82=C
83=D
84=E
85=F
86=G
87=H
88=I
89=J
8A=K
8B=L
8C=M
8D=N
8E=O
8F=P
90=Q
91=R
92=S
93=T
94=U
95=V
96=W
97=X
98=Y
99=Z
9A=a
9B=b
9C=c
9D=d
9E=e
9F=f
A0=g
A1=h
A2=i
A3=j
A4=k
A5=l
A6=m
A7=n
A8=o
A9=p
AA=q
AB=r
AC=s
AD=t
AE=u
AF=v
B0=w
B1=x
B2=y
B3=z

; C0 (/) work, I don't know about the rest of following though:
BE=!
BF=?
C0=/
C1=:
C2=”
C3=’
C4=-
C5=.
C6=,
C7=…
C8=;
C9=#
CA=+
CB=(
CC=)
CD=%
CE=~



RE: Changing the MP Needed in battle window - mrTentacle - 12-23-2016

Thanks! that's just what I was looking for

Frog

Yup, that did it, had to redo the entire string and the string before that says MP, for some reason the table cant be to long so I had to remove the extra MHP letters.

Thanks again!


RE: Changing the MP Needed in battle window - madsiur - 12-23-2016

(12-23-2016, 08:36 AM)mrTentacle Wrote: Yup, that did it, had to redo the entire string and the string before that says MP, for some reason the table cant be to long so I had to remove the extra MHP letters.

If really the need, the whole table, including ATB characters  could be relocated in another bank. There would be enough room for 14 characters (see here).

All the code changes needed would be this:

Code:
C1/40CB:    BFCB3FC1    LDA $C13FCB,X        ; Load font character from table

C1/40F5:    E01500      CPX #$0015           ; Number of characters in table, could go up to #$001A


Also, I wonder if the devs considered at some point a form of ability that consume HP, since the H is not used at all. I think the main menu in battle use directly the whole FWF table..