øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=442.msg3553e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3d1e.htmldelayedslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=442.15e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index3d1e.html.zxZTg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ…¬ôOKtext/htmlISO-8859-1gzip@øÕôÿÿÿÿÿÿÿÿÑHTue, 10 Mar 2020 09:04:50 GMT0ó°° ®0®P®€§²ð®ZTg^ÿÿÿÿÿÿÿÿÔ$ô Spell ASM Finds

Author Topic: Spell ASM Finds  (Read 23006 times)

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #15 on: March 20, 2008, 12:00:50 AM »
I went back and rechecked that part of the subroutine, and it's definitely multiplying by 5/4. I know this because it performs a multiplication subroutine on the modified hit rate and 5, and then shifts the bits of the answer to the right twice (effectively dividing by 4). So I'm not sure where it's going wrong, but that part is multiplying by 5/4. There might be another area that modifies it; perhaps I'll find the answer when I deconstruct more of it.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #16 on: March 20, 2008, 12:06:28 AM »
I'll check with a different spell then.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #17 on: March 20, 2008, 12:18:49 AM »
This looks good for Break/Stone. Hit rate increased a bit, so it sounds legit. I'm not sure if it is applicable to FF4A though (not tested yet).
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #18 on: March 20, 2008, 12:31:27 AM »
Yey, I'm not totally crazy!   :laugh:

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #19 on: March 20, 2008, 12:48:15 AM »
It seems to work on FF4A as well for the most part.
« Last Edit: March 20, 2008, 01:17:55 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #20 on: March 20, 2008, 07:35:49 AM »
Finally! I found the special check that Asura does. It's part of the subroutine that matches the summon spell to its effect spell, and choses the random Asura effect. Within this subroutine, it also sets the target of Asura to all five party slots.

However, it's not going to be easy to replicate this behavior for Life or Phoenix Downs. I'm trying to figure out why they don't work this way already, but all my ideas have been dead-ends so far. There's a targeting check during the spell/item subroutine that removes all the non-targetable slots, and I thought this would be the key, but it is bypassed if the spell is Asura's multi-life or any of the Life spells (Life1, Life2, Recover, Remedy, Vanish). So this can't be it. Somewhere along the line it's removing the already dead targets, but I can't find where it is. It's driving me crazy! Asura, you tricky woman, I thought I had you figured out . . .

 A :cookie: for me and a  :banonsmash: for Asura

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #21 on: March 20, 2008, 09:00:53 AM »
Well, consider this. The spell itself is not naturally multitargetable. Battle scripts such as Rubicante focuses Life1 multitargeting on your characters in a reaction to Fire (not Edge's scripted battle though).

Then there's the monster Zemus's Mind that casts a multitargeted Charm, even though the original spell doesn't normally perform this (though changing the spell's behavior seems to work just fine)...

