Author Topic: Unknown info from FF4 that would be great to know  (Read 17962 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #30 on: January 12, 2013, 02:42:13 AM »
Well, I didn't crack the Avenger, but I did find a little bit more out about it.

It seems there are 2 checks (maybe more since I Still haven't gotten Auto-Berserk off the Avenger) for Berserk Weapons.

The first is at

0x3A4BE - 4C it is being compared with the A Register, which if it reads 4C will continue on. If you change it to say 16 (Shadow Sword) Than the Shadow Sword will become a Berserk Weapon, just like the Avenger. And the Avenger will Still be a Berserk weapon. Oy...

 In ROM this is located at...

0x1A6BE - Change the 4C to whichever other weapon you want to have Berserk on it. (I'm now doing a sweep of the Rom for other Compare 4C's to see if that could still be the answer, I'll check that out in the morning though.)



Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #31 on: January 12, 2013, 02:46:06 PM »
Alright! Well that ends the Arrow business. I found how to make treasure chests give multiples of items, that aren't arrows.

I found it by breakpointing on where the Arrows would appear in my inventory when picked up from a chest, back traced a little from there and found another C9 54 (Compare with 54) and there it was. An unintended consequence of this is that all Weapons are given a multiple of 10 from events. So there would be 10 Excaliburs for instance when you trade the Adamant Ore for the Excalibur (however then you can just have the Smithy's apprentice sell "repairs" to Excalibur, since it's not a quest item.

In addition is the amount that these are given.

In RAM at...

0x009824 - 54 (Change that to whatever value you would like so that when you collect that specific kind of item a multiple would appear in your inventory up until the Armor begins)

0x009828 - 0A (Change that to what you wish for the quantity of item from those sorts of items.)

In ROM at...

0x1A24 - 54

0x1A28 - 0A

Looks like there's no issue now with a Durability based FFIV.

If only finding the information on Two-handedness was this simple...



Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Unknown info from FF4 that would be great to know
« Reply #32 on: January 12, 2013, 02:54:23 PM »
Looks like there's no issue now with a Durability based FFIV.

Except for the near-infinite arrow bug. of course.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #33 on: January 12, 2013, 03:15:48 PM »
Well, yes. But that's easy enough to deal with by getting rid of Berserk status, I would imagine? (At least that's how I thought that bug went?)

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Unknown info from FF4 that would be great to know
« Reply #34 on: January 12, 2013, 03:50:11 PM »
A single arrows/consumable weapon is only removed when a character gets their next turn after attacking. As long as they only get one turn in each battle, the arrow can last forever. It's a non-issue with arrows for the most part, but it would be game-breaking to the system you want to implement.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #35 on: January 12, 2013, 03:57:04 PM »
A single arrows/consumable weapon is only removed when a character gets their next turn after attacking. As long as they only get one turn in each battle, the arrow can last forever. It's a non-issue with arrows for the most part, but it would be game-breaking to the system you want to implement.

Hmm, that does seem like an issue and I just tested it and it looks like you're right. What an odd way to program it. However in a difficulty mod or a solo mod (where defeating all enemies would ideally take more than one round of turns) would it work in such situations?

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #36 on: January 12, 2013, 04:50:12 PM »
I get the feeling that the game says "decrement this weapon" and simply waits to process it on the next turn.

What it should actually do is decrement  the weapon when the character's turn is executed. I know there has been issues with item decrementing in various FF games, waiting to delay it instead of processing it when it happens... I'm sure there's some "item lockage" or "item dependency" at work, but inevitably it is coded poorly.
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: Unknown info from FF4 that would be great to know
« Reply #37 on: January 13, 2013, 02:54:09 PM »
So I have some good news and I have some... strange news.

Good news is I found out how the game makes Two-handed weapons work! It wasn't a "CMP" byte like I expected it to be, but a value stored in the X Register of 4C44 (which is looking at the data between 44 and 4C. If you switch that index you can make items that weren't two handed, two handed. But this comes with a strange caveat...

Despite it specifically looking for weapons that are 44-4C it will still count default Two-handed weapons as two handed. You can even make a Two-Handed shield (when Defense is the best priority?) You can sadly not have "Two-Handed" Armor of any type, the game will just ignore the input indexes.

So we're nearly there! If I can just find this other range (if it exists) than Two-Handed weapons are ours to manipulate.

This data is located in RAM at...

01C02A - A2 44 4C - (Change the range of 44-4C to anything you like, say you want Kain's Spears to be two handed, per instance you would change this to 23 2A. That is only for the Weapon side of things though. The Shield side is located at...

01C02F - A2 44 4C - (As above change the Range and the game will read (If Shield then...) for the Two-handed weapons.

In ROM this is at...

0xC22A - A2 44 4C
0xC22F - A2 44 4C



We're so close now! Hopefully I can update this with an Edit, to say I've found the original range, but this in itself is quite interesting...

Did they originally intend for there to be two sets of Two Handed Equipment, rather than all shoved into one section?  Since these values apparently have no effect on normal Two-handed weapons. As of now this only works outside of battle. Inside of battle the "new" Two-Handed Equipment is treated no differently than normal,  need to track down a few more values it would appear.


 :edit: Woohoo! I found how Two Handed Weapons are calculated...! In battle. (So now I've got one side in battle and one side outside of battle, how odd.) While outside of battle there exists two ranges that the game is apparently looking at, no such thing exists for in battle, unfortunately (as far as I could see) In battle uses a simple CMP 44, as I expected it to do.

I found it by breakpointing on the Item Location of the Shadow Shield and (painstakingly since I basically had to hold down Enter, click left, see if it registered (since the breakpoint is continually going off)  click up, and A) and for one tiny sliver of opportunity to present itself, when the Equip fails. After several tries I finally got it and followed it to a Bunch of CMP values (this will prove useful) and CMP 44 was among them. So inside of battle now we can change the range (only the Range can be changed unfortunately, so you can start Two-Handed weapons earlier or later than original. I'm going to post the Instructions, since Dragonsbrethren can better understand them to see if I missed anything.




Code: [Select]
$03/F30F D0 04 BNE $04    [$F315] A:0049 X:0000 Y:0000 P:envMxdIzc
$03/F315 C9 44 CMP #$44 A:0049 X:0000 Y:0000 P:envMxdIzc
$03/F317 B0 04 BCS $04    [$F31D] A:0049 X:0000 Y:0000 P:envMxdIzC
$03/F31D C9 4D CMP #$4D A:0049 X:0000 Y:0000 P:envMxdIzC
$03/F31F B0 04 BCS $04    [$F325] A:0049 X:0000 Y:0000 P:eNvMxdIzc
$03/F321 A9 02 LDA #$02 A:0049 X:0000 Y:0000 P:eNvMxdIzc
$03/F323 80 1B BRA $1B    [$F340] A:0002 X:0000 Y:0000 P:envMxdIzc
$03/F340 85 0F STA $0F    [$00:000F] A:0002 X:0000 Y:0000 P:envMxdIzc
$03/F342 AD 95 28 LDA $2895  [$7E:2895] A:0002 X:0000 Y:0000 P:envMxdIzc
$03/F345 D0 04 BNE $04    [$F34B] A:0062 X:0000 Y:0000 P:envMxdIzc
$03/F34B C9 44 CMP #$44 A:0062 X:0000 Y:0000 P:envMxdIzc
$03/F34D B0 04 BCS $04    [$F353] A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F353 C9 4D CMP #$4D A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F355 B0 04 BCS $04    [$F35B] A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F35B C9 54 CMP #$54 A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F35D B0 04 BCS $04    [$F363] A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F363 C9 61 CMP #$61 A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F365 B0 04 BCS $04    [$F36B] A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F36B C9 6D CMP #$6D A:0062 X:0000 Y:0000 P:envMxdIzC
$03/F36D B0 04 BCS $04    [$F373] A:0062 X:0000 Y:0000 P:eNvMxdIzc
$03/F36F A9 10 LDA #$10 A:0062 X:0000 Y:0000 P:eNvMxdIzc
$03/F371 80 03 BRA $03    [$F376] A:0010 X:0000 Y:0000 P:envMxdIzc
$03/F376 85 0E STA $0E    [$00:000E] A:0010 X:0000 Y:0000 P:envMxdIzc
$03/F378 AD 22 18 LDA $1822  [$7E:1822] A:0010 X:0000 Y:0000 P:envMxdIzc
$03/F37B C2 20 REP #$20 A:0000 X:0000 Y:0000 P:envMxdIZc


As before there are two checks, but I'm not entirely sure what the second one is doing since you can dequip the Two Handed weapon and re-equip it with the Shield still on, so it doesn't act like the instructions in the first part.

(Though it is written right above...)

This is located in RAM at...

03F315 - C9 44 (Change the 44 to where ever you want the Two-Handed weapons to start)

03F34B - C9 44 (Not sure what it's doing, but it's likely best to change this to whatever value you are changing the above to)

In ROM at...

0x1F515 - C9 44

0x1F54B - C9 44

And if I'm not mistaken the other CMP's are listing Bows and Arrows.

CMP 4D is where the Bows start
CMP 54 is where Arrows start
CMP 61 is where Shields start
CMP 6D is where Helmets start (No idea why that's being compared) So some further things to keep in mind. (And will likely get a post in on these in time)


 :edit: And we are done! I have figured out all aspects of Two-handedness! (Sort of, not really, still missing the range on what you can and can't equip while under Two-Handedness, hopefully I can find that, but it's not really too important, in my opinion.)It doesn't have any effect on the normal Two-Handed weapons because of a second check that the game has (quite redundant if you ask me...) that CMP's it with a 43 (which was what was throwing me off for a long time.)

It seems what I had found above was the first part of it...

Quote
In ROM this is at...

0xC22A - A2 44 4C
0xC22F - A2 44 4C

You change those to two values (but keep in mind, anything that comes after this will count as bows, so to be safe, it's best to keep the end indexes more or less the same, unless you plan to change the amount of bows to be less/more.)

As before there are two checks (Well technically 3, but changing that one or keeping it at 43 does not appear to make any visible difference) One for the Weapon and one for the Shield.

They are in RAM at...

1C045 - 00 43 (Change this to any value that you want the Two-Handed weapons to begin, this is the Shield check to see if you can Equip X weapon with a Shield already on)
1C075 - 00 43 (As above, this is the Weapon check to see if you can Equip a Shield with X weapon on.)

And in ROM at...

0xC245
0xC275

And in total to make more (or less) Two-Handed weapons follow these steps.

1. Go to 0xC22A - A2 44 4C, 0xC22F - A2 44 4C and change those to where ever you want Two-Handed Weapons to start and end (Keep in mind that after Two-Handed comes Bows, so be careful what what you set here, since the actual checks do not have an "end range" unfortunately)

2.  Go to 0xC245- A2 00 44, 0xC275 - A2 00 44 and change those to the second value you chose above.

3. Go to  0x1F515 - C9 44, 0x1F54B - C9 44 and change the 44 to the value above for a starting point to the Two-Handed Weapons.

There we go, The range of Two-Handed weapons altered in 3 easy steps!







And that should cover it for Two-Handedness. At least for now. If anyone has anything else they'd like me to look up about that functionality, please let me know.


« Last Edit: January 13, 2013, 04:34:18 PM by Grimoire LD »

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Unknown info from FF4 that would be great to know
« Reply #38 on: January 13, 2013, 06:17:17 PM »
Yeah, I don't really get why values greater than helmets are tested. If they were using BCC for the comparison it would make perfect sense since they'd be using the helmet start to test shields. As it is, I don't get it, I figure they would rule out the value being out of range sooner, but that's probably what it's there for.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #39 on: January 13, 2013, 09:56:22 PM »
Minor Update - I found how the game looks at Key Items. It was a very simple check.  Set the breakpoint to the Legend Sword's slot. See when the Legend Sword was being Read, try to throw it away, see why it can't be thrown away.

It was a simple (our old friend) C9 19, CMP 19. Right above that was the check to the rest of the Key Items.

In RAM at...


0x01A397 - C9 19 - Legend Sword, Key Item Status

0x01A39F - C9 EC - All other Key Items (I'm not sure why it supposedly starts above EC and a few others...)

0x01A245 - CMP E2 (Tent?)
0x01A249 - CMP E3 (Cabin?)
0x01A324 - CMP ED (Chocobo Whistle) Looks like 1AXXX seems like a good place to look around for those odder item dealings.

 :edit: A note with these item CMP's. Aside from the Key Item search, all the others are looking at That specific value. So say... for whatever reason you want a "Chocobo Sword" (It will still be greyed out in a normal menu)and that sword is Value 16. You would then change  the value of ED to 16 and voila. Using the Sword would call the Big Chocobo. And if you didn't want the sword in this example to disappear after use, you would change

DE 41 14   DEC $1441,x[$7E:1441]   A:00ED   X:0000   Y:6800   P:envMxdIZC to a Nop (I think! Dragonsbrethren can probably think of an easier way.)
« Last Edit: January 13, 2013, 11:00:02 PM by Grimoire LD »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #40 on: January 14, 2013, 08:04:18 AM »
This is absolutely fantastic news! Grimoire, you are my new hero. You really went above and beyond the call on this one! We now have:

* Two-handed-ness (basically)
* Key-item-ness
* Equips-like-bow
* Eqiups-like-arrow
* Shields
* Helmets

(though, not body/arms? still... awesome)

This will all be incorporated into the editor in the near future, but I'm not sure how much time it will take as I will need to fool around with the interface a little to accomodate this new information. Just to make sure, are all these addresses for headered v1.1?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #41 on: January 14, 2013, 12:30:59 PM »
This is absolutely fantastic news! Grimoire, you are my new hero. You really went above and beyond the call on this one! We now have:

* Two-handed-ness (basically)
* Key-item-ness
* Equips-like-bow
* Eqiups-like-arrow
* Shields
* Helmets

(though, not body/arms? still... awesome)

This will all be incorporated into the editor in the near future, but I'm not sure how much time it will take as I will need to fool around with the interface a little to accomodate this new information. Just to make sure, are all these addresses for headered v1.1?

Thanks PinkPuff! I suggest waiting on the Bow and Arrow, I've come across index ranges (like those of the Two-handed weapons among a few other things. I will need to research those more thoroughly before I can really say that they are usable.

As for Helmets... I wouldn't say that's the case. I don't know why it's looking at that area (maybe just to say that is where Armor begins) but there will be more to it than just that one CMP, I'm quite sure. I'll be getting to all of this in short order though.

Since I am using FF4kster to get quick access to various things, and it works without issue I would say this is a headered 1.1 version.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #42 on: January 14, 2013, 07:48:06 PM »
Well, this has been quite a wild ride, jumping from one section of RAM to another, following any little byte and being mislead time and again.

First off, the "bad" news. This...

Quote
03F315 - C9 44 (Change the 44 to where ever you want the Two-Handed weapons to start)

03F34B - C9 44 (Not sure what it's doing, but it's likely best to change this to whatever value you are changing the above to)

Are actually Left and Right hands. However that 03F315 above is not Two Handed Weapons per se, but is the start of "special" weapons all together. It took me forever in-battle to realize that this was just a starting index, and the first index just happens to be Two-Handed weapons. What does this mean? I'm not entirely sure, to be honest. But if this value is not lower than what you have Bows set to (not sure why you'd ever want that) then you will not be able to equip bows in non-bows/arrows in either hand. So really, it's not a big deal, just don't go too crazy with placements and always keep your indexes aligned, lest any problems appear.

So without further ado, the data!



This one's going to get a little messy (since there's a lot of moving pieces to this one)

in RAM...

- 01BFBD - A2 4D 5F (Index Range of Bows and Arrows, checks this range to see if it is allowed in the recessive hand, use this to add more weapons that can be used in the recessive hand.)

- 01C044 - A2 00 43 (Weapon Must be above this value to be equipped with an Arrow (The game ordinarily uses this value so in theory you could equip Two-Handed weapons with Arrows, if there weren't other checks made to prevent this.

- 01C07A - A2 4D 53 (Index Range of Bows - Unsure, but best to change it to whatever value you have the others 4D53's set to.)

- 01C096 - A2 4D 53 (When changed to a new index, will allow you to equip arrows to selected index Only if the arrows were not equipped in the first place and the other checks had not been modified.)

- 038F27 - C94D (When altered to a new Index, it will add the Attack power of both weapons (Arrow + otherwise) together.)

- 03F315 - C9 44 (Right Hand -(possibly dominant hand) Change the 44 to where ever you want the Special Property weapons to start)

- 03F34B - C9 44 (Left Hand - possibly recessive hand) Change the value to what you have above.)


- 038F27 - C9 4D (When altered to a new Index, it will add the Attack power of both weapons (Arrow + otherwise) together (or divide them depending on which hand it is held) to the left (possibly recessive) hand. Around this are are other various CMP's for Arrows, and Shields)

- 038F41 - C9 4D (As above, except for right (possibly dominant) hand.)



In ROM...

- 0xC1BD - A2 4D 5F (Index Range of Bows and Arrows, checks this range to see if it is allowed in the recessive hand, use this to add more weapons that can be used in the recessive hand.)

- 0xC244 - A2 00 43 (Weapon Must be above this value to be equipped with an Arrow (The game ordinarily uses this value so in theory you could equip Two-Handed weapons with Arrows, if there weren't other checks made to prevent this. Also Special Weapons cannot be equipped with Shields.)


- 0xC27A - A2 4D 53 (Index Range of Bows - Unsure, but best to change it to whatever value you have the others 4D53's set to.)

- 0xC296 - A2 4D 53 (When changed to a new index, will allow you to equip arrows to selected index Only if the arrows were not equipped in the first place and the other checks had not been modified.)

- 0x19127 - C9 4D (When altered to a new Index, it will add the Attack power of both weapons (Arrow + otherwise) together of the right hand.)

- 0x19141 - C9 44 (Right Hand -(possibly dominant hand) Change the 44 to where ever you want the Special Property weapons to start)

- 0x19127 - C9 4D (When altered to a new Index, it will add the Attack power of both weapons (Arrow + otherwise) together (or divide them depending on which hand it is held) to the left (possibly recessive) hand. Around this are are other various CMP's for Arrows, and Shields)

- 0x19141 - C9 4D (As above, except for right (possibly dominant) hand.)

- 0x1F515 - C9 44 (Right Hand -(possibly dominant hand) Change the 44 to where ever you want the Special Property weapons to start)

- 0x1F54B - C9 44 (Left Hand - possibly recessive hand) Change the value to what you have above.)







There's a Lot here, but that's now to be expected with Special Weapons functionality, thank goodness for editors to compound these all into a simple step. Oh yes, I forgot to actually write down the ROM Locations of the Key Items (and Whistle)

0xA597 - C9 1F - Legend Sword (Change to whatever value you'd like.)
0xA59F - C9 EC - All other Key Item Index (Pass and Whistle have two unique entries for some reason.)
0xA524 - C9 ED - Changing this value will change whatever value you set it to, to act like a Chocobo Whistle

And that's that! I may get a post or edit in on arrows tonight (depends how much energy I have left)


 :edit:

Switched my focus. As I had thought, it seemed that the Key Items portion was only half of the puzzle. The rest of it was in very different (and rather obscure) places.



In RAM...


- 01A25C - C9 19 (Legend Sword, Shows up dark "as unsellable" in Shops, change value to desired item.)

-01C2A7 - A2 00 ED (Shows up dark "as unsellable" in Shops, change value to desired items to make them white (Sellable) but don't forget to change the initial index range!)

-01C927 - C9 19 (Prevents you from selling the Legend Sword, change to desired value to prevent selling that item.)

-01C92F - C9 EE (Prevents you from selling any items above this range, can be altered as one wishes.)




In ROM...

-0xA45C - C9 19 (Legend Sword, Shows up dark "as unsellable" in Shops, change value to desired item.)

-0xC4A7- A2 00 ED (Shows up dark "as unsellable" in Shops, change value to desired items to make them white (Sellable) but don't forget to change the initial index range!)

-0xCB27 - C9 19 (Prevents you from selling the Legend Sword, change to desired value to prevent selling that item.)

-0xCB2F - C9 EE (Prevents you from selling any items above this range, can be altered as one wishes.)




« Last Edit: January 14, 2013, 09:14:44 PM by Grimoire LD »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #43 on: January 15, 2013, 03:08:39 PM »
Alright, time to get to Arrows. Since Arrows and Bows are pretty tied together, expect a bit of repeating data.


-01BFBD - A24D5F (Index Range of Bows and Arrows, checks this range to see if it is allowed to be equipped by Bows (And equipped in the recessive hand.))
-01C044 - A20043 (Weapon Must be above this value to be equipped with an Arrow (The game ordinarily uses this value so in theory you could equip Two-Handed weapons with Arrows, if there weren't other checks made to prevent this. Also Special Weapons cannot be equipped with Shields.)
-01C085 - A2545F (Index Range of Arrows, change to where ever you want to change it, allows you to equip Otherwise + a Bow)
-01C08C - A2545F (Index Range of Arrows change to where ever you want to change it, allows you to equip a Bow + Otherwise )



In ROM at...
- 0xC1BD - A2 4D 5F 01BFBD - A24D5F (Index Range of Bows and Arrows, checks this range to see if it is allowed to be equipped by Bows (And if it can be equipped in the recessive hand.))

-0xC244 - A2 00 43 (Weapon Must be above this value to be equipped with an Arrow (The game ordinarily uses this value so in theory you could equip Two-Handed weapons with Arrows, if there weren't other checks made to prevent this. Also Special Weapons cannot be equipped with Shields.)

-0xC285 - A2 54 5F (Index Range of Arrows, change to where ever you want to change it, allows you to equip Otherwise + a Bow)

-0xC28C - A2 54 5F (Index Range of Arrows change to where ever you want to change it, allows you to equip a Bow + Otherwise )




(Several Hours Later...)

Oh boy, as fast as this was to find outside of battle, inside of battle was a headache and a half. It was fairly basic, but not what I expected.

In RAM...

-03F325 - C9 54 (This is the starting range of arrows. Change to whatever the new starting range of your arrows may be.)

-03F35B - C9 54 (It originally prevents arrows from being equipped with arrows and bows being equipped with bow thus preventing (1 manner) of item duplication. This is the End range for what is set at 3F325. It is best to have the two match ranges, as things can get messy otherwise.)

Example: Say you want another arrow but don't want to eat into Shields, you would then change the Bow index, (in another post) and change these two values to the value of the Artemis bow (53) and the Artemis Bow would be treated as an Arrow inside of battle.

In ROM...

0x1F525 - C9 54 (This is the starting range of arrows. Change to whatever the new starting range of your arrows may be.)

0x1F55B - C9 54 (It originally prevents arrows from being equipped with arrows and bows being equipped with bow thus preventing (1 manner) of item duplication. This is the End range for what is set at 3F325. It is best to have the two match ranges, as things can get messy otherwise.)




That leaves only shields! Should hopefully get to that tonight, then I'll probably revisit either items or commands.


 :edit:-
RAM -

Here's the information on Shields. There's not really a lot here, since Shields are not all that complicated. Just two checks are done.

In RAM...

01BFC5 - A2 61 6C (Index Range of Shield + Weapon)
01C069 - A2 61 6C (Index Range of Sheilds)

In ROM...

0C1C5 - A2 61 6C (Index Range of allowed Shield + Weapon)

0C269 - A2 61 6C (Index Range of allowed Weapon + Shield)
« Last Edit: January 15, 2013, 09:22:43 PM by Grimoire LD »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #44 on: January 26, 2013, 09:32:42 PM »
So I spent the better part of the day looking for how Protect/Shell work because let's face it. They're worthless the way they are. But I thought the idea behind them had potential so I went data-diving. Only to meet with some very odd and almost disheartening results. The game passes by each value in a "mirror data" and reallocates stats based on what is present within, I didn't realize this until late, but when I did everything started to click.

I had set every kind of breakpoint on Defense for using Protect but came up each time in a circle, when I found the mirror data in 7E2700 I found leads almost immediately and I am proud to say that I found out how Protect works.

I set out on this hoping to make use of Protect/Shell for my Solo Black Mage mod for Saber and Temper respectively, and I finally found the data necessary for it (At least for Protect which will become Saber)

(Second Mirror! 7E2700 - (For whatever reason the game has a mirror of your in-battle data that it draws from to put in the actual battle data table)

03D866 - AD 2A 27 - (Where it loads the stat to add to +5) e.g changing this to 17 20 will load your Wisdom into your defense +5.

03D869 - 69 05 (Location of Protect Modifier change 05 to what you wish)

03D86F - 8D 2A 27 (Will decide where to put Defense +5) e.g. changing it to 8D 29 27 will change your evasion to Defense +5

NOTE: If you change the the first and second values listed to the same amount you will then be able to continue stacking. Should you change the first value, you will then replace whichever value is the second one with the first value +5.



In ROM this is at...

0x01DA66 - AD 2A 27 ( (Where it loads the stat to add to  then +5) e.g changing this to 17 20 will load your Wisdom into your defense +5.

0x01DA69 - 69 05 (Location of Protect Modifier change 05 to what you wish)

0x01DA6F - 8D 2A 27 (Will decide where to put Defense +5) e.g. changing it to 8D 29 27 will change your evasion to Defense +5



And finally here's the data chart so you can switch its function without fear of what you're switching it to...

00 -Character Identifier - 81
01 - Class - 09
02 - Level - 01
03 - ??? - 00
04 - ??? - 00
05 - ??? - 00
06 - ??? - 00
07 - HP (1) - 55
08 - HP (2) - 00
09 - Max HP (1) - 55
0A - Max HP (2) - 00
0B - MP (1) - 19
0C - MP (2) - 00
0D - Max MP (1) - 19
0E - Max MP (2) - 00
0F - Strength - 03
10 - Agility - 07
11 - Vitality - 02
12 - Wisdom - 08
13 - Will - 03
14 - Modified Strength - 03
15 - Modified Agility - 07
16 - Modified Vitality - 02
17 - Modified Wisdom - 08
18 - Modified Will - 03
19 - ???- 00
1A - ??? - 00
1B - X's to hit - 01
1C - Accuracy - 28
1D - Attack Power - 03
1E - ???- 00
1F - ??? - 00
20 - ??? - 00
21 - ??? - 00
22 - ??? - 00
23 - Magic Evasion - 06
24 - ??? - 00
25 - ??? - 00
26 - ??? - 00
27 - ??? - 00
28 - ??? - 00
29 - Physical Evasion - 1E
2A - Physical Defense - 03
2B - ??? - 00
2C - ??? - 00
2D - ??? - 04
2E - ??? - 15
2F - ??? - 0A



Though as for what I plan as Saber... I'm not yet sure... there's several possibilities here.

1. Use it to increase Raw attack power (as in the above example) by 5 each cast.

2. Use Wisdom in place of the weapon's attack power +5 (Cannot be stacked)

Any other ideas on what might be applicable there?

 :edit: Turns out Shell was right next to it.

0x01DA8A - AD 24 27 ( Where it loads the stat to add to  then +3) e.g changing this to 17 20 will load your Wisdom into your magic defense +3.

0x01DA8D - 69 03 (Location of Shell Modifier change 03 to what you wish)

0x01DA93 - 8D 24 27 (Will decide where to put Defense +5) e.g. changing it to 8D 29 27 will change your evasion to Magic Defense +3

Temper will likely just be X's to hit, +1 for an exorbitant amount of MP (and only for special branches of the Black Mage Class)

 :edit: 2 An Addendum to Bluff

While finding out how Protect/Shell worked , I finally realized what I was missing on getting Bluff to increase any statistic. The "(Where it loads the stat to add to  then +10)"

I went back to its location and lo and behold I missed the value sitting no more than half a word away from it!

to recap...


03EAC8 - A9 10   LDA #$10   A:0011   X:0022   Y:0000 - Load up a 10 (16) into Register A (Change that to what you will)

03EAD0 - BD 17 20 LDA $2017,x[$7E:2017]   A:0010   X:0000   Y:0000   P:envMxdic - Load this 10 (16) into Intelligence Stat.

And to finish it off...

03EADB - 9D 17 20 (Change this to choose where it will be adding the +10 from) Both the second and the third values listed here must be the same for it to properly stack.


In ROM this can all be found at...

0x01ECC8 - A9 10   LDA #$10   A:0011   X:0022   Y:0000 - Load up a 10 (16) into Register A (Change that to what you will)

0x1ECD0 - BD 17 20 LDA $2017,x[$7E:2017]   A:0010   X:0000   Y:0000   P:envMxdic - Load this 10 (16) into Intelligence Stat.

0x1ECDB - 9D 17 20 (Change this to choose where it will be adding the +10 from) Both the second and the third values listed here must be the same for it to properly stack.

With this knowledge of a "second mirror data" I may be able to find out more about commands.
« Last Edit: January 26, 2013, 11:14:10 PM by Grimoire LD »