јAslickproductions.org/forum/index.php?PHPSESSID=jr78ed1e4bmu7qogp18bffjs15&topic=421.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index05cc-2.htmlslickproductions.org/forum/index.php?board=13.480e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index05cc-2.html.zxЌg^џџџџџџџџџџџџџџџџџџџџШржЪOKtext/htmlISO-8859-1gzip@јеЪџџџџџџџџTue, 10 Mar 2020 15:19:17 GMT0ѓАА Ў0ЎPЎ€ЇВ№ЎЌg^џџџџџџџџD&Ъ Summon Effect Data Peculiarities

Author Topic: Summon Effect Data Peculiarities  (Read 5111 times)

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Summon Effect Data Peculiarities
« on: March 12, 2008, 06:52:09 PM »
I've been modifying the spell effects (and audio/visual effects) and noticed a few restrictions on the summon spells. The data of the first set of summon spells (within the spell effect data) only contribute the targeting/casting time and the displayed MP cost. The second set of spells (within the enemy attack data) contribute the actual effect of the spell. Also, it's this second set's corresponding audio/visual effects that are used when the spell is cast.

A while ago I tried to redirect the targeting of the summon spells to characters, and unless it's intended that way (i.e. Asura), the summon will automatically fail. The summon sprite will show for half a second, but disappear (like Odin's failure). So there must be a safeguard against hurting your own characters that way, although I have no idea why. None of them are reflectable, so it doesn't make sense to me. It's annoying, because it means there can't be any healing/beneficial summon except Asura (and Sylph, if you count its healing). If anyone can fix this/figure a way around it, I'd be really grateful.

When modifying the visual effects of the summons, the last byte of the four (what I call the "effect movement") needs to stay the value it is at. This values range from 0A-1A, starting with 0A for Imp, 0B for Bomb, and so on. If you change these, the summon sprite will stay on the screen (although the battle will still be fine), and the sprite's movement will be messed up. The audio effects for some of the summons are contained within this "effect movement" byte, too (similar to White/Holy).

Also, as is known, Sylph doesn't cost any MP. Does anyone know why? I thought it would be a mismatch between the summon spell and it's effect spell, but that's not the case.

Please post any other peculiarities about the summon data if you have any.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Summon Effect Data Peculiarities
« Reply #1 on: March 12, 2008, 07:08:47 PM »
All I can tell is that the first set of summons (in the order that the spell list is in) is display data.. though I bet it is used in the MP check (spell highlighting). The second set is obviously the math part, but it's a little more than that. In JCE's hack, only one of Asura's spells only consume the amount that's listed in the menu, so the internal data is taken into account here.

As for Sylph, it might simply just be the spell MP consumption for it is hardcoded, or the range of spells are hardcoded or something.. or maybe bad logic? Go figure.

Offensive summons were never meant to target your guys ever...

There's a chance that there is some data tied to the spells effects themselves.. that's probably what you want to look at.
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: Summon Effect Data Peculiarities
« Reply #2 on: March 12, 2008, 11:18:13 PM »
Asura's multi-Life targeting is also special. If you make a normal Life/Raise spell multi-targeted, it will ignore already dead characters. (I was trying to make a multi-Raise spell, but I can't get around that quite yet.) Asura's revive is special because it will target all characters, even if they are already dead.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Summon Effect Data Peculiarities
« Reply #3 on: March 12, 2008, 11:28:08 PM »
Asura's multi-Life targeting is also special. If you make a normal Life/Raise spell multi-targeted, it will ignore already dead characters. (I was trying to make a multi-Raise spell, but I can't get around that quite yet.) Asura's revive is special because it will target all characters, even if they are already dead.

I'm trying to remember if it were possible to revive Undead targets to kill them in FF4. I forget if that was a random event or bad memory.. but IIRC undead are the only targets that don't respawn on the revive trick.

The only difference as far as I can tell between Life1/Life2 and Asura's Life spell are their hit rates.

