+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Giving classes MP in FF1
Pages: [1]
Author Topic: Giving classes MP in FF1  (Read 2 times)
Volcanon
Guest
« on: March 25, 2008, 10:55:14 am »

I'm working on a hack for FF1, and at the moment I'm having difficulty trying to get fighter/thief/martial artists to have MP. I've set them to have MP in the class stats, but it doesn't register in the game, so I presume there's a bit somewhere saying "MP? Y/N?"
Any help?
CaseCrash
Guest
« Reply #1 on: March 25, 2008, 11:36:23 am »

Dienyddiwr Da's Final Fantasy Bytes documents might help you out.

Quote from: chbytes.txt
Address of Data : 3050-30AB

Character Data consits of 11 bytes.

Quote from: chbytes.txt
XI- havent the foggiest,
 but interrestingly, they appear to be sorted by magical skill,
 the Fighter and Thief (0F) learn to cast magic later,
 the Black belt(0A) can never cast magic, and the Mages (14) always can.
 Who knows?

I'd experiment with that.


EDIT: Found this in Maria Renard's FF1 Facelift Bytes docs:

Quote from: FF1BonusBytes.txt
------------------------------------------------------------
Hold Magic Switches
------------------------------------------------------------
By default, the Fighter and Thief get no MP until class change.  They can gain MP if they start off as Knights or Ninjas, though.  Here's how to tweak that.

$2DC7D reads "F0 40 C9 01 F0 3C".

Change the $01 to whatever class you want to be without MP.  So if you don't want the Red Mage to have magic, you'd change it to 03.

Just like the Black Belt stats, you can tweak this, to include a range. Here's how.  Change the second $F0 byte to read $30:

$2DC7D should now read "F0 40 C9 01 30 3C".

However, if you're using FFHackster, this WILL be overwritten.  Until someone changes that... ^_^

Hope it helps
KingMike
Guest
« Reply #2 on: March 25, 2008, 04:31:40 pm »

You could probably change "F0 3C" to "EA EA" if you want all classes to have MP.
Karatorian
Guest
« Reply #3 on: March 25, 2008, 08:51:03 pm »

The code modified by the hack in the FFBonusBytes document will only fix the Fighter and Theif not getting MP. The Black Belt and Master still won't get MP. The reason for this is that the level up data (which is shared by base classes and thier upgrades) never gives them any. The level up data is at ROM address 0x2D094 (0x2D0A4 with header). It's 588 bytes long, which is 49 levels per class and 2 bytes per class. The second byte is a bitmap which indicates whether a class gains spell slots.

The section of code modified by the FFBB hack is as follows:

Code:
$9C6A LDA $688E ; Load the character's <class> byte and skip the [Magic
$9C6D BEQ $9CAF ; Points] section if <fighter> or <theif>.
$9C6F CMP #$01
$9C71 BEQ $9CAF

To compleatly eliminate this check, you could simply NOP out the last three instructions.

Another section of code you may be interested in is located at 0x2DC8A (0x2DC9A with header).

Code:
$9C8A LDA $688E ; Check the <class> byte and set A to 5 on <knight> and
$9C8D CMP #$06 ; <ninja> and A to 10 on all other classes.
$9C8F BEQ $9C99
$9C91 CMP #$07
$9C93 BEQ $9C99
$9C95 LDA #$0A
$9C97 BNE $9C9B
$9C99 LDA #$05

This sets the limit on how many spells per level a class can have at most. The limits are actually one less than the loaded numbers. If you exceed a limit of 9, the number will end up displayed as a letter.

I don't know where the code that determins which classes gain spell slots on character creation is, but I imagine it's near the hack also mentioned in FFBonusBytes to change the starting spell slots.

Finally, you may want to edit the magic permission bytes. I don't know the format, but they're located at 0x3AD18.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC