Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=123;area=showposts;start=1125e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexe0e5-4.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=123e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexe0e5-4.html.zx0g^ P,]OKtext/htmlISO-8859-1gzip0|]Tue, 10 Mar 2020 20:18:14 GMT0 0P.g^X] Show Posts - Grimoire LD

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Grimoire LD

1126
Let's finish this right! Just because I can't access it doesn't meant I can't jump to it.

Enemy Runs Away - Routine

Code: [Select]
$03/E1B2 A9 04 LDA #$04 A:0003 X:0028 Y:0000 P:envMxdizc - Load 04 into A.
$03/E1B4 8D E6 38 STA $38E6  [$7E:38E6] A:0004 X:0028 Y:0000 P:envMxdizc - Store A in 7E38E6
$03/E1B7 A6 A6 LDX $A6    [$00:00A6] A:0004 X:0028 Y:0000 P:envMxdizc - Load X from A6
$03/E1B9 BD 03 20 LDA $2003,x[$7E:2003] A:0004 X:0000 Y:0000 P:envMxdiZc - Load Indexed Slot's Status Byte 1 into A.
$03/E1BC 09 80 ORA #$80 A:0000 X:0000 Y:0000 P:envMxdiZc - Add 80 (Death) if applicable.
$03/E1BE 9D 03 20 STA $2003,x[$7E:2003] A:0080 X:0000 Y:0000 P:eNvMxdizc - Store A in Indexed Slot's Status Byte 1.
$03/E1C1 A9 05 LDA #$05 A:0080 X:0000 Y:0000 P:eNvMxdizc - Load 05 into A. (Ran Away)
$03/E1C3 8D CA 34 STA $34CA  [$7E:34CA] A:0005 X:0000 Y:0000 P:envMxdizc  - Store A in 7E34CA.
$03/E1C6 EE 0A 39 INC $390A  [$7E:390A] A:0005 X:0000 Y:0000 P:envMxdizc - +1 to 7E390A.
$03/E1C9 4C 9B 85 JMP $859B  [$03:859B] A:0005 X:0000 Y:0000 P:envMxdizc - Jump to Subroutine
$03/859B A9 F8 LDA #$F8 A:0005 X:0000 Y:0000 P:envMxdizc - Load F8 into A.
$03/859D 8D C2 33 STA $33C2  [$7E:33C2] A:00F8 X:0000 Y:0000 P:eNvMxdizc - Store A in 7E33C2.
$03/85A0 A9 03 LDA #$03 A:00F8 X:0000 Y:0000 P:eNvMxdizc - Load 03 into A.
$03/85A2 8D C3 33 STA $33C3  [$7E:33C3] A:0003 X:0000 Y:0000 P:envMxdizc - Store A in 7E33C3.
$03/85A5 60 RTS A:0003 X:0000 Y:0000 P:envMxdizc - Return

I'm of the opinion that this is completely unused by the game. The game opts to use Retreat over "Ran Away". What this might have been is possibly for a scrapped "Feared Away" sequence if an enemies Steal Prevention dropped too low, like in FFI and II (maybe III as well, can't recall). I never recalled "Ran Away" showing up in-game and it does give you the Exp as if you had defeated the foe, unlike Retreat does.

Though my memory could just be faulty.

1127
Hmm, yeah. I don't think the game is capable of showing one spell after another, unless there is something I'm missing. Otherwise the game will choose the last spell on the list. But I suspect that the game will be able to use several commands at once.

Well though I haven't yet got Steal to work like I want it to (Take away the Item Byte when it is achieved.) I did manage to add an FFIV:A capability to it which effectively makes it Mug.

The first ten bytes of Steal are this...

$03/E1CC   A9 17   LDA #$17   A:0003   X:002E   Y:0000   P:envMxdizc - Load 17 into A.
$03/E1CE   8D C8 34   STA $34C8  [$7E:34C8]   A:0017   X:002E   Y:0000   P:envMxdizc - Store A in 7E34C8
$03/E1D1   A9 10   LDA #$10   A:0017   X:002E   Y:0000   P:envMxdizc - Load 10 into A.
$03/E1D3   8D C7 34   STA $34C7  [$7E:34C7]   A:0010   X:002E   Y:0000   P:envMxdizc - Store A in 7E34C7

Which I've come to learn are just "Put Name of Command (In this case "Sneak" into a Message Box". Things that can easily be replaced. Besides, if we're using the skill we clearly know what skill is being used.

My replacement takes these ten bytes and does this...

$03/E1CC   AD B2 26   LDA $26B2  [$7E:26B2]   A:0003   X:002E   Y:0000   P:envMxdizc - Load Caster's Gauntlet into A.
$03/E1CF   C9 9D   CMP #$9D   A:009D   X:002E   Y:0000   P:eNvMxdizc - Is it Shadow Gauntlets? (For testing)
$03/E1D1   D0 03   BNE $03    [$E1D6]   A:009D   X:002E   Y:0000   P:envMxdiZC - If not, branch to 03E1D6 (rest of normal routine)
$03/E1D3   20 99 C4   JSR $C499  [$03:C499]   A:009D   X:002E   Y:0000   P:envMxdiZC - Jump to Fight Routine.

So whether you succeed, or fail. You will always deal some damage, making Steal on its own worthwhile if you have the right Gauntlet equipped.

It is so simple to do this, yet I cannot figure how to write a 00 into an item byte into a successful steal, oy...

