Aslickproductions.org/forum/index.php?PHPSESSID=q4c29v6tmbbnv0gvgpv2lv9nn7&topic=1754.45e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index9805-2.htmlslickproductions.org/forum/index.php?board=13.160e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index9805-2.html.zx@g^,/5OKtext/htmlISO-8859-1gzip8:5Tue, 10 Mar 2020 07:40:20 GMT0 0P@g^/5 Unknown info from FF4 that would be great to know

Author Topic: Unknown info from FF4 that would be great to know  (Read 17969 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #45 on: January 27, 2013, 11:01:23 AM »
Well I've made some headway on Hide, but I'm still missing a piece... In any case I managed to turn off Auto-Hide on Edward (Leaving him in a state of inaction, there's still something I'm missing here...), you can now change it to Auto-Command anything you like (As long as it involves allies or hits all enemies otherwise it will be used upon Edward) So in other words... Dark Wave, Hide (Really?!), Pray,  Kick, Endure, Bluff, Cry, Regen, and Parry. It has limited use, really. But, in my opinion, some of those options are better than Hide.

In RAM at...

03AB56 C9 05 (Compare A with 05) - Character ID of the character that will Hide of its own volition when in Critical)

03AD0B A9 09 (Command the Character who ordinarily Hides will perform on themselves)

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #46 on: January 27, 2013, 11:40:24 AM »
It's not "10", but hex 0x10 , which is 16.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #47 on: January 27, 2013, 12:52:55 PM »
I know, but since I was using Hex terms elsewhere I decided to apply Hex terms there. Only trying to stay consistent with the terminology I used before.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #48 on: January 27, 2013, 10:43:10 PM »
Well I've made some headway on Hide, but I'm still missing a piece... In any case I managed to turn off Auto-Hide on Edward (Leaving him in a state of inaction, there's still something I'm missing here...), you can now change it to Auto-Command anything you like (As long as it involves allies or hits all enemies otherwise it will be used upon Edward) So in other words... Dark Wave, Hide (Really?!), Pray,  Kick, Endure, Bluff, Cry, Regen, and Parry. It has limited use, really. But, in my opinion, some of those options are better than Hide.

In RAM at...

03AB56 C9 05 (Compare A with 05) - Character ID of the character that will Hide of its own volition when in Critical)

03AD0B A9 09 (Command the Character who ordinarily Hides will perform on themselves)

As I had thought, I was missing Just one piece and after some more data-diving I managed to find that final piece.




