øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;u=123;area=showposts;start=1065e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0ef5-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=profile;area=showposts;u=123e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index0ef5-2.html.zx,òg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ P,LuOKtext/htmlISO-8859-1gzip@øÕLuÿÿÿÿÿÿÿÿTue, 10 Mar 2020 20:18:10 GMT0ó°° ®0®P®€§²ð®*òg^ÿÿÿÿÿÿÿÿûQLu 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

1066
Final Fantasy IV Research & Development / Re: AI Index Reference
« on: November 06, 2013, 12:33:18 AM »
I still think that theory has backing, ranging from the unused area coordinates in the Lunar core where there Clearly was supposed to be a door at one time, I think it is a reasonable assumption.

Now I have finished recording all scripts in the Overworld (only 90 on the Moon for better or worse)

Code: [Select]

Basic Script Usage
Overworld/Underworld
  Script 1: Nothing
  Script 2: Fight (Lots of Things)
  Script 3: Target Random Foe, Fight (Lots of Things)
  Script 4: Fight, Explode (Bomb, GrayBomb, Balloon)
  Script 5: Explode (GrayBomb, Balloon, Grenade, Left Arm, Right Arm)
  Script 6: Reaction (Grenade)
  Script 7: Target Random Foe, Petrify (Basilisk, BlackLiz)
  Script 8: Fight, Petrify  (Basilisk, Ice Liz)
  Script 9: Petrify (BlackLiz)
 Script 10: Target Random Foe, Ice-2 (Ice Liz)
 Script 11: Roulette, Fatal (Unused?)
 Script 12: Ice-2 (Ice Liz, EvilDoll)
 Script 13: Target Random Foe, Beak (Eagle, Roc, Treant)
 Script 14: Beak (Cocktric, Roc Baby)
 Script 15: Target Random Foe, Fatal (FloatEye, Red Eye, Marion)
 Script 16: Fight, Gaze (Red Eye)
 Script 17: Target Party, Count, Self-Stop (Unused)
 Script 18: Count (Unused)
 Script 19: Target Random Foe, Fire1 (Spirit, Soul)
 Script 20: Fire1, Fight (Spirit, Soul)
 Script 21: Target Random Foe, Sleep (Ghost)
 Script 22: Fire2, Fight, Sleep (Ghost)
 Script 23: Target Random Foe, Vampire (Cave Bat, Giant Bat, Were Bat, VampGirl, VampLady,)
 Script 24: Vampire (Cave Bat, Giant Bat, Were Bat)
 Script 25: Self-Peep, 140, 141, Self-Peep, 142, 143, 145, 146, 147, 148, Retreat (Dummy(5))
 Script 26: Stop (Treant)
 Script 27: Target Random Foe, Bersk (DarkTree)
 Script 28: Bersk (DarkTree)
 Script 29: Target Random Foe, Needle (SwordRat, Needler, StingRat)
 Script 30: Needle (SwordRat, Needler, StingRat)
 Script 31: Fatal (TinyMage)
 Script 32: Lit-1, Ice-1, Fire1 (TinyMage)
 Script 33: Psych (TinyMage, Larva, Crawler)
 Script 34: Hold (TinyMage)
 Script 35: Fight, Powder (SandMoth, Glomwing, RockMoth)
 Script 36: Fight, Heat Ray (Unused?) NOTE: Possibly intended for an unused Moth type?
 Script 37: Target All Foes, Quake (Sandpede, Centpede, Arachne)
 Script 38: Fight, Quake (Talantla)
 Script 39: Quake (Sandpede, Centpede, Arachne, Talantla)
 Script 40: Fight, Hug, Fight (Unused) NOTE: Possibly intended for an unused Arachne type.
 Script 41: Target All Foes, Tornado (Sandworm)
 Script 42: Tornado (Sandworm)
 SCript 43: Target All Foes, Wave (Aquaworm)
 Script 44: Wave (Aquaworm, Calbrena)
 Script 45: Retreat (Red Worm, WaterBug, HugeCell, Officer, General)
 Script 46: Vampire (RedWorm, VampGirl, VampLady) NOTE: Repeat of Script 24 and can be replaced.
 Script 47: Target Random Foe, Weak (Gargoyle, Hooligan)
 Script 48: Fight, Fight, Fight, Weak (Gargoyle)
 Script 49: Weak, Fight (Hooligan)
 Script 50: Toad (CaveToad, MadToad)
 Script 51: Pollen (TrapRose, Cannibal)
 Script 52: Chain-Flag1-Search(End), Chain-Disrupt-Flag0(End) (TrapDoor)
 Script 53: 139, Tradeoff (TrapDoor)
 Script 54: Slow (Crawler, CaveNaga,)
 Script 55: Lit-1 (Skelton, Red Bone, Puppet, Milon)
 Script 56: Lit-2 (Skull, EvilDoll,)
 Script 57: Nothing (Unused)NOTE: A copy of "Nothing", can be replaced.
 Script 58: Nothing, Nothing, Fight, Retreat (WaterBug, HugeCell)
 Script 59: Remedy (WaterBug, HugeCell)
 Script 60: Target All Foes, M-Order, 83, (Officer)
 Script 61: 180, 181, Self-Sleep, EndBattl (Dummy(4))
 Script 62: Fight, Fight, Fight, Absorb (VampGirl)
 Script 63: Fight, Lit-2, Glance (VampLady)
 Script 64: Target All Foes, Fire (FlameDog)
 Script 65: Fire (FlameDog, D. Machin, Calbrena)
 Script 66: Target All Foes, Thunder (Unused) NOTE: Would have likely been used by either an unused ThunderDog or a later Charmed dragon.
 Script 67: Thunder (Yellow D., Calbrena)
 Script 68: Piggy (Guard)
 Script 69: Size (Guard)
 Script 70: Wall (BladeMan, EvilDoll)
 Script 71: Virus (BladeMan)
 Script 72: Enemy Spell - Charm (Lilith)
 Script 73: Slap (Lilith)
 Script 74: Target Foe, Enemy Spell - Charm (Lamia, Q. Lamia)
 Script 75: Fight, Fight, Entangle (Hydra, Python)
 Script 76: Peep (Mage)
 Script 77: Blast, Drain (Mage)
 Script 78: Tongue (Naga)
 Script 79: Mute (HugeNaga)
 Script 80: Target Random Foe, Bluster (Panther, BlackCat)
 Script 81: Bluster (Panther, BlackCat)
 Script 82: Absorb (SwordMan)
 Script 83: Curse (SwordMan)
 Script 84: Ray (Medusa, Gorgon)
 Script 85: Target Random Foe, Charm (Dummy(1), Gremlin, Fiend)
 Script 86: Fight, Charm, Fight (Dummy(1) NOTE: Was intended for unused Fiend-type foe.
 Script 87: Charm (Gremlin, Fiend)
 Script 88: Blaze (Chimera, Mantcore)
 Script 89: Self-Hatch (Black Liz, Red Worm, HugeNaga, Yellow D., Green D., Lamia)
 Script 90: Target All Foes, Blizzard (IceBeast)
 Script 91: Blizzard, Fight (IceBeast)
 Script 92: Toad(TinyToad) NOTE: Copy of Script 50, can be replaced.
 Script 93: Call (Marion, Sorcerer, Conjurer)
 Script 94: Target Random Foe, Drain (Roc Larva, Crawler, Sorcerer)
 Script 95: Target Random Foe, Warp (Conjurer)
 Script 96: Fire1 (Q. Eblan, Puppet)
 Script 97: Ice-1 (Puppet)
 Script 98: Target All Foes, M-Order, 82 (General)
 Script 99: Target Random Foe, Beam (Beamer)
Script 100: Beam (Beamer, Alert, Searcher)
Script 101: Target All Foes, Emission (Unused)
Script 102: Emission (Unused) NOTE: May have been intended for a Beamer-like foe. The only enemy in the game which uses Emission appears to be Dr. Lugae(2)
Script 103: Target Random Foe, Fast (Witch)
Script 104: Slow, Mute (Witch)
Script 105: Self-Toad, Toad, Toad, Self-Toad, Retreat (ToadLady)
Script 106: Target All Foes, M-Order, 138 (ToadLady)
Script 107: Target Random Foe, Stone (Unused) NOTE: This implies that the Warlock was originally intended not to be on the Moon.
Script 108: Fight, Nuke (Unused) NOTE: Whoa. Was this originally intended for the Overworld Warlock?
Script 109: Fire2, Psych, Drain, Fatal (Unused) NOTE: Looks like they may have intended for even more of the Magic Lady-type of foe.
Script 110: Self-Wall (Unused) NOTE: There's more unused Scripts than I thought there would be.
Script 111: Digest (Unused)
Script 112: Fightx2 (Green D., Yellow D., Raven, Roc, Aligator, Crocdile
Script 113: Fight, Thunder (Green D.)
Script 114: Search, Magnet, Search, Beam (LastArm)
Script 115: 9, Nothing (Alert, Searcher)
Script 116: Alert (Alert, Searcher)
Script 117: Breath, Digest, Fight (Molbol)
Script 118: Fight, Fight, Blitz (Unused) NOTE: May have been intended for Clapper's original Attack AI?
Script 119: Blitz (Clapper)
Script 120: Fire2 (EvilDoll)
Script 121: Roulette Laser (Unused) NOTE: An unused sequence also references this.
Script 122: Laser (Unused)
Script 123: Fire, Fight, Fight, Fight, Fight (FlameDog)
Script 124: Magnet (MacGiant)
Script 125: Fission (LastArm)
Script 126: 104, Nothing, 104, Nothing, 104, Nothing, 104, Nothing, 104, Nothing, 104, Nothing, 104, Nothing, 104, Nothing, Fight (Dummy(9)
Script 127: Nothing (Unused)NOTE: A copy of "Nothing" can be replaced.
Script 128: Nothing (Unused)NOTE: Copy, can be replaced.
------------------------------------------------------------------
Boss Monsters


Script 129: Fight, Fight, Fight, Chain-1-Sprite1-InvinOn-Flag1(End), Nothing, Nothing, Nothing, Chain-2-Sprite0-InvinOff-Flag0(End)(D. Mist)
Script 130: Coldmist, 3,4,5 (D. Mist)
Script 131: 20, Call (Girl)
Script 132: Chain-Sprite67-Quake-EndBattl(End)(Titan)
Script 133: Sprite5, Speed+9, +1Flag, Nothing (OctoMamm)
Script 134: Sprite6, Speed+8, +1Flag, Nothing (OctoMamm)
Script 135: Sprite7, Speed+7, +1Flag, Nothing (OctoMamm)
Script 136: Sprite8, Speed+6, +1Flag, Nothing (OctoMamm)
Script 137: Sprite9, Speed+5, +1Flag, Nothing (OctoMamm)
Script 138: Sprite10, Speed+4, +1Flag, 73, 74 (OctoMamm)
Script 139: Srptie11, Speed+3, +1Flag, Nothing (OctoMamm)
Script 140: +1 Flag, Nothing (OctoMamm)
Script 141: 6, 6, 6, 6, Flag0, (Unused) NOTE: The message just seems to be "Good luck..." over and over again. I guess maybe it's for testing?
Script 142: Flag1 (D. Knight)
Script 143: Counter (Antlion)
Script 144: 23, 24, Flag1, Nothing (Bard)
Script 145: 25, 26, Flag2, Nothing (Bard)
Script 146: 27, 28, Flag3, Nothing (Bard)
Script 147: 29, 30, 22, EndBattl (Bard)
Script 148: C-Anna, 65,66,67,Flag1 (WaterHag(2))
Script 149: 68, R-Images, 69,Flag2, Defense 0% (WaterHag(2))
Script 150: 70, Self-Vanish (WaterHag(2))
Script 151: 64, Chain-Explode-TradeOff(End) (MomBomb)
Script 152: Sprite13, Flag1, Nothing(MomBomb)
Script 153: Nothing, 8, Target All Foes, M-Order, Nothing (Milon)
Script 154: Lit-1, Fight (Milon)
Script 155: 7, Self-Vanish (Milon)
Script 156: Drain (Ghast)
Script 157: 21, 36, Flag1 (Milon-Z)
Script 158: 171, DullSong (Unused) NOTE: Was likely meant for Milon-Z as a counter.
Script 159: Dark, Dark, Dark, 33, 34, 35, 149, Self-Vanish (D. Knight)
Script 160: Dark, 32, Flag0 (D. Knight)
Script 161: Entangle, Fight (Left Arm)
Script 162: Vampire (RightArm) NOTE: This is a copy of Scripts 24 and 46 and can be replaced.
Script 163: Fight, Fight, Fight, Fight, Target All Foes, Fast, Fight (Baigan)
Script 164: Target All KO Foes, Recover (Baigan)
Script 165: Self-Wall (Baigan) NOTE: This is a copy of Script 110, which is an unused Script.
Script 166: Chain-Reaction1-71-Sprite19-WeakBolt(End), Nothing, Wave, Self-Fast (Kainazzo)
Script 167: Defense+, Flag1, Nothing (Kainazzo)
Script 168: Fight, Flag1
Script 169: Chain-Flag0-Reaction0-Sprite18-WeakIce-117(End)(Kainazzo)
Script 170: Chain-Flag2-Reaction0-Sprite20-WeakIce-72-Nothing(End)(Kainazzo)
Script 171: Nothing, Nothing,, Nothing, 10, Chain-Fire2-Lit-2-Ice-2(End), Weak,11,12,13, EndBattl(Dark Elf(1))
Script 172: 45, Fight, Fight, Fight, Fight, Fight, Quake (DarkElf(1))
Script 173: Chain-Fire2-Lit-2-Ice-2(End), Weak, Whisper (DarkElf(2))
Script 174: Chain-14-Music(Boss)-TradeOff(End) (DarkElf(2))
Script 175: D. Breath (DarkElf(3))
Script 176: Target-Type2, Wall (Sandy)
Script 177: Berserk, Slow, AllFoes-Cure2 (Sandy)
Script 178: 102, 103, Target-Type2, Fire2, 102,103, Target-Type2, Lit-2, 102, 103, Target-Type2, Ice-2, 102, 103, Target-Type2, 102, 103, Virus (Mindy)
Script 179: Fire1, Lit-1, Ice-1, Venom (Mindy)
Script 180: 46, Fight (Cindy)
Script 181: Fight, AllFoes-Remedy(Cindy)
Script 182: Chain-Weak-Ray(End), Fight (Valvalis)
Script 183: Fight, Nothing, Flag0 (Valvalis)
Script 184: Chain-Defense+, M Defense+, Flag1, Sprite22(End) (Valvalis)
Script 185: Sprite21, Flag2, Defense-, M. Defense -, Fight (Valvalis)
Script 186: 47,48,Nothing (Valvalis)
Script 187: 15, Target-DarkKn, Fight, 16, Kick, 17, Target-DarkKn, Fight, 18, Kick, Flag1 (Karate)
Script 188: 19, EndBattl (Karate)
Script 189: 127, Music(Calcobrena), TradeOff (Calbrena)
Script 190: 126, Music(Boss), TradeOff (Cal, Brena)
Script 191: 106, 108, Sprite17, Glare (Rubicant)
Script 192: Chain-Sprite19-ResistNone-VeryWeakIce(End), Glare, Chain-Sprite16,ResistIceAbsorb-WeakIceAbsorb(End), Chain-Sprite17-None-VeryWeakIce(End) Chain-Sprite16-ResistIceAbsorb-WeakIceAbsorb(End), Flag1 (Rubicant)
Script 193: TargetAllies-Life1 (Rubicant)
Script 194: TargetAllies-Fire2 (Rubicant)
Script 195: 144, 107, 6, Self-Vanish (Rubicant)
Script 196: 49, 50, Nothing, Fire2, 51, 52, Nothing, Fire2, Fire2, 53, Nothing, UNKNOWN, Music(Sad), Target-Type2, M-Order, Sprite31, Flag1, 55, Nothing 56, Nothing, 57, Nothing, 58, Nothing, 109, Nothing, 110, Nothing, 111, Nothing, 112, Nothing, 113, Nothing, Self-Vanish(K. Eblan)
Script 197: 115, 116, Self-Vanish (Q. Eblan)
Script 198: 96, 54, Nothing (Q. Eblan)
Script 199: Chain-88-89-Nothing-Flag1(End) (Dr. Lugae(1))
Script 200: Chain-96-TargetType2-Heal-89(End), Nothing (Dr. Lugae(1))
Script 201: 94, 95, TradeOff, Flag0 (Dr. Lugae(1))
Script 202: 90, 91, 89,92, Flag2, Nothing (Dr. Lugae(1))
Script 203: 97, Explode (Balnab)
Script 204: TargetType2-Fight, Flag2 (Balnab)
Script 205: Fight, Fight, 100, Explode (Balnab-Z)
Script 206: 98, Chain-99-40-Music(Boss)-Flag1-Poison(End) (Dr. Lugae(2))
Script 207: Beam, Laser, Emission, TargetAllies-Heal (Dr. Lugae(2))
Script 208: Gas (Dr. Lugae(2))
SCript 209: Crush, Nothing (EvilWall)
Script 210: Chain-WallMove-Fight+1Flag(End) (EvilWall)
Script 211: Petrify (EvilWall) NOTE: Copy of Script9, can be replaced.
Script 212: Fight, Fight, Fight, Sprite43, Nothing, Nothing, Odin, Fight, Fight, Sprite43, Nothing, Nothing, Odin, Fight, Chain-Sprite43-Flag1(End), Flag0, Odin (Odin)
Script 213: 105, Self-Vanish (Odin)
Script 214: Chain-Sprite45-Nothing-BigWave(End), Sprite46, Nothing, Ice-2, Ice-2, Nothing, Chain-Sprite45-BigWave(End), Sprite46, Nothing, Ice-2, Nothing (Leviatan)
Script 215: TargetAllies-Maser (Leviatan, Attacker)
Script 216: TargetType1-Remedy (Defender)
Script 217: 121, Nothing, 122, Nothing, 123, Nothing, 124, Nothing, 125, Chain-Sprite48-MegaNuke(End), Wait, Sprite47 (Unused)NOTE: It is clearly a copy of Bahamut's Moon Script, but as this is referenced in the Overworld section, it goes completely unused.
Script 218: 59, 60, Jump, Nothing, 61, 62, Flag1 (Dragoon)
Script 219: Jump (Dragoon)
Script 220: Chain-63-Jump-EndBattl(End) (Dragoon)
Script 221: 43, 44, Nothing (Golbez(1))
Script 222: 37, 38, 39, 40, 41, Nothing (Golbez(1))
Script 223: 42, Self-Vanish (Golbez(1))
Script 224: Nothing, Nothing, Chain-75-76-Nothing-77-Hold Gas-78-79-Nothing-80-Call-Flag1-Nothing(End) (Golbez(2))
Script 225: Nothing (Golbez(2)) NOTE:A copy of Script1 and can be replaced.
Script 226: 84, 177, Heal, 85, 86, Wait, Music(Decisive), G-Rydia, Flag2 (Golbez(2))
Script 227: Virus, Lit-3, Fire-2 (Golbez(2))
Script 228: 87, Self-Vanish (Golbez(2)
Script 229: Chain-Yang2-Demolish-Kain2-Demolish-Rosa2-Demolish(End) Chain-81-Nothing-InvinOff-G-MistD-G-MD-Spl(End) (Shadow)
Script 230: Self-Cure4, Flag1 (Asura)
Script 231: Self-Cure3, Flag2 (Asura)
Script 232: Life1, Flag0 (Asura)
Script 233: Sprite55, Sprite53, Sprite54, Sprite55, Flag2, Fight (Asura)
Script 234: Sprite54, Sprite55, Sprite53, Sprite54, Flag0, Fight (Asura)
Script 235: Sprite53, Sprite54, Sprite55, Sprite53, Flag1, Fight (Asura)
Script 236: ResistIceBolt, VeryWeakFire, Chain-RaceZombie(End), Fight, Fight, Fight, Fight, Curse (Elements(1))
Script 237: Flag1, Sprite17, ResistFireBolt, VeryWeakIce, RaceMage (Elements(1))
Script 238: TargetAllies-Fire2, TargetAllies-Fire3, TargetAllies-Glare (Elements(1))
Script 239: Tradeoff (Elements(1))
Script 240: Chain-ResistFireIce-VeryWeakBolt-RaceNone(End), Fight, Fight, Fight, Fight, BigWave (Elements(2))
Script 241: Flag3, Sprite116, ResistNone, WeakHoly, RaceNone, Nothing (Elements(2))
Script 242: Ray, Fight, Ray, Fight, Storm, (Elements(2))
Script 243: Self-Wall (CPU) NOTE: This is a copy of Script 110 which is an unused script and can be changed.
Script 244: Globe199, Globe199, TargetKOFoes-Recover (CPU)
Script 245: Fight, Glance, Fight, Fight, Hold, Fight (Calbrena)
Script 246: Chain-Fight-Fight(End), Nothing, Flag0, Nothing (Rubicant)
Script 247: Ice-2 (Unused) NOTE: Copy of Script12.
Script 248: Self-Wall, Flag1 (Unused) NOTE: Copy of an already unused Moon Script for Bahamut.
Script 249: Blaze, Fight, Fight (Mantcore)
Script 250: 174, 175, EXplode (Dummy(3))
Script 251: 151, 152, 153, EndBattl (Dummy(6))
Script 252: Music(Fabul), UNKNOWN, 182, Nothing, Nothing, Nothing, 183, Vanish (Dummy(7))
Script 253: 184, 185, 186, EndBattl (Dummy(8))
Script 254: 119, Slap (Dummy(7))
Script 255: Empty (Unused)

I should hopefully finish the Moon scripts soon as well.

1067
Final Fantasy IV Research & Development / Re: Whose turn is it?
« on: November 06, 2013, 12:30:34 AM »
Hmm...

http://slickproductions.org/forum/index.php?topic=1883.msg19350#msg19350

Is this of any help in that? Charge and Jump's second portion does make it go through the Fight Routine which would likely reset the timer all on its own.

1068

I'll take it slowly, as I don't want to overwhelm you with information, please tell me if this manner looks proper to work with.

Fight

Basic Attack Option, including Elemental Damage, Weak-Creature Resist/Weapon Damage, Status Infliction
  • Elemental Hit Damage Modifier
    • Elemental Hit - Very Weak: 1C863
    • Elemental Hit - Weakness: 1C872
    • Elemental Hit - Immunity: 1C881
    • Elemental Hit - Resistance: 1C890

  • Creature Weak to Weapon/Resist Armor
    • Monster Weakness Weapon Hit: 1C8A5
    • Monster Resistance Armor Hit: 1C8B8


Caster's Stat Subtracted from Target's Stat equals Chance to Inflict Status.
  • Status Infliction Formula
    • Caster's Stat: 1CA43
    • Target's Stat: 1CA46

Note in Regards to Command: The Elemental/Creature Hits are translated in this manner.

00: Always 1 Damage
01: x1/2 Damage
02: Normal Damage
03: x1.5 Damage
04: x2 Damage
05: x2.5 Damage
06: x3 Damage
07: x3.5 Damage
08: x4 Damage



1069
Heal Code

Code: [Select]
$01/B84A A9 00 LDA #$00 A:B84A X:B737 Y:0320 P:eNvMxdIzc - Load 00 into A.
$01/B84C 20 55 B8 JSR $B855  [$01:B855] A:B800 X:B737 Y:0320 P:envMxdIZc - Jump to Subroutine (Targeting Info)
$01/B861 C2 20 REP #$20 A:1001 X:1040 Y:0320 P:envMxdIzc - Reset Processor Status.
$01/B863 BD 03 00 LDA $0003,x[$7E:1043] A:1001 X:1040 Y:0320 P:envmxdIzc - Load Target's Status Byte 1 into A.
$01/B866 29 80 7C AND #$7C80 A:0000 X:1040 Y:0320 P:envmxdIZc - Do... this... to get rid of status bits.
$01/B869 9D 03 00 STA $0003,x[$7E:1043] A:0000 X:1040 Y:0320 P:envmxdIZc  - Store A in Target's Status Byte 1.
$01/B86C E2 20 SEP #$20 A:0000 X:1040 Y:0320 P:envmxdIZc - Set Processor Status
$01/B86E 68 PLA A:0000 X:1040 Y:0320 P:envMxdIZc - Pull A from Stack.
$01/B86F 60 RTS A:0000 X:1040 Y:0320 P:envMxdIZc - Return.

Life1 Code

Code: [Select]
$01/B870 A9 00 LDA #$00 A:B870 X:B737 Y:0320 P:eNvMxdIzc - Load 00 into A.
$01/B872 8D BD 1B STA $1BBD  [$7E:1BBD] A:B800 X:B737 Y:0320 P:envMxdIZc - Store A in 7E1BBD.
$01/B875 20 7F B8 JSR $B87F  [$01:B87F] A:B800 X:B737 Y:0320 P:envMxdIZc - Jump to Subroutine (same targeting one as above, just a slightly different entrance point)
-------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------
$01/B87F 48 PHA A:B800 X:B737 Y:0320 P:envMxdIZc - Push A onto Stack.
$01/B880 20 B4 87 JSR $87B4  [$01:87B4] A:B800 X:B737 Y:0320 P:envMxdIZc - Jump to Subroutine (Targeting)
------------------------------------------------------------------------------------------------------
$01/B883 BD 8B 1B LDA $1B8B,x[$7E:1B8B] A:B800 X:0000 Y:0320 P:envMxdIZc - Load A from 7E1B8B.
$01/B886 F0 2A BEQ $2A    [$B8B2] A:B8FF X:0000 Y:0320 P:eNvMxdIzc - If 00 branch to 01B8B2.
$01/B888 20 79 B9 JSR $B979  [$01:B979] A:B8FF X:0000 Y:0320 P:eNvMxdIzc - Jump to Subroutine (??)
$01/B88B BD 03 00 LDA $0003,x[$7E:1043] A:1001 X:1040 Y:0320 P:envMxdIzc - Load Target's Status Byte 1.
$01/B88E 10 22 BPL $22    [$B8B2] A:1000 X:1040 Y:0320 P:envMxdIZc - Are they alive? If so, branch to 03B8B2 (Return)
$01/B890 29 7F AND #$7F A:1080 X:1000 Y:0320 P:eNvMxdIzc - Add 7F (get rid of 80)
$01/B892 9D 03 00 STA $0003,x[$7E:1003] A:1000 X:1000 Y:0320 P:envMxdIZc - Store A in Target's Status byte 1.
$01/B895 BD 16 00 LDA $0016,x[$7E:1016] A:1000 X:1000 Y:0320 P:envMxdIZc - Load Target's Modified Vitality.
$01/B898 85 43 STA $43    [$00:0143] A:100B X:1000 Y:0320 P:envMxdIzc - Store Modified Vitality into 43.
$01/B89A C2 20 REP #$20 A:100B X:1000 Y:0320 P:envMxdIzc - Reset Processor Status.
$01/B89C A5 43 LDA $43    [$00:0143] A:100B X:1000 Y:0320 P:envmxdIzc - Load Modified Vitality into A (even though it already is...)
$01/B89E 0A ASL A A:000B X:1000 Y:0320 P:envmxdIzc - x2.
$01/B89F 0A ASL A A:0016 X:1000 Y:0320 P:envmxdIzc - x2
$01/B8A0 65 43 ADC $43    [$00:0143] A:002C X:1000 Y:0320 P:envmxdIzc - Add Modified Vitality onto that.
$01/B8A2 DD 09 00 CMP $0009,x[$7E:1009] A:0037 X:1000 Y:0320 P:envmxdIzc - Compare the value to max HP.
$01/B8A5 90 03 BCC $03    [$B8AA] A:0037 X:1000 Y:0320 P:eNvmxdIzc - If it is higher than max HP branch to 03B8AA
----------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------
$01/B8AA 9D 07 00 STA $0007,x[$7E:1007] A:0037 X:1000 Y:0320 P:eNvmxdIzc - Store A in Target's HP.
$01/B8AD E2 20 SEP #$20 A:0037 X:1000 Y:0320 P:eNvmxdIzc - Set Processor Status.
$01/B8AF EE BD 1B INC $1BBD  [$7E:1BBD] A:0037 X:1000 Y:0320 P:eNvMxdIzc - +1 to 7E1BBD.
$01/B8B2 68 PLA A:0037 X:1000 Y:0320 P:envMxdIzc - Pull A from Stack.
$01/B8B3 60 RTS A:0002 X:1000 Y:0320 P:envMxdIzc - Return.
The underlying code of out-of-battle revival is here plain to see.

Modified Vitality x4 + Modified Vitality = Revival amount.

Life2 Code

Code: [Select]
$01/B8B4 A9 00 LDA #$00 A:B8B4 X:B737 Y:0320 P:eNvMxdIzc - Load 00 into A.
$01/B8B6 8D BD 1B STA $1BBD  [$7E:1BBD] A:B800 X:B737 Y:0320 P:envMxdIZc - Store A in 7E1BBD.
$01/B8B9 20 DE B8 JSR $B8DE  [$01:B8DE] A:B800 X:B737 Y:0320 P:envMxdIZc - Jump to Subroutine (Targeting)
---------------------------------------------------------------------------------------------------------------------
$01/B8BC 1A INC A A:B800 X:0000 Y:0320 P:envMxdIZc - +1 to A.
$01/B8BD C9 05 CMP #$05 A:B801 X:0000 Y:0320 P:envMxdIzc - Uh... what?
$01/B8BF D0 F8 BNE $F8    [$B8B9] A:B801 X:0000 Y:0320 P:eNvMxdIzc - Loop if it hasn't ?checked for all five party members?  to 01B8B9.
$01/B8C1 AD BD 1B LDA $1BBD  [$7E:1BBD] A:0005 X:0004 Y:0320 P:envMxdIZC - Load A from 7E1BBD.
$01/B8C4 D0 17 BNE $17    [$B8DD] A:0001 X:0004 Y:0320 P:envMxdIzC - Branch if not 00 to 01B8DD.
$01/B8DD 60 RTS A:0001 X:0004 Y:0320 P:envMxdIzC - Return.
------------------------------------------------------------------------------------------------------------------------
$01/B8DE 48 PHA A:B800 X:B737 Y:0320 P:envMxdIZc - Push A onto Stack.
$01/B8DF 20 B4 87 JSR $87B4  [$01:87B4] A:B800 X:B737 Y:0320 P:envMxdIZc - Jump to Subroutine (Targeting)
$01/B8E2 BD 8B 1B LDA $1B8B,x[$7E:1B8B] A:B800 X:0000 Y:0320 P:envMxdIZc - Load A from 7E1B8B
$01/B8E5 F0 22 BEQ $22    [$B909] A:B800 X:0000 Y:0320 P:envMxdIZc - If 00 branch to 01B909
------------------------------------------------------------------------------------------------------------------------------------------
$01/B8E7 20 79 B9 JSR $B979  [$01:B979] A:B8FF X:0002 Y:0320 P:eNvMxdIzc - Jump to Subroutine (Targeting?)
$01/B8EA BD 03 00 LDA $0003,x[$7E:1003] A:1000 X:1000 Y:0320 P:envMxdIZc - Load Target's Status Byte 1 into A.
$01/B8ED 10 1A BPL $1A    [$B909] A:1080 X:1000 Y:0320 P:eNvMxdIzc - If not dead branch to 01B909.
$01/B8EF A9 00 LDA #$00 A:1080 X:1000 Y:0320 P:eNvMxdIzc  - Load 00 into A.
$01/B8F1 9D 03 00 STA $0003,x[$7E:1003] A:1000 X:1000 Y:0320 P:envMxdIZc - Store A in Target's Status Byte 1.
$01/B8F4 BD 04 00 LDA $0004,x[$7E:1004] A:1000 X:1000 Y:0320 P:envMxdIZc - Load Target's Status Byte 2 into A.
$01/B8F7 29 7F AND #$7F A:1000 X:1000 Y:0320 P:envMxdIZc - Add 7F (getting rid of 80, meaning that Curse was intended to be outside of battle originally, thereby making this check now worthless)
$01/B8F9 9D 04 00 STA $0004,x[$7E:1004] A:1000 X:1000 Y:0320 P:envMxdIZc - Store A in Target's Status Byte 2.
$01/B8FC C2 20 REP #$20 A:1000 X:1000 Y:0320 P:envMxdIZc - Reset Processor Status
$01/B8FE BD 09 00 LDA $0009,x[$7E:1009] A:1000 X:1000 Y:0320 P:envmxdIZc - Load Target's Max HP.
$01/B901 9D 07 00 STA $0007,x[$7E:1007] A:00C8 X:1000 Y:0320 P:envmxdIzc - Store in Target's Current HP.
$01/B904 E2 20 SEP #$20 A:00C8 X:1000 Y:0320 P:envmxdIzc - Set Processor Status.
$01/B906 EE BD 1B INC $1BBD  [$7E:1BBD] A:00C8 X:1000 Y:0320 P:envMxdIzc - +1 to 7E1BBD.
----------------------------------------------------------------------------------------------------------------------------------------------
$01/B909 68 PLA A:B800 X:0000 Y:0320 P:envMxdIZc - Pull A.
$01/B90A 60 RTS A:B800 X:0000 Y:0320 P:envMxdIZc - Return (to earlier in the routine)

Now this is interesting! Apparently Curse was supposed to be carried out of battle, the Life formula makes clear mention of getting rid of it when revived, this makes no sense outside of battle unless Curse was originally supposed to be permanent status.

Size Code
Code: [Select]
$01/B90B A9 10 LDA #$10 A:B90B X:B737 Y:0320 P:eNvMxdIzc - Load 10 into A.
$01/B90D A0 03 00 LDY #$0003 A:B910 X:B737 Y:0320 P:envMxdIzc - Load 03 into Y.
$01/B910 80 0E BRA $0E    [$B920] A:B910 X:B737 Y:0003 P:envMxdIzc - Branch to 03B920
-----------------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------------------
$01/B920 85 48 STA $48    [$00:0148] A:B910 X:B737 Y:0003 P:envMxdIzc - Store A in 0148.
$01/B922 49 FF EOR #$FF A:B910 X:B737 Y:0003 P:envMxdIzc - Add FF to A.
$01/B924 85 49 STA $49    [$00:0149] A:B9EF X:B737 Y:0003 P:eNvMxdIzc - Store A in 149.
$01/B926 84 4B STY $4B    [$00:014B] A:B9EF X:B737 Y:0003 P:eNvMxdIzc - Store Y in 14B.
$01/B928 A9 00 LDA #$00 A:B9EF X:B737 Y:0003 P:eNvMxdIzc - Load 00 into A.
$01/B92A 20 33 B9 JSR $B933  [$01:B933] A:B900 X:B737 Y:0003 P:envMxdIZc - Jump to Subroutine (Targeting intro)
---------------------------------------------------------------------------------------------------------------------------
$01/B92D 1A INC A A:B900 X:0000 Y:0003 P:envMxdIZc - +1 to A.
$01/B92E C9 05 CMP #$05 A:B901 X:0000 Y:0003 P:envMxdIzc - Has it gone through 5 times?
$01/B930 D0 F8 BNE $F8    [$B92A] A:B901 X:0000 Y:0003 P:eNvMxdIzc - If not, loop back to 03B92A.
--------------------------------------------------------------------------------------------------------------------------------
$01/B933 48 PHA A:B900 X:B737 Y:0003 P:envMxdIZc - Push A onto Stack.
$01/B934 20 B4 87 JSR $87B4  [$01:87B4] A:B900 X:B737 Y:0003 P:envMxdIZc - Jump to Subroutine (Targeting)
$01/B937 BD 8B 1B LDA $1B8B,x[$7E:1B8B] A:B900 X:0000 Y:0003 P:envMxdIZc - Load A from 7E1B8B.
$01/B93A F0 17 BEQ $17    [$B953] A:B900 X:0000 Y:0003 P:envMxdIZc - Branch if 00 to 01B953.
---------------------------------------------------------------------------------------------------------------------------------------
$01/B93C 20 79 B9 JSR $B979  [$01:B979] A:B9FF X:0002 Y:0003 P:eNvMxdIzc - (Targeting?)
$01/B93F 86 4E STX $4E    [$00:014E] A:1000 X:1000 Y:0003 P:envMxdIZc - Store X in 014E.
$01/B941 64 50 STZ $50    [$00:0150] A:1000 X:1000 Y:0003 P:envMxdIZc - Store Zero in 0150.
$01/B943 B1 4E LDA ($4E),y[$7E:1003] A:1000 X:1000 Y:0003 P:envMxdIZc - Load Target's Status Byte 1 into A.
$01/B945 48 PHA A:1000 X:1000 Y:0003 P:envMxdIZc - Push A onto Stack
$01/B946 25 49 AND $49    [$00:0149] A:1000 X:1000 Y:0003 P:envMxdIZc - Add the value in 0149 onto A.
$01/B948 91 4E STA ($4E),y[$7E:1003] A:1000 X:1000 Y:0003 P:envMxdIZc - Store A in1 4E.
$01/B94A 68 PLA A:1000 X:1000 Y:0003 P:envMxdIZc  - Pull A.
$01/B94B 49 FF EOR #$FF A:1000 X:1000 Y:0003 P:envMxdIZc - Add FF onto A.
$01/B94D 25 48 AND $48    [$00:0148] A:10FF X:1000 Y:0003 P:eNvMxdIzc - Add the value in 0148 (10 from the start of routine)
$01/B94F 11 4E ORA ($4E),y[$7E:1003] A:1010 X:1000 Y:0003 P:envMxdIzc - Add that value onto Character's Status Byte1 .
$01/B951 91 4E STA ($4E),y[$7E:1003] A:1010 X:1000 Y:0003 P:envMxdIzc - Store Character's Status Byte 1.
--------------------------------------------------------------------------------------------------------------------------------------------
$01/B953 68 PLA A:B900 X:0000 Y:0003 P:envMxdIZc - Pull A from Stack.
$01/B954 60 RTS A:B900 X:0000 Y:0003 P:envMxdIZc - Return.

No new surprises there, it is clear that status healing is a uniform system. Looks to see who is the target, then target of that target, and goes on from there. Now things should get interesting...

Magic Menu Call (choice of targets)

Code: [Select]
$01/B955 C2 20 REP #$20 A:00F0 X:0000 Y:0308 P:envMxdIZc - Reset Processor Status
$01/B957 A9 57 02 LDA #$0257 A:00F0 X:0000 Y:0308 P:envmxdIZc - Load 0257 into A.
$01/B95A A2 00 03 LDX #$0300 A:0257 X:0000 Y:0308 P:envmxdIzc - Load 0300 into X.
$01/B95D A0 00 A2 LDY #$A200 A:0257 X:0300 Y:0308 P:envmxdIzc - Load A200 into Y.
$01/B960 54 7E 7E MVN 7E 7E A:0257 X:0300 Y:A200 P:eNvmxdIzc - ?Block Move Negative?
$01/B963 E2 20 SEP #$20 A:FFFF X:0558 Y:A458 P:eNvmxdIzc - Set Processor Status.
$01/B965 60 RTS A:FFFF X:0558 Y:A458 P:eNvMxdIzc - Return.
No idea how Any of that works.

Magic Menu Close (choice of targets)
Code: [Select]
$01/B966 C2 20 REP #$20 A:0001 X:BBEC Y:0018 P:eNvMxdIzc - Reset Processor Status.
$01/B968 A9 57 02 LDA #$0257 A:0001 X:BBEC Y:0018 P:eNvmxdIzc - Load 0257 into A.
$01/B96B A2 00 A2 LDX #$A200 A:0257 X:BBEC Y:0018 P:envmxdIzc - Load A200 into X.
$01/B96E A0 00 03 LDY #$0300 A:0257 X:A200 Y:0018 P:eNvmxdIzc - Load 0300 into Y.
$01/B971 54 7E 7E MVN 7E 7E A:0257 X:A200 Y:0300 P:envmxdIzc - ?Move Block Negative?
$01/B974 E2 20 SEP #$20 A:FFFF X:A458 Y:0558 P:envmxdIzc - Set Processor Status.
$01/B976 60 RTS A:FFFF X:A458 Y:0558 P:envMxdIzc - Return

As above, very little idea.


Exit/Sight Code

Code: [Select]
$01/B993 AD 04 1A LDA $1A04  [$7E:1A04] A:B993 X:B747 Y:0102 P:eNvMxdIzc - Load 7E1A04 into A.
$01/B996 29 20 AND #$20 A:B9B0 X:B747 Y:0102 P:eNvMxdIzc - Add 20.
$01/B998 F0 E8 BEQ $E8    [$B982] A:B920 X:B747 Y:0102 P:envMxdIzc - Branch if 00 to 01B982.
$01/B99A A9 04 LDA #$04 A:B920 X:B747 Y:0102 P:envMxdIzc - Load 04 into A. (That's not just any 04, that is an Event Specific 04!)
$01/B99C 80 09 BRA $09    [$B9A7] A:B904 X:B747 Y:0102 P:envMxdIzc - Branch to 03B9A7.
------------------------------------------------------------------------------------------------------------------------------------
$01/B99E AD 04 1A LDA $1A04  [$7E:1A04] A:B99E X:B747 Y:0103 P:eNvMxdIzc - Load 7E1A04 into A.
$01/B9A1 29 40 AND #$40 A:B940 X:B747 Y:0103 P:envMxdIzc - And 40.
$01/B9A3 F0 DD BEQ $DD    [$B982] A:B940 X:B747 Y:0103 P:envMxdIzc - Branch if 00 to 01B982.
$01/B9A5 A9 05 LDA #$05 A:B940 X:B747 Y:0103 P:envMxdIzc - Load 05 into A. (Event Specific)
---------------------------------------------------------------------------------------------------------------------------------
$01/B9A7 8D 03 1A STA $1A03  [$7E:1A03] A:B904 X:B747 Y:0102 P:envMxdIzc - Store A in 7E1A03.
$01/B9AA 20 DC B9 JSR $B9DC  [$01:B9DC] A:B904 X:B747 Y:0102 P:envMxdIzc - Jump to Subroutine (??)
$01/B9AD C2 20 REP #$20 A:0056 X:1040 Y:0102 P:envMxdIzC - Reset Processor Status
$01/B9AF 9D 0B 00 STA $000B,x[$7E:104B] A:0056 X:1040 Y:0102 P:envmxdIzC -  Store A in Caster's MP.
$01/B9B2 E2 20 SEP #$20 A:0056 X:1040 Y:0102 P:envmxdIzC - Set Processor Status.
$01/B9B4 22 B6 FD 1E JSL $1EFDB6[$1E:FDB6] A:0056 X:1040 Y:0102 P:envMxdIzC - Jump Long to 1EFDB6. (??)
$01/B9B8 AE 65 1A LDX $1A65  [$7E:1A65] A:0006 X:0006 Y:0102 P:envMxdIzc - Load A from 7E1A65.
$01/B9BB 9A TXS A:0006 X:02F1 Y:0102 P:envMxdIzc - Transfer X to Stack.
$01/B9BC 60 RTS A:0006 X:02F1 Y:0102 P:envMxdIzc - Return

And there we go! Finally a means to change the event trigger in a more than simple fashion (refer to this post for more information.) You could change Exit's event to something else say... Siren's Effect. This would be useful in differentiating it from the Emergency Exit item which would still have the normal effect. In addition you could change Dwarves' Bread event without having to worry about Sight also having that effect if you change Sight's event pointer.








1070
Game Modification Station / Re: FF6 Improvement Project
« on: November 05, 2013, 07:32:51 AM »
That is incredibly cool! It's very much in the vein of the original .hack// series where your available spells and skill were completely based on your equipment, I might have to fool around with that down the line.

1071
Alright, this would ordinarily go in my Note thread, but it seems more pertinent to this discussion here, I've finally started to make real headway into the way the game decides and calculates out-of-battle spells, including a full disassembly of Curing Magic.

[Cure1 Code
Code: [Select]
$01/B753 AF F5 97 0F LDA $0F97F5[$0F:97F5] A:B753 X:B737 Y:0320 P:eNvMxdIzc - Load A from Cure1's Power.
$01/B757 8D 91 1B STA $1B91  [$7E:1B91] A:B704 X:B737 Y:0320 P:envMxdIzc - Store A in 7E1B91
$01/B75A 80 4A BRA $4A    [$B7A6] A:B704 X:B737 Y:0320 P:envMxdIzc - Branch to 01B7A6
--------------------------------------------------------------------------------

Cure2 Code

Code: [Select]
$01/B75C AF FB 97 0F LDA $0F97FB[$0F:97FB] A:B75C X:B737 Y:0320 P:eNvMxdIzc - Load A from Cure2's Power.
$01/B760 8D 91 1B STA $1B91  [$7E:1B91] A:B70C X:B737 Y:0320 P:envMxdIzc - Store A in 7E1B91
$01/B763 80 41 BRA $41    [$B7A6] A:B70C X:B737 Y:0320 P:envMxdIzc - Branch to 01B7A6
----------------------------------------------------------------------------------------------------------

Cure3 Code
Code: [Select]
$01/B765 AF 01 98 0F LDA $0F9801[$0F:9801] A:B765 X:B737 Y:0320 P:eNvMxdIzc - Load A from Cure3's Power.
$01/B769 8D 91 1B STA $1B91  [$7E:1B91] A:B724 X:B737 Y:0320 P:envMxdIzc - Store A in 7E1B91.
$01/B76C 80 38 BRA $38    [$B7A6] A:B724 X:B737 Y:0320 P:envMxdIzc - Branch to 01B7A6.

Cure4 Code
Code: [Select]
$01/B76E AD BB 1B LDA $1BBB  [$7E:1BBB] A:B76E X:B737 Y:0320 P:eNvMxdIzc - Load A from 7E1BBB. (Is it being Multi-targeted)
$01/B771 F0 09 BEQ $09    [$B77C] A:B700 X:B737 Y:0320 P:envMxdIZc - If 00 branch to 01B77C
-------------------------------------------------------------------------------------
$01/B773 AF 07 98 0F LDA $0F9807[$0F:9807] A:B7FF X:B737 Y:0320 P:eNvMxdIzc - Load Cure 4's Power into A.
$01/B777 8D 91 1B STA $1B91  [$7E:1B91] A:B748 X:B737 Y:0320 P:envMxdIzc - Store A in 7E1B91.
$01/B77A 80 2A BRA $2A    [$B7A6] A:B748 X:B737 Y:0320 P:envMxdIzc - Branch to 01B7A6
--------------------------------------------------------------------------------------
$01/B77C A9 00 LDA #$00 A:B700 X:B737 Y:0320 P:envMxdIZc - Load 00 into A.
$01/B77E 20 87 B7 JSR $B787  [$01:B787] A:B700 X:B737 Y:0320 P:envMxdIZc - Jump to Subroutine.
-------------------------------------------------------------------------------------------
(Accessed at end of Routine)
$01/B781 1A INC A A:0700 X:1040 Y:0320 P:envMxdIZc +1 to A.
$01/B782 C9 05 CMP #$05 A:0701 X:1040 Y:0320 P:envMxdIzc - Has it gone through 5 Times for every character? (Which it can't because of the specific coding requirements...)
$01/B784 D0 F8 BNE $F8    [$B77E] A:0701 X:1040 Y:0320 P:eNvMxdIzc - If not branch back to 01B77E.
-------------------------------------------------------------------------------------------------------
$01/B786 60 RTS A:0705 X:0004 Y:0320 P:envMxdIZC - Return
-------------------------------------------------------------------------------------------
$01/B787 48 PHA A:B700 X:B737 Y:0320 P:envMxdIZc - Push A onto Stack.
$01/B788 20 B4 87 JSR $87B4  [$01:87B4] A:B700 X:B737 Y:0320 P:envMxdIZc - Jump to subroutine (??)
$01/B78B BD 8B 1B LDA $1B8B,x[$7E:1B8B] A:B700 X:0000 Y:0320 P:envMxdIZc - Load A from 7E1B8B.
$01/B78E F0 14 BEQ $14    [$B7A4] A:B7FF X:0000 Y:0320 P:eNvMxdIzc - If 00 branch to 0187B4.
$01/B790 A5 43 LDA $43    [$00:0143] A:B7FF X:0000 Y:0320 P:eNvMxdIzc - Load A from 143.
$01/B792 20 77 B9 JSR $B977  [$01:B977] A:B700 X:0000 Y:0320 P:envMxdIZc - Jump to Subroutine (Determining who it is being cast upon)
$01/B795 BD 03 00 LDA $0003,x[$7E:1043] A:1001 X:1040 Y:0320 P:envMxdIzc - Load Target's Status Byte 1.
$01/B798 30 0A BMI $0A    [$B7A4] A:1000 X:1040 Y:0320 P:envMxdIZc - If dead, skip.
$01/B79A C2 20 REP #$20 A:1000 X:1040 Y:0320 P:envMxdIZc - Reset Processor Status.
$01/B79C BD 09 00 LDA $0009,x[$7E:1049] A:1000 X:1040 Y:0320 P:envmxdIZc - Load A from Character's Max HP.
$01/B79F 9D 07 00 STA $0007,x[$7E:1047] A:076C X:1040 Y:0320 P:envmxdIzc - Store A in Character's Current HP.
$01/B7A2 E2 20 SEP #$20 A:076C X:1040 Y:0320 P:envmxdIzc - Set Processor Status
$01/B7A4 68 PLA A:076C X:1040 Y:0320 P:envMxdIzc - Pull A.
$01/B7A5 60 RTS A:0700 X:1040 Y:0320 P:envMxdIZc - Return
------------------------------------------------------------------------------------------------

General Spell Healing Code

Code: [Select]
$01/B7A6 A9 00 LDA #$00 A:B704 X:B737 Y:0320 P:envMxdIzc - Load 00 into A.
$01/B7A8 EB XBA A:B700 X:B737 Y:0320 P:envMxdIZc - Exchange B and A 8-bit Accumulators. (That is quite useful, I'll need to keep that in mind)
$01/B7A9 AD 91 1B LDA $1B91  [$7E:1B91] A:00B7 X:B737 Y:0320 P:eNvMxdIzc - Load A from 7E1B91.
$01/B7AC C2 20 REP #$20 A:0004 X:B737 Y:0320 P:envMxdIzc - Reset Processor Status.
$01/B7AE 0A ASL A A:0004 X:B737 Y:0320 P:envmxdIzc - x2 to A.
$01/B7AF 0A ASL A A:0008 X:B737 Y:0320 P:envmxdIzc - x2 to A
$01/B7B0 8D 91 1B STA $1B91  [$7E:1B91] A:0010 X:B737 Y:0320 P:envmxdIzc - Store A in 7E1B91.
$01/B7B3 E2 20 SEP #$20 A:0010 X:B737 Y:0320 P:envmxdIzc - Set Processor Status
$01/B7B5 A5 E8 LDA $E8    [$00:01E8] A:0010 X:B737 Y:0320 P:envMxdIzc - Load the value 01E8 into A.
$01/B7B7 20 07 90 JSR $9007  [$01:9007] A:0001 X:B737 Y:0320 P:envMxdIzc - Jump to Subroutine (Gets Targeting Info.)
$01/B7BA BD 18 00 LDA $0018,x[$7E:1058] A:1001 X:1040 Y:0320 P:envMxdIzc - Load Caster's Modified Will into A.
$01/B7BD 4A LSR A A:103C X:1040 Y:0320 P:envMxdIzc - /2
$01/B7BE 4A LSR A A:101E X:1040 Y:0320 P:envMxdIzc - /2
$01/B7BF 4A LSR A A:100F X:1040 Y:0320 P:envMxdIzc - /2
$01/B7C0 1A INC A A:1007 X:1040 Y:0320 P:envMxdIzC - /2
$01/B7C1 85 54 STA $54    [$00:0154] A:1008 X:1040 Y:0320 P:envMxdIzC - Store A in 0154
$01/B7C3 64 55 STZ $55    [$00:0155] A:1008 X:1040 Y:0320 P:envMxdIzC - Store Zero in 0155.
$01/B7C5 A9 00 LDA #$00 A:1008 X:1040 Y:0320 P:envMxdIzC - Load 00 into A.
$01/B7C7 EB XBA A:1000 X:1040 Y:0320 P:envMxdIZC Exchange B and A 8-Bit Accumulators
$01/B7C8 BD 18 00 LDA $0018,x[$7E:1058] A:0010 X:1040 Y:0320 P:envMxdIzC - Load Caster's Modified Will into A.
$01/B7CB 4A LSR A A:003C X:1040 Y:0320 P:envMxdIzC - /2.
$01/B7CC C2 20 REP #$20 A:001E X:1040 Y:0320 P:envMxdIzc - Reset Processor Status
$01/B7CE 18 CLC A:001E X:1040 Y:0320 P:envmxdIzc - Clear Carry Flag.
$01/B7CF 6D 91 1B ADC $1B91  [$7E:1B91] A:001E X:1040 Y:0320 P:envmxdIzc - Add Modified Will /2 onto the base power of the Cure.
$01/B7D2 85 57 STA $57    [$00:0157] A:002E X:1040 Y:0320 P:envmxdIzc - Store A in 57.
$01/B7D4 18 CLC A:002E X:1040 Y:0320 P:envmxdIzc - Clear Carry Flag.
$01/B7D5 65 57 ADC $57    [$00:0157] A:002E X:1040 Y:0320 P:envmxdIzc - Add the value of 57 onto A.
$01/B7D7 C6 54 DEC $54    [$00:0154] A:005C X:1040 Y:0320 P:envmxdIzc - -1 from a ticker of Modified Will/8
$01/B7D9 D0 F9 BNE $F9    [$B7D4] A:005C X:1040 Y:0320 P:envmxdIzc - Repeat this until the ticker reads 0.
(Thereby the formula for healing HP with spells outside of battle is...)
 (Base x 4 + (Will /2 x Will/8)
The rest of the routine is just cleaning matters and safeguards. They aren't too important to record. It does end at 01B849 which might be important for me later.

In addition to this is Float dealings...

Float Code

Code: [Select]
$01/B9CD BD 04 00 LDA $0004,x[$7E:1044] A:1001 X:1040 Y:0320 P:envMxdIzc - Load Target's Status Byte 2 into A.
$01/B9D0 09 40 ORA #$40 A:1000 X:1040 Y:0320 P:envMxdIZc - Add 40 if Applicable.
$01/B9D2 9D 04 00 STA $0004,x[$7E:1044] A:1040 X:1040 Y:0320 P:envMxdIzc - Store A in Target's Status Byte 2.

I can't see its functionality though if it were changed however, considering how few beneficial statuses are in FFIV in the first place. I feel I am close now. I can already make Sight look at a character basis. It may not be too difficult to exchange its event code for something more useful.

1072
Ah, so it is Golbez who initiates the Twin sequence, the Twin command routine makes that very unclear and says that either can be used to cast W. Meteo.

1073
It is indeed reflected, because he never uses Twin to make Zemus die per script, it goes on forever. This also effects Golbez's AI Script in a strange way, causing him to use blank spells or no spells, but he will never use the Crystal on Zeromus.

1074
Hmm, I think I may have noticed a glitch with the auto-battles in the editor. Only the FuSoYa/Golbez ones mind you. At the end of FuSoYa's Zemus battle script White is shown when it should Twin instead. The Zeromus Battle has FuSoYa's second action being Dispel, but that wouldn't make much sense. These oddities also seem to screw up Golbez as well who doesn't use his proper script to end the battles.

1075
I'll have to poke around and look for those pointers eventually. So far I've had little luck with it, other than finding what seems to cause the events to occur, it still did not make the Sight effect into anything else.

Ah, I understand what you want now, only one correction though...

Cry

Sets Write Stat to half the value of Read Stat:

Should be...

Subtracts Write Stat from half the value of Read Stat:

On the topic of statuses... the only thing that inflicts Blind for the party in the Entire game are the Blind Arrows and by the time you get them there are better options to use, its sort of ridiculous.

Now I did locate how the Out-of-battle Status Healings Items work, not the spells yet, with that knowledge finding the spells status checks (Toad, Pig, Esuna, Float) should not be too difficult to find.


1076
Here's something I posted in another topic, but it bears re-iterating...

This is the Event to Play at New Game, so you won't have to cannibalize the normal event every single time you want to test something in a quick manner.
8081 in LoROM (Thank you Dragonsbrethren for the lead in the default items topic)

$00/8081   A9 10   LDA #$10   A:0081   X:21E0   Y:00F0   P:eNVMxdizC - Add 10 to A (Starting Events)
$00/8083   20 63 DF   JSR $DF63  [$00:DF63]   A:0010   X:21E0   Y:00F0   P:enVMxdizC - Jump to Subroutine (Event Dealings)

In Rom this is at...

281 - A9 10 - Starting Event.

This is Exceptionally useful when testing your hack and you don't want to have to rebuild your event library every single time you want to play a normal game. So you no longer need to destroy the main event and (granted there's a Load Map command within) can start the game from any point.

1077
I thought this was pretty neat and worth posting for any person that wants to change the game's story significantly to where the game would star another character (or at least start the game as someone who is not Cecil.)




$00/92D6   BF 00 A9 0F   LDA $0FA900,x[$0F:A900]   A:0001   X:0000   Y:0000   P:envMxdIZC - Load starting character's stats from this point.

All you need to do is add 20 until you get the stats (including character ID) of the character you want to start the game as. This was originally gotten around before by changing Cecil's Class, but changing the starting point of the stats themselves lends a bit more legitimacy to the proceedings, so to speak.

In ROM this is located at  0x14D6.

In addition to this closeby is the calculating of the default Critical hit dealings and "steal prevention" (I am now under the impression that these never naturally change when leveling)

$00/92E7   BF 00 A9 0F   LDA $0FA900,x[$0F:A916]   A:0014   X:0016   Y:0002   P:eNvMxdIzc - Load the 14, 15, 16th bytes of the the default data and load it into 102D, 2E, 2F.

ROM - 14E7

And finally...

$00/92F8   BF 00 A9 0F   LDA $0FA900,x[$0F:A91E]   A:0063   X:001E   Y:0007   P:eNvMxdIzc - Loads bytes 17 - 1F into character stats starting at 1037 (Current EXP)

ROM - 14F8

$00/E67D   BF 00 AB 0F   LDA $0FAB00,x[$0F:AB05]   A:0001   X:0005   Y:0005   P:envMxdIzC - Load Starting Equipment. (Every 7 bytes is a set of a character's equipment)

ROM - 687D

And let's try and change the starting event, it is Event 10 strangely enough so finding this will be a bit tricky, likely. As it has never been looked for...

Ah! And finally found it! This is located at...

8081 in LoROM (Thank you Dragonsbrethren for the lead in the default items topic)

$00/8081   A9 10   LDA #$10   A:0081   X:21E0   Y:00F0   P:eNVMxdizC - Add 10 to A (Starting Events)
$00/8083   20 63 DF   JSR $DF63  [$00:DF63]   A:0010   X:21E0   Y:00F0   P:enVMxdizC - Jump to Subroutine (Event Dealings)

In Rom this is at...

281 - A9 10 - Starting Event.

This is Exceptionally useful when testing your hack and you don't want to have to rebuild your event library every single time you want to play a normal game. So you no longer need to destroy the main event and (granted there's a Load Map command within) can start the game from any point.

So there you go. This is the way to switch the main character in a more legitimate way than kicking Cecil out of the party or changing Cecil's class alone and finally for testing you no longer are confined in starting at Event 10, but may start the game where ever there is a Load Map function.

1078
Final Fantasy IV Research & Development / Re: Whose turn is it?
« on: November 04, 2013, 12:22:51 PM »
That is Awesome! Incredible work there Chillyfeez! Finally now we can add wait timers to some commands that should have them to begin with, I was looking for the elusive "timer" bytes, but I expected them to be in the command routines themselves, not in a completely separate part of ROM.

Again, well done! That would make a very neat little addition to the editor.

1079
There's a lot of interesting things you did with this world map! You even added some subtleties like the mention of Baron having a weak naval force so you placed their docking points away from the center of the kingdom's power and the idea of connecting Damcyan and Troia via the shallows is a very neat idea and in addition is how you've made the trek to Mt. Ordeals an actual trek is also a good way to expand upon the game's background.

You even touched up the Underworld, made a few more connecting paths here and there, expanded the Three Step Penninsula into an actual area of the map, the Moon changes are few, but they are interesting. I didn't see the Hummingway Cave though I may have missed it.

The only glitch seems to be Baron Castle, everywhere else that I went to seemed to work properly. I think all you need to do is copy default map data over the section of Baron Castle and you should be good to go.

1080
Ah, glad to see more FFIV hacks in the making! I'll download this (use FF4kster to get past the places where I can't go) and see what you've done.