READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Astral Chain package

The Original Forum. Game archives, full of resources. How to open them? Get help here.
demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Astral Chain package

Post by demonslayerx8 » Wed Aug 28, 2019 1:01 pm

I've got the container pretty much all figured out, but I have 0 clue on how to make a script, so I've uploaded some samples from the game for anyone to make a BMS script for
0x00 - magic [pkzl]
0x04 - unk
0x08 - package size
0x10 - files in package
0x14 - table offset location
0x18 - length of filename table

table:
-Filename Location (at ZStandard)
-Decompressed Size [this can be skipped]
-Offset location of said compressed file
-Compressed file length
No need to extract files to their decompressed files since it's all zstandard/zstd compression, I can just decompress them via smash ultimate tools, which is what I did for the model, when I was extracting files 1 at a time without proper filenames.
Image

andree
advanced
Posts: 52
Joined: Sun Jul 09, 2017 1:36 pm
Has thanked: 5 times
Been thanked: 3 times

Re: Astral Chain package

Post by andree » Fri Aug 30, 2019 3:19 pm

demonslayerx8 wrote:
Wed Aug 28, 2019 1:01 pm
No need to extract files to their decompressed files since it's all zstandard/zstd compression, I can just decompress them via smash ultimate tools, which is what I did for the model, when I was extracting files 1 at a time without proper filenames.
So which tools did you used?

demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Re: Astral Chain package

Post by demonslayerx8 » Fri Aug 30, 2019 3:58 pm

andree wrote:
Fri Aug 30, 2019 3:19 pm
demonslayerx8 wrote:
Wed Aug 28, 2019 1:01 pm
No need to extract files to their decompressed files since it's all zstandard/zstd compression, I can just decompress them via smash ultimate tools, which is what I did for the model, when I was extracting files 1 at a time without proper filenames.
So which tools did you used?
Extracted the compressed files via hex 1 at a time, then I used zstd (via cmd prompt) to decompress the files.

Atm just waiting for a proper script to be made that'll extract all the files with their proper names in their compressed forms.

User avatar
DKDave
veteran
Posts: 96
Joined: Mon May 06, 2019 6:07 pm
Has thanked: 1 time
Been thanked: 32 times

Re: Astral Chain package

Post by DKDave » Fri Aug 30, 2019 5:11 pm

This QuickBMS script should extract and decompress the files.


# Astral Chain . pkz extract
# By Dave, 2019

IDString "pkzl"

ComType ZSTD

Goto 0x10
Get ITEMS Long
Get FILE_ENTRY Long

XMath NAME_TABLE "FILE_ENTRY + (ITEMS * 0x20)"

For A = 1 to ITEMS

Goto FILE_ENTRY
Get NAME_OFFSET Long
Get JUNK Long
Get SIZE Long
Get JUNK Long
Get OFFSET Long
Get JUNK Long
Get ZSIZE Long
Math NAME_OFFSET + NAME_TABLE
Goto NAME_OFFSET
GetDSTring FILENAME 0x10

Clog FILENAME OFFSET ZSIZE SIZE
# Log FILENAME OFFSET ZSIZE # Use this line to get compressed output instead

Math FILE_ENTRY + 0x20

Next A
"Each person is born with their fate written into their own genetic code. It's unchangeable, immutable. But that's not all there is to life." - Dr. Naomi Hunter

demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Re: Astral Chain package

Post by demonslayerx8 » Fri Aug 30, 2019 11:31 pm

ooohh thanks!! Works on all the files so far!

Kerilk
beginner
Posts: 23
Joined: Sun Aug 27, 2017 2:08 pm
Has thanked: 4 times
Been thanked: 11 times

Re: Astral Chain package

Post by Kerilk » Sat Aug 31, 2019 8:49 am

The model/animation format is identical to Nier's. Texture format is unknown to me.
I added support for Astral Chain to my noesis plugin. If someone can help me with the texture format (FOURCC is "XT1\x00") I should be able to add it to the plugin.
https://github.com/Kerilk/noesis_bayonetta_pc/
Note that you need to unpack the pkz files by yourself.
Astral Chain.png
You do not have the required permissions to view the files attached to this post.
Last edited by Kerilk on Sat Aug 31, 2019 9:10 pm, edited 1 time in total.

demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Re: Astral Chain package

Post by demonslayerx8 » Sat Aug 31, 2019 10:08 am

Kerilk wrote:
Sat Aug 31, 2019 8:49 am
The model/animation format is identical to Nier's. Texture format is unknown to me.
I added support for Astral Chain to my noesis plugin. If someone can help me with the texture format (FOURCC is "XT1\x00") I should be able to add it to the plugin.
https://github.com/Kerilk/noesis_bayonetta_pc/
Note that you need to unpack the pkz files by yourself.
the texture format is ASTC_10x10_UNORM and uses switch's swizzle algorithm. Still working on it.
Image
WTA :
magic
unk [possibly file version?]
file total
table1 offset
table2 offset
table3 offset
table4 offset
table5 offset

table1 - texture offset locations in wtp
table2 - texture filesize in wtp
table3 - unk
table4 - unk
table5 - texture header info

Texture header
magic
unk
texture filesize
unk
unk
mipmap count
unk
unk
width
height
depth
unk
unk
unk
Edit:
Also, is there a reason why there's no facial bones for the 2 main chars? Or do they use vertex morph sets?

