Why are there so many u16's?

I’ve recently being hacking into the FEGBA spell system and it turns out the game treats the spell animation index as a u16 and not a u8 so you can now have more than 255 spell animations.
Why does these games have so many halfwords when they should be bytes?

Perhaps IS just anticipated that they’d need more than 255 spell animations and made the system to account for it?

It’s funny how the stuff they used less of, like mugs and whatnot, got extended halfwords while the other stuff like items and characters got bytes. Hell, the Character List rams the limit, and they seem torn at first between using new character bytes every chapter in Lyn Mode and using a single character byte for a group of chapters in Eliwood/Hector mode.

Giving your array 65,000+ indices when you only fill up a little more than 70 of those spots seems like a HUGE overestimation, but it could just be weird compiler stuff so it’s hard to tell. I’m now getting a strong hunch that the animation array also has 65536 indices. Seems like everything FEditor related is a halfword, oddly enough. I think I’ll check that next

Going to repeat my argument from the chat, with a bit more detail.

Most of the busses in the GBA, particularly to the ROM, are 16-bit width. So halfwords are the natural size for ROM data (this is part of why ARM code doesn’t blow THUMB out of the water performance-wise on the GBA, despite the power of the instruction set). The 8-bit values are the unusual cases (although there’s an 8-bit bus to SRAM), where someone clever must have thought they were saving a few bytes. Which is kinda silly because it’s a 16mb cartridge that isn’t full, and generally these data arrays are small potatoes compared to, you know, the graphic/sound/etc. resources they point at.

Thinking about how often the data array values are referenced (things like character, class, item IDs in events) compared to the graphical arrays, I guess the “snowball effect” is what saves space, however negligible that might be. Those are also things that have to be referenced in save data, so there’s probably some logic to keeping those data arrays compacted to a single byte.