You may now set Auto-Hide (Or Auto-Pray, Auto-Regen, Auto-Salve, whatever you wish (as long as it targets You!) on whoever you wish! Do you want Rosa to take emergency precautions and use Pray automatically (very often as well) until she gets herself out of Critical? Or how about Edward actually uses Salve until he escapes Critical?

It has its uses. And above all, you can easily change it to 00 so Edward no longer Auto-Hides!

In RAM at...

03A407 - C9 05 (Character ID of the character that, if they happen to have Auto-Hide, will auto-hide even when their menu is shown)

03AB56 -  C9 05  (Character ID of the character that will Hide of its own volition when in Critical)

03AD0B -  A9 09 (The Command the Character who ordinarily Hides will perform on themselves)

In ROM at...


0x1A607  - C9 05 (Character ID of the character that, if they happen to have Auto-Hide, will auto-hide even when their menu is shown)

0x1AD56 -  C9 05  (Character ID of the character that will Hide of its own volition when in Critical)

0x1AF0B -  A9 09 (The Command the Character who ordinarily Hides will perform on themselves)

The only thing I am missing from Hide is its targeting, and I don't know if that refers to the normal command's targeting or not.


Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #49 on: January 27, 2013, 11:21:10 PM »
I'd rather not use Dark Wave while critical...  :tongue:
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #50 on: January 28, 2013, 08:25:49 AM »
 :hmm: I wonder how this would interact with Berserk? It's trivial enough to change, say, Yang's Gird into casting Berserk rather than Protect. After the first time would the character keep casting berserk due to being in critical or keep attacking due to being berserk?
Let's dance!

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #51 on: January 28, 2013, 09:53:14 AM »
Berserk would probably have precedence. You only react during critical status once your turn is up.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #52 on: January 28, 2013, 10:24:36 AM »
Easy enough to test! I'll try it out...

Yep! Looks like Deathlike2 was correct. Setting Gird to cast Berserk, will throw the Auto-Girding character into Berserk.

Tested it with Dispel as well and he will continue to cast Gird on himself until he's re-Berserked and it he gets out of critical range, and you cast Dispel, he will not continue to cast Berserk.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #53 on: January 30, 2013, 02:40:52 PM »
I think I may have found the means to nerf Jump...

03E980 - 09 02 (Status to Inflict on person using Jump - NOTE: Not responsible for the actual jumping portion, but does seem to deal something with the damage done, when changed to Not 02 or not 00, the character will seem inflicted by Doom but the counter will read 00 and nothing will happen.)

Unfortunately all of my other efforts to find how Jump is used has gone nowhere. I found what appeared to be the Jump Status, but when changed the character Jumping will never return from their jump.


In other news I managed to find out how the game looks at what needs to be equipped to use certain skills. The entire collection is bunched together so it's not a difficult thing to figure out.

By changing these you can then set them towards different skills like say that you want a Two-Handed weapon equipped to use Jump instead of Sing (because that makes no sense, Edward doesn't even Use a Harp in his Sing command animation)

In RAM at...

03A28E - C9 05 (Compare with Dark Wave's Command)
03A292 - C9 08 (Compare with Sing's Command)
03A296 - C9 0C (Compare with Aim's Command)
03A29A - C9 10 (Compare with Twin's Command)


I'll hopefully be able to find out the direct relation between ranges for these four commands (or rather three. Because Twin is something extra special without doubt) For reference here is all the Commands in Hex

(From the Tower of Babil Docs)

#  Name  Tg Comments
-- ----  -- --------
00 Fight 50 one ally/enemy
01 Item  00 opens a sub-menu
02 White 00 opens a sub-menu
03 Black 00 opens a sub-menu
04 Call  00 opens a sub-menu
05 Dummy 60 all enemy (Dark Wave)
06 Jump  58 one ally/enemy
07 Dummy 60 all enemy (Remember)
08 Sing  50 one enemy
09 Hide  00
0A Dummy 20 all allies (Medicine)
0B Dummy 20 all allies (Pray)
0C Aim   50 one ally/enemy
0D Dummy 50 one enemy (Store)
0E Kick  60 all enemy
0F Dummy 00 (Endure)
10 Twin  60 all enemy
11 Dummy 00 (Strengthen)
12 Dummy 60 all enemies (Cry)
13 Cover 18 one ally
14 Peep  58 one ally/enemy
15 Dummy 60 (Unknown and unused command)
16 Dart  50 one ally/enemy
17 Sneak 50 one ally/enemy
18 Ninja 00 opens a sub-menu
19 Dummy 28 all allies (Spirit Wave)
1A Chang -- Yes, this really is "Chang" in the ROM; I don't know where the e
            gets put in.
1B Parry --
1C Show  --
1D Off   --

 :edit: Alright! Found the item ranges that the game looks at for Commands. They are quite close to the original offsets above.



03A2F8 - C9 61 (If the Weapon value is this or above this (or 00?) Dark Wave cannot be used)
03A304 - C9 61 (Unsure, it does not appear to effect Dark Wave (May be Equipped Hand)

03A30E - C9 44 (If the value is this or above this, Sing can be used)
03A312 - C9 4D (If the value is this or above this, Sing cannot be used)
03A31C - C9 44 (I'm beginning to wonder if maybe these are Hand dealings? But every character that has a special command like this is Right Handed, curiously enough. I guess it shows them to be thorough. For now on I'll mark these as "Right" and "Left" handed. )
03A320 - C9 4D (Left Handed - If the value is this or above this Sing cannot be used)

03A32A - C9 54 (Right Handed - If the value is this or above this Aim can be used.
03A32E - C9 61 (Right Handed - If the values it this or above this Aim cannot be used (Looking for Bow? This would hint that Aim can be used with two Arrows equipped or two bows... well I'll give it a shot... Yep. Looks like it's right. Aim can be used with Two Bows or Two Arrows. An interesting non-check. Good on the programmers.)

Interestingly enough there is no duplicate data for Left/Right handed for Bows/Arrows.


And unfortunately as I thought, looks like Twin wasn't going to be in here.


The possibilities are immense! Do you want to make magic require a Staff or Rod equipped? Or for Dark Wave to actually require a Dark Sword? How about a Whip to use Call, or Two Handed Weapon for Jump?

While there are plenty of possibilities, there's only three that can be utilized. You may change Dark Wave's limits to another command and restrict (or expand?) the range of which it can be used (In example, Require Rosa to use a Staff to use a (better?) Pray.)

And the same applies for the other commands! This opens up a lot for me and I hope it helps you all as well!


In ROM this is located at...

01A48E - C9 05 (Compare with Dark Wave's Command)
01A492 - C9 08 (Compare with Sing's Command)
01A496 - C9 0C (Compare with Aim's Command)
01A49A - C9 10 (Compare with Twin's Command)


01A4F8 - C9 61 (Right Handed - If the Weapon value is this or above this (or 00?) Dark Wave cannot be used)
01A504 - C9 61 (Left Handed -  If the Weapon value is this or above this (or 00?) Dark Wave cannot be used (May be Equipped Hand)

01A50E - C9 44 (Right Handed - If the value is this or above this, Sing can be used)
01A512 - C9 4D (Right Handed - If the value is this or above this, Sing cannot be used)
01A51C - C9 44 (Left Handed  - If the value is this or above this, Sing can be used)
01A520 - C9 4D (Left Handed - If the value is this or above this Sing cannot be used)

01A52A - C9 54 ( - If the value is this or above this Aim can be used.
01A52E - C9 61 (Right Handed - If the values it this or above this Aim cannot be used (Looking for Bow? This would hint that Aim can be used with two Arrows equipped or two bows... well I'll give it a shot... Yep. Looks like it's right. Aim can be used with Two Bows or Two Arrows. An interesting non-check. Good on the programmers.)

 :edit: 2 -

I've taken another look about the surrounding data and I noticed an interesting pattern...

03A2F3 - BD 33 20 (7E2033 the location of the character's Right Hand Weapon)
03A2F6 - F0 07 (???)
03A2F8 - C9 61 (Right Handed Dark Wave Ranges)

In essence this means you can switch What it requires for you to use a particular command (in using the Character Data Table a few posts up). I find it difficult to think of a skill that would require that, but that's now a possibility. This data is always two bytes separated from the main Command Range, but if someone would like me to record their exact ROM locations, I can do it on request.

« Last Edit: January 30, 2013, 05:47:27 PM by Grimoire LD »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #54 on: January 30, 2013, 07:28:02 PM »
Alright I've been taking a look at Aim now and yes, it seems that Phoenix was right. The game loads FF into a Mirror Data of Accuracy. But I have seen a low level Edward with Aim miss and not infrequently against Imps. Is there something else that's going on here?

 I'm currently looking how an FF gets put in there...

Found it. Aim is programmed in a way which makes it Very difficult to change without significantly modifying its code. This is how it works... It starts out as a 0000 Accumulator. Then it is Decremented once. Resetting it to FF. And there you have it. That's how the game gets the FF. Maybe taking a further look at the data will show me a solution, hmm...

Well here's the relevant data before it gets pushed into other sectors.

Code: [Select]
$03/E836 AD 9C 26 LDA $269C  [$7E:269C] A:0003 X:0018 Y:0000 Load Edward's Accuracy into A.
$03/E839 48 PHA A:002F X:0018 Y:0000 Push A (Not really sure what that means in this case)
$03/E83A AD 29 27 LDA $2729  [$7E:2729] A:002F X:0018 Y:0000 Load A into 7E2729 (The Mirror Data for First Character)
$03/E83D 48 PHA A:0000 X:0018 Y:0000 Push A (No idea)
$03/E83E 7B TDC A:0000 X:0018 Y:0000    Transfer something... I don't see it's relevance here.
$03/E83F 8D 29 27 STA $2729  [$7E:2729] A:0000 X:0018 Y:0000 Store A in 7E2729 (Highly redundant, isn't it? Why not just change it to 00 above rather than putting in an Accuracy which will be overwritten in several instructions?)
$03/E842 3A DEC A A:0000 X:0018 Y:0000 -1 From A, making it 00FF
$03/E843 8D 9C 26 STA $269C  [$7E:269C] A:00FF X:0018 Y:0000 Store A in True Accuracy

I'll try to comment...

This to me screams of redundant code. I cannot figure out why it pampers a value for several commands that it soon erases entirely? I think there may be room to change Aim to make it merely double accuracy (by using some Shift Right Logical commands... I think?) Instead of 255 "Always Hits".

But DragonsBrethren is much better at stuff like rewriting commands than I am. So I'll leave any actual modifications in that regard to him.

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #55 on: January 30, 2013, 09:13:05 PM »
I can't really explain that phenomenon to you other than there may be "futzing" with the attack multiplier at lower levels and/or bows.

 :edit:

The only thing this reminds me most of is the WSC/GBA port's new Flan rule where you commonly use 1 or occasional 2 of the attack multiplier when you attempt to hit Flan.
« Last Edit: January 30, 2013, 10:29:51 PM by Deathlike2 »
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Unknown info from FF4 that would be great to know
« Reply #56 on: January 31, 2013, 01:36:08 PM »
I'm sure they're pushing the accuracy values to the stack so they can pull the original values back later in the routine.

The TDC instruction transfers the direct page register to the accumulator. I guess FF4 always uses 0 (or this code can break horribly) and they were trying to be efficient here.

Your call's as good as mine on storing 0 in the temp accuracy, only thing I can guess is that they make use of it later in the routine.
« Last Edit: January 31, 2013, 01:45:27 PM by Dragonsbrethren »

Deathlike2

  • Moderator
  • *
  • Posts: 3,538
  • I'm looking at you, bitch!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #57 on: January 31, 2013, 04:31:25 PM »
Well, that could explain a few things in why the attack misses outright... but there must be a level or some comparison involved to cause early game misses.
Working on the next Yet To Be Named FF4 "Hardtype" Hack Download Latest: v1.48

Video Demos: #1 #2 #3

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #58 on: February 04, 2013, 02:27:38 PM »
Hmm, I wonder if breaking on Level references might help me find out some of the formula... doubt it, but it may be worth a chance.

Well, I found where the game stores where to start with the random level up bonuses.

In RAM at...

03EF20 - C9 46 (Compare with 70 - Checks the Level Up Data located at Level 69 and disregards displayed level up amount)

03EF45 - C9 46 (Compare with 70 - Checks the Level Up Data located in the "above 70" section. Does not work unless 03EF20 also reads the same amount.)

To make this actually usable for a hack, there would need to be some changes to it. I need to find the location of why it looks only at 69's Level Up Data if I can and switch that to normal procedure. The only thing I'd like from this is the random level ups.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #59 on: February 04, 2013, 03:12:31 PM »
The HP and MP bonuses for the 70+ levels are drawn from the level 69 bonus. Could it have something to do with that?
Let's dance!