User avatar
HeliosAI
mega-veteran
mega-veteran
Posts: 165
Joined: Wed Nov 17, 2010 2:57 pm
Has thanked: 147 times
Been thanked: 53 times

Re: Astral Chain package

Post by HeliosAI » Sat Aug 31, 2019 11:57 am

demonslayerx8 wrote: Edit:
Also, is there a reason why there's no facial bones for the 2 main chars? Or do they use vertex morph sets?
In other platinum games there are seperate head models elsewhere (sometimes even other package) that have full rig. Probably the same here.

Kerilk
beginner
Posts: 23
Joined: Sun Aug 27, 2017 2:08 pm
Has thanked: 4 times
Been thanked: 11 times

Re: Astral Chain package

Post by Kerilk » Sat Aug 31, 2019 5:20 pm

WTA
Table 3 are flags for the game
Table 4 are hashes to reference textures in materials

demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Re: Astral Chain package

Post by demonslayerx8 » Sat Aug 31, 2019 6:44 pm

HeliosAI wrote:
Sat Aug 31, 2019 11:57 am
demonslayerx8 wrote: Edit:
Also, is there a reason why there's no facial bones for the 2 main chars? Or do they use vertex morph sets?
In other platinum games there are seperate head models elsewhere (sometimes even other package) that have full rig. Probably the same here.
ah gotcha
Kerilk wrote:
Sat Aug 31, 2019 5:20 pm
WTA
Table 3 are flags for the game
Table 4 are hashes to reference textures in materials
ohh, didn't know that, thanks for the tip.

Edit:
Well so far I have no luck with getting these textures properly, it's close but I don't know much about swizzling.
Image
Last edited by demonslayerx8 on Sat Aug 31, 2019 7:17 pm, edited 1 time in total.

Kerilk
beginner
Posts: 23
Joined: Sun Aug 27, 2017 2:08 pm
Has thanked: 4 times
Been thanked: 11 times

Re: Astral Chain package

Post by Kerilk » Sat Aug 31, 2019 7:10 pm

There are volume textures in sta/ra_00.dtt, maybe they can give you some insight about the unknown texture info fields. I am trying to match them to https://github.com/aboood40091/BNTX-Inj ... globals.py but for now I am rather unsuccessful. I was hoping it was some kind of BNTX that had been stripped.
The texture archive is in wtb format (meaning the texture data is inside the file rather than in an accompanying wtp).

demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Re: Astral Chain package

Post by demonslayerx8 » Sat Aug 31, 2019 8:13 pm

Kerilk wrote:
Sat Aug 31, 2019 7:10 pm
There are volume textures in sta/ra_00.dtt, maybe they can give you some insight about the unknown texture info fields. I am trying to match them to https://github.com/aboood40091/BNTX-Inj ... globals.py but for now I am rather unsuccessful. I was hoping it was some kind of BNTX that had been stripped.
The texture archive is in wtb format (meaning the texture data is inside the file rather than in an accompanying wtp).
I took a look, and they're about the same as the regular texture

the flags however, makes a bit more sense to me now
20000060 - normal/pbr/special maps
20000064 - diffuse/cube

Did notice that the cubemap and FogLUT has unk4 set as 8 tho... as far as I know, cubemaps have 6 layers, not 8... :?
Image

edit:
if u wanna see/take a look at the coding for these textures in Switch Toolbox

Kerilk
beginner
Posts: 23
Joined: Sun Aug 27, 2017 2:08 pm
Has thanked: 4 times
Been thanked: 11 times

Re: Astral Chain package

Post by Kerilk » Sat Aug 31, 2019 8:56 pm

unk4 could be:
typedef enum {
T_1D,
T_2D,
T_3D,
T_Cube,
T_1D_Array,
T_2D_Array,
T_2D_Mulitsample,
T_2D_Multisample_Array,
T_Cube_Array
} texture_type_t;

so 8 would be T_Cube_Array
But that could be completely wrong.
Also the textures from CubeMap have 7 mip map, while those from FogLUT have 1, but sizes don't seem to coincide:
Astral Chain textures.png
Edit: if you are looking for PlatinumGames related binary templates you may find something interesting here:
https://github.com/Kerilk/bayonetta_too ... _templates
You do not have the required permissions to view the files attached to this post.

demonslayerx8
advanced
Posts: 53
Joined: Mon Jul 06, 2015 12:48 am
Has thanked: 13 times
Been thanked: 7 times

Re: Astral Chain package

Post by demonslayerx8 » Sun Sep 01, 2019 6:40 am

Well so far, no luck on getting these textures properly.. I've tried contacting RTB, but no response yet.

Edit:
Could the 2nd unknown after depth be bytes per pixel?

gren
ultra-n00b
Posts: 3
Joined: Tue Feb 19, 2019 12:41 am

Re: Astral Chain package

Post by gren » Tue Sep 10, 2019 11:22 pm

I was working through the file format on my own and worked out all of pkz and most of DAT file structure but I couldn't figure out what the 5th table was for in DAT files and it seems maybe unneeded? The first 4 were for offsets, file type, file name, and size, but I couldn't for the life of me figure out what the 5th was. Any one got any ideas?

Also I have 010 templates for pkz dat, and wip templates for the texture ones as well but don't have too much on textures yet. Will post when I get home later

Post Reply