Aslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&action=printpage;topic=473.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexb4ec-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=473.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexb4ec-2.html.zxoLg^OKtext/htmlISO-8859-1gzip@Tue, 10 Mar 2020 08:31:02 GMT0 0PnLg^? Print Page - Shadow Party Stats

Board of Slick

Library of the Ancients => Final Fantasy IV Research & Development => Topic started by: Phoenix on April 05, 2008, 10:49:40 AM

Title: Shadow Party Stats
Post by: Phoenix on April 05, 2008, 10:49:40 AM
The shadow party stats are specified within the RAM area of $7E:1140-127F. These hold the stat data for characters that have left your party but will rejoin later. The data areas for each character are:

1140-117F   Kain
1180-11BF   Tellah/FuSoYa (and Cid)
11C0-11FF   Rosa
1200-123F   Yang
1240-127F   Rydia

Some code that is being executed knows when and for whom to save the data, but I don't know the location of it. Re-adding a character outside these five will add the character with their original stats.

Though equipment information is within these stats, when one of these five characters is re-added, their new equipment is determined by the initial equipment information (7AD00-7AD91). The one exception to this is Tellah when he receives all his spells on Mt. Ordeals. His initial equipment specification for that instance of his character is empty, but he maintains the same equipment that his last character instance had. I'm not sure how this works, exactly.

Magic lists are also separate from these stats and are continuous throughout the game. For example, if you remove older Rydia from your party and add child Rydia, she'll maintain the same magic lists even though her stats and equipment match her child instance.

If anyone knows anything else related to the shadow party stats, please post. I'm researching this information right now because I need to be able to freely add and remove characters from the party, and right now this severely limits character handling in my hack.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 05, 2008, 11:07:01 AM
My guess is that either Tellah is being handled differently on Mt. Ordeals or that Tellah's shadowed info is still being stored away until that event completes.

Also, you would have to look into the "revised" equipment data that is being changed by the game... using Rosa or Yang under this instance is your best bet. Here are some reasons:

1) Young Rydia switches to Older Rydia profile.
2) Kain comes back fully equipped
3) Tellah comes back with the same equipment you first met him. This might be something you look into further.
4) Dark Knight Cecil switches to Paladin Cecil profile.

For Yang, he starts with a Leather Robe and a Claw. When he rejoins at Baron, he comes back with only a Leather Robe.
For Rosa, she starts with a full set of equipment. When she rejoins, she comes back with the Prisoner Robe only.

Both characters you may want to look into.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 05, 2008, 11:29:57 AM
Rydia, Kain, Rosa, and Yang all have their equipment specified in the initial equipment bytes. Tellah does, too -- he comes back with slightly different equipment the second time: the first time he is equipped with a Staff and a Leather Robe, the second time he is equipped with a Staff, a Gaea Robe, and an IronRing. All of these work correctly with their initial equipment specification.

The third instance of Tellah (after Mt. Ordeals) is the one with no specified equipment, but he keeps the same equipment he had in the second instance. My point was that this must be specially coded to work this way, since this is the only character instance where this happens.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 05, 2008, 11:50:39 AM
Rydia, Kain, Rosa, and Yang all have their equipment specified in the initial equipment bytes. Tellah does, too -- he comes back with slightly different equipment the second time: the first time he is equipped with a Staff and a Leather Robe, the second time he is equipped with a Staff, a Gaea Robe, and an IronRing. All of these work correctly with their initial equipment specification.

I forgot the details.. oh well. I blame the Staff for being useless and being only useful for the Scamaglione (undead version) battle.

Quote
The third instance of Tellah (after Mt. Ordeals) is the one with no specified equipment, but he keeps the same equipment he had in the second instance. My point was that this must be specially coded to work this way, since this is the only character instance where this happens.

No doubt there.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 07, 2008, 10:23:48 PM
I noticed after I started this thread that the second slot for the shadow data also stores the information for FuSoYa once he's left your party. I've updated the original post to reflect this.

I have also found the subroutines that load the character data into the shadow data, and vice versa, and have been decoding them. I didn't think I'd be able to figure them out, but I had a breakthrough today and I believe I've found the information that determines which characters it stores stats for. I'll have to do some testing to be sure, though.

But here's a little interesting tidbit for everyone: the information I've found says that Cid's stats are loaded into the second shadow data slot as well. This means that, at some point in development, he was intended to rejoin your party.

 :hmm:
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 07, 2008, 10:29:59 PM
But here's a little interesting tidbit for everyone: the information I've found says that Cid's stats are loaded into the second shadow data slot as well. This means that, at some point in development, he was intended to rejoin your party.

 :hmm:

It's simple. He was to replace the $#*)($#*#$ing old man so he would completely own in the Giant.

Edit: The fact that Cid faces zero Mechs during his time with you makes zero sense.
Title: Re: Shadow Party Stats
Post by: Pinkpuff on April 08, 2008, 08:50:41 AM
That would've been so awesome!!
Title: Re: Shadow Party Stats
Post by: Paladin on April 08, 2008, 08:58:56 AM
I think if you look at the story of the game the more likely answer is that there were events that included Cid later in the game but before the Giant's emergence which were cut.

