Open Fallenleader opened 9 years ago
Pull request #14 adds all the Pokemon package formats to FileIO.cs and FrmMain.cs, which makes them load A-OK. Tested with PC, MM, GR and PT. Couldn't find any PB or PK files to test with, and I have no clue what AD is, but there we go. It's a start.
I will attempt to find some PB and PK files or testing. I cannot remember the offset locations right off hand. Will edit or reply here with a link to a handful, and the rom names with offsets. No clue what AD is either, unless I fixed a typo on my end and it didn't show on yours.
@Fallenleader if with offset location you mean the RomFS path, on Pokémon Omega Ruby and Alpha Sapphire, Pokémon models (PBs and PKs) are located in a/1/3/3. AD files are map textures, you can find them in a/0/1/4.
Yea, just found them. Uploading a few now for @igniscitrinus to test with. Edit: https://www.dropbox.com/sh/njn1w7knur9d9dg/AADA2IZsJa17FZMddX5ls8-ra?dl=0
I have kindly uploaded bulbasaur's related files. There is an organized structure of what is and isn't known,
I couldn't figure out a file format for the life of me and my C# grasp is pretty slippery, but I'll tell you what I know: Ohana actually loads a material animation from the .PF file if you get rid of the header up to 'BCH' (or add another case for its magic bytes under FileIO and FrmMain, MAYBE), but it doesn't seem to do anything on my end. .PB and .PK do seem like they have animations in them, as well. The Unknown .PC file is only 88 bytes long, so I really, highly doubt there's actually anything particularly critical in there. As for the .PT files that Ohana refuses to read, RTB made a proper .PNG dump of all the texture containers in XY/ORAS, and the textures in those specific unloadable .PTs look like phong exponent maps to me: Compare with this phong exponent map example from the Valve developer wiki: I only found AD because it was in the list under the pkmnContainer case. I haven't seen any of those in the game's RomFS myself, but that's probably there for a reason.
EDIT: @igniscitrinus PF can be ignored unless fixed for completion reasons. @gdkchan as it stands, the PB and PK issue is still valid and should be reopened until addressed, and PT is a simple few lines in the import code. Not sure why this issue was merged with an unrelated one. Currently, PT can be imported by dragging and dropping the file onto ohana, though attempting to load the model later results in the textures not being applied. This does not affect the functionality of Ohana.
Sorry, was kinda my fault. @gdkchan would have to reopen it. As for the remaining PT format, you never know when that exact format might show up again (odds are it won't show up ever again, frankly), but the contents are definitely nothing short of insignificant. Other than that, I think most everything else from Pokemon is sorted out, though.
I hope I'm not out of line here, but I have modified Rebirth myself with some major changes, including the ability to read PT files. Until Rebirth itself supports these texture containers, try using this: https://github.com/Quibilia/Ohana3DS-Transfigured
@Quibilia this is why ohana is open source. submit a pull request :D Now all we need to to support the animation formats and Pokemon extraction is complete!
On another note, I have been looking for the trainer animations for OW and in battle models to no avail. Anyone have any idea where it is in ORAS?
@Fallenleader I've been looking for any trace of any skeletal animations for a very long time. The material animations (which change the textures, like when blinking) and visibility animations (which make certain parts invisible, like when Bulbasaur's feelers retract) are easy to find: They're in the same folder as the models. But the skeletal animations, which actually move the models, are nowhere to be found.
PK IIRC. It's a custom format. that's all I know. Quote: PK files seems to contains BCHs with visibility animations and also has some unknown data at the beginning that appears to be skeletal animation with a custom format.
It seems all skeletal animations are custom. this is going to be difficult as I am not good at REing things like this anyhow, much less custom.
Mind shooting me an email later? I have another format to crack non 3ds related. It's a format that hasn't been cracked for years despite a few good fans still keeping the game alive. We would really love to make custom tracks.
latest pull request addresses and fixes these issues. once accepted, please close.
It looks like that while support for PB and PK was added in pull request #14 it was subsuquently inadvertently removed again with this commit 6e6a071b9ef9db902ae700dcc34195b40ed64bef. In it's current build attempting to import PB or PK files results in load(Stream data) returning a blank file formatType unsupported, which then causes a null reference exception for the use cases fileType.materialAnimation and fileType.visibilityAnimation in the import(fileType type) function.
PB files seems to contains BCHs with material animations. PK files seems to contains BCHs with visibility animations and also has some unknown data at the beginning that appears to be skeletal animation with a custom format. While the skeletal format eventually needs to be supported, Ohana should have the ability to open these files as a container for a temporary workaround for the BCH flies inside them. This would add further compatibility to pokemon games, until the bone structure is worked out.
Also, I have had no luck using the pt textures for pokemon (PC), unlike in the previous Ohana. This could be something I am doing wrong however, and if so, should be ignored.