Author Topic: Aim and Regen Commands  (Read 1100 times)

Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 346
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Aim and Regen Commands
« on: July 17, 2015, 01:56:57 PM »
Due to certain changes I've been making in my project (tying the Bows and Arrows indexes to 2 now-dummied weapons to allow the rest of the bows/arrows become new weapons), I cannot for the life of me get the Aim command to function properly.correctly. The main reason for this I believe is because Aim was only meant for bow & arrow, or the command checks that a character has some weapon in each hand.

Is there a way to allow it to function with a one-handed weapon? I tried messing with it's ranges in FF4kster, but to no avail. I'm not actually sure of the benefits Aim would have now that I nexed Bows/Arrows (I think all the command does is ensure a hit? I'm not sure what else it normally does)



I'm also wondering if it's feasible to tweak the Regen command to heal MP periodically instead of HP based off the Wisdom or Willpower stat. Seeing as Yang is the recipient of this command, I don't think it would be game-breakingly overpowered if I were to go this route.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Kea

  • Vargas
  • *
  • Posts: 94
    • View Profile
Re: Aim and Regen Commands
« Reply #1 on: July 17, 2015, 08:04:36 PM »
As far as I know, the only mechanical thing Aim does in any version is set your base hit to 255 for that attack. Couldn't help you with recoding it (little experience with SNES assembly).

Making Regen heal MP instead of HP should just be a matter of tweaking one or two bytes, but making it run off of the user's stats would require some rewriting.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Aim and Regen Commands
« Reply #2 on: July 17, 2015, 08:30:09 PM »
Due to certain changes I've been making in my project (tying the Bows and Arrows indexes to 2 now-dummied weapons to allow the rest of the bows/arrows become new weapons), I cannot for the life of me get the Aim command to function properly.correctly. The main reason for this I believe is because Aim was only meant for bow & arrow, or the command checks that a character has some weapon in each hand.

Is there a way to allow it to function with a one-handed weapon? I tried messing with it's ranges in FF4kster, but to no avail. I'm not actually sure of the benefits Aim would have now that I nexed Bows/Arrows (I think all the command does is ensure a hit? I'm not sure what else it normally does)



I'm also wondering if it's feasible to tweak the Regen command to heal MP periodically instead of HP based off the Wisdom or Willpower stat. Seeing as Yang is the recipient of this command, I don't think it would be game-breakingly overpowered if I were to go this route.

Aim *should* be a simple range check which my information was put into the editor, I could have sworn we tested this out long ago... but I did just try it out and it didn't change anything. I still have notes regarding Aim's Range check in ASM, so let me find that fast...

Here we are, they're some of my older notes but should still be readable...
Quote
In ROM this is located at...

01A48E - C9 05 (Compare with Dark Wave's Command)
01A492 - C9 08 (Compare with Sing's Command)
01A496 - C9 0C (Compare with Aim's Command)
01A49A - C9 10 (Compare with Twin's Command)


01A4F8 - C9 61 (Right Handed - If the Weapon value is this or above this (or 00?) Dark Wave cannot be used)
01A504 - C9 61 (Left Handed -  If the Weapon value is this or above this (or 00?) Dark Wave cannot be used (May be Equipped Hand)

01A50E - C9 44 (Right Handed - If the value is this or above this, Sing can be used)
01A512 - C9 4D (Right Handed - If the value is this or above this, Sing cannot be used)
01A51C - C9 44 (Left Handed  - If the value is this or above this, Sing can be used)
01A520 - C9 4D (Left Handed - If the value is this or above this Sing cannot be used)

01A52A - C9 54 ( - If the value is this or above this Aim can be used.
01A52E - C9 61 (Right Handed - If the values it this or above this Aim cannot be used (Looking for Bow? This would hint that Aim can be used with two Arrows equipped or two bows... well I'll give it a shot... Yep. Looks like it's right. Aim can be used with Two Bows or Two Arrows. An interesting non-check. Good on the programmers.)

As for Regen... that was actually one of my first projects and I failed. I still think I'd fail if I looked at it now. You see the amount of healing it does to the player is through a very specific set of code which runs through into normal HP recovery. In the past I had a lot of trouble changing it, and in the end had no success. Making it based on Spirit or Will though was done for Combat Boost where it is based on the character's Will.


Bahamut ZERO

  • Cagnazzo
  • *
  • Posts: 346
  • Gender: Male
  • If ye're takin a beatin, hop in de back row!
    • View Profile
Re: Aim and Regen Commands
« Reply #3 on: July 18, 2015, 12:09:12 PM »
As far as I know, the only mechanical thing Aim does in any version is set your base hit to 255 for that attack. Couldn't help you with recoding it (little experience with SNES assembly).

Making Regen heal MP instead of HP should just be a matter of tweaking one or two bytes, but making it run off of the user's stats would require some rewriting.

Hmm, looking at the FF4 Reference Book site,  Aim just sets hit rate to 99%, so yeah you're right on the money there.  It was supposed to also have  Bow damage + Strength 1/4, but that only happens in FF4A (and the ds version I'd imagine as well).



Due to certain changes I've been making in my project (tying the Bows and Arrows indexes to 2 now-dummied weapons to allow the rest of the bows/arrows become new weapons), I cannot for the life of me get the Aim command to function properly.correctly. The main reason for this I believe is because Aim was only meant for bow & arrow, or the command checks that a character has some weapon in each hand.

Is there a way to allow it to function with a one-handed weapon? I tried messing with it's ranges in FF4kster, but to no avail. I'm not actually sure of the benefits Aim would have now that I nexed Bows/Arrows (I think all the command does is ensure a hit? I'm not sure what else it normally does)



I'm also wondering if it's feasible to tweak the Regen command to heal MP periodically instead of HP based off the Wisdom or Willpower stat. Seeing as Yang is the recipient of this command, I don't think it would be game-breakingly overpowered if I were to go this route.

Aim *should* be a simple range check which my information was put into the editor, I could have sworn we tested this out long ago... but I did just try it out and it didn't change anything. I still have notes regarding Aim's Range check in ASM, so let me find that fast...

Here we are, they're some of my older notes but should still be readable...
Quote
In ROM this is located at...

01A48E - C9 05 (Compare with Dark Wave's Command)
01A492 - C9 08 (Compare with Sing's Command)
01A496 - C9 0C (Compare with Aim's Command)
01A49A - C9 10 (Compare with Twin's Command)


01A4F8 - C9 61 (Right Handed - If the Weapon value is this or above this (or 00?) Dark Wave cannot be used)
01A504 - C9 61 (Left Handed -  If the Weapon value is this or above this (or 00?) Dark Wave cannot be used (May be Equipped Hand)

01A50E - C9 44 (Right Handed - If the value is this or above this, Sing can be used)
01A512 - C9 4D (Right Handed - If the value is this or above this, Sing cannot be used)
01A51C - C9 44 (Left Handed  - If the value is this or above this, Sing can be used)
01A520 - C9 4D (Left Handed - If the value is this or above this Sing cannot be used)

01A52A - C9 54 ( - If the value is this or above this Aim can be used.
01A52E - C9 61 (Right Handed - If the values it this or above this Aim cannot be used (Looking for Bow? This would hint that Aim can be used with two Arrows equipped or two bows... well I'll give it a shot... Yep. Looks like it's right. Aim can be used with Two Bows or Two Arrows. An interesting non-check. Good on the programmers.)

As for Regen... that was actually one of my first projects and I failed. I still think I'd fail if I looked at it now. You see the amount of healing it does to the player is through a very specific set of code which runs through into normal HP recovery. In the past I had a lot of trouble changing it, and in the end had no success. Making it based on Spirit or Will though was done for Combat Boost where it is based on the character's Will.




Based on your notes, it sounds like the command looks through the Bow and Arrow ranges, then checks that both hands have a weapon in them (combination of bow and arrow, bows, or arrows), then runs a check of the Aim ranges to set it's usability.

Though now that I've read up a bit more on the Aim command itself,  I'm not too worried about losing access to it by essentially removing bows/arrows.  Her accuracy doesn't change much at all now that her weapons don't have the penalties of bows or arrows, so perhaps I'd be better off adding it to my Gamebreakingly OP/Wasted space list alongside Boast, Cry, and Peep haha.


It's a shame Regen is set up the way it is. I was going to use that as  a way to balance Yang's high-powered Wishes and his intentionally low MP, but now that I think about it, the low MP itself acts as more of a balancer since once it hits 0 those spells essentially become a failure chance for the couple no-cost skills also set. :) I'll just retweak Regen's message so it'll mention HP again instead of MP, since normal Regen still fits this Yang's character.

Quote
Making it based on Spirit or Will though was done for Combat Boost where it is based on the character's Will.


Oh yeah, I forgot Combat Boost did that! That's certainly a much better system than vanilla FF4's locked set rate.
I update my graphics thread on almost a daily basis, so keep an eye out for new stuff!

Kea

  • Vargas
  • *
  • Posts: 94
    • View Profile
Re: Aim and Regen Commands
« Reply #4 on: July 19, 2015, 12:50:56 AM »
Oh, one thing I missed regarding Aim - it also sets your target's Evade to 0%. That's important since hit and evade calculations are separate.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,682
    • View Profile
Re: Aim and Regen Commands
« Reply #5 on: July 19, 2015, 01:02:07 AM »
Oh, one thing I missed regarding Aim - it also sets your target's Evade to 0%. That's important since hit and evade calculations are separate.

Would be meaningful if default FFIV Actually gave the enemy's their proper Evasion! Also, it doesn't quite give 99% accuracy, it gives it the full 255%, but I think something happens in the Fight routine where its truncated down to 99%. It's kind of humorous how it gets to 255 actually. It takes the 0% evasion that was stored in the enemy's stats and just subtracts 1 to make it roll over to 255.

The real irony I find is that someone was not aware of how their own programming worked. Any changes made to the Mirror Stats are not brought back from that single phase of battle so the idea to use the Push and Pull system was meaningless in the first place.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Aim and Regen Commands
« Reply #6 on: August 17, 2017, 01:44:04 AM »
I'm not sure if this is worth thinking about, but it's probably 2 years too late.

In FF2US, Asura casts Cure4/Curaja instead of Protect (due in part that Protect was dummied out.... for the most part, except until you fight Zemus's Breath which has 2 of the dummied spells intact - the Dispel effect can still be seen under the Energy Staff under Reflect, but I digress...).

When you deal enough damage to Asura, Cure4 stops healing Asura HP... it starts to most likely become MP due to overflow or underflow (or some truly horrible erroneous logic) due to monsters having more than 9999 HP - chances are it is capped at like ~16384HP or something (remember Cure4 attempts to heal all HP when single targeted, using a specific formula).

I'm not sure if this will help you, but whatever I guess.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3