Multitargeted Life1/2 should work (I'll have to test and see).. Rubicante casts a multitargeted Life1. It is possible that it may fail simply due to Magic Evade.

Edit: It seems to work fine on my end. If you're casting this via a low Will character, it might not work the way it should.
« Last Edit: March 12, 2008, 11:36:34 PM 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: Summon Effect Data Peculiarities
« Reply #4 on: March 13, 2008, 04:18:15 AM »
Really, it worked!? Were dead characters in your party? When I casted Life on everyone, it ignored the dead characters, like other status effects. It wasn't a case of Magic Evade, the graphic didn't even show for the dead characters.

If this was the case and it did work, what version did you test on? My test was on FF2us.

Phoenix

  • FF4 Hacker
  • *
  • Posts: 456
    • View Profile
    • Phoenix Hacks
Re: Summon Effect Data Peculiarities
« Reply #5 on: March 13, 2008, 04:26:54 AM »
Summons will also fail if the enemies have reflect and it is not set to ignore reflect. In other words, they're non-reflectable, even if you set the reflectable bit.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Summon Effect Data Peculiarities
« Reply #6 on: March 13, 2008, 04:37:41 AM »
Really, it worked!? Were dead characters in your party? When I casted Life on everyone, it ignored the dead characters, like other status effects. It wasn't a case of Magic Evade, the graphic didn't even show for the dead characters.

If this was the case and it did work, what version did you test on? My test was on FF2us.

I had this same problem, I scrapped the "Mega Phoenix" item from my hack because I couldn't get it working properly.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Summon Effect Data Peculiarities
« Reply #7 on: March 13, 2008, 06:46:38 AM »
Hmm.. I guess there is a problem with targeting dead targets.

Rubicante's version does work for sure, but that's dependant on magic evade (since it targets "the enemies") for success.

I'm currently guessing there is some bit that's being executed with Asura's Life1 that Life1 isn't executing...

The only thing Asura has going for her is "double effective magic power"... but Life1 doesn't seem to rely on anything unless there is spell power data I'm not aware of.
« Last Edit: March 13, 2008, 07:21:26 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: Summon Effect Data Peculiarities
« Reply #8 on: March 13, 2008, 07:21:11 AM »
A bit within the effect data?

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Summon Effect Data Peculiarities
« Reply #9 on: March 13, 2008, 07:25:24 AM »
Probably.. multitargeting life only works under two instances, so there has to be something to it.
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: Summon Effect Data Peculiarities
« Reply #10 on: March 13, 2008, 07:41:54 AM »
You know, it could simply be hardcoded. Life/Life2 is probably checking against a live person first.. whereas Asura's Life varient checks against the dead first.

By default, dead people can't be targeted by multitargeted spells, which is probably why this effect occurs.
« Last Edit: March 13, 2008, 08:00:49 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: Summon Effect Data Peculiarities
« Reply #11 on: March 13, 2008, 08:22:34 AM »
That's exactly what I was going to say. I've tried copying the effect data for Asura's Life spell exactly, and it doesn't work, which mean it's not contained in the effect data. It must hard-coded within the spell subroutines. If you've looked at the Tower of Bab-il documents on the spell code ASM, the subroutines do special checks for certain spells, so it's probably that way for all the little inconsistencies in the spell list.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Summon Effect Data Peculiarities
« Reply #12 on: March 13, 2008, 08:35:40 AM »
That's exactly what I was going to say. I've tried copying the effect data for Asura's Life spell exactly, and it doesn't work, which mean it's not contained in the effect data. It must hard-coded within the spell subroutines. If you've looked at the Tower of Bab-il documents on the spell code ASM, the subroutines do special checks for certain spells, so it's probably that way for all the little inconsistencies in the spell list.

That's not entirely surprising, like Cure4 always gives max healing when single targeting... and such stuff.

The only thing I can think of is that most summons are primarily hardcored to fail against allies only because the animation wouldn't look right (note how the effects make your characters disappear during the sequence for obvious reason). Asura kinda avoids that because there is most likely code for applying the end effect, just like how the Mist-Dragon+Ring casts a variant of Blink after being casted.

I've actually never seen the Tower of Bab-il's documents ever.  :tongue: Link?
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: Summon Effect Data Peculiarities
« Reply #13 on: March 13, 2008, 09:24:17 AM »
I have a revised theory on Sylph's MP consumption. Other than being hardcoded, it could be classified as an "monster spell attack". Since monsters in this game can cast spells regardless of their MP, that's probably what this spell may have been classfied as somehow.
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: Summon Effect Data Peculiarities
« Reply #14 on: March 13, 2008, 05:33:25 PM »
The Tower of Bab-il documents can be found on Romhacking.net, but here's the direct link:

http://www.romhacking.net/docs/%5B97%5Dff2usdocs.zip

Along with the offsets document from Yousei's FF4Edit, those files started me on my way to understanding the FF4 ROM. I think you'll find them helpful, although maybe not as much as I did since you know more starting off. But there's still some good tables and things in there, like the spell data and spell code explanation, and the enemy data table.

If you look in the spell code explanation document, they actually show the check for Cure4 when single targeting, so you're right on that. That's what made me think the same goes for other spells.

As for Sylph, I don't think there is an "enemy attack" classification for spells, other than the 8-letter names vs 6-letter names. I think enemies simply don't take MP cost into account (since they don't even have MP data, right?). If you change an enemy attack to have an MP cost, enemies can still cast it (no matter the cost) but if you add the spell to your list, it will still cost your character MP.
« Last Edit: March 13, 2008, 05:43:05 PM by Phoenix »