Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Deathlike2 on February 28, 2008, 03:01:15 PM
Title: Cry/Fake Tears Command
Post by: Deathlike2 on February 28, 2008, 03:01:15 PM
It does exactly what most people thought it would do. When executed, it makes running away easier. The difficulty of running away is based on your level vs the enemy's level (high levels imply easier to run away).
It seems that the time to run away is approximately cut in half when this command executes. This command allows for stacking (reducing the time further) on multiple cries.
This command does not seem to influence the randomness of money drops (which is simply 1/4 of what you would get if you won the battle).
This command also doesn't change the fact that you can't run away from bosses.
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on September 05, 2013, 01:42:31 AM
Cry is such a strange and unique command. It alters the value at 2F of an enemies stats which is presumably some kind of "run strength" or something since DeathLike2 has confirmed that Cry works like it says on the tin (how worthless. Running away is barely an issue even if running from level 127 monsters.) It is the only player command that gives the player access to an enemies stats outside of damage. Meaning that with the appropriate hacking you could make Cry reduce the enemies strength, speed, spell power, you name it.
In LoRom/HiRom... 0x3EAF8 - A2 05 00 (LDX 0005) - Load 05 into X (05 is how much the enemies "run strength" is damaged by Cry. (Later on in the routine X is put into A)
0x3EB0B BD 2F 20 - (LDA 7E202F +x) - Load A into 7E202F+x (Meaning Monster Data since they're targeted. Though in theory you could target your party or self with this as well, if we could ever figure out that targeting)
In ROM at...
0x1ECF8 - A2 05 00 (LDX 0005) - Load 05 into X (05 is how much the enemies "run strength" is damaged by Cry. (Later on in the routine X is put into A)
0x1ED0B BD 2F 20 - (LDA 7E202F +x) - Load A into 7E202F+x (Meaning Monster Data since they're targeted. Though in theory you could target your party or self with this as well, if we could ever figure out that targeting
And there you have it refer to the Tower of Bab-il Doc on Stat Records and you should be golden on what you want to change.
And that's another useless command made relevant!
Title: Re: Cry/Fake Tears Command
Post by: chillyfeez on September 05, 2013, 12:38:26 PM
Hey, awesome! It's always great, imho, when you find one byte to change that can completely alter a command like this. Nice work!
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on September 05, 2013, 10:23:30 PM
Now I'm wondering Chillyfeez if Cry can be targeted towards the party or self, thereby increasing possibilities on what it can do... your testing back then said it was irrelevant which was definitely true of the time...
And it still only effect enemies, hmm... I wonder if there's some code specifically in regards to that that says this command only works on enemy/ally...
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on September 05, 2013, 11:06:23 PM
The original idea may be based on the original "Fear" spell in FF1.
Subtracting a fear value by 5 does very little unless it's dividing by 5...
I'm not even sure if this works on boss monsters like the Behemoth (yes, watch the Behemoth feel sad for Porom... not). It probably doesn't.
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on September 05, 2013, 11:28:57 PM
That was my thought as well that it may have been intended to originally have been a Fear-esque effect. (Though what that data means in a character's stats is still beyond me. However it can only be reduced to 1 and monsters have no "Ran away in fear" like they did in FFI and II effects.
Also it looks like it does effect Bosses strangely enough. I guess they really didn't put too much effort into this command. At least Complete Collection made it into a Command and not just a filler. (I do wish thought that Complete Collection would have included Cid's Elemental Weapon skill, in place of useless Analyze that was a fairly neat idea)
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on September 06, 2013, 01:16:41 AM
Well here's an addendum. It seems I was so certain that the Load 05 into X up there was effecting the power of Cry that I didn't give it a second thought and didn't test it as vigilantly as I should have.
Turns out I was wrong. That 05 is an interesting little value which might be worth further exploration.... but for now here's the Real way to make Cry useful... Relevant Cry Code
03EAF2 - BD 2F 20 (LDA from 7E202F) - Load A from "Run Strength" (to properly decrement later in the routine)
03EB0B - BD 2F 20 (LDA from 7E202F) - As above. It is safe to change both to assure there is no data discrepancy.
03EB0E - E5 A9 - (SBC A by Value in A9 (05)) - A nuisance of an instruction (Since to my knowledge it is always a Static 05 anyhow)... it's not necessary to keep so change it to... ---------------------- 03EB0E - E9 05 - (SBC A by 05) - It keeps the original function but gets rid of the extraneous A9 check. This will allow you to change this in any way you like.
03EB16 - 9D 2F 20 - (STA 7E202F) - Put the new value into Enemy "Run Strength" Say you wanted it to act like Complete Collection's Cry you would change the values to...
03EAF2 - BD 04 20 (LDA from 7E2004) - Load A from "Status Byte 2" (to properly decrement later in the routine)
03EB0B - BD 04 20 (LDA from 7E2004) - As above. It is safe to change both to assure there is no data discrepancy.
03EB0E - E9 00 - (SBC 00) - An invalid instruction now, only put in place to assure that a Charm status'd opponent not have their status changed by the command. (And by virtue can only be effected by Cry if they have no other Status Ailments currently inflicting them, in addition you cannot use Cry to inflict Charm if any of the Enemy team are inflicted with a status ailment. Thereby making it less broken than it is in FFIV:CC.
03EB14 - A9 08 - (LDA 01) - Load 01 into A... This assures that the value will be static and not add or subtract which makes sense for statuses. In most normal cases 03EB14 is skipped over and is only accessed if the value in question reads 00. (To be used in the normal routine where an enemy's "Run Strength" cannot be 00 and reverts to 01)
03EB16 - 2D 04 20 - (STA 7E2004) - Load 08 into Status Byte 2 (Charm). ----------------------------- Now the only issue with this is that there is no Status Protection included, meaning that you will be able to charm enemies that normally couldn't be charmed... which makes very little difference since generally enemies that are immune to Charm have no Charm scripts (except Flan type enemies for whatever reason)[/code]
This was all in LoRom/HiRom obviously, in ROM you would want to change these values to give you "FFIV:CC Cry" and the general information all together...
1ECF2 - BD 2F 20 (LDA from 7E202F) - Load A from "Run Strength" (to properly decrement later in the routine)
1ED0B - BD 2F 20 (LDA from 7E202F) - As above. It is safe to change both to assure there is no data discrepancy.
1ED0E - E5 A9 - (SBC A by Value in A9 (05)) - A nuisance of an instruction (Since to my knowledge it is always a Static 05 anyhow)... it's not necessary to keep so change it to... ---------------------- 1ED0E - E9 05 - (SBC A by 05) - It keeps the original function but gets rid of the extraneous A9 check. This will allow you to change this in any way you like.
1ED16 - 9D 2F 20 - (STA 7E202F) - Put the new value into Enemy "Run Strength"
Say you wanted it to act like Complete Collection's Cry you would change the values to...
1ECF2 - BD 04 20 (LDA from 7E2004) - Load A from "Status Byte 2" (to properly decrement later in the routine)
1ED0B - BD 04 20 (LDA from 7E2004) - As above. It is safe to change both to assure there is no data discrepancy.
1ED0E - E9 00 - (SBC 00) - An invalid instruction now, only put in place to assure that a Charm status'd opponent not have their status changed by the command. (And by virtue can only be effected by Cry if they have no other Status Ailments currently inflicting them, in addition you cannot use Cry to inflict Charm if any of the Enemy team are inflicted with a status ailment. Thereby making it less broken than it is in FFIV:CC.
1ED14 - A9 08 - (LDA 01) - Load 01 into A... This assures that the value will be static and not add or subtract which makes sense for statuses. In most normal cases 1ECB14 is skipped over and is only accessed if the value in question reads 00. (To be used in the normal routine where an enemy's "Run Strength" cannot be 00 and reverts to 01)
1ED16 - 2D 04 20 - (STA 7E2004) - Load 08 into Status Byte 2 (Charm). ----------------------------- Now the only issue with this is that there is no Status Protection included, meaning that you will be able to charm enemies that normally couldn't be charmed... which makes very little difference since generally enemies that are immune to Charm have no Charm scripts (except Flan type enemies for whatever reason) And there you have it. A completely new command made up of older parts. (Nowe we just need to targetting and we will be Set.)
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on October 01, 2013, 10:06:36 PM
And the purpose of Cry is revealed!
What it seems like it was *supposed* to do was make Stealing easier. For a very long time people assumed that Byte 2F was Run Strength, which might also be true, but is also more importantly "Steal Prevention". The way Steal ends up working is this...
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....
Kill an enemy's Steal Prevention. (after using four to five times) and your chance to steal becomes that much better.
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on October 02, 2013, 01:59:01 AM
Hm... Cry+Steal.
If only that worked on bosses... (it doesn't AFAIK)
Title: Re: Cry/Fake Tears Command
Post by: chillyfeez on October 02, 2013, 06:12:38 AM
It might. The inability to run is determined by a flag in the battle, not a property of the monster itself, so cry may still have the same effect and we just never really noticed it. Unless the cry routine checks for the boss flag, but that check would be easy enough to disable.
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on October 02, 2013, 07:52:56 AM
I've confirmed before that bosses aren't immune to Cry, but their steals are always Cure1 so... I guess you could stack up on the Unique Obtain Firebomb's from Red Dragons in FFII... if you had Porom to Cry it into submission (If Edge is Level 50 you should always get the item regardless if their Steal Prevention is 0).
I also have a plan to make it so you can only steal one item per enemy, mainly for the purposes of them having actually useful things to steal that I might not want the character to stock up on in just one battle.
Title: Re: Cry/Fake Tears Command
Post by: Dragonsbrethren on October 02, 2013, 01:50:05 PM
Are you certain the only thing that stat is used for is stealing?
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on October 02, 2013, 02:30:10 PM
No, I'm not certain, which is why I added that caveat about Odin and Run Strength possibly also being connected to it.
In fact let me see if Odin is involved at all...
As far as I can tell it does trigger a reaction with Odin, but it also triggers with any spell used and this part of data reads all parts of an enemy's data for some reason. Not just 2F. On the contrary, trying to run with the 2F byte breakpointed did not trigger any reaction.
As far as I can see anyhow it seems it is only used in a "Steal Prevention" capacity.
Title: Re: Cry/Fake Tears Command
Post by: Dragonsbrethren on October 02, 2013, 05:09:18 PM
Well I'm not ready to call it 100% yet, but it definitely has some interesting implications about the game's planned story/character progression if that turns out to be the case.
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on October 02, 2013, 10:08:59 PM
I'm beginning to think that maybe Steal was originally a skill that Palom had before they thought of Edge, as it would make sense that the rambunctious kid could have a command like that and his sister's accompanying command may have originally helped with that. It's really difficult to say though.
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on October 03, 2013, 07:37:46 PM
"Run Strength" to my knowledge had a lot more to do with the level of the enemy you are running from.
For instance, if you do an initial run of the Lunar Subterrane, running from the basic enemies wasn't too hard.
When you reach the Lunar Core... every monster takes forever to run away from. AFAIK every monster is @ level 99.
Do what you will with this info.
It has zero to do with bosses (other than Cry not working vs them), but has everything to do with level.
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on October 03, 2013, 09:54:45 PM
Hmm, I just tested this with a lvl. 100 Zombie against a Level 10 party... There were a lot of Back Attacks which prevented us from running until they got a full turn in, but running away from them after that only took 2 or 3 seconds, maybe a little longer than ordinary. I really couldn't tell. Everyone knows that level is also concerned in back attacks and pre-emptive strikes, I wonder if it has anything to do with that?
But Cry does work against bosses. All it would seem to do though is increase your chances of stealing a Cure1 from them.
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on October 04, 2013, 10:07:31 AM
Level definitely influences back attacks, as that tends to tell you that you're underleveled.
It's more noticeable in TAY, probably due to "adjusted limits".
I'd have to look into FF4A with the ability to use Cry+Steal.
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on October 12, 2013, 01:12:07 PM
Cry doesn't seem to have any impact in Stealing (tried using codes to add Cry to the command list and no noticeable change occurred).
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD 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.
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on October 13, 2013, 01:44:41 PM
I've tried it in both FF2 US (through Game Genie codes) and FF4A and there really is no difference. It has no effect AFAIK.
Title: Re: Cry/Fake Tears Command
Post by: Grimoire LD on October 13, 2013, 02:31:29 PM
That directly goes against the coding for the very command itself...
$03/E1EA20 8B 85JSR $858B [$03:858B]A:0081X:002EY:0000P:eNvMxdizc - 03858B - Jump to RNG Routine. $03/E1ED85 A9STA $A9 [$00:00A9]A:000FX:0000Y:0000P:eNvMxdizc - Store Random Number in A9. $03/E1EF18 CLCA:0035X:0000Y:0000P:envMxdizc - Clear Carry Flag. $03/E1F0A9 32LDA #$32A:0035X:0000Y:0000P:envMxdizc - Load 32 into A (50?) $03/E1F26D 82 26ADC $2682 [$7E:2682]A:0032X:0000Y:0000P:envMxdizc - + Caster's Level. $03/E1F538 SECA:003CX:0000Y:0000P:envMxdizc - Set Carry Flag $03/E1F6ED 2F 27SBC $272F [$7E:272F]A:003CX:0000Y:0000P: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/E1F9B0 04BCS $04 [$E1FF]A:002CX:0000Y:0000P: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...
... $03/EAF0A6 A6LDX $A6 [$00:00A6]A:0010X:0024Y:0000P:envMxdizc - Load User's Slot. $03/EAF2BD 2F 20LDA $202F,x[$7E:202F]A:0010X:0000Y:0000P:envMxdiZc - Load User's ?Steal Prevention? $03/EAF54A LSR AA:000AX:0000Y:0000P:envMxdizc - /2. $03/EAF685 A9STA $A9 [$00:00A9]A:0005X:0000Y:0000P:envMxdizc Store it in A9. $03/EAF8A2 05 00LDX #$0005A:0005X:0000Y:0000P:envMxdizc - Load 0005 into X. (Gets to Monster Slots) $03/EAFB86 ABSTX $AB [$00:00AB]A:0005X:0005Y:0000P:envMxdizc - Store X in AB. -------------------------------------------------------------------------(Looping Point)-------------------------------------------------------------------------------------- $03/EAFDA6 ABLDX $AB [$00:00AB]A:0005X:0005Y:0000P:envMxdizc - Load X from AB. $03/EAFFBD 40 35LDA $3540,x[$7E:3545]A:0005X:0005Y:0000P:envMxdizc - Load A from 7E3545 (Slots of Monsters) $03/EB02D0 15BNE $15 [$EB19]A:0000X:0005Y:0000P:envMxdiZc - If not 00 branch to 03EB19. $03/EB048A TXAA:0000X:0005Y:0000P:envMxdiZc - Transfer X to A. $03/EB0520 89 84JSR $8489 [$03:8489]A:0005X:0005Y:0000P:envMxdizc - Jump to Subroutine (Preparation?) $03/EB08A6 A6LDX $A6 [$00:00A6]A:0000X:05A0Y:0000P:envMxdizc - Load Slot from A6. $03/EB0A38 SECA:0000X:0280Y:0000P:envMxdizc - Set Carry Flag. $03/EB0BBD 2F 20LDA $202F,x[$7E:22AF]A:0000X:0280Y:0000P:envMxdizC - Load Monster's Steal Prevention. $03/EB0EE5 A9SBC $A9 [$00:00A9]A:006EX:0280Y:0000P: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/EB10F0 02BEQ $02 [$EB14]A:0069X:0280Y:0000P:envMxdizC - If 00 branch to 03EB14. $03/EB12B0 02BCS $02 [$EB16]A:0069X:0280Y:0000P:envMxdizC - If above 00 branch to 03EB16. ------------------------------------------------------------------------------------------------------------------------------------------- $03/EB14A9 01LDA #$01A:00FCX:0280Y:0000P:eNvMxdizc - Load 01 into A. ------------------------------------------------------------------------------------------------------------------------------------------- $03/EB169D 2F 20STA $202F,x[$7E:22AF]A:0069X:0280Y:0000P: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.
Title: Re: Cry/Fake Tears Command
Post by: Deathlike2 on October 13, 2013, 06:43:09 PM