More than 0xFF entries for portraits

Fork yeah. Team UNDERTROLL struck gold today. Credits to @Venno for this discovery. While examining the unknown values in the character data structure, he realized that the unknown directly under the portrait value, which we’d always assumed to be a byte (0x00), was actually part of the portrait value, meaning it’s a short (0x0000). The capacity for more than 256 portrait slots was actually there the whole time.

Upon learning that, I really wanted to test things out. @Temp took care of expanding the max index in FEditor for testing purposes. This setup exists in every GBAFE game.

Proof:

5 Likes

You know what that means…

Full expressions for the whole cast to make them less bland!

I wonder if anybody will ever make use of the fact that you can now have over 65,000 portraits, lol.

Anyways, the text functionality exists too, exactly as I’d suspected it would work. With [LoadFace][0x??][0x01], FEditor would only take 0x01 or 0xFF as values (two 0xFFs loads the current unit’s portrait, of course), but changing that second byte to 0x02 allows the loading command to read the next set of 256 portraits.

Basically, you take the portrait index and break it into 01 01, add +1 to that first value (02 01), and then switch them: giving you [LoadFace][0x01][0x02]. There’ll be an effort to make the value just outright match the index value.

Can we make a unified command like [LoadFace=0x102] --> [LoadFace][0x2][0x2]?

But
I already found that
and told you about it

You keep saying this everywhere and yet not once, not even a single time have you linked to where you originally posted it. Maybe if you’d made a topic somewhere about it we might remember it.

2 places = everywhere. Good to know.
I never said I posted it I said I found it and told people like Alex, Colours, and Arch. It’s probably in my skype chat logs but that’s from mad long ago like 2+ months and the find function doesn’t seem to work for me. I alluded to it in this topic if that counts? When I told Alex, he seemed like he already knew so it might even be in the FEditor doc but I doubt it

Well, if you knew it and didn’t really put the info out there, there isn’t much point in complaining when other people think they’ve discovered something. Though if you told Arch and he’s saying they just figured it out yesterday you may want to rethink how you word things or something. (I don’t know what you said in skype so I’ll just shrug)

If someone had straight up told me “256 portraits isn’t the limit it’s like 65k” I would’ve acted on it immediately, lol.

well I told you when I made the STR/MAG thing for you. The third version I said I was going to use the superfluous byte in the portrait halfword and you were like ok
Found the chat with Alex about it, but I guess if you know now it doesn’t matter

When you call something a “superfluous” byte and ask if it can be repurposed within that context, I probably assumed that it didn’t do anything. If you’d explained “this byte is part of the portrait value and the max index far larger than FEditor has actually been allowing us,” I wouldn’t have said ok to shitcanning that.

But it’s nice to know that Alex knew the whole fucking time too, lol. Who cares? Let’s all just be happy that we can have 65k portraits. If we start pooling money, I’ve calculated (at the standard rate I’ve been paying for commission) that we’ll need $1,092,250 (at three portraits for $50) to completely fill the array.

well my thought was since getting it to actually be able to use all 65,535 spots was a pain in the ass and kind of unnecessary and pointless because even if you had and planned on using that many mugs it would take up way too much space so it’d be better to use it for something else but I guess the character and class structs have enough useless bytes that you don’t necessarily need that one. So many possibilities…
speaking of portraits, where’s my cat, bruh?

Er, you don’t need to use all 65,535 slots(…I hope?), I’m sure there are people that just want the extra space for even just a handful more mugs >.>

@Brendor: It’s surprisingly difficult to find somebody willing to sprite your cat, even for a modest payment. And also I’m a tad broke right now so I can’t really offer strong enough financial incentives until I git employed again.

I’m mostly joking about 65k slots, but yeah. EN is already hitting the limit, and it’s a “small” hack.

You don’t have to fill all the spots, no, but you have to allow yourself enough room for however many you want plus some because going back and repointing over and over because you need more space is obviously not good. Plus you’re probably going to have to change a whole bunch of things just to get it to play nice with FEditor and a whole bunch of other stuff that makes it not really worth all the trouble unless you really need more than 255 portraits

so I get no payment? goddamnit

Can this be done for the animations too?

You need to change code but shouldn’t be too hard for someone to do

so was that there the whole time and noone thought portraits might have been 2 bytes?

they use 2 in FE4/5 too, although portraits are used a bit differently, and pretty sure they don’t use over 255

1 Like

I knew it for a while but I guess no one else did
shrug

My sprite artist is going to hate me now. He’s probably going to go give existing portraits doofy lips or make them not blink again as retaliation.