øA slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=419.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexea7f.html slickproductions.org /forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=419.0 e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexea7f.html.z x ŽŒg^ ÿÿÿÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ `¦D Qw OK text/html ISO-8859-1 gzip 8:Ö Qw ÿÿÿÿÿÿÿÿ Tue, 10 Mar 2020 13:04:38 GMT 0ó° °® 0® P® €§² ð® ŽŒg^ V Qw
Print Page - Completing Weapon-Spell Magic Hacks
Board of Slick
Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Deathlike2 on March 12, 2008, 01:35:34 PM
Title: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: JCE3000GT 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:
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin 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...
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 13, 2008, 11:17:08 PM
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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin 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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 14, 2008, 06:51:03 PM
Hmmm, try tweaking a different weapon that doesn't normally have a spell then?...
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin 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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin 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...
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 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)
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin 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.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 14, 2008, 07:49:04 PM
I'm talking about using the weapon as an item in battle.... hmmm
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin 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
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 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:
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin on March 14, 2008, 08:02:49 PM
Hex editing is not too bad once you get used to it, it's just cumbersome.
I use Hex Workshop Pro, but there are plenty of free ones. I only bought it because when I was a student it was $10 bucks with free version upgrades :tongue:
The ASM stuff is the real "technomancy"...
People that actually write compilers and stuff in assembler are wizards IMO :tongue:
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 14, 2008, 08:07:04 PM
I will revisit this later though...
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin on March 14, 2008, 08:09:51 PM
Sure, I'd be glad to run a few tests again.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Phoenix on March 15, 2008, 02:58:46 AM
I did a few tests like these a while ago. You can find it in this thread: http://slickproductions.org/forum/index.php?topic=118.0 (http://slickproductions.org/forum/index.php?topic=118.0)
Here's what I thought:
Quote
I did a few tests, and from what I could determine, a weapon spell power of 01 roughly equals a wisdom stat of 3. Cecil casting Fire1 with wisdom 6 did about the same damage as a Shadow Sword casting Fire1 at a spell power of 02, and Cecil casting Fire1 with wisdom 17 did damage about the same as a stat of 06. I changed the stat to FF, and Fire1 was doing anywhere between 3000 and 5600 damage -- so it does appear you can make it pretty super-powered. I tested FF with a Fire2 spell, and did 9999 damage consistently (at least to beginning monsters).
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 15, 2008, 07:08:38 AM
I did a few tests like these a while ago. You can find it in this thread: http://slickproductions.org/forum/index.php?topic=118.0 (http://slickproductions.org/forum/index.php?topic=118.0)
Here's what I thought:
Quote
I did a few tests, and from what I could determine, a weapon spell power of 01 roughly equals a wisdom stat of 3. Cecil casting Fire1 with wisdom 6 did about the same damage as a Shadow Sword casting Fire1 at a spell power of 02, and Cecil casting Fire1 with wisdom 17 did damage about the same as a stat of 06. I changed the stat to FF, and Fire1 was doing anywhere between 3000 and 5600 damage -- so it does appear you can make it pretty super-powered. I tested FF with a Fire2 spell, and did 9999 damage consistently (at least to beginning monsters).
The math needs to be checked. :P As far as I can tell, it is the spell multiplier. I don't know exactly why you chose to use "a wisdom stat of 3" even though it has the same implication of having a wisdom stat of 0 in terms of the algo.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 17, 2008, 09:58:06 PM
Linking older thread just in case: http://slickproductions.org/forum/index.php?topic=118.0
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Paladin on March 24, 2008, 08:29:32 PM
I was expanding out all the weapon data this evening and I noticed something interesting in the Main Data on Byte 0x02 (The Attack% or "Accuracy" Byte).
Every weapon that was originally coded to cast a magic spell (whether it works in FF-II or not) has the MSB flipped on the Accuracy byte. (I noticed this because the accuracy shouldn't be over 100%, for example it's $A8 for the Rod.)
The pattern definitely corresponds to weapons that cast magic. No weapons that do not cast magic have the Accuracy MSB flipped, with only one exception. The Samurai/Yoichi bow has it flipped. Making me think that weapon may have originally had a spell associated with it but the developers managed to disable it and leave no trace. The only other bow that has the bit is the Elven Bow, which is supposed to cast Shell.
The only inverse exception is that the Power staff does not have the MSB flipped, even though it was supposed to cast Berserk... Every other spell casting weapon does.
I don't know what this means...and I'm not sure what it does??? I do know it's not required to make a spell work on a weapon as I've set weapons with magic without altering the accuracy value.
My first thought was that perhaps it makes the spell always hit?...I haven't tested exhaustively, but my early opinion is that it doesn't appear to. I have the "Doom" spell set on the Deathbringer sword and it always hits, no matter what, without accuracy's MSB flipped. (I also don't think I'm going to leave that spell on that weapon, it's kind of a big cheat to keep using the spell that way).
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on March 24, 2008, 08:43:29 PM
Every weapon that was originally coded to cast a magic spell (whether it works in FF-II or not) has the MSB flipped on the Accuracy byte. (I noticed this because the accuracy shouldn't be over 100%, for example it's $A8 for the Rod.)
The pattern definitely corresponds to weapons that cast magic. No weapons that do not cast magic have the Accuracy MSB flipped, with only one exception. The Samurai/Yoichi bow has it flipped. Making me think that weapon may have originally had a spell associated with it but the developers managed to disable it and leave no trace. The only other bow that has the bit is the Elven Bow, which is supposed to cast Shell.
The only inverse exception is that the Power staff does not have the MSB flipped, even though it was supposed to cast Berserk... Every other spell casting weapon does.
I don't know what this means...and I'm not sure what it does??? I do know it's not required to make a spell work on a weapon as I've set weapons with magic without altering the accuracy value.
My first thought was that perhaps it makes the spell always hit?...I haven't tested exhaustively, but my early opinion is that it doesn't appear to. I have the "Doom" spell set on the Deathbringer sword and it always hits, no matter what, without accuracy's MSB flipped. (I also don't think I'm going to leave that spell on that weapon, it's kind of a big cheat to keep using the spell that way).
The bit is not set for the Slumber Sword's magic, even though Sleep works fine.. although the only conclusion I came up with Sleep is that it is a level based spell.
I have no idea if that bow meant to have a spell... but it beats me as to what it was supposed to cast. It was never used for anything in FF4 anyways.
The Power Staff obviously meant to cast Berserk.
It may be worth checking on what that bit actually does and/or if that byte gets checked at all.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Phoenix on March 25, 2008, 03:03:16 AM
I've thought for a while that that byte corresponds to item use, but I didn't know you could make a weapon have a spell without it. :hmm: Seems like it's functioning the same way as the armor bits (signifying armor, gauntlet, helmet). Changing them doesn't seem to work, but they correspond to those values. Maybe they meant to have it be that way, decided it was too difficult, and the subroutine instead works on item number. It wouldn't surprise me, considering that they use spell numbers a lot in the spell subroutines.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on December 13, 2008, 05:24:41 PM
Mega :bump:
This is a reminder for myself to test shields and spell multipliers greater than 8.
Title: Re: Completing Weapon-Spell Magic Hacks
Post by: Deathlike2 on December 14, 2008, 02:41:07 AM
Ok, it looks like Shields are intentionally locked out, but you can reflect the spells for random graphics...
Spell multipliers greater than 8 work... I've tested 25x and 50x and the numbers match up. That means that a weapon-spell can have as much as 255 as a spell multiplier?!?!?!