Normalised Item Magic - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Hacks, Resources and Tutorials (https://www.ff6hacking.com/forums/forum-1.html) +--- Forum: Jidoor Auction House (https://www.ff6hacking.com/forums/forum-4.html) +---- Forum: Patches, Bugfixes, Tweaks (https://www.ff6hacking.com/forums/forum-15.html) +---- Thread: Normalised Item Magic (/thread-3214.html) Pages:
1
2
|
Normalised Item Magic - seibaby - 04-28-2016 Title: Normalised Item Magic Author: Seibaby Version: 0.2 Release date: 30/04/2016 Applies to: FF3us 1.0 (MD5:E986575B98300F721CE27C180264D890) Tested on: FF3us 1.0 (may or may not work on other versions; untested) Download Code: Files included in this archive: Introduction: Item Magic, aka breaking Rods (and Shields), normally produces unblockable, defense-ignoring spells that always do max damage, punch right through Reflect and doesn't even have the goddamn common courtesy of wiping off Clear status after they're done. While it is apparent that Square wanted Item Magic to never miss, it seems to me like a result of lazy programming that Rods and Shields became the unholy instruments of inescapable death and destruction that they are. In the interest of improved game balance, this patch makes spells cast via an item consider all the steps of damage modification (Mdef, Shell, Morph, self damage, and random variance). Such spells will now remove Clear, but remain Unblockable and will still bypass Reflect. The alternate version of this patch does not preserve the Unblockable and Non-reflectable attributes. Spells cast via items will bounce off Reflect, and may miss their targets. In other words, it makes spells cast via Item behave exactly like spells cast via the Magic command. BONUS: Check the included assembly for some optional modifications that increase damage instead of bypassing Reflect and Mblock. Testing: I have tested this only briefly. If you encounter problems with this patch, please send feedback to me in this thread or in a PM. Version history: 0.2 Optimized code and reimplemented some original functionality. 0.1 The first version (the alternative version in this release). Credits and Thanks: Gi Nattak for requesting the original version of this patch, and initiating a discussion leading to its release. Kugawattan for providing a trail of thought that led me to develop the second version of this patch. Madsiur for encouraging the release of this patch and offering to host it on FF6hacking.com. Assassin for his invaluable commented disassembly of bank C2. Assembly code Code: ;Item magic removes Clear and doesn't ignore defense Code: ;Alternate version - Item magic works like normal Magic Disassembly and commentary Code: Original code: RE: Normalised Item Magic - Kugawattan - 04-28-2016 Interesting. I guess the developers felt that if you had to have your item break, the spell they would produce would be stronger. I'm still deciding whether I should use this or not, because of what I just said. I'll see what I do. RE: Normalised Item Magic - seibaby - 04-28-2016 @Gi Nattak, upon rereading your PM I must admit I'm a bit confused as to what you're asking for exactly. I thought you meant breaking Rods, as Throwing a Rod doesn't cast a spell. However, Throwing a Skean does cast a spell. Do you want to modify the behaviour of Thrown weapons? Or spells cast by Throwing a Skean/Edge? And are you only interested in Ignore Clear specifically? EDIT: because if so, what you suggested works fine, I just tested it. Code: C2/1895: 80 03 BRA $189A ;Set Ignore Clear RE: Normalised Item Magic - Kugawattan - 04-28-2016 I don't know about Gi but I sure am interested on the behavior on thrown weapons. RE: Normalised Item Magic - seibaby - 04-28-2016 (04-28-2016, 09:20 AM)Kugawattan Wrote: Interesting. I guess the developers felt that if you had to have your item break, the spell they would produce would be stronger. I forgot what it was you wanted to do. Something with Throw? RE: Normalised Item Magic - Kugawattan - 04-28-2016 Making Thrown items not ignore defense. Perhaps also slighty increase the damage multiplier to compensate this fact. I have physically tough enemies often in my hack so I don't want the player to use an easy way out :P RE: Normalised Item Magic - seibaby - 04-28-2016 Well why didn't you say so? I have a mod like that lying around, too! To make Thrown weapons not ignore defense Normally, Thrown weapons are treated as Items (which must ignore defense, row, safe/shell etc to work properly). The item usage setup code has a branch that separates non-magical items (Tools, Skeans that don't use a spell, and Thrown weapons) from magical items (Potions, etc.). However, the setting of the Ignore Defense property occurs before that branch: Code: Original code: Code: C2/2A74: B0 66 BCS $2ADC (branch if Skean or Item Magic or Tools) Code: Original code: Both the pieces of code before and after the branch simply set the variable 11A2 to different values. the first bit (#$01) in $11A2 is 1 if physical (0 if magical) the fifth bit (#$20) in $11A2 is 1 if the attack ignores defense This is pretty much all we need to know to make this hack. Don't set ignore defense before the branch, only set physical attack. Set magical attack AND ignore defense after the branch. So, physical items will not ignore defense, but magical ones still will (so Potions will work properly). Note that this doesn't affect Skeans, since they call upon the magic code to cast a spell instead. TRB just flips off the bits indicated in the accumulator, but we can't use it to flip one bit on and the other off. It's okay though, nothing else has changed in $11A2 between the two instructions, so we can use STA to just set it to a new value. NOTE: making Thrown weapons not defense-ignoring also makes them do half damage to targets in the back Row, which obviously makes no sense for Throw. Unfortunately, the two properties are intertwined in the damage modification code and not easily separated. Fixing this issue requires a bigger hack, preferably one that allows the damage modification code to accept a byte as input, check each bit individually, and turn off or on the 7 different properties of damage modification accordingly. Then we could have attacks that ignore row, but not defense, or any other combination. Some day I may tackle that kind of hack... If all of this is over your head, just copy and paste the following code into an .asm file and use xkas to apply the patch: Code: ;Make Throw not Ignore Defense, Safe/Shell, Row, Defend, etc... By the way, the damage incrementor for Throw is here: Code: C2/188D: A9 02 LDA #$02 RE: Normalised Item Magic - Kugawattan - 04-28-2016 As friggin awesome as this looks like, I'm afraid I can't really use it if it doesn't ignore row...the character who can throw already specializes in long range attacking... RE: Normalised Item Magic - Tenkarider - 04-28-2016 I thought Gi Nattak's problem was solved with Hatzen's patch on tools/scroll... maybe i'm wrong? Nice patch anyway RE: Normalised Item Magic - seibaby - 04-28-2016 @Kugawattan: you misunderstand. Throw still does full damage from the back row. However, the TARGET'S row now modifies damage (as in, if the target hit with the thrown weapon is in the back row, they take half damage). This should only be an issue with monsters using Throw on characters. I believe monsters always start out in the front row and can't change it (unless they're somehow hit with R.Polarity). This applies to Morph and Defend, too, by the way (both halves damage taken). Again, not a big issue unless your mod relies heavily on monsters throwing pointy stuff at your characters. |