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

1111
Haha! You can never be too certain, especially with FFIV. Hopefully this will help you out. Also your tutorial for getting the Shadow Dragon to work properly is very well described.

1112
Indeed so. Without the Pointer 2 the summon never shifts their pose (and is just there.) Interestingly you can even assign Jinn's "Fly across the screen" to any summon and it should work properly. At least it did when I tested it with Indra.

1113
Here are the Pointer 2 Effects...

Pointer 2 Effects

1 - Nothing
2 - Makes it so the sprite/sequence doesn't look so blocky and square. - Used by Lots of things.
3 - Used by Exit
4 - Used by Meteo
5 - Used by Comet (Looks pretty good using Shell/Protect/Blink graphics.
6 - Absorption-esque effect. - Used by Psych, Drain, Absorb, etc.
7 - Screen Shake
8 - (Seemed to be a multi-Effect, need to test with other Sprites - Targets Allies only)
9 - (Seemed to be another multi-effect, need to test with other sprites)
10 -(Sprite appears first on caster, caster reacts, then vanishes, then sprite appears on targetted enemy.) unsummons - Used by Imp
12 - Possibly keeps the grey palette on enemies when they are petrified and removes the Summon Image. - Used by Roc
13 - Removes Summon Image if applicable - Used by Mage
14 - Looks like a flurry of punches hits Enemy 1, if an ally is targeted, otherwise if an enemy is targeted it will target properl, removes Summon Image. - Used by Chocobo
15 - Shiva's Ice Storm, Moves Shiva's Sprite, Unsummons.
16 - Moves Indra's Sprite, unsummons. - Used by Indra
17 - Jinn flying across the screen, unsummons - Used by Stone, Petrify, Jinn
18 - Another Screen Shaker, unsummons - Used by Titan
19 - Likely used by Mist Dragon, but corresponds to chosen sprites. expels sprite at enemies (looks Really great with Life Sprite chosen) unsummons - Used by Mist Dragon
20 - Seems to be Sylph's healing effect (Figure eighting sprites as they heal) unsummons - Used by Sylph
21 - Odin's Zantetsuken, unsummons - Used by Odin
22 - Leviathan's Wave , unsummons- Used by Leviathan
23 - Unsummons - Used by Asura 1.
24 - Unsummons - Used by Asura 2.
25 - Unsummons - Used by Asura 3.
26 - Megaflare, Unsummons - Used by Bahamut.
27 - Nothing
28 - Nothing
29 - Shows the Sprite/Sequence and Sound Effect Twice. - Used by Explode
30 - Very strange... The effect shows four castings of the spells around the party and the enemies vanish one by one. Only to reappear when the effect concludes, but with a "defeated" sound effect. Oh... - Used by Reaction.
31 - Nothing
32 - Warp's or Dimension 9's revolving aura. - Used by Warp, Demolish
33 - Nuke's (Flare's) Effect. Casted Jinn's effect?
34 - Wave attacking the party. - Used by Big Wave, Wave
35 - Fire 3's Effect.
36 - Nothing
37 - White (Holy's) Effect - Used by Holy.
38 - Odin Rushing Forward - Odin (Enemy Spell)
39 - Sprite/Sequence happens, then screen flashes many different sorts of color - Used by Big Bang
40 - ??? - Used by Fission
41 - Cure 4's Effect.
42 - Screen Flashes Light Blue and then Sprite/Sequence - Used by Glance
43 - Screen Flashes Red, then Sprite/Sequence - Used by Crush
44 - Screen Flashes Yellow, then Sprite/Sequence
45 - Screen Flashes White, no Sprite/Sequence occurs - Used by Gaze, Slap
46 - Sprite/Sequence appears on Caster, then target
47 - Screen Flashes White several times, no Sprite/Sequence occurs - Used by Black Hole
48 - A glitched graphic appears for only less then a second, no Sprite/Sequence occurs
49 - Crashes Game.
50 - The battle screen darkens and does not lighten again, no Sprite/Sequence Occurs.
51 - The Caster Literally jumped across the screen, and then the game crashed.
52 - Screen blacked out.
53 - Crashes Game.
54 - Crashes Game.
55 - No Sprite/Sequence occurs.
56 - Screen blacked out.
57 - Crashes Game
58 - No Sprite/Sequence occurs.
59 - Game goes crazy, then blacks out.
60 - Game Crashes

Here's an ancient post of mine which shows what all Spells Pointer 2 uses.

Weapon Sprites:

Sprite 008 - Thrown Handaxe
Sprite 012 - Thrown Ninjastars
Sprite 014 - Thrown Boomerang
Sprite 016 - Thrown Chakram
Sprite 017 - Thrown Items (Yellow)
Sprite 018 - Thrown Items (Blue)
Sprite 020 - ? (looks to just be glitch graphics)
Sprite 024 - Bow?
Sprite 025 -






I have to wonder if the term "sprite" is a misnomer. Considering that something that couldn't possibly share the same sprite like Peep, Fatal, Float, Quake, etc are listed under the same.

Sprites : 00 Cure1/2/3/4/etc (All to do with Pointer 1 and 2?)
Sprites : 01 Protect/Shell/Blink/Ice1/2/3/Shiva (Summon)/Image
Sprites : 02 Life1/Life2/Asura (RaiseAll)
Sprites : 03 (Looks akin to a Cure graphic)

Sprites : 04 Megaflare/White/Warp/Sleep/Drain/Psych/Nuke/Jinn (Summon)/Flare/Smoke/Sylph (Attack),Bahamut (Attack)/Powder/Disrupt/DullSong/Gas/Demolish/Disrupt(2)/Absorb/Vampire/Digest/Pollen/Fission/MegaNuke/


Sprites : 05 (Same as 03?)
Sprites : 06 Peep/Fatal/Count/Search
Sprites : 07 (Looks to basically be Death Faces from Fatal)
Sprites : 08 Mute/Dispel/Size/Toad/Piggy/Venom/Lit1/2/3/Indra (Summon)/Blitz/Indra (Attack)/Breath/Whisper/Poison/Magnet/Blitz(Enemy)/Thunder

Sprites : 09 (Possibly some explosion graphic?)
Sprites : 10 Stone/Flame/Roc (Attack)/Beak/Petrify/Hug
Sprites : 11 Meteo/W.Meteo/Fire1/2/3/Bomb (Summon)/Chocobo (Summon)/Bomb(Attack)/Jinn(Attack)/Explode/Reaction/Fire/Blaze/Explode(2)/Emission

Sprites : 12 (A breath attack, possibly?)
Sprites : 13 Float/Quake (O...kay?)/Titan (Attack)/Quake(Enemy)
Sprites : 14 Comet
Sprites : 15 Weak/Weak(Enemy)/Storm/Tornado/Glare
Sprites : 16 Hold/Charm/Virus/Mage/Bluster/Entangle/Hold Gas/
Sprites : 17 Fast/Berserk/Wall/Stop (Seems that it's mostly in the pointer 1 for this one)
Sprites : 18 Slow/Heal/Silver Staff/Unicorn Horn/Maser/Heal(Enemy)/Heal (Enemy2)/Beam/Laser/Heat Ray
Sprites : 19 (An explosion of some sort)
Sprites : 20 Hatch
Sprites : 21 Pin/Big Bang/Globe199/Needle/Counter/












Pointer 1: 03 Wall
Pointer 1: 28 Fatal (The rising of the reaper and the energy being taken away animation)
Pointer 1: 37 Quake (To be exact the animation of the chasm)
Pointer 1: 47 Flame
Pointer 1: 48 Flood
Pointer 1: 49 Smoke
Pointer 1: 50 Pin
Pointer 1: 60 Blitz
Pointer 1: 61 Mist (Dragon) (Attack)





Pointer 2: 00 Null
Pointer 2: 01 (The graphic starts from the middle right of the target and descends down slightly before vanishing.)
Pointer 2: 02 Venom/Sleep/Flare/Smoke/Powder/Tongue/DullSong/Gas/Digest/Pollen
Pointer 2: 03 Exit (When you're not actually leaving battle with this, the game gets fairly screwy)
Pointer 2: 04 Meteo/W.Meteo
Pointer 2: 05 Comet
Pointer 2: 06 Drain/Osmose/Absorb/Vampire
Pointer 2: 07 Quake (Shaking of the screen)
Pointer 2: 08 (Looks like a burst of graphic raising upwards coming from the bottom of the screen only ever hitting the party)
Pointer 2: 09 (Graphics assault the enemies and only the enemies)
Pointer 2: 10 Imp (Striking Graphic, over rides defaults Sound choice)
Pointer 2: 11 Bomb
Pointer 2: 12 Roc
Pointer 2: 13 Mage
Pointer 2: 14 Chocobo
Pointer 2: 15 Shiva
Pointer 2: 16 Indra
Pointer 2: 17 Stone/?Jinn?/Ray/Beak/Petrify/Hug/
Pointer 2: 18 Titan
Pointer 2: 19 Mist
Pointer 2: 20 Sylph
Pointer 2: 21 Odin
Pointer 2: 22 Leviatan (Curiously enough there is no sprite or pointer 1 provided for it)
Pointer 2: 23 Asura Cure 3
Pointer 2: 24 Asura Cure 4
Pointer 2: 25 Asura Raise All
Pointer 2: 26 Bahamut
Pointer 2: 27 (Graphic flickers on the target briefly, can be multi targeted)
Pointer 2: 28 (Same as above?)
Pointer 2: 29 Explode
Pointer 2: 30 Reaction
Pointer 2: 31 (Seemed identical to Fission)
Pointer 2: 32 Warp/Demolish/Disrupt
Pointer 2: 33 Nuke/?Jinn?
Pointer 2: 34 Big Wave/Wave (The big difference between this and Leviatan's summon attack is this goes towards the party, though it has pointer 1 as well included in the ability, which doesn't appear to do anything.
Pointer 2: 35 Fire 3
Pointer 2: 36 No graphic even shows, damage just appears.
Pointer 2: 37 White
Pointer 2: 38 Odin (Zantetsuken against party, graphics will glitch if it is not Odin using it)
Pointer 2: 39 Big Bang
Pointer 2: 40 Fission (When used as an ally, the damage effect is shown on the caster and they do the pain animation, does not hurt them though)
Pointer 2: 41 Cure 4
Pointer 2: 42 Glance
Pointer 2: 43 Crush
Pointer 2: 44 (Screen flashes briefly and then it repeats Pointer 2: 27 seemingly)
Pointer 2: 45 Gaze
Pointer 2: 46 Bomb (Summon)
Pointer 2: 47 Blk. Hole
Pointer 2: 48 (No graphic)
Pointer 2: 49 (Crashes emulator)


And now Sequences...

00 - Exit/Drain/Psych/Shiva/Chocobo/Imp/Odin/Leviathan/Blk.Hole/Absorb/Vampire/(Enemy)Odin(Pointer 2 does the work in those cases, or has no graphic, those that have no graphic will be omitted)
01 - Nothing?
02 - Nothing?
03 - Wall
04 - Flare
05 - Fire 1/Emission
06 - Fire 2
07 - Fire 3
08 - Lit 1
09 - Lit 2 /(Enemy)Thunder
10 - Lit 3/(Enemy)Blitz
11 - Ice 1
12 - Ice 2
13 - Ice 3
14 - Armor/Shell/Image
15 - Blink
16 - Fast
17 - Dispel
18 - Mute
19 - Berserk
20 - Stop
21 - Slow
22 - Cure 1/Warp/(Hidden Spell)Disrupt-(Interestingly it seems as if it has a fully functioning Sprite/Sequence, but is never seen because of 255 Effect)/Demolish/Disrupt
23 - Cure 2/Asura1/
24 - Cure 3/Heal Staff/Asura2/Remedy
25 - Bio
26 - Charm
27 - Weak/(Enemy)Weak
28 - Fatal/Count
29 - Heal/Silver Staff/Staff/(Enemy)Heal/(Enemy)Heal(2)
30 - Peep/Search (overrides Pointer 2)
31 - Life1/Asura1
32 - Life2 (There's a difference?)
33 - Size/Breath/Whisper/Poison
34 - Float
35 - Hold/Entangle
36 - White/Nuke/(Spell)Jinn/MegaNuke
37 - Quake/Titan/(Enemy)Quake
38 - Powder/Digest/Pollen/
39 - Stone/(Summon)Roc/Ray/Beak/Petrify/Hug
40 - (Spell) Indra
41 - (Spell)Chocobo
42 - (Spell) Shiva
43 - Meteo/Comet/(Summon)Bahamut/W. Meteo (even though Pointer 2 seems to handle most of it)
 :edit:What this actually seems to do is prevent the graphic from showing on the target and lets Pointer 2 handle the process.
44 - (Spell) Bomb/(Summon)Bomb/Explode/Reaction/Explode(2)
45 - (Summon) Indra
46 - Cure 4
47 - Flame
48 - Flood
49 - Smoke
50 - Pin
51 - (Enemy Spell)Charm
52 - Needle
53 - (Summon)Jinn
54 - Fire/Blaze
56 - Cold Mist/D.Breath/Blizzard
57 - Venom
58 - Hatch
59 - (Summon)Sylph
60 - Blitz
61 - (Summon)Mist (Pointer 2 seems to override this though, 61 on its own seems to be the Sylph Healing graphic)
62 - Maser/Beam/Laser/Heat Ray
63 - Magnet
64 - Fission/Big Wave/Wave(I believe it may be overridden by Pointer 2)
 :edit: It is. The Sequence looks to be completely unused. It seems to be an explosion from the center-left of the screen that first expands and then moves horizontally.
65 - Counter
66 - Nothing?
67 - Big Bang
68 - Alert
69 - Globe199
70 - Tornado
71 - Storm
72 - (Summon)Mage/Bluster/Blast
73 - Hold Gas
74 - Unused Yellow Flashing effect with Sprites around targets.
75 - Glare
76 - Sleep/Tongue/Gas/
77 - Curse/DullSong
78 - Gaze/Slap/Glance/Crush (Though I believe Pointer 2 may disable that.)
 :edit:Doesn't appear to do anything on its own.
79 - A sequence occurs where large rotating sprites hit enemies, and this repeats four times.
80 - Sequence (which was a weird green effect on targets) never ended.
81 - The screen turned blue, enemies began to float but the battle still continued on.
82 - A graphic shows on the targets which seems to change and linger for around 10 seconds before ending.
83 - Nothing
84 - Wave of graphic hits target, repeating five times while target flashes.
85 - Same as 80.
86 - Nothing
87 - Like 84, except hits only once.
88 - Same as 80.
89 - Same as 80
90 - Same as 80.
There are a few gaps, but looking at just the game data it shows what is and isn't used. I'll see if I can figure out what the unused sequences look like then.


 :edit: And that's that. I think that covers Sprite, Sequence, and Effects in an adequate fashion.

1114
Sequence and Effects sound like proper name choices. I'll see if I can't wrangle up a list for Sequence, Effects is a little bit trickier at times to identify, but I will do what can be done.

1115
I've been putting the finishing touches on my FFIV-FFI mod and have come to a very strange realization. As an added bonus I included the Four Elemental Fiends from FFI (namesakes only, sprite transferring seems near impossible for me) into the Hidden Waterfall cave as a non necessary. but not so out of the way place that anyone who thinks they are able to can test their ability. Now I put three of the four fiends in Chest-Only Battles, and this is when I came to this realization...

Monsters in Chests do not refer to the ordinary rules of formation but something else entirely.

What it seems to refer to is a list starting from Formations 449 to 512. This is likely done to assure there is no mix up between the Overworld and the Underworld chests or something to that accord (There's also some normal fights spread throughout). There is a good amount of empty space spread throughout filled with Imps so it wouldn't be a difficult matter to deal with.

Hopefully now knowing that the next update could have that added as a viewing feature when setting monsters to chests.

1116
Almost without a doubt. Now this may also be in conjunction with a Pointer 1 at times, but it seems a little bit difficult to say.

1117
In the Animation Tabs of Spells in the Editor.

There is Sprite, Pointer 1, and Pointer 2.

Sprite is... clearly a series of sprites.

Pointer 1 is the Graphic Sequence that is used when the target is hit by the Spell. (e.g. Lit spells use 8, 9, and 10. These are all sequences which show a series of sprites falling from the sky and hitting the enemy.)

Pointer 2 appears to be graphics that appear regardless of whether the enemy is hit or not. (e.g. Flash of Light when the enemy uses Glance or Gaze whether it effects the target or not which use 42 and 45.)


1118
In preparing my FFIV to FFI patch I've started to look into graphics again and have come up with something that I can't believe I didn't notice for all of this time.

Pointer 1 specifically is the graphic sequence that appears if the enemy is hit by the spell. (Defined by the Sprite)
Pointer 2 is the graphic that appears regardless.

1119
Final Fantasy IV Research & Development / Re: Cry/Fake Tears Command
« on: October 13, 2013, 02:31:29 PM »
That directly goes against the coding for the very command itself...

Code: [Select]
$03/E1EA 20 8B 85 JSR $858B  [$03:858B] A:0081 X:002E Y:0000 P:eNvMxdizc - 03858B - Jump to RNG Routine.
$03/E1ED 85 A9 STA $A9    [$00:00A9] A:000F X:0000 Y:0000 P:eNvMxdizc - Store Random Number in A9.
$03/E1EF 18 CLC A:0035 X:0000 Y:0000 P:envMxdizc - Clear Carry Flag.
$03/E1F0 A9 32 LDA #$32 A:0035 X:0000 Y:0000 P:envMxdizc - Load 32 into A (50?)
$03/E1F2 6D 82 26 ADC $2682  [$7E:2682] A:0032 X:0000 Y:0000 P:envMxdizc - + Caster's Level.
$03/E1F5 38 SEC A:003C X:0000 Y:0000 P:envMxdizc - Set Carry Flag
$03/E1F6 ED 2F 27 SBC $272F  [$7E:272F] A:003C X:0000 Y:0000 P:envMxdizC - (Oh my God... It's the real purpose of 2F in Data... "Run Strength" is actually "Steal Prevention" - It mostly coincides with Enemy Level + 10, which is why we thought it was based solely on level. So what Cry actually does is it Increases your chance to Steal... So Why in Heaven's Name is it given to a character that can't even be in the party at the same time as the one with Steal?!.)
$03/E1F9 B0 04 BCS $04    [$E1FF] A:002C X:0000 Y:0000 P:envMxdizC - If greater than 00? branch to 03E1FF
...

To repeat myself...

"Whew! Now that was work but a lot of valuable information came out of this. First and foremost is finally the purpose of that Mystery Byte that we've been calling "Run Strength" for years on end. What it actually is a "Steal Prevention" byte. It appears to be Enemy Level +10(decimal) for Enemies. Which means the Purpose of Cry is to make it easier to Steal Items. Well done Square! Under normal circumstances that situation can never happen! In addition is all the chances of success are recorded below so Cry is absolutely, positively, worthless under normal gameplay circumstances.

50 + Level - Target's Steal Prevention = Amount that will be tested against a Random Number (which seems like it can range from 1-255.) - If the value is over 100 it is an automatic success. (which can only happen in levels 60 and up.)  I wonder if this 2F Byte might also be dealing something with Odin as well...."

And Cry is a very specific command it is difficult to get its function wrong...

Code: [Select]
...
$03/EAF0 A6 A6 LDX $A6    [$00:00A6] A:0010 X:0024 Y:0000 P:envMxdizc - Load User's Slot.
$03/EAF2 BD 2F 20 LDA $202F,x[$7E:202F] A:0010 X:0000 Y:0000 P:envMxdiZc - Load User's ?Steal Prevention?
$03/EAF5 4A LSR A A:000A X:0000 Y:0000 P:envMxdizc - /2.
$03/EAF6 85 A9 STA $A9    [$00:00A9] A:0005 X:0000 Y:0000 P:envMxdizc Store it in A9.
$03/EAF8 A2 05 00 LDX #$0005 A:0005 X:0000 Y:0000 P:envMxdizc - Load 0005 into X. (Gets to Monster Slots)
$03/EAFB 86 AB STX $AB    [$00:00AB] A:0005 X:0005 Y:0000 P:envMxdizc - Store X in AB.
-------------------------------------------------------------------------(Looping Point)--------------------------------------------------------------------------------------
$03/EAFD A6 AB LDX $AB    [$00:00AB] A:0005 X:0005 Y:0000 P:envMxdizc - Load X from AB.
$03/EAFF BD 40 35 LDA $3540,x[$7E:3545] A:0005 X:0005 Y:0000 P:envMxdizc - Load A from 7E3545 (Slots of Monsters)
$03/EB02 D0 15 BNE $15    [$EB19] A:0000 X:0005 Y:0000 P:envMxdiZc - If not 00 branch to 03EB19.
$03/EB04 8A TXA A:0000 X:0005 Y:0000 P:envMxdiZc - Transfer X to A.
$03/EB05 20 89 84 JSR $8489  [$03:8489] A:0005 X:0005 Y:0000 P:envMxdizc - Jump to Subroutine (Preparation?)
$03/EB08 A6 A6 LDX $A6    [$00:00A6] A:0000 X:05A0 Y:0000 P:envMxdizc - Load Slot from A6.
$03/EB0A 38 SEC A:0000 X:0280 Y:0000 P:envMxdizc - Set Carry Flag.
$03/EB0B BD 2F 20 LDA $202F,x[$7E:22AF] A:0000 X:0280 Y:0000 P:envMxdizC - Load Monster's Steal Prevention.
$03/EB0E E5 A9 SBC $A9    [$00:00A9] A:006E X:0280 Y:0000 P:envMxdizC - The value from what is in A9 (which will always be 05, because it does not change throughout the game as far as I'm aware)
$03/EB10 F0 02 BEQ $02    [$EB14] A:0069 X:0280 Y:0000 P:envMxdizC - If 00 branch to 03EB14.
$03/EB12 B0 02 BCS $02    [$EB16] A:0069 X:0280 Y:0000 P:envMxdizC - If above 00 branch to 03EB16.
-------------------------------------------------------------------------------------------------------------------------------------------
$03/EB14 A9 01 LDA #$01 A:00FC X:0280 Y:0000 P:eNvMxdizc - Load 01 into A.
-------------------------------------------------------------------------------------------------------------------------------------------
$03/EB16 9D 2F 20 STA $202F,x[$7E:22AF] A:0069 X:0280 Y:0000 P:envMxdizC - Store A in Monster's Steal Prevention.
...

The reason you may not have been seeing much of an impact is all dependent on the foes you tested this on. If you tested it on say, Imp it would give no real positive. But if you test this on a very high level monster with a Level 25 Edge and continue to use Cry the chance of stealing an item should become a lot more possible.

I'll test that now and see what happens.

Yes, I tested this on Level 100 Zombies that had a default 6E in their Steal Prevention slot (100+10) and used Cry many times to bring it down to 01. At first I could not steal anything when they had 110 Steal Prevention, but when I used Cry and whittled it down to 1 I was succeeding a lot more than I was failing.

9/10 Times at 6E Steal prevention I failed (And that 1 was likely quite a fluke)
2/10 Times at 01 Steal Prevention I failed to steal.

1120
My short adventure of adding in all of FFI's unique spell routines into FFIV is now complete.

FFIV now has

LOCK (Decreases Evasion) In exchange of Single Digit HP Formula (Weak, etc)
SLO1 (Decreases Enemy Accuracy) In exchange of Increase Magic Defense (Shell)
TMPR (Gives + to Attack) In exchange of Modify Speed (Slow, Fast)
FAST (+1 Attack Multiplier) In exchange of Hug (Hug)
SLO2 (-2 Multiplier) in exchange of Reaction (Reaction)
SABR (+16 Attack, +10 Accuracy) in exchange of Get Rid of Positive Status (Dispel) (Black Hole is still active)
HARM (Damage Only the Undead) in exchange of Add Count (Count)
RUSE (+ Evasion) in exchange of Add Image (Blink)
FEAR (Decreases Target's "Steal Prevention" by Caster's Str/4, if less than Caster's Level 50% chance of fleeing.) in exchange of Odin.
ALIT,AFIR,AICE,ARUB,WALL (ALit, AFir, AIce add resistance to the predictable elements. ARub (going to be referred to as NlDth) gives the target immunity from Instant Death attacks. Wall, cannot work like it does in FFI because of my lack of control over statuses. (as I am pretty sure that is what NulAll (WALL) likely is in FFI. Instead it adds +Instant Death Protection and the three elemental resistances) also in exchange of Odin.

Look forward to news about a patch coming up soon!

1121
I rather like FFI and I think that some of its formulas could be put into FFIV and not seem that out of place. So my current goal is to replace (what I deem to be) useless or rare formulas, to make formulas that are more in-line with FFI's own. Now there might be a method to use some of the unused spell routine slots,  but I'm not 100% ready to go that far yet. But it would save a few formulas if it worked.

LOCK - (Focus - -Evasion Which will actually work in this hack!)

Replacing Tornado/Weak's formula


Lock Routine
Code: [Select]
$03/D453 AD 29 27 LDA $2729  [$7E:2729] A:0003 X:0006 Y:0000 P:envMxdizc - Load Target's Evasion into A.
$03/D456 ED 9D 28 SBC $289D  [$7E:289D] A:0000 X:0006 Y:0000 P:envMxdiZc - Subtract A from Lock's Spell Power.
$03/D459 10 02 BPL $02    [$D45D] A:00E6 X:0006 Y:0000 P:eNvMxdizc - If it is a positive number branch to 03D45D.
$03/D45B A9 00 LDA #$00 A:00E6 X:0006 Y:0000 P:eNvMxdizc - Load 00 into A.
$03/D45D 8D 29 27 STA $2729  [$7E:2729] A:0000 X:0006 Y:0000 P:envMxdiZc - Store A in Target's Evasion.
$03/D460 60 RTS A:0000 X:0006 Y:0000 P:envMxdiZc - Return

Replaces Shell Routine -
SLOW - Slow1 Routine (Basically the same as above. Both sequences are the same.) - Reduces Target's Accuracy
Code: [Select]
$03/D873 AD 1C 27 LDA $271C  [$7E:271C] A:0003 X:001C Y:FFFF P:envMxdizc - Load Target's Accuracy into A.
$03/D876 ED 9D 28 SBC $289D  [$7E:289D] A:004B X:001C Y:FFFF P:envMxdizc - Subtract A from Spell Power.
$03/D879 10 02 BPL $02    [$D87D] A:003B X:001C Y:FFFF P:envMxdizC - If it is still positive, branch to 03D87D.
-------------------------------------------------------------------------------------------------------------
(Same as above)
------------------------------------------------------------------------------------------------------------
$03/D87D 8D 1C 27 STA $271C  [$7E:271C] A:003B X:001C Y:FFFF P:envMxdizC - Store A in Target's Accuracy.
$03/D880 60 RTS A:003B X:001C Y:FFFF P:envMxdizC - Return


Replacing Modify Speed.

TMPR - Temper - Increases Attack.

Code: [Select]
$03/D897 AD 82 26 LDA $2682  [$7E:2682] A:0003 X:001E Y:0000 P:envMxdizc - Load Caster's Level into A.
$03/D89A 4A LSR A A:000A X:001E Y:0000 P:envMxdizc - Divide A by 2.
$03/D89B AA TAX A:0005 X:001E Y:0000 P:envMxdizc - Transfer A to X.
$03/D89C AD 1D 27 LDA $271D  [$7E:271D] A:0005 X:0005 Y:0000 P:envMxdizc - Load Target's Attack Base into A.
$03/D89F 8E A9 00 STX $00A9  [$7E:00A9] A:003C X:0005 Y:0000 P:envMxdizc - Store Caster's Level /2 into A9.
$03/D8A2 6D A9 00 ADC $00A9  [$7E:00A9] A:003C X:0005 Y:0000 P:envMxdizc - Add A9 onto A.
$03/D8A5 C9 FF CMP #$FF A:0041 X:0005 Y:0000 P:envMxdizc - Is it FF?
$03/D8A7 90 02 BCC $02    [$D8AB] A:0041 X:0005 Y:0000 P:envMxdizc - If it is below FF branch to 03D8AB.
----------------------------------------------------------------------------------------------------------------------------------------------------------
(Load FF into A to prevent an overflow)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
$03/D8AB 8D 1D 27 STA $271D  [$7E:271D] A:0041 X:0005 Y:0000 P:envMxdizc - Store A in 7E271D.
$03/D8AE 60 RTS A:0041 X:0005 Y:0000 P:envMxdizc - Return

This works a bit different from the other spells and that's to give Temper a use all game long, technically. It will boost attack in this manner... Attack + Level/2. So it will continue to scale as you level up.

Replaces Hug
FAST - FFI Haste (+1 Attack Multiplier)

Code: [Select]
$03/DCFB AD 1B 27 LDA $271B  [$7E:271B] A:0003 X:0048 Y:0000 P:envMxdizc - Load Target's Attack Multiplier into A.
$03/DCFE 1A INC A A:0002 X:0048 Y:0000 P:envMxdizc - +1 to A.
$03/DCFF C9 0B CMP #$0B A:0003 X:0048 Y:0000 P:envMxdizc -Is it 0B?
$03/DD01 90 02 BCC $02    [$DD05] A:0003 X:0048 Y:0000 P:eNvMxdizc - If Lower than 0B branch to 03DD01.
------------------------------------------------------------
(Set it back to 0A)
-----------------------------------------------------------
$03/DD05 8D 1B 27 STA $271B  [$7E:271B] A:0003 X:0048 Y:0000 P:eNvMxdizc - Store A in Target's Attack Multiplier into A
$03/DD08 60 RTS A:0003 X:0048 Y:0000 P:eNvMxdizc - Return

I am Well aware of how easy a spell like this would be to abuse in FFIV, I'm not even sure if setting it to a Max of 10 Attack Multipliers is fair. I may have to go lower to balance it a little further, I'm not sure in what way though.

Replaces Reaction

SLO2 - Slowra (Decreases Enemy's Attack Multipliers by 2.)

Code: [Select]
$03/DD2F AD 1B 27 LDA $271B  [$7E:271B] A:0003 X:004C Y:0000 P:envMxdizc - Load Target's Attack Multiplier into A.
$03/DD32 3A DEC A A:0000 X:004C Y:0000 P:envMxdiZc - -1 to A.
$03/DD33 3A DEC A A:00FF X:004C Y:0000 P:eNvMxdizc - -1 to A.
$03/DD34 C9 02 CMP #$02 A:00FE X:004C Y:0000 P:eNvMxdizc - Is it less than 02?
$03/DD36 90 02 BCC $02    [$DD3A] A:00FE X:004C Y:0000 P:eNvMxdizC - If not, branch to 03DD3A
$03/DD38 A9 01 LDA #$01 A:00FE X:004C Y:0000 P:eNvMxdizC - If so, load 01 into A. (To prevent overflow_
$03/DD3A 8D 1B 27 STA $271B  [$7E:271B] A:0001 X:004C Y:0000 P:envMxdizC - Store A in 7E271B.
$03/DD3D 60 RTS A:0001 X:004C Y:0000 P:envMxdizC - Return.

This one is probably really easy to abuse as well. I should probably make some of these auto-fail if used on a boss. Or just set the "Hit Boss - No" bit.


Replaces Dispel

SABR - Saber (+16 Attack, +10 Accuracy)

Code: [Select]
$03/D8B0 AD 1D 27 LDA $271D  [$7E:271D] A:0003 X:0020 Y:0000 P:envMxdizc - Load Target's Attack into A.
$03/D8B3 69 10 ADC #$10 A:003C X:0020 Y:0000 P:envMxdizc - Add 10 (16) to A.
$03/D8B5 C9 80 CMP #$80 A:004C X:0020 Y:0000 P:envMxdizc - Is it 80? (128)
$03/D8B7 90 02 BCC $02    [$D8BB] A:004C X:0020 Y:0000 P:eNvMxdizc - If not, branch to 03D8BB
--------------------------------------------------------------------------------
Load 80 into A if so. (This is to prevent a Mage (Saber is a Self-cast spell) from jumping up to over 200 attack with repeated castings)
------------------------------------------------------------------------------
$03/D8BB 8D 1D 27 STA $271D  [$7E:271D] A:004C X:0020 Y:0000 P:eNvMxdizc - Store A in Target's Attack.
$03/D8BE AD 1C 27 LDA $271C  [$7E:271C] A:004C X:0020 Y:0000 P:eNvMxdizc - Load Target's Accuracy.
$03/D8C1 69 0A ADC #$0A A:004F X:0020 Y:0000 P:envMxdizc - Add 10.
$03/D8C3 C9 FF CMP #$FF A:0059 X:0020 Y:0000 P:envMxdizc - Is it FF (255?)
$03/D8C5 90 02 BCC $02    [$D8C9] A:0059 X:0020 Y:0000 P:envMxdizc - If less than FF branch to 03D8C9.
------------------------------------------------------------------------------
Load FF into A. I don't mind players having more than 100% accuracy. Especially if enemies will have access to these very same spells.
---------------------------------------------------------------------------
$03/D8C9 8D 1C 27 STA $271C  [$7E:271C] A:0059 X:0020 Y:0000 P:envMxdizc
$03/D8CC 60 RTS A:0059 X:0020 Y:0000 P:envMxdizc


Replacing Count Routine

HARM - (Dia, deals damage only to the Undead) Well setting that up took a lot less time than I thought it would. Trying to alter Holy routine to have such an effect, oy... I'm not going to bother. It has no elemental checks or anything of that accord. Obviously if it were Holy it would deal crushing damage to Zombies that would ordinarily be weak to it.

Code: [Select]
$03/DBB5 AD 40 27 LDA $2740  [$7E:2740] A:0003 X:0038 Y:0000 P:envMxdizc - Load Target's Creature Type into A.
$03/DBB8 29 80 AND #$80 A:0080 X:0038 Y:0000 P:eNvMxdizc - Is it Zombie?
$03/DBBA D0 01 BNE $01    [$DBBD] A:0080 X:0038 Y:0000 P:eNvMxdizc -If not, branch to 03DBBD.
--------------------------------------------------------------------------------------------
$03/DBBC 60 RTS A:0000 X:0038 Y:FFFF P:envMxdiZc - Return.
------------------------------------------------------------------------------------------------
$03/DBBD 20 AF C9 JSR $C9AF  [$03:C9AF] A:0080 X:0038 Y:0000 P:eNvMxdizc - Jump to Damage Determination.
$03/DBBE 60 RTS A:0080 X:0038 Y:FFFF P:envMxdiZc - Return.


Replaces Blink

RUSE (Or... FFI's Blink. Adds Evasion) This will be very simple so as to be able to use Blink's extremely small routine. No checks, so if people want to overflow themselves back to low evasion, then they can have it. It's set to 0A but I wonder if that's a bit high...

Code: [Select]
$03/D623 AD 29 27 LDA $2729  [$7E:2729] A:0003 X:0010 Y:0000 P:envMxdizc
$03/D626 69 0A ADC #$0A A:0016 X:0010 Y:0000 P:envMxdizc
$03/D628 8D 29 27 STA $2729  [$7E:2729] A:0020 X:0010 Y:0000 P:envMxdizc
$03/D62B 60 RTS A:0020 X:0010 Y:0000 P:envMxdizc


We are surprisingly nearly there. All that remains is implementing Fear (-"Steal Prevention" Current Str/2 (maybe 4) If "Steal Prevention" is less than user's level, do an RNG check. It is is less than 50/100 put 80 in Status Byte 1.) and the various Elemental Shields. (AFir, AIce, etc)


Unlike everything else I've ever done... I'll actually be releasing this mini-mod as a patch! Just don't expect any balancing or anything of that sort, it will only include the 14 new routines and maybe some enemy AI changes to make use of them. This is merely a proof of concept. It will include Monster's evasions reimplemented as well.
 :edit:
Now onto the rest...

Replacing Odin (Odin will instead be a Dark Elemental Attack that hits all foes)

AFir, AIce, ALit, NulMgc, NulAll - (The First three are obvious on what they do, NulMgc makes it so Instant Death attacks won't kill the target and NulAll decreases the amount of damage magic does by 50%. I cannot emulate that. So instead it will just give you all resistances from elementals and protection from instant death.)

NulFir, NulIce, NulLit
Code: [Select]
$03/DB5F AD A2 28 LDA $28A2  [$7E:28A2] A:0003 X:0036 Y:0000 P:envMxdizc - Load Spell's Elemental.
$03/DB62 D0 2D BNE $2D    [$DB91] A:0000 X:0036 Y:0000 P:envMxdiZc - If it has an Elemental branch to 03DB91. (Used to transfer to Fear Routine)
$03/DB64 AD 9D 28 LDA $289D  [$7E:289D] A:0000 X:0036 Y:0000 P:envMxdiZc - Load Spell's Power.
$03/DB67 F0 0E BEQ $0E    [$DB77] A:0001 X:0036 Y:0000 P:envMxdizc - If 00 branch to 03DB77. (NulMgc, NulAll portion)
$03/DB69 AA TAX A:0001 X:0036 Y:0000 P:envMxdizc - Transfer A to X.
$03/DB6A 8E A9 00 STX $00A9  [$7E:00A9] A:0001 X:0001 Y:0000 P:envMxdizc - Store Spell Power in A9.
$03/DB6D AD 25 27 LDA $2725  [$7E:2725] A:0001 X:0001 Y:0000 P:envMxdizc - Load Target's Elemental Resistance into A.
$03/DB70 0D A9 00 ORA $00A9  [$7E:00A9] A:0000 X:0001 Y:0000 P:envMxdiZc - Add Spell Power into A if applicable.
$03/DB73 8D 25 27 STA $2725  [$7E:2725] A:0001 X:0001 Y:0000 P:envMxdizc - Store A in Target's Elemental Resistance.
$03/DB76 60 RTS A:0001 X:0001 Y:0000 P:envMxdizc - Return

What this does is allows me to save a lot of code and add some versatility to it. The Spell Powers will be as follows... AFir - 01, AIce, 02, ALit, 04, you could make other Resistance spells as well like ADrk, 08, AHly, 10, AAir, 20, ADrn, 40 if so inclined.

NulMgc (NlDth)

Code: [Select]
$03/DB5F AD A2 28 LDA $28A2  [$7E:28A2] A:0003 X:0036 Y:0000 P:envMxdizc - Load Spell's Elemental into A.
$03/DB62 D0 2D BNE $2D    [$DB91] A:0000 X:0036 Y:0000 P:envMxdiZc - If not 00 branch to 03DB91.
$03/DB64 AD 9D 28 LDA $289D  [$7E:289D] A:0000 X:0036 Y:0000 P:envMxdiZc - Load Spell's Power into A.
$03/DB67 F0 0E BEQ $0E    [$DB77] A:0000 X:0036 Y:0000 P:envMxdiZc - If 00 branch to 03DB77
---------------------------------------------------------------------------------------------
(NulFire, Ice, Lit are in here)
------------------------------------------------------------------------------------------
$03/DB77 AD 2B 27 LDA $272B  [$7E:272B] A:0000 X:0036 Y:0000 P:envMxdiZc - Load Target's Status Resistance into A.
$03/DB7A 09 80 ORA #$80 A:0000 X:0036 Y:0000 P:envMxdiZc - Add 80 (Death to it.
$03/DB7C 8D 2B 27 STA $272B  [$7E:272B] A:0080 X:0036 Y:0000 P:eNvMxdizc - Store A in Target's Resistance.
$03/DB7F AD A4 28 LDA $28A4  [$7E:28A4] A:0080 X:0036 Y:0000 P:eNvMxdizc - Load Status Infliction Byt 2 (Not real, just for Spell) of Spell.
$03/DB82 D0 01 BNE $01    [$DB85] A:0080 X:0036 Y:0000 P:eNvMxdizc - If it is not 00 branch to 03DB85.
$03/DB84 60 RTS A:00C0 X:0036 Y:0000 P:eNvMxdizC - Return

This gets by the other elemental resistance checks by seeing if it has power in the first place and since NulAll does the same thing with added all elemental resistance it goes off of that but checks if the spell has a Status Ailment to inflict (which it won't because the right tools aren't in place) and moves onto the rest of the routine.

So we will pick up NulAll there so as not to repeat most of a routine...

NulAll
Code: [Select]
....
$03/DB77 AD 2B 27 LDA $272B  [$7E:272B] A:0000 X:0036 Y:0000 P:envMxdiZc - Load Status Resistance Byte 1 of Target into A.
$03/DB7A 09 80 ORA #$80 A:0000 X:0036 Y:0000 P:envMxdiZc - Add 80 if applicable (Death)
$03/DB7C 8D 2B 27 STA $272B  [$7E:272B] A:0080 X:0036 Y:0000 P:eNvMxdizc - Store A in Status Resistance Byte.
$03/DB7F AD A4 28 LDA $28A4  [$7E:28A4] A:0080 X:0036 Y:0000 P:eNvMxdizc - Load Status Byte 2 of Spell.
$03/DB82 D0 01 BNE $01    [$DB85] A:0080 X:0036 Y:0000 P:eNvMxdizc - If it is not 00 branch to 03DB85.
$03/DB85 AD 25 27 LDA $2725  [$7E:2725] A:0080 X:0036 Y:0000 P:eNvMxdizc - Load Target's Elemental Resistance into A.
$03/DB88 09 7F ORA #$07 A:0000 X:0036 Y:0000 P:envMxdiZc - Add Fire, Ice, and Lightning Resistance into A if applicable.
$03/DB8A 8D 25 27 STA $2725  [$7E:2725] A:0007 X:0036 Y:0000 P:envMxdizc - Store A in Target's Elemental Resistance.
$03/DB8D 60 RTS A:0007 X:0036 Y:0000 P:envMxdizc - Return.

Whew! Took a little bit of fancy coding (for me, this is all virtually new to me) but everything is working properly! I just hope I have enough bytes left in Odin to make Fear work properly...

 :edit: With one byte left to spare I completed Fear to the exactions I desired! (Granted I probably could have saved even more space if I used one Branching point for the Returns.

Code: [Select]
$03/DB5F AD A2 28 LDA $28A2  [$7E:28A2] A:0003 X:0036 Y:0000 P:envMxdizc - Load Spell's Elemental.
$03/DB62 D0 2A BNE $2A    [$DB8E] A:0001 X:0036 Y:0000 P:envMxdizc - Branch if not 00 to 03DB8E.
-----------------------------------------------------------------------------------------------------------------
The Resistance Routines are in here....
----------------------------------------------------------------------------------------------------------------
$03/DB8E AD 94 26 LDA $2694  [$7E:2694] A:0001 X:0036 Y:0000 P:envMxdizc - Load Caster's Strength into A.
$03/DB91 4A LSR A A:000D X:0036 Y:0000 P:envMxdizc /Strength by 2.
$03/DB92 4A LSR A A:0006 X:0036 Y:0000 P:envMxdizC /Strength by 2.
$03/DB93 AA TAX A:0003 X:0036 Y:0000 P:envMxdizc - Transfer A to X.
$03/DB94 8E A9 00 STX $00A9  [$7E:00A9] A:0003 X:0003 Y:0000 P:envMxdizc - Store X in A9.
$03/DB97 AD 2F 27 LDA $272F  [$7E:272F] A:0003 X:0003 Y:0000 P:envMxdizc - Load Target's "Steal Prevention".
$03/DB9A ED A9 00 SBC $00A9  [$7E:00A9] A:000B X:0003 Y:0000 P:envMxdizc - Subtract Steal Prevention from Caster's Strength divided by 4.
$03/DB9D 8D 2F 27 STA $272F  [$7E:272F] A:0007 X:0003 Y:0000 P:envMxdizC - Store A in Target's "Steal Prevention".
$03/DBA0 CD 82 26 CMP $2682  [$7E:2682] A:0007 X:0003 Y:0000 P:envMxdizC - Is it less than the caster's level?
$03/DBA3 90 01 BCC $01    [$DBA6] A:0007 X:0003 Y:0000 P:eNvMxdizc - If so, branch to 03DBA6.
--------------------------------------------------------
(Return within)
--------------------------------------------------------
$03/DBA6 20 8B 85 JSR $858B  [$03:858B] A:0007 X:0003 Y:0000 P:eNvMxdizc - Jump to Random Number Generator.
$03/DBA9 C9 32 CMP #$32 A:0034 X:0000 Y:0000 P:eNvMxdizc - Is it greater than 32?
$03/DBAB B0 01 BCS $01    [$DBAE] A:0034 X:0000 Y:0000 P:envMxdizC - If so branch to 03DBAE
----------------------------------------------------
(Another Return)
------------------------------------------------------
$03/DBAE A9 80 LDA #$80 A:0034 X:0000 Y:0000 P:envMxdizC - Load 80 (Death) into A.
$03/DBB0 8D 03 27 STA $2703  [$7E:2703] A:0080 X:0000 Y:0000 P:eNvMxdizC - Store A in Target's Status Byte 1.
$03/DBB3 60 RTS A:0080 X:0000 Y:0000 P:eNvMxdizC - Return


Phew! Now this was a wonderful experiment. I've managed to include all of the unique formulas from FFI into FFIV.
Ah wait, there is one more... While Protect exists in FFIV it is nowhere near as malleable as it seems in FFI. So I will fix that routine up and see if I can't have it load Spell Power instead of Default 5.

And that was a bit more of a pain than I was expecting... ah well it works, that's all that matters.

Changes made to Protect...

Code: [Select]
$03/D859 AE 9D 28 LDX $289D  [$7E:289D] A:0011 X:001A Y:0000 P:envMxdizc - Load Spell Power into X..
$03/D85C 8E A9 00 STX $00A9  [$7E:00A9] A:0011 X:4201 Y:0000 P:envMxdizc - Store X in A9.
$03/D85F 80 04 BRA $04    [$D865] A:0011 X:4201 Y:0000 P:envMxdizc - Branch to 03D865.
--------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------
$03/D865 18 CLC A:0011 X:4201 Y:0000 P:envMxdizc - Clear Carry Flag.
$03/D866 AD 2A 27 LDA $272A  [$7E:272A] A:0011 X:4201 Y:0000 P:envMxdizc - Load Target's Physical Defense into A.
$03/D869 6D A9 00 ADC $00A9  [$7E:00A9] A:0011 X:4201 Y:0000 P:envMxdizc - Add Spell Power to A.
$03/D86C 80 01 BRA $01    [$D86F] A:0012 X:4201 Y:0000 P:envMxdizc - Branch to 03D86F.
$03/D86F 8D 2A 27 STA $272A  [$7E:272A] A:0012 X:4201 Y:0000 P:envMxdizc - Store A Target's Physical Defense.
$03/D872 60 RTS A:0012 X:4201 Y:0000 P:envMxdizc - Return.


I got rid of the Zeromus check to add in a "Look at Spell Power" routine and it uses that to load the + to Defense.

Now I am finished. This was only done to supplement FFIV's existing system. I could go much further and make spells and attacks more akin to FFI's. But I think this will do for now.


The Patch will be coming soon!

1122
Hmm, well I've started to dive into this using the Status Healing Items as a base, now after a bit of diving I found that they are put into a routine which decreases their amount by D5, which is the value of Soft - Item D5.

In this they become somehow tested against the status afflicting the character, but here is where I get lost. It seems fairly simple, but it must deal something with bits and I'm not too familiar with status in bits.

Something I have completely overlooked is that the game sees Curse as an out-of-battle status ailment, due to the Cross being able to be used outside of battle. I guess that was for plans that never got off the ground or just plain oversight.

Here's the code, it seems straightforward but I don't quite grasp it. It is used by all Status Healing Items outside of battle, save Remedy. Remedy seems to be something special.


Code: [Select]
Successful Heal - Soft - Petrify

$01/A776 E9 D5 SBC #$D5 A:A7D5 X:A654 Y:A100 P:eNvMxdIzC
$01/A778 0A ASL A A:A700 X:A654 Y:A100 P:envMxdIZC
$01/A779 85 43 STA $43    [$00:0143] A:A700 X:A654 Y:A100 P:envMxdIZc
$01/A77B A6 43 LDX $43    [$00:0143] A:A700 X:A654 Y:A100 P:envMxdIZc
$01/A77D A0 03 00 LDY #$0003 A:A700 X:0000 Y:A100 P:envMxdIZc
$01/A780 C2 20 REP #$20 A:A700 X:0000 Y:0003 P:envMxdIzc
$01/A782 B1 60 LDA ($60),y[$7E:1043] A:A700 X:0000 Y:0003 P:envmxdIzc
$01/A784 85 45 STA $45    [$00:0145] A:0040 X:0000 Y:0003 P:envmxdIzc
$01/A786 3F C3 FE 1E AND $1EFEC3,x[$1E:FEC3] A:0040 X:0000 Y:0003 P:envmxdIzc
$01/A78A 91 60 STA ($60),y[$7E:1043] A:0000 X:0000 Y:0003 P:envmxdIZc

Code: [Select]
Unsuccessful Heal - Dwarf Bread - Petrify

$01/A776 E9 D5 SBC #$D5 A:A7D7 X:A654 Y:A100 P:eNvMxdIzC
$01/A778 0A ASL A A:A702 X:A654 Y:A100 P:envMxdIzC
$01/A779 85 43 STA $43    [$00:0143] A:A704 X:A654 Y:A100 P:envMxdIzc
$01/A77B A6 43 LDX $43    [$00:0143] A:A704 X:A654 Y:A100 P:envMxdIzc
$01/A77D A0 03 00 LDY #$0003 A:A704 X:0004 Y:A100 P:envMxdIzc
$01/A780 C2 20 REP #$20 A:A704 X:0004 Y:0003 P:envMxdIzc
$01/A782 B1 60 LDA ($60),y[$7E:1043] A:A704 X:0004 Y:0003 P:envmxdIzc
$01/A784 85 45 STA $45    [$00:0145] A:0040 X:0004 Y:0003 P:envmxdIzc
$01/A786 3F C3 FE 1E AND $1EFEC3,x[$1E:FEC7] A:0040 X:0004 Y:0003 P:envmxdIzc
$01/A78A 91 60 STA ($60),y[$7E:1043] A:0040 X:0004 Y:0003 P:envmxdIzc

The answer is in there somewhere, but I can't grasp it.

Now that I am much wiser about this sort of thing I can fully grasp what's going on with Outside Battle Status Healing Items...

Successful Heal - Soft - Petrify

$01/A776   E9 D5   SBC #$D5   A:A7D5   X:A654   Y:A100   P:eNvMxdIzC - -D5 from A. (Hen Item D5,start of Status Healing Items is read as 00)
$01/A778   0A    ASL A   A:A700   X:A654   Y:A100   P:envMxdIZC  - x2 A? Must only refer to the smaller bytes.
$01/A779   85 43   STA $43    [$00:0143]   A:A700   X:A654   Y:A100   P:envMxdIZc - Store A in 0143.
$01/A77B   A6 43   LDX $43    [$00:0143]   A:A700   X:A654   Y:A100   P:envMxdIZc - Load X from 0143. (Used for indexing later)
$01/A77D   A0 03 00   LDY #$0003   A:A700   X:0000   Y:A100   P:envMxdIZc - Load 0003 into Y.
$01/A780   C2 20   REP #$20   A:A700   X:0000   Y:0003   P:envMxdIzc - Reset Processor Status
$01/A782   B1 60   LDA ($60),y[$7E:1043]   A:A700   X:0000   Y:0003   P:envmxdIzc - Load A from 7E1043.(Indexed 60 must be Start of Item List +Y)
$01/A784   85 45   STA $45    [$00:0145]   A:0040   X:0000   Y:0003   P:envmxdIzc  - Store A in 145.
$01/A786   3F C3 FE 1E   AND $1EFEC3,x[$1E:FEC3]   A:0040   X:0000   Y:0003   P:envmxdIzc - Here is the Very Important Part and it is a part I cannot stress enough. It is a part of LoRom that has a bunch of values that are as follows...
$01/A78A   91 60   STA ($60),y[$7E:1043]   A:0000   X:0000   Y:0003   P:envmxdIZc - Store A in Status Byte 1.

BF (-40 getting rid of Petrify) FF - ?? DF (-20 getting rid of Toad) FF - ?? EF (-10 getting rid of Small.) FF - ?? F7 (-8 getting rid of Pig) FF FB (-4 getting rid of Mute)  FF FD (-2 getting rid of Darkness) FF FE (-1 Getting rid of Poison) - FF FF (getting rid of All Statuses)

This can be seen clearer in my "failed" example...

Unsuccessful Heal - Dwarf Bread - Petrify

$01/A776   E9 D5   SBC #$D5   A:A7D7   X:A654   Y:A100   P:eNvMxdIzC - Dwarf Bread is Item D7 - D5 = Item 2.
$01/A778   0A    ASL A   A:A702   X:A654   Y:A100   P:envMxdIzC - x2 the lower parts of A.
$01/A779   85 43   STA $43    [$00:0143]   A:A704   X:A654   Y:A100   P:envMxdIzc - Store A in 0143 (04 specifically)
$01/A77B   A6 43   LDX $43    [$00:0143]   A:A704   X:A654   Y:A100   P:envMxdIzc - Load X from 0143.
$01/A77D   A0 03 00   LDY #$0003   A:A704   X:0004   Y:A100   P:envMxdIzc - Load 0003 into Y.
$01/A780   C2 20   REP #$20   A:A704   X:0004   Y:0003   P:envMxdIzc - Reset Processo Status.
$01/A782   B1 60   LDA ($60),y[$7E:1043]   A:A704   X:0004   Y:0003   P:envmxdIzc - Load A from Status Byte 1.
$01/A784   85 45   STA $45    [$00:0145]   A:0040   X:0004   Y:0003   P:envmxdIzc - Store A in 145.
$01/A786   3F C3 FE 1E   AND $1EFEC3,x[$1E:FEC7]   A:0040   X:0004   Y:0003   P:envmxdIzc - Add the byte from that value (above) into A.
$01/A78A   91 60   STA ($60),y[$7E:1043]   A:0040   X:0004   Y:0003   P:envmxdIzc - Store A in Status Byte 1.
[/code]

And there we go! I do not know if these values are used elsewhere, my bets are that they likely are not. But I can't be too sure on that. Not that changing them would really help, since you can still only carry those specific statuses out of battle anyhow.


$01/A6DE   C9 DE   CMP #$DE   A:00CE   X:0002   Y:6800   P:eNvMxdIzc - Is the Item Alert?
$01/A6E0   F0 10   BEQ $10    [$A6F2]   A:00CE   X:0002   Y:6800   P:eNvMxdIzc - If so branch to 01A6F2.
$01/A6E2   C9 E2   CMP #$E2   A:00CE   X:0002   Y:6800   P:eNvMxdIzc - Is the Item Tent?
$01/A6E4   B0 0C   BCS $0C    [$A6F2]   A:00CE   X:0002   Y:6800   P:eNvMxdIzc - If greater than tent branch to 01A6F2.
$01/A6E6   20 59 A4   JSR $A459  [$01:A459]   A:00CE   X:0002   Y:6800   P:eNvMxdIzc - Jump to Subroutine (???)
 
(Item decrementing subroutine, quite uninteresting)
$01/A70C   C9 DE   CMP #$DE   A:00CE   X:00B4   Y:0007   P:eNvMxdIzC - Is it Alert?
$01/A70E   F0 12   BEQ $12    [$A722]   A:00CE   X:00B4   Y:0007   P:eNvMxdIzc - If so branch to 01A722.

$01/A710   C9 E2   CMP #$E2   A:00CE   X:00B4   Y:0007   P:eNvMxdIzc - Is the Item Tent?
$01/A712   B0 0E   BCS $0E    [$A722]   A:00CE   X:00B4   Y:0007   P:eNvMxdIzc - If greater than tent branch to 01A722.



Hmm, just some other miscellaneous things. I haven't really been able to use them that well yet. Couldn't find anything of much interest.

1123
Hmm, yeah I'll take a look and see if I can't find anything in that regards.

This is it...

Code: [Select]
$03/8840 20 8B 85 JSR $858B  [$03:858B] A:0000 X:00C0 Y:0060 P:envMxdiZC - Generate Random Number (I have reason to believe this routine loads from 0-100 only not 0-256)
$03/8843 C9 32 CMP #$32 A:0014 X:0000 Y:0060 P:envMxdizc - Is it 32 or more?
$03/8845 B0 03 BCS $03    [$884A] A:0014 X:0000 Y:0060 P:eNvMxdizc  - If so branch to 03884A.
$03/8847 4C 20 89 JMP $8920  [$03:8920] A:0014 X:0000 Y:0060 P:eNvMxdizc - Jump to Subroutine (Return out of routine)
$03/8920 60 RTS A:0014 X:0000 Y:0060 P:eNvMxdizc

But there's something more here...
Code: [Select]
$03/883F 60 RTS A:0000 X:0280 Y:000F P:envMxdiZC (The routine before this is difficult to ascertain other than its cleaning statuses)
$03/871B 20 86 F1 JSR $F186  [$03:F186] A:0000 X:0280 Y:000F P:envMxdiZC - Jump to Subroutine 03F186
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$03/F186 7B TDC A:0000 X:0280 Y:000F P:envMxdiZC - Transfer Direct Page
$03/F187 AA TAX A:0000 X:0280 Y:000F P:envMxdiZC - Transfer A to X
$03/F188 A8 TAY A:0000 X:0000 Y:000F P:envMxdiZC - Transfer A to Y
$03/F189 BD 41 20 LDA $2041,x[$7E:2041] A:0000 X:0000 Y:0000 P:envMxdiZC - Load Slot 1's Unknown(41) into A.
$03/F18C 9D 2D 20 STA $202D,x[$7E:202D] A:0002 X:0000 Y:0000 P:envMxdizC - Store A in Slot 1's ?Critical Hit Chance? (I wonder why...)
$03/F18F BD 42 20 LDA $2042,x[$7E:2042] A:0002 X:0000 Y:0000 P:envMxdizC - Load Slot 1's Unknown(42) into A.
$03/F192 9D 2E 20 STA $202E,x[$7E:202E] A:0014 X:0000 Y:0000 P:envMxdizC - Store A in Slot 1's Critical Hit Damage bonus.
$03/F195 B9 BF 38 LDA $38BF,y[$7E:38BF] A:0014 X:0000 Y:0000 P:envMxdizC - Load 7E38BF into A.
$03/F198 9D 03 20 STA $2003,x[$7E:2003] A:0000 X:0000 Y:0000 P:envMxdiZC - Store A in Slot 1's Status Byte 1.
$03/F19B B9 C0 38 LDA $38C0,y[$7E:38C0] A:0000 X:0000 Y:0000 P:envMxdiZC - Load 7E38C0 into A.
$03/F19E 9D 04 20 STA $2004,x[$7E:2004] A:0000 X:0000 Y:0000 P:envMxdiZC - Store A in Slot 1's Status Byte 2.
$03/F1A1 B9 C1 38 LDA $38C1,y[$7E:38C1] A:0000 X:0000 Y:0000 P:envMxdiZC - Load A in 7E38C1.
$03/F1A4 9D 06 20 STA $2006,x[$7E:2006] A:0000 X:0000 Y:0000 P:envMxdiZC - Store A in Slot 1's Status Byte 3.
$03/F1A7 20 BC 85 JSR $85BC  [$03:85BC] A:0000 X:0000 Y:0000 P:envMxdiZC - Jump to Subroutine (From here on it is a repeating cycle of 80 to reach all necessary points)

Well here's something of note... it's how the game takes the values from in-battle and puts them back into the normal positions.

Code: [Select]
$03/F1B2 7B TDC A:0000 X:0280 Y:000F P:envMxdiZC - Transfer Direct Page.
$03/F1B3 AA TAX A:0000 X:0280 Y:000F P:envMxdiZC - Transfer A to X.
$03/F1B4 A8 TAY A:0000 X:0000 Y:000F P:envMxdiZC - Transfer A to Y.
$03/F1B5 64 A9 STZ $A9    [$00:00A9] A:0000 X:0000 Y:0000 P:envMxdiZC - Store Zero in A9.
$03/F1B7 64 AB STZ $AB    [$00:00AB] A:0000 X:0000 Y:0000 P:envMxdiZC - Store Zero in AB.
$03/F1B9 BD 00 20 LDA $2000,x[$7E:2000] A:0000 X:0000 Y:0000 P:envMxdiZC - Load 2000 into A.
$03/F1BC 99 00 10 STA $1000,y[$7E:1000] A:0081 X:0000 Y:0000 P:eNvMxdizC - Store it into A.
$03/F1BF E8 INX A:0081 X:0000 Y:0000 P:eNvMxdizC - +1 X
$03/F1C0 C8 INY A:0081 X:0001 Y:0000 P:envMxdizC - +1 Y
$03/F1C1 E6 AB INC $AB    [$00:00AB] A:0081 X:0001 Y:0001 P:envMxdizC - +1 AB
$03/F1C3 A5 AB LDA $AB    [$00:00AB] A:0081 X:0001 Y:0001 P:envMxdizC - Load AB into A.
$03/F1C5 C9 40 CMP #$40 A:0001 X:0001 Y:0001 P:envMxdizC - Rinse and repeat until you fill up the unit's stats.
$03/F1C7 D0 F0 BNE $F0    [$F1B9] A:0001 X:0001 Y:0001 P:eNvMxdizc - As above.
--------------------------------------------------------

Do this 5 times for each party member...

Code: [Select]
$03/F1D0 AA TAX A:0080 X:0040 Y:0040 P:envmxdizc - Transfer A to X
$03/F1D1 7B TDC A:0080 X:0080 Y:0040 P:envmxdizc - Transfer Direct Page.
$03/F1D2 E2 20 SEP #$20 A:0000 X:0080 Y:0040 P:envmxdiZc - Set Processor.
$03/F1D4 E6 A9 INC $A9    [$00:00A9] A:0000 X:0080 Y:0040 P:envMxdiZc - +1 A9.
$03/F1D6 A5 A9 LDA $A9    [$00:00A9] A:0000 X:0080 Y:0040 P:envMxdizc - Load A9 into A
$03/F1D8 C9 05 CMP #$05 A:0001 X:0080 Y:0040 P:envMxdizc - Is it 5?
$03/F1DA D0 DB BNE $DB    [$F1B7] A:0001 X:0080 Y:0040 P:eNvMxdizc - If not, branch back to 03F1B7 to properly transfer data

Item Storing into Outside of Battle Space.

Code: [Select]
$03/F1DC 7B TDC A:0005 X:0280 Y:0140 P:envMxdiZC - Transfer Direct Page.
$03/F1DD AA TAX A:0000 X:0280 Y:0140 P:envMxdiZC - Transfer A to X.
$03/F1DE A8 TAY A:0000 X:0000 Y:0140 P:envMxdiZC - Transfer A to Y.
$03/F1DF 86 A9 STX $A9    [$00:00A9] A:0000 X:0000 Y:0000 P:envMxdiZC - Store X in A9.
$03/F1E1 BD 1B 32 LDA $321B,x[$7E:321B] A:0000 X:0000 Y:0000 P:envMxdiZC - Load Item Battle Spot.
$03/F1E4 99 40 14 STA $1440,y[$7E:1440] A:00C9 X:0000 Y:0000 P:eNvMxdizC - Store A in Item Spot.
$03/F1E7 F0 04 BEQ $04    [$F1ED] A:00C9 X:0000 Y:0000 P:eNvMxdizC - If 00 branch to 03F1ED.
$03/F1E9 C9 60 CMP #$60 A:00C9 X:0000 Y:0000 P:eNvMxdizC - Do this 60 times.
$03/F1EB D0 06 BNE $06    [$F1F3] A:00C9 X:0000 Y:0000 P:envMxdizC - If not done, branch to 03F1F3.
$03/F1F9 D0 04 BNE $04    [$F1FF] A:0002 X:0000 Y:0000 P:envMxdizC
$03/F1FF E8 INX A:0002 X:0000 Y:0000 P:envMxdizC - +1 to X
$03/F200 E8 INX A:0002 X:0001 Y:0000 P:envMxdizC - +1 to X
$03/F201 E8 INX A:0002 X:0002 Y:0000 P:envMxdizC - +1 to X
$03/F202 E8 INX A:0002 X:0003 Y:0000 P:envMxdizC - +1 to X.
$03/F203 C8 INY A:0002 X:0004 Y:0000 P:envMxdizC - +1 to Y.
$03/F204 C8 INY A:0002 X:0004 Y:0001 P:envMxdizC - +1 to Y.
$03/F205 E6 A9 INC $A9    [$00:00A9] A:0002 X:0004 Y:0002 P:envMxdizC +1 to A9.
$03/F207 A5 A9 LDA $A9    [$00:00A9] A:0002 X:0004 Y:0002 P:envMxdizC - Load A9.
$03/F209 C9 30 CMP #$30 A:0001 X:0004 Y:0002 P:envMxdizC - Has it done this 30 times?
$03/F20B D0 D4 BNE $D4    [$F1E1] A:0001 X:0004 Y:0002 P:eNvMxdizc - If not branch back to 03F1E1.

And there you have it! The chance to drop money when you run is purely a 50/50 chance  32/64 (because if it were 80/100  205/255 we would have noticed a long time ago)




1124
Final Fantasy IV Research & Development / Re: Cry/Fake Tears Command
« on: October 12, 2013, 03:34:54 PM »
Hmm, that means one of two things... FFIV:A's cry may do something more intelligent. Or Steal is based differently in FFIV:A. Steal may look directly at enemy levels in FFIV:A, possibly.

1125
I believe that is generally unknown. FFIV has not been explored to the same extent as FFVI has been. It is difficult to even place a possible starting point, but if I had to I would say likely say this... 038000 to 03FFFF. I cannot get the game to breakpoint in battle before 038000 and I've never seen a 04XXXX value in battle.