166
Final Fantasy IV Research & Development / Re: Grimoire LD's Notes, Methods, and Hacks (Basic Attack/Defense Disassembly)
« on: September 26, 2013, 02:19:15 AM »Counter Routine
Well... that seemed straightforward enough.
This is such a waste of space and opportunity. For whatever reason the game has four extra bytes allocated to it (possibly more) that would easily allow someone to add in an Elemental or Status component.
I will have to move away slightly from my ordinary coding (as shown through Geiger's) to get the point across...
This is what is at 03DDD0 Ordinarily
2E 03 39 4C AF C9 EE 81 38 60 - The 60 is the RTS which takes it out of the routine, but it never seems to be properly read. Nor are the three bytes before it as far as I could tell. It has the barebones basic of being an attack formula without anything added to it.
To...
Say we wanted to add Elemental to this...
2E 03 39 20 30 E1 4C AF C9 60 - This adds in 20 30 E1 Or Jump to E130 which is the Elemental Damage Routine.
Say you wanted Cecil to learn a series of Elemental Sword Attacks, this change would allow the Counter Formula to do so and if you didn't want the data to be the same exact as your physical attack you would change the 7E269D to something else desired. Maybe base it on Cecil's Current MP making it scale in power (and if controlled properly) but shouldn't overtake the power of the available swords. You could also, in essence, cannibalize Sing to give Cid a "Random Element Attack" skill. This is quite a unique formula and it may just be better to expand on it rather than worry about Absorb too much.
Well, it's a straight damage attack powered by your actual weapon power... it's the basic idea that I made for a hack that replaced the godawful Goblin's Punch to the same concept that was used in FF5 (the FF4 version is technically better... plus it's great for a hack).
Damage, Poison (Venom, Poison) Routine.
A bit of deja vu... well I guess all of those formula's follow a similar progression so it makes sense that they might somewhat repeat themselves. The definitions of the repeated Jumps are explained in the Mage Subroutine above. No surprises here. While you can change the inflicted status the Timers will likely become askewed because of the absence of Poison.
If you could find the damage algo, that would be greatly appreciated.
Odin Routine
Now it makes sense! The reason why Sylph is broken and Odin is not, is because the loop has the 80 attached and it loops immediately to that subroutine, therefore counting all five slots.. As far as I can tell the Sylph formula may have a lot unnecessary fluff that the Odin formula bypasses through a jump rather than having the formula attempt to add 80 itself and fail in the long run. Even so the game doesn't necessarily take Odin's formula into consideration as using Odin as another character will reduce the MP of that character and not just Rydia if Sylph is used. However there is a strange measure that goes along with this where if another character uses Odin, their MP will become Rydia's current MP. But this is only done if Odin fails. If it succeeds nothing special happens with MP.
The Level Checking portion of the spell seems to be located elsewhere. But if the Level Check does not succeed than the game does not even try to load the rest of the routine. Even if you do succeed you have a 50/50 chance of succeeding in using it. That seems a bit low so for balancing purposes it may be best to increase the player's chances a bit to maybe 60-65% chance of success.
I haven't really figured out the level check, but it is more prevalent in the GBA port than it is the SNES ports.
Count Routine
Not a very long or complicated code, but this doesn't answer the reasons why the game has trouble killing more than two monsters with Count. Not much help there, I'm afraid.
@Chillfeez - That spell is in desperate need of some help. Unfortunately I can't begin to fathom where this level check is. It may deal something special with simply choosing the spell rather than anything leading up to its casting.
Count is Reflectable... and has serious bugs in its design. Try it and you'll see really weird stuff with the ATB.
Recover 1/10 - Recover 1/3 Target's HP (Remedy/Absorb) Routines
Another bizarre reference to Target Strength, again it seems to automatically make the damage recovered 9999. This may have been in earlier plans or something. Since it can't be seen in the normal game and there is no logical way of activating it just like with Explode. It is interesting to see a Routine inside of a Routine in the form of Absorb though.
I'm trying to recall if there were monsters that used Remedy (1/10 of maxHP) that weren't boss monsters.. I know there are a number of monsters that use Absorb (1/3 of maxHP) that aren't bosses...
I don't think there's any monster that manipulates its Attack Power though (it's hard to recall at this hour)... but something like the "monster that has no image" might be the one. It has the max attack power set to it (like the Dark Elf YOU FOOLS version). I've kinda envisioned that monster to be the one where you convert the 2-handed Crystal Sword to a one-handed version. That would make for an interesting battle.
Search Routine
I don't know what to make of this routine, honestly. Using it as if it were a spell didn't appear to do much of anything to monster targeting.
It's supposed to set the monster's next target to the one previously chosen by Search. That's why the TrapDoors have the giveaway secret to Reflect.
It is also used by the Last Arm for Reflect... but also changes the "Target All" of its Fission attack (self-explode, damage everyone) to whoever that target was. It's only good for the enemy that uses it, but I suspect you can manipulate it for the same thing Golbez uses.
Quote
Hatch Routine
Curiously enough it will not work if a player tries to use it. I'm not sure why that is.
Hatch applies to the monster that uses it and has the status. It is the only reaction to damage in virtually any battle script.
Quote
Something Happens to Adult Rydia Routine
Now this is a really strange one. Apparently it is another formula that looks for a specific character (and again that character is Rydia). That battle formation has to hide Rydia somehow in a manner that I don't fully understand. It looks to put some sort of status on her and keep her hidden from sight and then removes all timers attached to her. What this routine seems to say is that Rydia is always actually in the battle, just not present. Hmm...
But for now that is all but one of the Routines (Yousei handled those I didn't go over long ago) aside from Heal (because it's apparently nearly 200 Bytes long!) I'll get to that eventually. For now I should see if I can use any of this newfound knowledge on Commands.
The status is most likely Hide (the same one Edward uses), because the animation isn't really all that special (the unhiding part, which is to show up in the battle).