This is one of the more recent theories I've discussed with others. That is the probability that the events in the underground were cut short due to development time constraints is.

After Zot Cain tells you about the nature of the crystals and the underground world. The underground is the reverse of the light world and just as there are four crystals of light, there are four of darkness in the underground.

We all know that the dwarves have a crystal and you get to retrieve the another one from the sealed cave. However where were the other two? I guess we're supposed to assume Golbez found them on his own just lying about somewhere.

The theory is, there were probably at least two more events relating to gathering the other two dark crystals in the underground that got cut. Probably after the sealed cave and Cain's second betrayal (because they only got that far in development).  Once Cain leaves, that opens a slot for Cid, back at Dwarf Castle, to fill for the rest of whatever else was supposed to happen underground...and then he probably leaves again before you go to the moon. Since it's "shortened up" there's no need for him to rejoin.

Of course this is speculation...but knowing that the game does have bits left that suggest Cid was to rejoin I think that makes more sense now to me...
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 08, 2008, 09:18:27 AM
I think Cid was supposed to be there, but primarily to get out of the underground and leave after the Giant sequence.

You would have Kain for most of the underground though. It's interesting because the Tower of Zot is accessible (strangely enough) and that warp device that Rubicante used would be somewhat accessible.

Note, there is a section of the floor that you fight Rubicante on that is never normally accessible.. (although the behavior of that area is bugged)  it would be a prime candidate for Tower of Zot revisited v3.
Title: Re: Shadow Party Stats
Post by: odditude on April 08, 2008, 09:33:24 PM
Bab-il, not Zot.  Idiots on the zsnes boards draining your brain? :laugh:
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 08, 2008, 09:44:25 PM
Bab-il, not Zot.  Idiots on the zsnes boards draining your brain? :laugh:

I admit it, it's shot. Time for  :sleep:
Title: Re: Shadow Party Stats
Post by: Phoenix on April 10, 2008, 02:08:09 AM
Finished testing: I did indeed find the data that determines which shadow data slots are used for whom. The table is sandwiched between the subroutines, which is why it's not easy to find. There's two different sets of bytes:

1. The first is the table for loading characters stats when a character joins your party. This is from 0689A-068AE (FF2us ROM with header). There is 1 byte per character ID. Values of 00-0F mean to load the initial stats for the characters (referencing the table at 7AB00), and values of 80-84 mean to load the shadow data stats.

2. The second table is for storing character stats in the shadow data slots when a character leaves your party. This is from 0691D-06930, again with 1 byte per character ID. Values of 00-04 mean to store the data in that shadow slot, and a value of 80 means don't store.

So, here's how the data lines up with the character IDs:
Code: [Select]
ID  Character Instance    Load  Store
--  ------------------    ----  -----
01  Cecil (Dark Knight)    00    80
02  Kain                   01    00
03  Rydia (child)          02    04
04  Tellah                 03    01
05  Edward                 04    80
06  Rosa                   05    02
07  Yang                   06    03
08  Palom                  07    80
09  Porom                  08    80
0A  Tellah (second time)   81    01
0B  Cecil (Paladin)        09    80
0C  Tellah (all spells)    81    80
0D  Yang (second time)     83    80
0E  Cid                    0A    01
0F  Kain (second time)     80    00
10  Rosa (second time)     82    80
11  Rydia (older)          84    80
12  Edge                   0B    80
13  FuSoYa                 0C    01
14  Kain (third time)      80    80
15  Golbez                 0D   

I've tested that adjusting these values changes what data is stored in the shadow slots, and have loaded post-leaving data for other characters (like Edward) successfully. This should open up some possibilities for those of you that want to change the make-up of the party during different points of the game.

However, there is still a limitation with the way this works: since there's only 5 slots, the character changes must be pre-determined, and not chosen by the player. The most flexible you can be with this is to keep two or three permanent members in the party and have two or three optional members, from a choice of 5 different characters. That isn't going to be good enough for my hack, so I've conceptualized and have started writing new subroutines to fix this, so that all 14 characters in my hack can be switched in and out freely.

Whew! After all that work I deserve a  :cookie:


...or maybe two  :cookie:  :happy:
Title: Re: Shadow Party Stats
Post by: Pinkpuff on April 10, 2008, 05:32:03 AM
That's awesome! What an amazing find!

Can't wait to see your character changing hack.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 10, 2008, 09:55:32 AM
FF4A, eat your heart out!

 :cookie: for Phoenix.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 11, 2008, 06:03:48 PM
Thanks!

I forgot to mention one thing. I also found the equipment check for Tellah's third instance (character id 0c). If you want him to receive initial equipment rather than keep what he has, then change the data at 06869 to EAEAEAEAEA. That should work, though I haven't checked it yet.
Title: Re: Shadow Party Stats
Post by: Pinkpuff on April 12, 2008, 07:24:16 AM
Quote
I've conceptualized and have started writing new subroutines to fix this, so that all 14 characters in my hack can be switched in and out freely.

