Author Topic: Element Grid Growth Formula  (Read 457 times)

glennxserge

  • Earthbound (+15)
  • *
  • Posts: 28
  • Sacred lickaroo.... Not!
    • View Profile
    • Chrono Cross FateTerminal
Element Grid Growth Formula
« on: April 30, 2022, 01:23:52 am »
Hi everyone, I'm poking around in some of the character stats trying to work at a few details about how the element grids function.  And I think I've mostly sorted out out the bitmasks that enable grids as well as how they are initially set when a character joins your party.  But I'm running into trouble understanding how the game determines which slot to open up at what level.  I'm not sure if it's set explicitly in some other data block or if there's a formula related to star level.

I'll use Serge's block as an example (from :MKL122788's character gamefaq)
Code: [Select]
[  22  ][  31  ][  39  ][      ][      ][      ][      ][      ]
[  19  ][  20  ][  24  ][  30  ][      ][      ][      ][      ]
[  12  ][  14  ][  16  ][  23  ][  36  ][      ][      ][      ]
[  07  ][  08  ][  09  ][  13  ][  21  ][  34  ][  46  ][  48  ]
[  00  ][  00  ][  00  ][  05  ][  11  ][  18  ][  26  ][  37  ]
[  01  ][  02  ][  03  ][  10  ][  15  ][  29  ][  35  ][  41  ]
[  04  ][  06  ][  25  ][  28  ][  33  ][  40  ][  43  ][  44  ]
[  17  ][  27  ][  32  ][  47  ][      ][      ][      ][      ]

At star level 0, there is one open slot in level 1, 2, and 3, on the fourth row, which is basically the center of the grid.  This is the case for every character, except Sprigg because she has no low level elements.  The rest of the slots are denoted with a number indicating which star level they will be unlocked.  I can't find anywhere that determines this growth pattern, and it's varies quite a bit character to character.

Referencing the stat data block for Serge at 0x13B721C8:
Code: [Select]
xx   00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
   - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
00 - 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 - 00 00 00 00 01 40 32 00 09 05 55 08 07 07 0A 0A
02 - 20 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00
03 - FC 03 FC 03 FC 03 F8 03 F0 01 E0 01 E0 01 E0 01
04 - 00 40 00 40 00 40 00 40 69 40 00 40 00 40 00 40
05 - 00 40 00 40 00 40 00 40 55 40 00 40 00 40 00 40
06 - 00 40 00 40 00 40 00 40 00 40 A0 C0 00 40 00 40
07 - 00 40 00 40 00 40 00 40 00 40 00 40 00 40 00 40
08 - 00 40 00 40 A1 C0 00 40 00 40 00 40 00 40 00 40
09 - 00 40 00 40 A2 C0 00 40 00 40 00 40 00 40 00 40
0A - 00 00 7B 00 32 14 00 00 00 00 00 00 00 00 00 00

Line 03 is the bitmask series (2 bytes per grid level), that indicate the final grid shape
Line 04-09 are the specific element slot values (2 bytes per value, with the upper nibble of the high byte being a flag for slot behavior; bit 7 means occupied for stuff like a tech, bit 6 is default)

I don't see any other areas of the data block that would indicate which slots open at what level.  Does anyone know more about this? 

glennxserge

  • Earthbound (+15)
  • *
  • Posts: 28
  • Sacred lickaroo.... Not!
    • View Profile
    • Chrono Cross FateTerminal
Re: Element Grid Growth Formula
« Reply #1 on: May 17, 2022, 07:10:56 pm »
Figured out a couple more things that are worth documenting, that I found weren't identified in the modification pages for enemy data: https://www.chronocompendium.com/Term/2535.html.  The player characters actually share the exact same data block format, and a couple of the missing 'unknown' bytes from the enemy section are used for characters.

Relevant to this post, byte 0x03 (previously unknown) is some kind of offset for which grid element growth table to use.  There are 8 used growth types, with most of them being Pip (uses 3,4,5, and 6 for his various forms), and Harle uses 7.  Serge and friends use 0 for the most part, and Viper and associates all seem to use 1.  I'll get a complete list as I keep digging.  I need to see if I can find an explicit lookup table associated with that byte offset, but this does seem to be the way the game determines which slots become available for characters at specific star levels.  I'll keep checking.

The other unknown byte from that link, is 0x1F.  This is the character stamina attribute.  It's listed in the block in the full integer form, the game must divide by 10 to get the decimal point, but I've verified that this is the stat that's used to regenerate character stamina.  It makes sense this wouldn't be used for enemies since they use a different attribute to determine their turn order.

Alright, back to looking for the element tables...

Grobycftw

  • Architect of Kajar
  • Porrean (+50)
  • *
  • Posts: 74
  • Chilling in the Bend of Time
    • View Profile
Re: Element Grid Growth Formula
« Reply #2 on: August 15, 2022, 05:36:43 pm »
Sup Glennxserge! Long time!
I thought I shared this doc before somewhere but not 100% sure so I'll post it here

https://drive.google.com/file/d/157ShXf_YE0djzhVvIVZiWs6bjjpEei1W/view?usp=sharing

here's some info/test I did when looking how the element grid we're working. We, just like you couldn't figure out what determined which grid gets open at "x" lvl, but we did figure a few things out and just needed to do some more testing to hope finding an answer to this :D 
anyway hope this can help somehow, feel free to use/edit anything in there!

Im thinking maybe we should try to find some similar bytes in those blocks with characters that has similar Element Grid Growth, like Grobyc and Karsh I think? they have the same grid I believe, things like that would be worth being checked out!

glennxserge

  • Earthbound (+15)
  • *
  • Posts: 28
  • Sacred lickaroo.... Not!
    • View Profile
    • Chrono Cross FateTerminal
Re: Element Grid Growth Formula
« Reply #3 on: August 26, 2022, 03:26:19 am »
Hey Grobyftw!  Thanks for sharing that, lots of good details in there  :lol:

Yeah, I tried finding some kind of lookup tables that represent the 7 specific growth patterns but I didn't have any luck.  Hard to search for something without knowing how the data is packed.  I should give this another look, after I read through your doc.