So it's kinda logicial that overriding spell targeting has priority.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #22 on: March 20, 2008, 04:01:00 PM »
Pray, Sing, Gird/Endure, Peep/Scan (probably doesn't matter though...), Recall/Remember should be affected by this increased hit rate multiplier... (at least Pray is working better in testing)
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #23 on: March 21, 2008, 06:05:25 AM »
Some Magic Defense findings:

  • Magic Defense % gets cut in half if blind. It also gets the 5/4 bonus if the target is in slot 1 (enemy or ally). So I guess this negates the Magic Hit Rate % bonus, and makes an enemy stronger against the rest of your party.
  • If the status bit is set on the spell, the Magic Defense Multiplier is set to 1.
  • If the target is a Toad or charging (from Yang's Power command), the Magic Defense Multiplier is set to 0.
  • If the target is an enemy and its Magic Defense Base is 255 (0xFF), then its Magic Defense % and Magic Defense Multiplier are both set to 99.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #24 on: March 21, 2008, 06:21:14 AM »
Some Magic Defense findings:

Magic Defense % gets cut in half if blind. It also gets the 5/4 bonus if the target is in slot 1 (enemy or ally). So I guess this negates the Magic Hit Rate % bonus, and makes an enemy stronger against the rest of your party.

Edit: Not many enemies that cast spells as the primary attack (or as a counter) are in the front row, so this is somewhat irrelevent. A few enemies comes to mind.. such as the EvilMask or the BladeMan (aka Ghost Knight in FF4A).

Quote
If the status bit is set on the spell, the Magic Defense Multiplier is set to 1.

I guess that's an attempt to make status spells to be "nicer" vs your guys.... somewhat...

Quote
If the target is a Toad or charging (from Yang's Power command), the Magic Defense Multiplier is set to 0.

I'll have to test Toad. Yang has crap for a Magic Defense Multiplier.. which for him solely relies on Agility. You really wouldn't have noticed this normally. At least I can finally tell people that that command is crappier than Jump for a good reason.

Quote
If the target is an enemy and its Magic Defense Base is 255 (0xFF), then its Magic Defense % and Magic Defense Multiplier are both set to 99.

Yes.. it's the next closest thing to invincibility. The Spell Multiplier for your characters never exceed 25 anyways, so it works out.
« Last Edit: March 21, 2008, 06:45:06 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #25 on: March 21, 2008, 06:24:55 AM »
Just tested Toad status... yes, it's confirmed. Wow, I didn't know Toad screwed with the multiplier. Now if Piggy did something else.. other that just disabling Commands and most other spells... I should have bothered testing these status effects at some point...
« Last Edit: March 21, 2008, 06:49:32 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #26 on: March 21, 2008, 06:52:31 AM »
Quote
Edit: Not many enemies that cast spells as the primary attack (or as a counter) are in the front row, so this is somewhat irrelevent. A few enemies comes to mind.. such as the EvilMask or the BladeMan (aka Ghost Knight in FF4A).

The slot number for enemies doesn't seem to correspond with row data. The first enemy in the enemy set is set as slot 1 (a value of 0x80), so all bosses and lone enemies exhibit this behavior.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Spell ASM Finds
« Reply #27 on: March 21, 2008, 06:54:15 AM »
Quote
Edit: Not many enemies that cast spells as the primary attack (or as a counter) are in the front row, so this is somewhat irrelevent. A few enemies comes to mind.. such as the EvilMask or the BladeMan (aka Ghost Knight in FF4A).

The slot number for enemies doesn't seem to correspond with row data. The first enemy in the enemy set is set as slot 1 (a value of 0x80), so all bosses and lone enemies exhibit this behavior.

Does it ever matter that they still die horrible deaths easily?  :tongue:

Edit: Never mind, I should reread more often.

2nd Edit: I'm pretty sure a similar thing is enforced when the enemy starts with 255 Defense as it is with 255 Magic Defense..
« Last Edit: March 21, 2008, 07:05:51 AM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #28 on: March 21, 2008, 07:51:30 AM »
I agree. Most likely, everything that deals with Magic Defense corresponds to Defense, Mag. Def. % to Evade %, etc. We already know some statuses (e.g. Blind) work this way, so I think it's pretty safe to assume Defense stats works similarly.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Spell ASM Finds
« Reply #29 on: March 21, 2008, 09:06:14 PM »
OK, here's what I've figured out on the targeting for multi-Life: I've search within the Spell/Item subroutine over and over, and it's not there. I believe that once you've set targets to "all" or "one", the code goes through a subroutine that eliminates the dead/inactive targets, then calls the Spell/Item subroutine. Asura's multi-revive works because it changes this information back to all targets. I'm not sure why there's a second targeting check within the Spell/Item subroutine . . . I'm sure there's a reason, but I don't know why.

Working on this theory, I set spells with the Life effect (0A) to reset targeting to all, before the second targeting check and after the spell data is loaded. This was successful in creating a multi-revive, but the targeting for the spell would always be "all", no matter who you selected. I also set only the spell Life1 to work this way, and it worked as well. So, you could create a single spell or item that would revive everyone, or let all revive spells/items work this way, but it would always target all allies.

That's as far as I'm going to go on this for now. I've already gone farther than I intended to in researching it -- I was able to replicate this behavior in summons a while ago, which is all I needed. All this work was so that I could create a Phoenix summon (no surprise there) for my hack. I need to get back to working on it (rather than obscure ASM data) if I intend to ever finish it. If someone else wants to pick up where I left off, I can give you my notes on the Spell/Item subroutine and give you the (rather large range of data) of where I think the first targeting check is.