If you can figure out how to do this, if it's not too much trouble, would you be able to describe how it's done? I'm sure I'm not the only one who would like to make a hack which gives the players the ability to change party members among the whole cast.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 12, 2008, 09:16:33 PM
I can tell you the concept (which is pretty simple), but you would need some ASM knowledge and understanding of the shadow data loading/storing subroutines to be able to write a fix yourself. What's probably easier for everyone is if I release a patch to change the behavior, which I plan on doing once I incorporate a working version in my hack.

Here's the concept for those of you that are interested: There are five shadow data slots of 64 bytes each. These store the same stat data as the RAM locations that store your current party stats. If you want to see what these are, click the spoiler button below. (I took these from the Tower of Bab-il documents; I didn't come up with them on my own.)

[spoiler]1000   *character id/handedness
1001   *class id/row properties
1002   level
1003-6   current status anomalies
1007-8   current hp
1009-A   maximum hp
100B-C   current mp
100D-E   maximum mp
100F   *base strength
1010   *base agility
1011   *base vitality
1012   *base wisdom
1013   *base willpower
1014   *modified strength
1015   modified agility
1016   *modified vitality
1017   modified wisdom
1018   modified willpower
1019   attack elemental
101A   *attack strong vs. creature types***
101B   physical attack multiplier
101C   physical attack percent
101D   physical attack base
101E   attack status 1***
101F   attack status 2***
1020   elements weak vs***
1021   elements very weak vs***
1022   magical defense multiplier
1023   magical defense percent
1024   magical defense base
1025   elemental defense (if immunity bit wasn't set)***
1026   elemental defense (if immunity bit was set)***
1027   *defense strong vs. creature types***
1028   physical defense multiplier
1029   physical defense percent
102A   physical defense base
102B   status immunity 1***
102C   status immunity 2***
102D-F   ?
1030   *helmet
1031   *armor
1032   *gauntlet
1033   *right-hand item
1034   *right-hand quantity
1035   *left-hand item
1036   *left-hand quantity
1037-9   *experience
103A   ?
103B   speed modifier. lower = faster. for autobattles, starts at 01; otherwise
      starts at 10. slow adds +08, (upper bound 20) haste adds -3 (lower bound 0C)
103C   ?
103D-F   *experience to level up
[/spoiler]

Since there aren't any unused locations of RAM (that I know of), I knew I had to fit as many characters' stat data within this 64 x 5 = 320 bytes of data that I could. Ideally, this would be 14, because there are 14 character classes and sets of sprites (not including Golbez and Anna, who don't have complete sets). In order to do this, I needed to store only the absolutely essential stats of a character, removing non-essential stats like modified strength/agility/vitality, hit percentage, attack statuses, etc. I call these "non-essential" because they can be calculated from a character's base stats and equipment data.

Looking at the data, I pared the stat list down to: character id (1 byte), class id (1), level (1), max HP (2), max MP (2), base str/agil/vit/wis/will (5), helmet (1), armor (1), gauntlet (1), right-hand weapon (2), left-hand weapon (2), and experience (3). This adds up to 22 essential bytes per character. Finally, I divided the 320-byte block by 22, and lo and behold there's room for 320/22 = 14.54 characters. It's like it was fated to be.

A bonus side effect of this method is that this should fix the adamant armor bug, since switching characters out would clear the elemental defense byte of the character.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 12, 2008, 09:31:09 PM
Since there aren't any unused locations of RAM (that I know of), I knew I had to fit as many characters' stat data within this 64 x 5 = 320 bytes of data that I could. Ideally, this would be 14, because there are 14 character classes and sets of sprites (not including Golbez and Anna, who don't have complete sets). In order to do this, I needed to store only the absolutely essential stats of a character, removing non-essential stats like modified strength/agility/vitality, hit percentage, attack statuses, etc. I call these "non-essential" because they can be calculated from a character's base stats and equipment data.

Looking at the data, I pared the stat list down to: character id (1 byte), class id (1), level (1), max HP (2), max MP (2), base str/agil/vit/wis/will (5), helmet (1), armor (1), gauntlet (1), right-hand weapon (2), left-hand weapon (2), and experience (3). This adds up to 22 essential bytes per character. Finally, I divided the 320-byte block by 22, and lo and behold there's room for 320/22 = 14.54 characters. It's like it was fated to be.

Can you say, incompatible SRAM time! The only issue you would have to deal with though is refreshing the character's data, since it is updated via the Equip menu...

Edit: As an aside, a conversion app would be nice, but not required. If the data is fucked up (not sure how you'd test this), use the default character data.

Quote
A bonus side effect of this method is that this should fix the adamant armor bug, since switching characters out would clear the elemental defense byte of the character.

Great, so make that fix pronto!  :wink:

Also, I have an idea...

Additional Edit: I do blame FF4A (US/Jap v1.0) for this idea, but there should be some event trigger/script that's executed to enable/disable characters gaining EXP while not in the active party. This way, you can maximize their stats and potential, which would make this version much more superior than its FF4A brethren.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 12, 2008, 10:02:19 PM
Quote
The only issue you would have to deal with though is refreshing the character's data, since it is updated via the Equip menu...

I worried about the same thing, but it turns out that some check after the stat data is loaded takes care of this, and the non-essential stats are loaded into RAM at the same time the character is added to the party. Lucky for me, I guess.  :finger:

Quote
As an aside, a conversion app would be nice, but not required. If the data is fucked up (not sure how you'd test this), use the default character data.

Do you mean a conversion between the original FF2/4 SRAM data and the patched one? This would have to be up to somebody else, since I'm not really a programmer; and if I was, it would be on a Mac, which most people wouldn't find very helpful.  :happy:

Quote
I do blame FF4A (US/Jap v1.0) for this idea, but there should be some event trigger/script that's executed to enable/disable characters gaining EXP while not in the active party. This way, you can maximize their stats and potential, which would make this version much more superior than its FF4A brethren.

Hmm...if I come across the experience adding subroutine that might be possible, but as of now I don't know the location of it. If someone finds it let me know.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 21, 2008, 05:13:35 PM
From the info that was quoted from the docs...

[spoiler]1000   *character id/handedness
1001   *class id/row properties
1002   level
1003-6   current status anomalies
1007-8   current hp
1009-A   maximum hp
100B-C   current mp
100D-E   maximum mp
100F   *base strength
1010   *base agility
1011   *base vitality
1012   *base wisdom
1013   *base willpower
1014   *modified strength
1015   modified agility
1016   *modified vitality
1017   modified wisdom
1018   modified willpower
1019   attack elemental
101A   *attack strong vs. creature types***
101B   physical attack multiplier
101C   physical attack percent
101D   physical attack base
101E   attack status 1***
101F   attack status 2***
1020   elements weak vs***
1021   elements very weak vs***
1022   magical defense multiplier
1023   magical defense percent
1024   magical defense base
1025   elemental defense (if immunity bit wasn't set)***
1026   elemental defense (if immunity bit was set)***
1027   *defense strong vs. creature types***
1028   physical defense multiplier
1029   physical defense percent
102A   physical defense base
102B   status immunity 1***
102C   status immunity 2***
102D-F   ?
1030   *helmet
1031   *armor
1032   *gauntlet
1033   *right-hand item
1034   *right-hand quantity
1035   *left-hand item
1036   *left-hand quantity
1037-9   *experience
103A   ?
103B   speed modifier. lower = faster. for autobattles, starts at 01; otherwise
      starts at 10. slow adds +08, (upper bound 20) haste adds -3 (lower bound 0C)
103C   ?
103D-F   *experience to level up
[/spoiler]

102D-F is most likely status immunities for the other stuff (Egg, Defense, Reflect, etc)... which AFAIK don't have a resistance to begin with.

On the other hand, those locations and/or 103A and 103C are the info revolving around the other equipment bits.

I'm talking about the bits that control back row compat, metallic, throwable... which I've also mentioned that some of those bits (no critical hits, back row compatible weapon) are buggy.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 21, 2008, 08:01:20 PM
102F is related to escaping. The data there is modified when using Porom's Cry command. My thought is that it is some type of internal "Luck" stat, that is used when determining whether the party can escape, and maybe other times.

The data from 102D-F is calculated during the equipment initialization, so it could be immunities for the other statuses; however, those statuses don't really need immunities (Barrier, Wall, image, jumping, hiding, etc.). Also, the values don't really seem to support this. At the beginning of the game, the values for Cecil at 102D-E are 02 and 14, which would imply immunity to Stop, image high, and Wall. Since we know this isn't true, it must be something else.

They could be related to the other equipment bits. Since they're buggy it's difficult to test. However, the 102D-F data comes from within the character stats; the bits that control metallic/throwable/etc. are stored within the equipment data, meaning they are calculated from the equipment. It's unlikely that equipment data would be stored within the character stat data. This is why I think those three bytes may be some internal "Luck" stat, or something to that effect.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 21, 2008, 08:13:54 PM
102F is related to escaping. The data there is modified when using Porom's Cry command. My thought is that it is some type of internal "Luck" stat, that is used when determining whether the party can escape, and maybe other times.

AFAIK, Cry seems to reduce the time to run in half, and the behavior is stackable (up to a point).

The ability to run away AFAIK is either tied to Agility and/or Level.

Quote
They could be related to the other equipment bits. Since they're buggy it's difficult to test. However, the 102D-F data comes from within the character stats; the bits that control metallic/throwable/etc. are stored within the equipment data, meaning they are calculated from the equipment. It's unlikely that equipment data would be stored within the character stat data. This is why I think those three bytes may be some internal "Luck" stat, or something to that effect.

You can easily test it believe it or not. Since they are buggy, just compare the data from before/after equipping stuff. The bug happens to be that the no-critical hit bit and back row bit doesn't revert when removed.

Some examples:

Dwarf Axe - no crit + back row
Arrows or Bows - back row
Boomerangs - back row
Whip - no crit + back row

Note that the back row detail requires 2 bits. A bow and arrow combo sets boths bits required for the back row check. I wrote specifically on how the back row check works.. if you need to test it out for yourself.

The back row check is like this (perhaps I need to write it in a separate thread):

1) Check if character is in back row and/or target is in back row
2) If true, determine the number of weapons equipped
3a) If there is 1, check if weapon is back row compatible
3b) If there is 2, check if both weapons are back row compatible (this includes Bow+Arrow combos)
4) If false, reduce hit rate by 1/2, repeat reduction if target is considered in the back row (stackable)

Since the back row bit is not unset when deequiping non-back row compatible weapons, you can check the bits for the bug and therefore determine the changes in the Shadow Data.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 21, 2008, 09:43:21 PM
I believe the long-range/back-row-compatible bit is stored within the second byte of the character stat data, along with the class id. I noticed this when handling the shadow stat data, Rosa's class id was always 25 (when it should be 05). I traced it to characters with a long-range weapon. So, the bits for this byte are:

0-4   Class ID (class, appearance, magic)
5        long-range weapon
6        ?
7        in back row

This is another reason why I think it's unlikely that this bit is stored in 102D-E, because it's already stored here. (The 6th bit was never active for any character that I could find, so I don't know what it's for yet.)

The no-critical bit isn't stored in the class ID, however, so I did test changing weapons to see if the bits were loaded. However, 102D-F remained unchanged for my tests.

One last note: My method of shadowing stat data should also remove the back row bit bug, since I'll remove the top three bits when storing/retrieving so I can just use the class id. If we can find the other bits, I can see if I can reset them as well. I'll see if I can search for subroutines that load the weapon data, and check those out.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 21, 2008, 09:52:21 PM
The "back row bit" has gotta be two bits. You can test this with Edge and Boomerangs...  one of the bits is set, even after you remove the weapon on the hand it was equipped on. Once the back row bits are set on both hands, both weapons instantly become back row compatible.

Rosa starts with a Bow+Arrow combo initially. Changing the set to something else initially is an easier method of testing this with either Bow or Arrow.

Two bits are needed.. one for each hand.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 21, 2008, 11:10:29 PM
Perhaps that's what the bit 6 is in the class id. It would make sense. I'll test it when I have time later.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 22, 2008, 06:49:00 AM
I forgot to mention that the Silence Staff also prevents critical hits, which is also worth testing against.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 22, 2008, 05:45:41 PM
Bit 6 in the class id is NOT set when equipping a long-range weapon to either hand. I still don't know what it's used for.

Equipping a long-range weapon in Edge's left-hand has strange behavior. It doesn't set bit 5 if you have a short-range weapon in his right-hand. If the right-hand is empty or has a long-range weapon, however, then the bit is set. For his right-hand, as soon as you equip a long-range weapon, it does set bit 5. You can see this behavior if Edge has two swords in his hands, and you equip a boomerang in his left-hand and move him to the back row. He'll still do half damage, compared to if you equip a boomerang in his right-hand and stick him in the back row. So although he's ambidextrous, apparently he's still right-hand dominant.  :happy:  Also, I tested bows and arrows with Cecil, and the bit is only set once both the bow and arrow are equipped (hands don't matter).