1128
Question: when using your code, does the spell cost MP?
If not, how does it know not to (since it's using the magic routine)? And is it possible to make it cost MP? This would take a bit of the cheap out of a theorhetical MKnight's special command...

DeathLike2 had the right idea with his response, but I did find the actual byte which says whether to use MP and that was in Recall's routine...

"So to have Recall not take any MP it is as simple as changing this...


$03/EABC   EE 5D 35   INC $355D  [$7E:355D]   A:0019   X:000F   Y:0003   P:envMxdizc - +1 to 7E355D.

To this...

$03/EABC   9C 5D 35   STZ $355D  [$7E:355D]   A:0020   X:0009   Y:0003   P:envMxdizc - Store Zero in 7E355D."

Adding that +1 to 7E355D signals to the game to use that spell's MP to cast it.

As for checking to see if you have enough MP to use said spell, that too is in Recall...

"
$03/EA9B   AD 8B 26   LDA $268B  [$7E:268B]   A:0000   X:000F   Y:0003   P:envMxdiZC - Load Caster's MP Byte 1.
$03/EA9E   85 A9   STA $A9    [$00:00A9]   A:00E7   X:000F   Y:0003   P:eNvMxdizC - Store A in A9.
$03/EAA0   AD 8C 26   LDA $268C  [$7E:268C]   A:00E7   X:000F   Y:0003   P:eNvMxdizC - Load Caster's MP Byte 2.
$03/EAA3   F0 04   BEQ $04    [$EAA9]   A:0003   X:000F   Y:0003   P:envMxdizC - Branch if not 00 to 03EAA9.
-------------------------------------------------------------------------------------------------------------------------------------------------
$03/EAA5   A9 FF   LDA #$FF   A:0003   X:000F   Y:0003   P:envMxdizC - Load FF into A. (Assumes you have enough MP to cast spell)
$03/EAA7   85 A9   STA $A9    [$00:00A9]   A:00FF   X:000F   Y:0003   P:eNvMxdizC - Store A in A9.
-----------------------------------------------------------------------------------------------------------------------------------------------
$03/EAA9   AD A1 28   LDA $28A1  [$7E:28A1]   A:00FF   X:000F   Y:0003   P:eNvMxdizC - Load A from Spell's MP Cost.
$03/EAAC   29 7F   AND #$7F   A:0007   X:000F   Y:0003   P:envMxdizC - Get rid of negative bits.
$03/EAAE   C5 A9   CMP $A9    [$00:00A9]   A:0007   X:000F   Y:0003   P:envMxdizC - Is it the same as what is in A9?
$03/EAB0   F0 06   BEQ $06    [$EAB8]   A:0007   X:000F   Y:0003   P:envMxdizc - Branch if Equal to 03EAB8.
$03/EAB2   90 04   BCC $04    [$EAB8]   A:0007   X:000F   Y:0003   P:envMxdizc - Branch  if More to 03EAB8.
-------------------------------------------------------------------------------------------------------------------------------------------------
$03/EAB4   68    PLA   A:0005   X:0009   Y:0003   P:envMxdizC - Pull A.
$03/EAB5   4C C2 EA   JMP $EAC2  [$03:EAC2]   A:0020   X:0009   Y:0003   P:envMxdizC - Jump to Routine (Return)
-------------------------------------------------------------------------------------------------------------------------------------------------
$03/EAB8   68    PLA   A:0007   X:000F   Y:0003   P:envMxdizc - Pull A from Stack (retrieving the spell to be cast)
$03/EAB9   8D D2 26   STA $26D2  [$7E:26D2]   A:0019   X:000F   Y:0003   P:envMxdizc - Store A in Caster's Action to be Taken.
$03/EABC   EE 5D 35   INC $355D  [$7E:355D]   A:0019   X:000F   Y:0003   P:envMxdizc - +1 to 7E355D.
$03/EABF   20 46 CC   JSR $CC46  [$03:CC46]   A:0019   X:000F   Y:0003   P:envMxdizc - Jump to Subroutine (Magic Call - Full)
$03/EAC2   60    RTS   A:00E0   X:0680   Y:001A   P:eNvMxdizC - Return
"
Granted that uses up a fair amount of bytes. What would be easier is a way to make the command unusable at 00 MP. Which is a very easy thing to set up whether inside the command or outside of it.

Now spells that are drawn from weapons are purely on a weapon by weapon basis.

There is an unknown (and possibly unused) byte in weapons that I think could be replaced and used for this as a secondary "Spell Check" so to speak. So that it can't be cast by just using the weapon.  Now the way I would set this up is to check the character's equipment (7E2780+), look in the Right Hand, then if inapplicable look in the Left Hand, meaning that only one instance of a spell would occur as the game would branch to the next part of the routine. But let me see if the game is capable of recognizing two magic commands in  a single routine for theories sake...

The game does not take kindly to casting two spells in one action, it seems. Either that or I'm missing something, which is completely possible. I might need to look back at the Summon section of data to see how that works since that is technically two spells, even if one is just the Summoning Preparation.




1129
Thanks Chillyfeez!

Indeed DeathLike2. I thought they must have added a fair amount of code to make that possible, but it doesn't appear to be the case whatsoever. All I did was take Peep's formula and cannibalized it to create something very different, but still something quite simple. Do FFIV:A have the means to change the magic cast from those specific weapons? (I mean, has it been found?) because if not, it may be a CMP added to the Fight routine to check to see if those work and then go into the Magic Routine to accomplish the specific spells.

I can see a new class idea come out of this though, "MKnight" "Can use the latent power of weaponry with the Fight Command".  Or something to that accord. Sort of like what I pictured Baigan being in a couple of ways.

So Salve is down, that has been made more versatile. A separate Fight command can be made, so that takes care of Fight, I wonder what I should try to modify next... Maybe work on Cid's FFIV:DS "Elemental Weapon" command?

1130

are the Resists still retained in their original RAM byte?  will they still cause Weak to their "opposite" element, or will having been reclassified as Absorb prevent that from happening?  iow, order of operations might matter if the answer to the first question is "no".

also, is there any further Penalty for Absorb?  e.g. will opposite elements become Very Weak (or instant death ;) )?

Having something classified as Absorb does nothing to the corresponding weakness, indeed.

------


that would make things a bit all-or-none, no?  suppose you have one piece of equipment that Resists ElementX, and another that is Immune to ElementY.  in your scenario, i think that ElementX and ElementY would wind up both being treated as Immune.

ah, maybe that's what you were striving for.

but i see merit to the existing way (with your bugfix to stop lingering Very Weak applied, of course) of having Resists and Immunities alongside one another, along with their varying penalties of Weaks and Very Weaks.  obviously, maintaining multiple categories has more precision.  and as i mentioned in my prior post, there's a nice parallelism to this system.

i would say that Square took this path because they wanted you to be able to have Resists and Immunities co-existing.  it is a departure from what they did with Absorb, but still plenty logical.  despite Absorb and Immune starting off as bits in the same data byte, they indeed had different systems employed for their implementation.  it's hard to pick one method over the other (though i find the Absorb way less intuitive).

Indeed, it does make things all or none, but seeing the behavior of the Cursed Ring, I can't help but think that may have been their original intention before they implemented in the Immune system. In any case you bring up a fair point, it is less versatile and the game does respond positively to having multiple resistances and immunities of different sorts.

Quote from: Algorithms Guide
[for physical attacks]
FF2/4/4ET (SNES)
Weakness > Immunity > Absorb/Resistance

Quote from: Grimoire LD
Weakness and Very Weak are kept separate with Very Weak taking precedence where applicable.

if both of these are true, then is Adamant Armor garbage against elemental physicals in FF4DS?  or does that game use the GBA elemental priority:


