Final Fantasy Hacktics

Modding => Help! => Topic started by: cadence on May 21, 2019, 12:36:14 pm

Title: Gender Byte
Post by: cadence on May 21, 2019, 12:36:14 pm
http://ffhacktics.com/wiki/World_Stats

I see that a Gender Byte shows up at 0x04 in the Stats List, and then again at 0x70 with different flags but some overlap. Does anyone know what's going on there?
Title: Re: Gender Byte
Post by: Xifanie on May 21, 2019, 01:08:01 pm
You're looking at the graphical section. I'm not even sure why there's a graphical section; it should be its own page.
Title: Re: Gender Byte
Post by: cadence on May 21, 2019, 03:57:30 pm
The graphical section meaning that's where the data shown in the UI is stored in RAM? So I'm guessing that's not per-unit, and that's why there are a bunch of duplicate fields?

I did notice the graphical section header but hadn't quite put together what that meant, since yeah it's weird that they share the same page. I could split that section off if you'd like but I'm not sure which pages should link to it and so on. >_>

Reading through this, I wonder why they decided to store things like Move as halfwords and not single bytes...
Title: Re: Gender Byte
Post by: Glain on May 21, 2019, 07:09:29 pm
Those are two different arrays of unit data.  The first is the main party data, and the second is the unit data used in the formation screen.  I actually have a more detailed definition of that data structure in the Data/Table Locations (http://ffhacktics.com/wiki/Data/Table_Locations) page.  (Search for "801c8638 (WORLD.BIN)")

In the case of formation screen unit data offset 0x70, it's copied from party data offset 0x04, so those should have the same value. (This routine (http://ffhacktics.com/wiki/Load_party_data_into_Formation_screen_data) is the one that copies the data.)

As for why they sometimes used 2-byte fields when 1-byte fields would suffice, it probably wasn't a conscious decision.  They probably used a short data type instead of a char data type in their C source code, or something along those lines.
Title: Re: Gender Byte
Post by: cadence on May 22, 2019, 10:15:10 pm
OK, thanks for the links!