I've confirmed that once you remove the weapon, bit 5 stays set. Unless the character leaves your party, it's stuck. Which is actually beneficial, considering you can then use short-range weapons in the back row.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 22, 2008, 06:10:28 PM
Bit 6 in the class id is NOT set when equipping a long-range weapon to either hand. I still don't know what it's used for.

Equipping a long-range weapon in Edge's left-hand has strange behavior. It doesn't set bit 5 if you have a short-range weapon in his right-hand. If the right-hand is empty or has a long-range weapon, however, then the bit is set. For his right-hand, as soon as you equip a long-range weapon, it does set bit 5. You can see this behavior if Edge has two swords in his hands, and you equip a boomerang in his left-hand and move him to the back row. He'll still do half damage, compared to if you equip a boomerang in his right-hand and stick him in the back row. So although he's ambidextrous, apparently he's still right-hand dominant.  :happy:  Also, I tested bows and arrows with Cecil, and the bit is only set once both the bow and arrow are equipped (hands don't matter).

I've confirmed that once you remove the weapon, bit 5 stays set. Unless the character leaves your party, it's stuck. Which is actually beneficial, considering you can then use short-range weapons in the back row.

Ok, I believe I have confirmed that behavior for Edge.

The only part that doesn't make sense is for left-handed people. I suspect the algo checks for handedness first (ambidexterous defaults to right handed). That would make a lot more sense.