Quote
FF4A (GBA)
Immunity > Weakness > Absorb/Resistance
?

FFIV:DS uses a slightly altered system which, in my opinion, is more balance oriented and in that game enemies have Elemental Physicals enabled and to my recollection I recall nothing bad about them in that game. I believe they either avoided the origin or just coded it in a different fashion.

We can take a look at my documented Fight Routine and see if that is indeed the case in FFIV though...

And... it is.

Code: [Select]
$03/C650 A9 02 LDA #$02 A:0000 X:0300 Y:0000 P:envMxdiZC - Load a 02 into A.
$03/C652 8D FE 38 STA $38FE  [$7E:38FE] A:0002 X:0300 Y:0000 P:envMxdizC - Store A at 7E38FE (presumably a data altering field x2 (Default) Power)
$03/C655 8D FF 38 STA $38FF  [$7E:38FF] A:0002 X:0300 Y:0000 P:envMxdizC - Store A at 7E38FF (as above)
$03/C658 AD 99 26 LDA $2699  [$7E:2699] A:0002 X:0300 Y:0000 P:envMxdizC - Load A from Caster's Attack Elemental Copy Data.
$03/C65B 8D 00 36 STA $3600  [$7E:3600] A:0008 X:0300 Y:0000 P:envMxdizC - Store A in 7E3600.
$03/C65E 2D 21 27 AND $2721  [$7E:2721] A:0008 X:0300 Y:0000 P:envMxdizC - Check the value of A against the Target's Very Weak Elemental.
$03/C661 F0 07 BEQ $07    [$C66A] A:0000 X:0300 Y:0000 P:envMxdiZC - Branch if there is no match to 03C66A.
--------------------------------------------------------------------------------------------------------------------------------
$03/C663 A9 08 LDA #$08 A:0008 X:0400 Y:0000 P:envMxdizC - Load a 08 into A.
$03/C665 8D FE 38 STA $38FE  [$7E:38FE] A:0008 X:0400 Y:0000 P:envMxdizC - Store A in 7E38FE (Presumably a data altering field - x4 Power)
$03/C668 80 2B BRA $2B    [$C695] A:0008 X:0400 Y:0000 P:envMxdizC - Always Branch to 03C695.
--------------------------------------------------------------------------------------------------------------------------------
$03/C66A AD 99 26 LDA $2699  [$7E:2699] A:0000 X:0300 Y:0000 P:envMxdiZC - Load Caster's Attack Elemental from Data Copy into A.
$03/C66D 2D 20 27 AND $2720  [$7E:2720] A:0008 X:0400 Y:0000 P:envMxdizC - Check the value of A against the Target's Elemental Weakness.
$03/C670 F0 07 BEQ $07    [$C679] A:0008 X:0400 Y:0000 P:envMxdizC - Branch if there is no match to 03C66A.
-------------------------------------------------------------------------------------------------------------------------------
$03/C672 A9 04 LDA #$04 A:0008 X:0400 Y:0000 P:envMxdizC - Load 04 into A.
$03/C674 8D FE 38 STA $38FE  [$7E:38FE] A:0004 X:0400 Y:0000 P:envMxdizC Store it at 38FE (x2 Power)
$03/C677 80 1C BRA $1C    [$C695] A:0004 X:0400 Y:0000 P:envMxdizC - Always Branch to 03C695.
---------------------------------------------------------------------------------------------------------------------------------
$03/C679 AD 99 26 LDA $2699  [$7E:2699] A:0000 X:0000 Y:0000 P:envMxdiZC - Load Caster's Elemental Attack from Data Copy into A.
$03/C67C 2D 26 27 AND $2726  [$7E:2726] A:0000 X:0000 Y:0000 P:envMxdiZC - Check it against Target's Elemental Immunity.
$03/C67F F0 07 BEQ $07    [$C688] A:0000 X:0000 Y:0000 P:envMxdiZC - Branch if there is no match to 03C688.
----------------------------------------------------------------------------------------------------------------------------------
$03/C681 A9 00 LDA #$00 A:0008 X:0400 Y:0000 P:envMxdizC - Load 00 into A.
$03/C683 8D FE 38 STA $38FE  [$7E:38FE] A:0000 X:0400 Y:0000 P:envMxdiZC - Store A in 38FE (x0 Power=1 Damage no matter what)
$03/C686 80 0D BRA $0D    [$C695] A:0000 X:0400 Y:0000 P:envMxdiZC - Branch to 03C695.
------------------------------------------------------------------------------------------------------------------------------------
$03/C688 AD 99 26 LDA $2699  [$7E:2699] A:0000 X:0400 Y:0000 P:envMxdiZC - Load A from Caster's Elemental Attack Data in Data Copy.
$03/C68B 2D 25 27 AND $2725  [$7E:2725] A:0008 X:0400 Y:0000 P:envMxdizC - Check it against the Target's Resistance Byte in Data Copy.
$03/C68E F0 05 BEQ $05    [$C695] A:0008 X:0400 Y:0000 P:envMxdizC - Branch to 03C695 if there is no match.
-------------------------------------------------------------------------------------------------------------------------------------
$03/C690 A9 01 LDA #$01 A:0008 X:0400 Y:0000 P:envMxdizC - Load 01 into A.
$03/C692 8D FE 38 STA $38FE  [$7E:38FE] A:0001 X:0400 Y:0000 P:envMxdizC Store it in a damage altering field (x1 (1/2) Power
-----------------------------------------------------------------------------------------------------------------------------------

Very Weak/Weak/Immune/Resistance, as has been said.

It would be a very simple matter to reorder these to something more conducive to accurately reflect the order of which it should go. And FFIV has the strange case of branching away whenever it hits upon a certain facet. But to put it plainly. The attacks made by any dual-wielder are calculated together, including their elementals, which is why the Ice and Fireclaw work as they do. The question is, what should be the order these go in?


The Tower of Babil Docs has the way it works with spell in clear portions. (using V1.0 instead of 1.1 as my research has focused on) at the bottom of the page, and that goes Immune(+Absorb)/Resists(+Absorb)/Very Weak/Weak.

http://rb.thundaga.com/tob/spellcode.txt

Absorb Elemental is taken from a very different place in the Fight Routine and is never invoked in relation to Elementals.

[/code]

1131
Ideally, I guess the player would want the spell to occur in addition to the attack damage. I mean, if I just want to cast the spell, I'll just use the weapon as an item. But I sincerely doubt that the game is capable of doing that - there is no other instance of a single character attack that generates multiple damage calls.
You could (I think):
  • Store zero in 00A2-00A3 (end damage result location)
  • Check for weapon spell
  • If none, jump down to regular attack routine
  • RNG
  • Check if random number is within range
  • If not, jump to regular attack routine
  • Load weapon spell
  • Jump to spell subroutine (which will return here when finished)
  • Regular attack routine
  • Add attack result to 00A2-00A3

In theory, I think this would cast the spell (if luck deems it so), then attack, and combine the resultant damage. Setting A2-A3 to zero first would ensure that if no spell is cast, only the attack's damage would be applied (instead of, say, being added to residual values from whatever the last attack was).

This game is surprisingly versatile! Even moreso than I thought!

I just tested a very simple process...

$03/E153   A9 1C   LDA #$1C   A:0003   X:0028   Y:0000   P:envMxdizc - Load Spell into A.
$03/E155   8D D2 26   STA $26D2  [$7E:26D2]   A:001C   X:0028   Y:0000   P:envMxdizc - Store A in Next Action.
$03/E158   9C C4 33   STZ $33C4  [$7E:33C4]   A:001C   X:0028   Y:0000   P:envMxdizc - Store Zero in 7E33C4.
$03/E15B   20 3E CD   JSR $CD3E  [$03:CD3E]   A:001C   X:0028   Y:0000   P:envMxdizc - Jump to Magic Call.
$03/E15E   A9 C0   LDA #$C0   A:0020   X:0680   Y:001A   P:envMxdizC - Load Attack Graphic into A
$03/E160   8D C4 33   STA $33C4  [$7E:33C4]   A:00C0   X:0680   Y:001A   P:eNvMxdizC - Store A in Audio/Visual Code.
$03/E163   4C 99 C4   JMP $C499  [$03:C499]   A:00C0   X:0680   Y:001A   P:eNvMxdizC - Jump to Fight Routine.


Remarkably this is All You Need to have the game use Magic, then attack and to my vast surprise, while it shows only one damage, it is Accumulated Damage from the command. So say you're doing 200 Damage with an attack. Say you add Lit-3 onto that damage with a Low Wisdom character and you'll see that shoot up to roughly 1500-1700 damage. This is in addition. The game will show the normal attack animation, then the magic graphic, making it look seamless and may I say, beautiful.

Add a few conditions to that (maybe intelligently look for the magic by looking at the Weapon itself) and we have Exactly that, (the above was just a proof of concept). For as sometimes poorly coded as FFIV sometimes seems to be, there are times when it shines and this is definitely one of those times. It looks like making a separate Fight command for Mages or a revamped Fight Command is close on the horizon!

1132
That is an interesting idea, not that any enemy ever uses a Dark Elemental attack, but if the Crystal Armor resists Dark it would be weak to Holy, leaving him vulnerable to seven big end-game foes.

1133
Those bytes aren't cleared? What? Bah, Square that's just lazy... in any case the Physical Attack property is an odd one, I wonder if that's part of the reason that enemies don't have any Elemental Physical Attacks in the normal FFII, despite the system fully supporting it? I can't think of any fix to that one either.

1134
Hmm, that actually implies that there's a separate check before Comet/Mini-Flare that checks for Twin Stars, then goes to Double Meteor, runs it through an RNG, and moves on if it fails, to the normal choices.

Because this idea has been brewing in my mind for quite some time I decided to make Salve a versatile command. Meaning that it will no longer Require any One item, but will be able to read from all usable items. There is code that reads from the Start of Battle Items to the End of Battle Items, meaning that whichever applicable item you have first in your inventory will be the item that is used... This can be anything (except maybe the Drain and Osmose Spell Items) and it should work perfectly fine. If targeting is your issue you can set the targeting of Salve to F0 so you can freely target all enemies or allies. If your concerned about the already unused Elemental Items you can make the ones that hit all foes hit only one enemy for significant damage if you don't use multi-targeting (Balance isn't so much my concern in this regard, but to one more balance-oriented may want to change DD to Cure 3 at D0. And if someone still want it to be Purely for allies and to use only the Potions, you can use CE to D1 as the checks to make.

All that was removed was a set of instructions that didn't seem to do anything and in my testing I never saw a problem with these.

If you have any thoughts or suggestions on how to improve this, please let me know. I plan on touching up the majority of the commands in time to make them more useful or give them a varied purpose.

Failed Attempt - Used Item above DD
Code: [Select]
$03/E2E4 BD 1B 32 LDA $321B,x[$7E:321B] A:0000 X:0000 Y:0000 P:envMxdiZc - Load A from 7E321B+x (Start of Items)
$03/E2E7 C9 B0 CMP #$B0 A:0007 X:0000 Y:0000 P:envMxdizc - Is it a Battle Item or above? (It's not in this run around)
$03/E2E9 B0 14 BCS $14    [$E2FF] A:0007 X:0000 Y:0000 P:envMxdizc - If so, branch to 03E2FF.
-----------------------------------------------------------------------------------------------------------------------------------------------
$03/E2EB C8 INY A:0007 X:0000 Y:0000 P:envMxdizc +1 to Y
$03/E2EC E8 INX A:0007 X:0000 Y:0001 P:envMxdizc +1 to X
$03/E2ED E8 INX A:0007 X:0001 Y:0001 P:envMxdizc +1 to X
$03/E2EE E8 INX A:0007 X:0002 Y:0001 P:envMxdizc +1 to X
$03/E2EF E8 INX A:0007 X:0003 Y:0001 P:envMxdizc +1 to X
$03/E2F0 E0 C0 00 CPX #$00C0 A:0007 X:0004 Y:0001 P:envMxdizc - Has it checked all items?
$03/E2F3 D0 EF BNE $EF    [$E2E4] A:0007 X:0004 Y:0001 P:eNvMxdizc - If not loop back to 03E2E4.

###################################################################
$03/E2E4 BD 1B 32 LDA $321B,x[$7E:321F] A:0007 X:0004 Y:0001 P:eNvMxdizc - Load Item Slot 2 into A.
$03/E2E7 C9 B0 CMP #$B0 A:00E9 X:0004 Y:0001 P:eNvMxdizc - Is it a Battle Item or above?
$03/E2E9 B0 14 BCS $14    [$E2FF] A:00E9 X:0004 Y:0001 P:envMxdizC - If so, branch to 03E2FF.
----------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------
$03/E2FF 85 FE STA $FE    [$00:00FE] A:00E9 X:0004 Y:0001 P:envMxdizC - Store Item Slot in FE.
$03/E301 C9 DD CMP #$DD A:00E9 X:0004 Y:0001 P:envMxdizC - Is it above the Final Battle Item?
$03/E303 B0 36 BCS $36    [$E33B] A:00E9 X:0004 Y:0001 P:envMxdizC - If so, branch to 03E33B
----------------------------------------------------------------------------------------------------------------------
$03/E33B CD A5 FE CMP $FEA5  [$7E:FEA5] A:00E9 X:0004 Y:0001 P:envMxdizC - Non applicable, only used for closing out of routine from hereon...
$03/E33E 8D C5 33 STA $33C5  [$7E:33C5] A:00E9 X:0004 Y:0001 P:eNvMxdizC
$03/E341 A9 0A LDA #$0A A:00E9 X:0004 Y:0001 P:eNvMxdizC
$03/E343 8D C8 34 STA $34C8  [$7E:34C8] A:000A X:0004 Y:0001 P:envMxdizC
$03/E346 A9 10 LDA #$10 A:000A X:0004 Y:0001 P:envMxdizC
$03/E348 8D C7 34 STA $34C7  [$7E:34C7] A:0010 X:0004 Y:0001 P:envMxdizC
$03/E34B 60 RTS A:0010 X:0004 Y:0001 P:envMxdizC - Return
#######################################################################

Successful Attempt - Couerl Whisker (Fatal)

Code: [Select]
$03/E2E4 BD 1B 32 LDA $321B,x[$7E:321F] A:0007 X:0004 Y:0001 P:eNvMxdizc - Load A from Item Slot +X
$03/E2E7 C9 B0 CMP #$B0 A:00C9 X:0004 Y:0001 P:eNvMxdizc - Is it a Battle Item?
$03/E2E9 B0 14 BCS $14    [$E2FF] A:00C9 X:0004 Y:0001 P:envMxdizC - If so, branch to 03E2FF.
-------------------------------------------------

------------------------------------------
$03/E2FF 85 FE STA $FE    [$00:00FE] A:00C9 X:0004 Y:0001 P:envMxdizC - Store A in FE
$03/E301 C9 DD CMP #$DD A:00C9 X:0004 Y:0001 P:envMxdizC - Is it Above the Final Battle Item?
$03/E303 B0 36 BCS $36    [$E33B] A:00C9 X:0004 Y:0001 P:eNvMxdizc - If so branch to 03E33B
$03/E305 EA NOP A:00C9 X:0004 Y:0001 P:eNvMxdizc - Null
$03/E306 EA NOP A:00C9 X:0004 Y:0001 P:eNvMxdizc - Null
$03/E307 BD 1C 32 LDA $321C,x[$7E:3220] A:00C9 X:0004 Y:0001 P:eNvMxdizc - Load Item Quantity into A
$03/E30A C9 01 CMP #$01 A:000A X:0004 Y:0001 P:envMxdizc - Is it 01 or below?
$03/E30C 90 E7 BCC $E7    [$E2F5] A:000A X:0004 Y:0001 P:envMxdizC - If so branch to 03E2F5.
$03/E30E 38 SEC A:000A X:0004 Y:0001 P:envMxdizC - Set Carry Flag.
$03/E30F BD 1C 32 LDA $321C,x[$7E:3220] A:000A X:0004 Y:0001 P:envMxdizC - Load Item Quantity into A.
$03/E312 E9 01 SBC #$01 A:000A X:0004 Y:0001 P:envMxdizC - -1 to A
$03/E314 9D 1C 32 STA $321C,x[$7E:3220] A:0009 X:0004 Y:0001 P:envMxdizC - Store A in Item Quantity
$03/E317 D0 0B BNE $0B    [$E324] A:0009 X:0004 Y:0001 P:envMxdizC - Branch if not 00 to 03E324.
------------------------------------------------------------------

-----------------------------------------------------------------
$03/E324 98 TYA A:0009 X:0004 Y:0001 P:envMxdizC - Transfer Y to A.
$03/E325 85 01 STA $01    [$00:0001] A:0001 X:0004 Y:0001 P:envMxdizC - Store 01 into A.
$03/E327 A9 06 LDA #$06 A:0001 X:0004 Y:0001 P:envMxdizC - Load 06 into A
$03/E329 20 85 80 JSR $8085  [$03:8085] A:0006 X:0004 Y:0001 P:envMxdizC - Jump to Subroutine (A lot of jumping, a lot of things that don't make much sense to me)
$03/E32C A9 F8 LDA #$F8 A:0000 X:7510 Y:0018 P:envMxdiZc - Load A from F8 (Targeting matters)
$03/E32E 8D D4 26 STA $26D4  [$7E:26D4] A:00F8 X:7510 Y:0018 P:eNvMxdizc - Store A in 7E26D4 (Targeting)
$03/E331 A5 FE LDA $FE    [$00:00FE] A:00F8 X:7510 Y:0018 P:eNvMxdizc - Load Item placed in FE. (Fatal)
$03/E333 8D D2 26 STA $26D2  [$7E:26D2] A:00C9 X:7510 Y:0018 P:eNvMxdizc - Store Fatal in Next Action to Take.
$03/E336 EE 2A 35 INC $352A  [$7E:352A] A:00C9 X:7510 Y:0018 P:eNvMxdizc - +1 to 7E352A.
$03/E339 20 3E CD JSR $CD3E  [$03:CD3E] A:00C9 X:7510 Y:0018 P:envMxdizc - Jump to Subroutine (Magic Call)
$03/E33C A5 FE LDA $FE    [$00:00FE] A:00F0 X:0680 Y:001A P:eNvMxdizC - Load Item from FE's Graphic.
$03/E33E 8D C5 33 STA $33C5  [$7E:33C5] A:00C9 X:0680 Y:001A P:eNvMxdizC - Store A in 7E33C5 (Graphics)
$03/E341 A9 0A LDA #$0A A:00C9 X:0680 Y:001A P:eNvMxdizC - Load Message (Salve)
$03/E343 8D C8 34 STA $34C8  [$7E:34C8] A:000A X:0680 Y:001A P:envMxdizC - Store A in Battle Message Small
$03/E346 A9 10 LDA #$10 A:000A X:0680 Y:001A P:envMxdizC - Load 10 into A.
$03/E348 8D C7 34 STA $34C7  [$7E:34C7] A:0010 X:0680 Y:001A P:envMxdizC - Store A in 7E34C7.
$03/E34B 60 RTS A:0010 X:0680 Y:001A P:envMxdizC - Return

Process in Pictures...

Salve on All Foes


Salve Failing


Salve Failed Because of the Item in the second slot having too high of a value.


Now the Items are Switched!



Salve is Successfully Cast!



1135
i'd be inclined not to mess with it.  making it extend to equipment outside of the one with the actual Immunity is a bit overreaching.  as is having normal Weaknesses involved.

there's already a nice parallelism (as seen in 03/9A69 and 03/9A78): Resist gives Weak to the "opposite" element, and Immune gives Very Weak to the "opposite" element.  greater magnitude in one direction is matched by larger in the other.

(out of curiosity: do they work the same in reverse?  will initial Weak give Resist to opposite, or Very Weak provide Immune to opposite?)

i understand the desire to try and "complete" an item like Glass Helm that has a bit set.  but it's always possible that it was set for no good reason, or that whatever aborted plan the designers had in mind with it simply can't be discerned from available information.

a couple of items in FF6 -- Paladin Shield and Memento Ring, iirc -- have a mystery bit set that does jack squat.  it can be fun to speculate on why it's there, but there's no actionable info.  and it's possible that whatever goal the designers had for it was eventually accomplished by one of the items' many other data fields.

I think DeathLike2 explained it in a better way than I could. I still don't fully grasp why Square took this path in particular. The easiest thing to do would have been to make 80 on the normal elemental byte be read as Immune (rather than set up an entirely separate byte for it) and add an exception for it if this Immune bit is triggered to (BMI) instead to use Very Weak instead of Weak elemental figurings. But 80 on the normal elemental byte does nothing.

But no, there is nothing called "Initial: Weak" in FFIV. No piece of equipment will make the player weak to a specific element with having a corresponding resistance. Weakness alone only exists with Monsters and they never deal with Resistance/Immune Weak/Very Weak bytes in the way that characters do. They're just set at the start of battle. There is one interesting exception but its not related to weaknesses. Enemies that are considered weak to Air are always considered Floating, so that's their workaround for that.

I wouldn't mind trying to think up a way to make Glass Mask unique, but I think that may be best to try with an Auto-Reflect, since its gained from the most Reflect intensive foe in the game And it is called "Glass".

There are mystery bits like that in weapons in FFIV as as well. Bit 1 seems to make it impossible to get Critical Hits (and I still have no idea where this is stored), Bit 2 is attached only to Cid's hammer, but again, no noticeable changes. Bit 4 is unknown, Bit 8 is unknown, Bit 10 is unknown, Bit 20 is Long Range, Bit 40 is Throwable, and Bit 80 is Magnetic.

So FFIV has its fair share of "possibly" useless bits. (Granted I think it would be neat to try and hack some purpose in for them)

1136
Quote
Oh what a fool I've been! The answer was so simple!

$03/9A82   F0 07   BEQ $07    [$9A8B]   A:0002   X:0003   Y:0026   P:envMxdIzc - Branch if 00 to 039A8B

Completely useless, it does nothing but Prevent the byte from being rewritten. It is the singular cause of the bug and nulling it does nothing adverse. Other armor types don't interfere with it as the specifications for where it is drawn is still the same Elemental Immunity Byte. So the easiest answer is...

$03/9A82   EA    NOP   A:0010   X:0003   Y:0026   P:envMxdIzc
$03/9A83   EA    NOP   A:0010   X:0003   Y:0026   P:envMxdIzc

That will keep the x4 weakness and while it will keep the "Very Weak to" 80 stores in Very Weak, an 80 on its own does nothing and is not necessary to worry about.

Quote
very nice.  can $21A1 normally have any of the bottom bits set if the top bit is clear?  if so, what happens?

as for Glass Helm/Mask, retooling it would definitely involve changing the order of things.  and if it were to make you Very Weak to anything you Resisted, would it also have the decency to bump up all such Resists to Immunities?  doing one without the other seems a bit asymmetrical.  it'd be like having dirty bathwater without actually having a baby, or however that expression goes.

Yep, it works perfectly. The reason it works this way is because every armor will be going through the "Does the Armor cause Very Weak?" instead of only Armor that have 00 in that regards, so an 80 will be put regardless because it... hmm... well this is interesting. I just tested it and it does nothing. That 80 is completely superfluous on characters. The x4 Weakness just comes by virtue of being in that byte rather than the one next to it, nothing to do with the 80 value, so we can freely erase that +80 part. Since it does nothing.

-----

EDIT:

Quote
As it is specifically that a Very Weak value is written only if the Immune bit has other elements attached with it. I'm not sure where I got the idea that Immune stacked with other Elements.

Quote
so to be sure, Immunity will give Very Weak for "opposites" of Immune elements, but it won't do anything to transform Weak elements into Very Weak?  or can gear with Immune transform Fire Shield's Ice weakness into severe Ice weakness, as written earlier?

iow, is $21A1 (as shown in your earlier post) the Very Weak elements, or is it a preliminary value that generates Very Weak after combining with normal Weak?

I was wrong, I'm not really sure why I thought that was the case, likely because it is the way Absorb works. My above example would have worked if I said Cursed Ring instead of Glass Mask, that is what I was thinking about, Equipment with an Absorb Element partners with initial Elemental Values (because they share the same byte) the reason Immune doesn't partner with initial values is because the two bytes are never read with one another.

To make it clear...

1 - Fire
2 - Ice
4 - Bolt
8 - Dark
10 - Holy
20 - Air
40 - Absorb
80 - Immune.

Immune is never written into the normal elemental resistance byte because it is an 80 and a BMI somewhere says it is placed in the Elemental Immunity Byte, not that the Immunity Bit does anything outside of being stored in its own byte. Weakness and Very Weak are kept separate with Very Weak taking precedence where applicable. The Immunity Byte draws its own set of values in Character Byte 21 and so it ignores already laid out weaknesses.

This is where the issue comes in. How do you get one to recognize the other without throwing off the other? The routine says this...

$03/9A78   A0 26 00   LDY #$0026   A:0000   X:0003   Y:0020   P:envMxdIzc - Load 0026 into Y
$03/9A7B   B1 80   LDA ($80),y[$7E:21A6]   A:0000   X:0003   Y:0026   P:envMxdIzc - Load A from Index +Y. (Elemental Immunity Byte)
$03/9A7D   85 A9   STA $A9    [$00:00A9]   A:0081   X:0003   Y:0026   P:eNvMxdIzc  - Store A in A9.
$03/9A7F   20 A8 9D   JSR $9DA8  [$03:9DA8]   A:0081   X:0003   Y:0026   P:eNvMxdIzc - Jump to Subroutine 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
$03/9DA8   29 12   AND #$12   A:0081   X:0003   Y:0026   P:eNvMxdIzc Get rid of inapplicable bits.
$03/9DAA   4A    LSR A   A:0000   X:0003   Y:0026   P:envMxdIZc - /2 A.
$03/9DAB   85 AA   STA $AA    [$00:00AA]   A:0000   X:0003   Y:0026   P:envMxdIZc - Store A in AA
$03/9DAD   A5 A9   LDA $A9    [$00:00A9]   A:0000   X:0003   Y:0026   P:envMxdIZc - Load A9.
$03/9DAF   29 09   AND #$09   A:0081   X:0003   Y:0026   P:eNvMxdIzc - Get rid of inapplicable bits.
$03/9DB1   0A    ASL A   A:0001   X:0003   Y:0026   P:envMxdIzc - x2 A.
$03/9DB2   05 AA   ORA $AA    [$00:00AA]   A:0002   X:0003   Y:0026   P:envMxdIzc - Add to AA.
$03/9DB4   60    RTS   A:0002   X:0003   Y:0026   P:envMxdIzc - Return
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$03/9A82   F0 07   BEQ $07    [$9A8B]   A:0002   X:0003   Y:0026   P:envMxdIzc - Branch if 00 to 039A8B
----------------------------------------------------------------------------------------------------------------------------------------
$03/9A84   A0 21 00   LDY #$0021   A:0002   X:0003   Y:0026   P:envMxdIzc - Load 0021 into Y.
$03/9A87   09 80   ORA #$80   A:0002   X:0003   Y:0021   P:envMxdIzc - Add 80 to A (if applicable)
$03/9A89   91 80   STA ($80),y[$7E:21A1]   A:0082   X:0003   Y:0021   P:eNvMxdIzc - Store A in 80.
--------------------------------------------------------------------------------------------------------------------

Would switching it from 26 to 25 do the trick? Or wouldn't that create an effect that whenever any element goes through there it would create a x4 Weakness? I'm a little flummoxed on how to proceed from there.

1137
Hmm, Agility would have been an ideal use for Weapon Magic... but I could find no reference, maybe I wasn't looking in the right place, and I would find it strange that the Slumber Blade would be the odd weapon out.

Indeed, that's exactly how Twin works, which is why it is a very simple matter to include a third spell at a reasonable chance of occurrence rather than just "failed." which barely any player will ever see.

I thought Double Meteor was a near guarantee in FFIV:A when you had the Twin Stars? I guess I'm recalling incorrectly then. Possibly it just takes Comet's probability, and uses Comet's original slot (quite a simple "Is Character equipped with Twin Stars...  Will Comet Occur? Then BEQ to Double Meteor" Then again, I can't recall Double Meteor too well in FFIV:A.

1138
Indeed, I only thought that for the lack of a better alternative I could think of. I didn't put as much effort as I should have into the Bit unsetting as I should have and I should search to see how its calculated for the ordinary weakness byte to compare and possibly repair the x4 weakness byte.

Also I was completely misunderstanding how the Immune bit works (or doesn't work). The only item in the normal game this glitch affects is the Adamant Armor. As it is specifically that a Very Weak value is written only if the Immune bit has other elements attached with it. I'm not sure where I got the idea that Immune stacked with other Elements. Likely from the Likely intentioned portion of the Glass Helm (which is just the Immune bit, which does nothing at all on its own.

This is how Elemental Weakness is removed... (and also explains how it is added.)

Code: [Select]
$03/9A69 A0 25 00 LDY #$0025 A:0000 X:0003 Y:002C P:envMxdIZC - Load 0025 into Y
$03/9A6C B1 80 LDA ($80),y[$7E:20A5] A:0000 X:0003 Y:0025 P:envMxdIzC - Load A from Elemental Resistance.
$03/9A6E 85 A9 STA $A9    [$00:00A9] A:0002 X:0003 Y:0025 P:envMxdIzC - Store A in A9
$03/9A70 20 A8 9D JSR $9DA8  [$03:9DA8] A:0002 X:0003 Y:0025 P:envMxdIzC - Jump to Subroutine (Elemental Weakness Set)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
$03/9DA8 29 12 AND #$12 A:0002 X:0003 Y:0025 P:envMxdIzC - Get rid of bits that are multiple of 12.
$03/9DAA 4A LSR A A:0002 X:0003 Y:0025 P:envMxdIzC - / A by 2.
$03/9DAB 85 AA STA $AA    [$00:00AA] A:0001 X:0003 Y:0025 P:envMxdIzc - Store A in AA
$03/9DAD A5 A9 LDA $A9    [$00:00A9] A:0001 X:0003 Y:0025 P:envMxdIzc - Load A9 into A
$03/9DAF 29 09 AND #$09 A:0002 X:0003 Y:0025 P:envMxdIzc - Get rid of bits...?
$03/9DB1 0A ASL A A:0000 X:0003 Y:0025 P:envMxdIZc - / A by 2.
$03/9DB2 05 AA ORA $AA    [$00:00AA] A:0000 X:0003 Y:0025 P:envMxdIZc - Add this to AA if applicable.
$03/9DB4 60 RTS A:0001 X:0003 Y:0025 P:envMxdIzc - Return
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$03/9A73 A0 20 00 LDY #$0020 A:0001 X:0003 Y:0025 P:envMxdIzc - Load 20 into A.
$03/9A76 91 80 STA ($80),y[$7E:20A0] A:0001 X:0003 Y:0020 P:envMxdIzc Store A in 7E2080 +20. (Elemental Weakness Byte)

That is quite markedly different than...

Code: [Select]
$03/9A78 A0 26 00 LDY #$0026 A:0000 X:0003 Y:0020 P:envMxdIzc - Load 0026 into Y
$03/9A7B B1 80 LDA ($80),y[$7E:21A6] A:0000 X:0003 Y:0026 P:envMxdIzc - Load A from Index +Y. (Elemental Immunity Byte)
$03/9A7D 85 A9 STA $A9    [$00:00A9] A:0081 X:0003 Y:0026 P:eNvMxdIzc  - Store A in A9.
$03/9A7F 20 A8 9D JSR $9DA8  [$03:9DA8] A:0081 X:0003 Y:0026 P:eNvMxdIzc - Jump to Subroutine 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
$03/9DA8 29 12 AND #$12 A:0081 X:0003 Y:0026 P:eNvMxdIzc Get rid of inapplicable bits.
$03/9DAA 4A LSR A A:0000 X:0003 Y:0026 P:envMxdIZc - /2 A.
$03/9DAB 85 AA STA $AA    [$00:00AA] A:0000 X:0003 Y:0026 P:envMxdIZc - Store A in AA
$03/9DAD A5 A9 LDA $A9    [$00:00A9] A:0000 X:0003 Y:0026 P:envMxdIZc - Load A9.
$03/9DAF 29 09 AND #$09 A:0081 X:0003 Y:0026 P:eNvMxdIzc - Get rid of inapplicable bits.
$03/9DB1 0A ASL A A:0001 X:0003 Y:0026 P:envMxdIzc - x2 A.
$03/9DB2 05 AA ORA $AA    [$00:00AA] A:0002 X:0003 Y:0026 P:envMxdIzc - Add to AA.
$03/9DB4 60 RTS A:0002 X:0003 Y:0026 P:envMxdIzc - Return
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$03/9A82 F0 07 BEQ $07    [$9A8B] A:0002 X:0003 Y:0026 P:envMxdIzc - Branch if 00 to 039A8B
----------------------------------------------------------------------------------------------------------------------------------------
$03/9A84 A0 21 00 LDY #$0021 A:0002 X:0003 Y:0026 P:envMxdIzc - Load 0021 into Y.
$03/9A87 09 80 ORA #$80 A:0002 X:0003 Y:0021 P:envMxdIzc - Add 80 to A (if applicable)
$03/9A89 91 80 STA ($80),y[$7E:21A1] A:0082 X:0003 Y:0021 P:eNvMxdIzc - Store A in 80.
--------------------------------------------------------------------------------------------------------------------

Oh what a fool I've been! The answer was so simple!

$03/9A82   F0 07   BEQ $07    [$9A8B]   A:0002   X:0003   Y:0026   P:envMxdIzc - Branch if 00 to 039A8B 

Completely useless, it does nothing but Prevent the byte from being rewritten. It is the singular cause of the bug and nulling it does nothing adverse. Other armor types don't interfere with it as the specifications for where it is drawn is still the same Elemental Immunity Byte. So the easiest answer is...

$03/9A82   EA    NOP   A:0010   X:0003   Y:0026   P:envMxdIzc
$03/9A83   EA    NOP   A:0010   X:0003   Y:0026   P:envMxdIzc

That will keep the x4 weakness and while it will keep the "Very Weak to" 80 stores in Very Weak, an 80 on its own does nothing and is not necessary to worry about.

I can't believe I missed such a simple solution, oh well. That should do it, hehe.


As seen above it ordinarily just takes the removed equipment's elemental weakness in the same way it puts it on. Loads its specific byte and adds or removes the appropriate byte.

Yes, I thought that the first time DeathLike2, but I found the cause of why it was writing 99 evasion into... well evasion. It was an uncleared value (80 of the Immunity bit, that gets added to Evasion, and finally is truncated down 63.) because Square didn't clean the value that contained it by the time it reached evasion. I fixed this by switching what byte stores the immunity byte for depositing later. Thereby leaving the appropriate byte clean for use by the time it reaches evasion.

1139
Ah, I should clarify that a bit, after finding this section of data I decided to take a closer look...

2780 - List of Equipment Starting from Helmet, Armor, Hand Armor, Weapon, Shield (Equipment Type, Defense, Evasion, Magic Defense, Magic Evade (?/2), Creature Resistance, Equip Index, Bonus Index, Elemental Resistance, Status Byte 1 Resist, Status Byte 2 Resist) 11 (Decimal) Bytes in Total for each piece of equipment. 55 (Decimal) Bytes per character slot then.

On Weapons...

A1 Weapon Bits, A2 Attack Power, A3 Accuracy, A4 Magic Spell, A5 ??, A6 Creature Weakness, A7 Equip Index, A8 Bonus Index, A9 Elemental Attack, AA Status Byte 1, AB Status Byte 2.

So that means that this was looking at the third character's Helmet, and specifically the Evasion byte of that, which makes sense, all things considered. So it doesn't really have any specific bits set. It's just a numerical value in this case.

Very Weakness is only set when one equips a piece of equipment that has a resistance AND they have the Immune bit. So say I have a Fire Shield and the Glass Mask, I would be immune to Ice, but Very Weak to Fire. Normally if I just have a Fire shield I would resist Ice and be weak to fire. I see what they were going for and it would be fine but...

When I remove the Fire Shield, I will no longer have that resistance to Ice, but I will still be Very Weak to Fire because the game never decrements that value properly like it does with ordinary Weakness bytes, hence why I suggested to just move it to the weakness byte. Immunity to one element should not come with such a high price as x4 Weakness, in my opinion in the first place and this prevents the potential problem of being unable to fix the value's issues because of the lack of space.

1140
Did I really miscount?

Haha! I can discern coding but can't count to 11.

The discussion on Crash is somewhere on the boards, but I can't recall off the top of my head. But yes it's in just decimal, not hex.

I don't expect the command was anything flashier than a spell effect, in all honesty, if they even got that far with it. The idea that it is called "Airship" comes from the Japanese FFIV, where it is called... well Airship. It may have been intended to be used whenever Cid rejoined the group for the Giant of Bab-il section.

A Mime command, eh? That does sound intriguing. 84 bytes could possibly be enough. We know the game must store that data somewhere because the Avenger Sword works like an uncontrollable FFV Mime in many respects.

Also here's a little something to make Pray use one of two spells. Just replace this...

$03/E859   20 A6 85   JSR $85A6  [$03:85A6]   A:00EA   X:00CE   Y:0000   P:envMxdizC - Jump to Subroutine (??)
$03/E85C   A9 10   LDA #$10   A:0003   X:00CE   Y:0000   P:envMxdizC - Load 10 into A (D) (Failed Prayer)
$03/E85E   8D CA 34   STA $34CA  [$7E:34CA]   A:0010   X:00CE   Y:0000   P:envMxdizC - Store A in Battle Message Data.
$03/E861   80 08   BRA $08    [$E86B]   A:0010   X:00CE   Y:0000   P:envMxdizC - Branch Always to 03E86B

With This...


$03/E855   C9 80   CMP #$80   A:00DA   X:0049   Y:0000   P:eNvMxdizC
$03/E857   90 0A   BCC $0A    [$E863]   A:00DA   X:0049   Y:0000   P:envMxdizC
$03/E859   A9 0F   LDA #$0F   A:00DA   X:0049   Y:0000   P:envMxdizC
$03/E85B   8D D2 26   STA $26D2  [$7E:26D2]   A:000F   X:0049   Y:0000   P:envMxdizC
$03/E85E   20 3E CD   JSR $CD3E  [$03:CD3E]   A:000F   X:0049   Y:0000   P:envMxdizC


A very simple process, indeed.