scurest / apicula

Convert Nintendo DS .nsbmd models
BSD Zero Clause License
156 stars 17 forks source link

Doesn't find proper palette for texture (Pokemon Follower Overworlds) #37

Closed Ayukito closed 3 years ago

Ayukito commented 3 years ago

For a few .BTX0 files in Pokemon games (specifically overworld Pokemon Sprites, see 201-206, or 297+ on a/0/8/1 -> 1_NUM.BTX0 in Pokemon HeartGold or SoulSilver for example), they use a palette naming scheme not implemented yet:

image

Palette 0 is for normal pokemon, Palette 1 is used for shiny pokemon. I've gotten around this by editing the code to accept len == 2 on line 91 of image_namer.rs, as well as a second check to force palette 1 if a new flag I added (--shiny) is used, but I know this is very case specific. Hoping for an actual solution to be created instead of my hack, possibly an argument to specify which palette index to force?

Ayukito commented 3 years ago

Brief research shows that Pokemon HeartGold and SoulSilver are the only Pokemon games that do this, DPPt and BW/2 do not do this. DPPt and BW2 use only 1 palette, and BW has two palettes but the second one is entirely black.

scurest commented 3 years ago

Are you using --more-textures or is it from an actual model?

Ayukito commented 3 years ago

Are you using --more-textures or is it from an actual model?

--more-textures is being used, with untouched Apicula it will tell me: [INFO] There are still unextracted textures though I tracked this down in the code to make my changes above. The palette naming scheme for these particular textures isn't implemented, and picking between which of the two palettes is used is desirable.

scurest commented 3 years ago

I'm not very interested in making --more-textures more complicated, mostly interested only interested in textures to the degree they are used by models. I'm definitely not going to do some kind of "pick which palette to use". Sounds like you already have a way to get regular/shinies out that's good enough?

Ayukito commented 3 years ago

I do, but I was hoping something would be added in the case others run into this issue and don't know why. This can be closed if nothing will be changed, my use purpose was only for batch ripping of .btx0 textures/sprites from that game, and my own changes will suffice.

scurest commented 3 years ago

Ok, thanks.