Try see if bit 6 is either the "no critical hit" bit or metallic bit... that's all I can think of at the top of my head.

The only character that doesn't fit this is Edward.. so I'm kinda at a loss at the moment for ideas.

It would help if you kindly give all the weapon/armor info for those character profiles that have that bit set.. there's usually something in common with them all that I simply can't think off at the top of my head.
Title: Re: Shadow Party Stats
Post by: Phoenix on April 22, 2008, 09:15:42 PM
Bit 6 isn't the no critical bit or the metallic bit. As far as I can tell, it's not used for anything. If it was ever set, I could trace it to something, but any RAM that I've analyzed doesn't have it set.

Edward, like Rosa, always has bit 5 set. He starts with a harp, which is a long-range weapon, so the bit is always set.

You want weapon/armor info for characters that have bit 5 set? Or bit 6? (I can't provide any data for the latter.)
Title: Re: Shadow Party Stats
Post by: Deathlike2 on April 22, 2008, 09:19:15 PM
Actually, never mind that... I think my reading comprehension is being reduced too quickly to tell.  :blush: :sleep:

The left handed check for back row compatible weapons the should be correct though...

Now I'm very curious how the back row bit is supposed to work in FF4A for ambidextrous characters.  :hmm:
Title: Re: Shadow Party Stats
Post by: Deathlike2 on November 24, 2009, 07:14:02 PM
Worth a  :bump: I guess

Based on this thread:
http://www.gamefaqs.com/boards/genmessage.php?board=588330&topic=52380093

Do we know what the shadow data/RAM contains when Palom+Porom leaves? I could only come up with 4 names, based on my recollection of Cid being part of the data...
Title: Re: Shadow Party Stats
Post by: Phoenix on November 25, 2009, 03:42:41 AM
Four names should be right. When the twins leave, the shadow slots should hold:

First Slot: Kain
Second Slot: Tellah (his stats when he last left the party)
Third Slot: Rosa
Fourth Slot: Yang
Fifth Slot: Rydia

Since the four other characters come back to the party, their stats need to be retained, and there isn't room for both Palom and Porom.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on November 25, 2009, 08:21:08 AM
When the twins leave, Yang and Tellah are already in the party... freeing up the 2 slots that you would need in the first place.
Title: Re: Shadow Party Stats
Post by: Phoenix on November 25, 2009, 08:05:03 PM
You're right, I forgot about Yang. It would work up until Cid's and FuSoYa's stats are stored (although neither need to be stored, FuSoYa's is only to show his HP in the auto-battles with Zemus). So I guess you really could make a FF4A-esque hack work with the shadow data as is. Who's up to the challenge?  :clocke:
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 04, 2013, 10:50:50 PM
102F is related to escaping. The data there is modified when using Porom's Cry command. My thought is that it is some type of internal "Luck" stat, that is used when determining whether the party can escape, and maybe other times.

