Author Topic: Completing Weapon-Spell Magic Hacks  (Read 6346 times)

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Completing Weapon-Spell Magic Hacks
« on: March 12, 2008, 01:35:34 PM »
Thanks Paladin for posting some of the relevent info in this thread: http://slickproductions.org/forum/index.php?topic=405.0

I wrote some data when testing in this thread: http://slickproductions.org/forum/index.php?topic=348.0

The data Paladin wrote matches up with this.

I noticed a few strange bits of data in the game..

Power Staff apparently was supposed to cast Berserk, but can't because the spell power data is 0. You will hear the "spell to be casted" when using vs Reflect.

Flame Whip has some power, but has no spell associated with it. I used the FF4 editor for this game and added Fire3 to the weapon, and it was casted... not spell effects unfortunately, but the damage was dealt. The weapon was probably supposed to have Fire3 built into it originally (think of how FF5's equivalent weapon operated).

Wooden Hammer was supposed to have cast Lit2, but can't because the spell power data is 0. You can see part of the effect vs Reflect.

So, to get weapon spell magic working properly, the power has to be at least 1, edit (aka use the editor or hack it manually) to manipulate the spell being cast by the weak (though, I don't even know what location is edited for it to be enabled), and change the spell visual so we're not confused (unless you like using a different spell's visual+sound).

In any case, there are 3 weapons that seem to have been not properly completed or tested by the original developers.
« Last Edit: March 12, 2008, 02:25:55 PM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

JCE3000GT

  • Master of FF4
  • *
  • Posts: 1,429
  • Gender: Male
  • Vladof
    • View Profile
    • BlitzKrieg Innovations
Re: Completing Weapon-Spell Magic Hacks
« Reply #1 on: March 12, 2008, 03:48:32 PM »
In any case, there are 3 weapons that seem to have been not properly completed or tested by the original developers.

I think these weapons were meant to do or be something else.  OR, it could just be laziness on Square's part--which is a more likely conclusion.   :laugh:

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #2 on: March 12, 2008, 09:22:22 PM »
Ok, it seems like Shields can do the magic as well.. I bet if you were to change the proper data, Shields can cast spells as well. The shared value the game checks is Magic Defense... so you would have to start there.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: Completing Weapon-Spell Magic Hacks
« Reply #3 on: March 13, 2008, 11:04:14 PM »
I hadn't noticed that on the Wooden Mallet...

Here are a couple others I noticed.

In FF-II version, both the Defense Sword and Murasame have the GFX set for "Protect" and the Power/Enable byte set to not 0, so the weapons appear to cast the spell but there is no spell set in the main data so all you get is the visual effect and sound effect, but the spell isn't really cast. I suppose this was done since they dummied Protect out of the game for whatever reason.

In both FF-II and and FF-IV-Normal the Elven bow appears to have the GFX set for "Shell" but the Power/Enable byte is 0 and there is no spell set in the main data. This looks like another one like the Mallet and Flame Whip.

It's a bit late to mess with tonight, but I am going to take a look at the shields and see if they will cast something...

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #4 on: March 13, 2008, 11:17:08 PM »
I hadn't noticed that on the Wooden Mallet...

Here are a couple others I noticed.

In FF-II version, both the Defense Sword and Murasame have the GFX set for "Protect" and the Power/Enable byte set to not 0, so the weapons appear to cast the spell but there is no spell set in the main data so all you get is the visual effect and sound effect, but the spell isn't really cast. I suppose this was done since they dummied Protect out of the game for whatever reason.

Yes, that's notable for FF2US only. Protect is still usable by the Mind monster when responding to physical attacks. FF4 and the easytype version have it working fine.

Quote
In both FF-II and and FF-IV-Normal the Elven bow appears to have the GFX set for "Shell" but the Power/Enable byte is 0 and there is no spell set in the main data. This looks like another one like the Mallet and Flame Whip.

This is just FF2US only as well. In FF4 (both normal and easy type), the spell is operational for that weapon. You can see the Mind monster cast this in response to a Holy elemental magic attack.

Quote
It's a bit late to mess with tonight, but I am going to take a look at the shields and see if they will cast something...

Sure, no rush.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: Completing Weapon-Spell Magic Hacks
« Reply #5 on: March 14, 2008, 06:40:29 PM »
Well I just tried giving the Paladin / Light Shield the ability to cast magic (Chose Fire 3 at random) using FF-II v1.0. The targeting acts like Fire 3 but it just says "Nothing Happened" when it tries to cast. This after setting the "Enable/Power" byte to a value greater than $00 and setting the visual effect to the appropriate spell.

The extra 48 bytes after the weapon's "Enable/Power" byte table are all set to $FF so they appear to be just empty space and not used for the shields.

I didn't test other shields, so if someone wants to do an exhaustive test...

It's probably just as well, you'd be really raising the Magic Defense of the shields to map black magic to them if it had actually worked ( although I guess an argument for some low index white magic could have been made like Holy which is $0B).

Oh...and to be clear I just documented the data in that spreadsheet after looking it up in the ROM. The offsets came from various sources including some people here.
« Last Edit: March 14, 2008, 06:49:11 PM by Paladin »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #6 on: March 14, 2008, 06:51:03 PM »
Hmmm, try tweaking a different weapon that doesn't normally have a spell then?...
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: Completing Weapon-Spell Magic Hacks
« Reply #7 on: March 14, 2008, 07:00:13 PM »
I've done plenty of that. I'm working on a hack right now that has Ragnarok casting Flare, and the Dragon Lance casting Dark Bahamut's MegaFlare.

I also have the Deathbringer and Assassin's Dagger casting Doom.

As long as you set the Power/Enable byte to something greater than 00 and the Spell Cast byte to something between $01-$BF weapons appear to cast spells.

Looks like just the shields won't take the data.


I'm also having some fun with the weapons animation data that Dragonsbrethren shared. Like making the Flame Whip use the fireball attack animation that the Flame Sabre and Flame Spear use. And the Electric Whip uses the "lightning strike" animation that only the Dragon Lance used.
« Last Edit: March 14, 2008, 07:05:17 PM by Paladin »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #8 on: March 14, 2008, 07:03:47 PM »
Awesome. One more thing then. Test to see what the spell multiplier range can be. AFAIK, the max was 8 in the data, but I get the feeling it could be far higher.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: Completing Weapon-Spell Magic Hacks
« Reply #9 on: March 14, 2008, 07:14:22 PM »
I just set the Holy/White Lance to have an Enable/Power value of FF and it just sufficiently Nuked some enemy for 9999 damage so looks like it will take any value between 01-FF.

I can't remember what thread it was where I got the offset range for those enable/power values but there was a discussion where someone tested the power values of a weapon that cast a spell and actually casting the spell as magic...

I also think the damage may be calculated as if the caster normally cast the spell. For example I messed with giving the Dragon Whip the Dark Bahamut's MegaFlare, as I had done with the Dragon Lance. I set the power/enable byte to $05 for both. When Cain used the lance the damage was 3000 something to each enemy (that mega flare is multi targeted only). When Rydia used the whip the damage was like 8000 or so per enemy (which wasn't a behavior I wanted). Now I think that particular spell is pretty strong anyway. But it does look like the game uses the stats of the person equipped when the spell is cast, which I guess makes sense. It may be a good idea to really test that out further...

« Last Edit: March 14, 2008, 07:28:45 PM by Paladin »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #10 on: March 14, 2008, 07:31:59 PM »
I just set the Holy/White Lance to have an Enable/Power value of FF and it just sufficiently Nuked some enemy for 9999 damage so looks like it will take any value between 01-FF.

That's not really a great test...  :tongue:

Try giving it Fire/Ice/Bolt1 (the spell, no need a graphics change here) and a value of FF. The damage range should always fall between 4080-6120 vs enemies that have 0 magic defense (like the Imp). That should be enough for me as a confirmation.

Quote
I think it may work as if the caster normally cast the spell. For example I messed with giving the Dragon Whip the Dark Bahamut's MegaFlare, as I had done with the Dragon Lance. I set the power/enable byte to $05 for both. When Cain used the lance the damage was 3000 something to each enemy (that mega flare is multi targeted only). When Rydia used the whip the damage was like 8000 or so per enemy (which wasn't a behavior I wanted). Now I think that particular spell is pretty strong anyway. But it does look like the game uses the stats of the person equipped when the spell is cast, which I guess makes sense. It may be a good idea to really test that out further...

The spell MegaFlare has the power of 255.. and split damage is ignored. I'm not sure what monsters you're testing it on (like, testing spells like that on a Behemoth (254 magic defense) would be radically different than those on an Red Dragon (0 magic defense) in FF2US). AFAIK, item based spells don't use your stats... except for level based spells such as Sleep, Hold, or Weak/Tornado.

Enemy's Megaflare Spell Damage According To Your Data:
1020 * 5 * 1.0 (worst case) = 5100 damage (assuming targets with 0 magic defense)
1020 * 5 * 1.5 (best case) = 7650 damage (assuming targets with 0 magic defense)
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: Completing Weapon-Spell Magic Hacks
« Reply #11 on: March 14, 2008, 07:42:52 PM »
Alright...

I equipped Rydia (Adult) at level 66 with the Flame Rod.  It normally has a power value of $03

I attacked a common Imp and it did 267 points damage, and pretty consistently does that kind of damage.

I set the power value to $FF and it did 9999 points of damage, again to a poor common variety Imp loitering about Baron.

Here are some other results:

128 = $80 = 9999 vs. Imp
64 = $40 = 5250 vs. Imp (appx.)
32 = $20 = 2450 vs. Imp (appx.)
16 = $10 = 1200-1500 vs. Imp (appx.)
8 = $08 = 1000-1500 vs. Imp (appx.)


The flame rod does just have Fire 1 mapped to it like it normally does.

Does this help? It looks like it busts the damage amounts you expected.
« Last Edit: March 14, 2008, 07:54:34 PM by Paladin »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #12 on: March 14, 2008, 07:49:04 PM »
Alright...

I equipped Rydia (Adult) at level 66 with the Flame Rod.  It normally has a power value of $03

I attacked a common Imp and it did 267 points damage, and pretty consistently does that kind of damage.

We're not testing the physical attack... although my lack of faith in Rods are founded.  :tongue:

Quote
I set the power value to $FF and it did 9999 points of damage, again to a poor common variety Imp loitering about Baron.

The flame rod does just have Fire 1 mapped to it like it normally does.

Does this help? It looks like it busts the damage amounts you expected.

Hmm.. maybe I did the math wrong.. lemme double check.

16 (base spell power) * 1 (worst case) * 255 = 4080
16 (base spell power) * 1.5 (best case) * 255 = 6120

I'm talking about using the weapon as an item in battle.... hmmm
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Paladin

  • FF4 Hacker
  • *
  • Posts: 105
  • Gender: Male
  • Warrior of Light
    • View Profile
    • FinalFantasyIV.net
Re: Completing Weapon-Spell Magic Hacks
« Reply #13 on: March 14, 2008, 07:55:30 PM »
Yes Yes, I am using the rod to cast the spell, using it as an item. The power value is the Power/Enable byte for the weapon's magic spell.

My fault in choice of words I said attacked, but meaning I cast the spell
« Last Edit: March 14, 2008, 08:01:07 PM by Paladin »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Completing Weapon-Spell Magic Hacks
« Reply #14 on: March 14, 2008, 08:00:28 PM »
Hmm.. I guess it might need tweaking for higher undocumented levels. Man.. I need to learn to hexedit or pray for an updated FF4 editor that makes this easy for me to test.

Oh well... something to research further.  :wink: :wtf:
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3