The data from 102D-F is calculated during the equipment initialization, so it could be immunities for the other statuses; however, those statuses don't really need immunities (Barrier, Wall, image, jumping, hiding, etc.). Also, the values don't really seem to support this. At the beginning of the game, the values for Cecil at 102D-E are 02 and 14, which would imply immunity to Stop, image high, and Wall. Since we know this isn't true, it must be something else.

They could be related to the other equipment bits. Since they're buggy it's difficult to test. However, the 102D-F data comes from within the character stats; the bits that control metallic/throwable/etc. are stored within the equipment data, meaning they are calculated from the equipment. It's unlikely that equipment data would be stored within the character stat data. This is why I think those three bytes may be some internal "Luck" stat, or something to that effect.


Absolutely ancient, but still here's a required Bump!

I've figured out what the 102D-F (or at least one of the bytes) do. Phoenix was right on the mark. It's kind of like a "luck" stat. 102D Definitely is. What 102D actually appears to be is the chance to Critical Hit.

It appears to be Value = Chance to Critical Hit - And it may be just a plain 100 (setting it to 64 seems to almost always guarantee a critical hit) rather than based off of 255. Now oddly this test was done with the Dummied Crystal Sword copy, which would mean that Logically I should have No Crit chance, but setting that to 64 and FF produced critical hits a plenty.

So Value = Chance to Critical Hit x Attack Multipliers. At least it appears that way and a Critical Hit seems to be recorded differently for each hit whether it was a Critical Hit or not. (not graphically speaking however)

NOTE: All Shadow Party people come back with the same critical hit stat, including Adult Rydia (who should have none due to being equipped with a Property 1 Weapon)

Dark Knight Cecil - 02 (14 0A)
Kain - 02 (14 0A)
Rydia - 01 (28 0A) - (So from the very start Rydia is given less of a chance to Critical Hit... hah.)
Tellah - 01 (1E 0A)
Edward - 02 (1E 0A)
Rosa - 02 (3C 0A)
Yang - 01 (Wha?!) (32 0A)
Palom - 01 (1E 0A)
Porom - 01 (1E 0A)
Paladin Cecil - 03 (I thought as much) (1E 01) - (01? Hmm...)
Cid - 05 (Whoa.) (23 14) - (Very different values from everyone thus far. I wonder what they mean...)
Edge - 08 (Well, I guess he's the king of crits then.) (19 19)
FuSoYa - 00 (Eh?) (00 32)

And there you have it. Edge will crit more than anyone else and it seems that FuSoYa cannot naturally get a critical hit Ever. To my knowledge some of this flies in the face of conventional knowledge. Exactly how does Property 1 make it so you can't critical hit then?

Well I figured out the first byte, let's see if I can soon figure out the second.

 :edit: Here's a peculiarity.

Cecil clearly has a 02 14 but in battle (and indeed viewing his initial battle records) this stat is shown as 04 19, hmm...

Ah hah... part of it is weapon based... each weapon may have its own Critical Hit Modifier...

 :edit: 2 Shadow - x2 +05 (Yes, you're reading that right. The Shadow Blade gives x2 to your current Critical Hit Modifier, tested with Critical Hit at 2, then at 5. At 2 it rises to 4, and 5 it rises to A. The second value seems to be a static +5 though.

Darkness - x2 +10

Black - x2 + 15

Note: It seems that the second value increases in comparison to its base attack power. Meaning that this value will be (Character Innate + Half of the weapon's Attack Power). I still have yet to reason out what this does...

Ah! I see! What it actually does is decide the amount of extra damage a weapon will deal when it Critically Hits. Setting the value to FF made that abundantly clear. That surprisingly means that Rosa has the best Innate damage with Critical Hits, oddly enough, with Cid in a close second and of all people Rydia in a distant third.

I should probably start from the beginning...

Now to see if all weapons do is double the chance for Critical Hits of if there's more to it...

Nothing - x1
Claws    - x2
Rods      - x2
Staffs     - x2
Dark Swords - x2
Light Swords - x2
Swords  - x2
Spears  - x2
Ninja Swords - x2
Knives - x2
Whips   -x2 (though they should not be able to cause Critical Hits due to Property 1, they still add the normal x2 which is inherent to all weapons so far)
Axes - x2
Throwing Weapons - x2
Boomerangs -x2
Harps - x2
Hammers - x2
Bows&Arrows x3 (Quite a shock!)
(Quite Possibly the game penalizes dual wielders by taking away their Crit Bonus from a normal weapon.)

Well aside from the discovery about the bows that felt like a waste so...

The critical hit bonus is basically double of what is shown above.

And confirmed! Characters who equip two weapons Lose their Critical Bonus when dual wielding! While quite significant for Edge, Yang barely seems like he will be able to score any critical hit in the first place.

Now all that remains is that final byte... it never appears to change and seems unique for some characters.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on September 05, 2013, 05:49:06 PM
Grimoire, I'm not sure if you read my algo doc with respect to critical hits, but that's essentially what it came down to.

However, I've noted your critical hits mention a fixed number to added damage... that would explain what critical hits do with undead and Cecil's Darkness elemental sword vs their elemental immunity.
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 05, 2013, 05:59:26 PM
Yeah, I re-read it just a couple of days ago. I didn't catch that character uniqueness and weapons altered Critical Hit chance though, maybe I'm already forgetting what I read.

Though yes, the way Critical Hits appear to work on enemies is that it will deal one times half of the weapons default Attack Power, depending on how many critical hits got through which does go a way in explaining the Dark Sword oddities.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on September 05, 2013, 07:17:13 PM
You've got to remember that Cid in terms of balance needs to dish extra damage in the absence of a shield...

Is it possible that Edge simply attempts to calculate the base critical hit change twice? He does critical hit reasonably enough.

With respect to Yang, I'm trying to recall if he dishes crits often (I don't think he does that often, but he does make them) and he's a special case with respect to the damage algo (where his damage increase comes from hits base attack power IIRC).
Title: Re: Shadow Party Stats
Post by: chillyfeez on September 05, 2013, 07:52:43 PM
Deathlike brings up an interesting point about Edge. We know his displayed attack power is split between the two weapons, maybe the algo requires a split of the crit chance, too.
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 05, 2013, 08:06:15 PM
That is true about Cid, but the extra damage is only dealt if he gets a Critical Hit which has a good chance of happening and a great default power. Though I suppose he might actually benefit a bit from a Bow/Arrow since those x3 Critical Hits to give him a 15% chance of a hit rather than his normal Wooden Hammer.

I would say you're both not far off with what happens with Edge, possibly. It is a little difficult to test though. Edge does have the highest default critical hit chance, only being beaten by Cid when Edge has two weapons equipped. I suppose it's possible then that each weapon is recorded separately which could be the reason for the split. But in any case only the weapon in the Right hand's Attack Power when there are two weapons are taken into account in terms of the Critical Hit Damage.

I recall Yang getting Critical Hits infrequently as well, but I distinctly recall always being less than impressed by the damage output of them, always just assuming before that it was a bad hit. I'll have to test that more thoroughly then.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on September 05, 2013, 08:26:14 PM
That is true about Cid, but the extra damage is only dealt if he gets a Critical Hit which has a good chance of happening and a great default power. Though I suppose he might actually benefit a bit from a Bow/Arrow since those x3 Critical Hits to give him a 15% chance of a hit rather than his normal Wooden Hammer.

I don't think his "potential" best combo at the time would be a GreatBow+Poison Arrows, but I've always figured that even the Wooden Hammer is sufficient for the magnetic cave. Remember that damage consistency is more important than critical hits.

Quote
I recall Yang getting Critical Hits infrequently as well, but I distinctly recall always being less than impressed by the damage output of them, always just assuming before that it was a bad hit. I'll have to test that more thoroughly then.

The bonus could be something as simple as being level based. Early levels, it doesn't really feel like it has any benefits. When you get him @ level 30+, the damage isn't necessary, and remember that critical hits do stack with his special charging command.
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 05, 2013, 08:42:24 PM
A good point. Bows have Awful accuracy virtually throughout FFIV. If you're not Rosa, you're likely not using a Bow. While the Wooden Hammer has a default 75% chance to hit, which while not showing as much damage as a Poison Arrow/GreatBow, is more effective because of the loss of accuracy and damage because of the formula of attacking with a Bow/Arrow.

I'm kind of an idiot... completely forgetting the already 50% bonus Yang would technically get by his innate critical hit damage stat. That said though it does seem as if his critical hits in particular deal much more than others. At x2 multipliers he deals roughly 50-80 damage with a base attack of 27. With his critical hit ratio set at 50 almost every hit is a critical, going along with what was said about dual wielders counting that value twice, dealing upwards to 200 170-180.  If it's really only half of the power he would be dealing 120 maybe. There just might be something special in regards to Yang and critical hits...
Title: Re: Shadow Party Stats
Post by: Deathlike2 on September 05, 2013, 09:02:18 PM
A good point. Bows have Awful accuracy virtually throughout FFIV. If you're not Rosa, you're likely not using a Bow. While the Wooden Hammer has a default 75% chance to hit, which while not showing as much damage as a Poison Arrow/GreatBow, is more effective because of the loss of accuracy and damage because of the formula of attacking with a Bow/Arrow.

The only time that has been addressed was during TAY where it was literally unified.

Quote
I'm kind of an idiot... completely forgetting the already 50% bonus Yang would technically get by his innate critical hit damage stat. That said though it does seem as if his critical hits in particular deal much more than others. At x2 multipliers he deals roughly 50-80 damage with a base attack of 27. With his critical hit ratio set at 50 almost every hit is a critical, going along with what was said about dual wielders counting that value twice, dealing upwards to 200 170-180.  If it's really only half of the power he would be dealing 120 maybe. There just might be something special in regards to Yang and critical hits...

I would suggest just hacking levels and stats, for the point of easy math amplification.

The critical hit attack bonus could simply be like LEVEL/4.

 :edit:
I reread my own FAQ and I wrote it was 50% of his attack power. It is possible that the Critical Hit Attack Bonus is literally the value of his LEVEL.
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 05, 2013, 09:53:37 PM
Hmm, levels seem to have nothing to deal with the damage done by Yang's critical hits. At level 99 It was still roughly 100 more than the normal attack, but nothing that significant or major surprisingly. It seemed, oddly enough, like the same numbers put in at his Level 10 self. +100 basically.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on September 05, 2013, 10:22:40 PM
Mind you, my research on those #s from critical hits were generally done on the GBA port since he's easier to test against.

I'd suggest adjusting manipulating his attack power though the STR stat and see if that makes a difference.
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 05, 2013, 10:34:44 PM
Yep, his Critical Hit Bonus is calculated Completely through his Strength. (After the initial +50% he gets from his innate Bonus) Setting his Strength to 99 I saw his normal attacks jump to anywhere from 500-800 but his critical hits were 900-1300. I would say the formula might be a little strange... Str/20 ?x? Innate Bonus = Critical Damage. I say multiply because when his Bonus is set to 0 he deals no extra damage with a Critical Hit even at 99 Strength. With his Critical Hit Bonus set to 10 he deals upwards to 700-1000 damage per hit. So it seems to be Str/20 (maybe even more) x 50 = Critical Hit Damage.
Title: Re: Shadow Party Stats
Post by: Deathlike2 on September 05, 2013, 11:01:58 PM
That formula doesn't look logical at all. I'll look into doing the numbers myself, but it makes zero sense to make it that odd.

It would just make sense that the value is simply equal to Yang's STR or some variation on it. The numbers get more complicated when you factor in the Attack Multiplier.
Title: Re: Shadow Party Stats
Post by: Grimoire LD on September 05, 2013, 11:21:39 PM
In all fairness the Attack Multiplier was only at 2 and accuracy was 80 from both weapons so I can't say that it's impossible that there may have been some discrepancy with the numbers. But yeah... Math is not my forte so I will gladly leave it to you. All I can tell is that when the Critical Hit Bonus is set to 00 no extra damage is done at all, despite Strength having a clear and present effect on the Critical Hit damage bonus.