Touhou Sky arena

Post questions about game models here, or help out others!
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Touhou Sky arena

Post by finale00 » Sat Dec 10, 2011 6:42 pm

The contents of this post was deleted because of possible forum rules violation.
Last edited by finale00 on Sat Dec 17, 2011 5:46 am, edited 1 time in total.

User avatar
chrrox
Moderator
Posts: 2601
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1358 times

Re: Touhou Sky arena

Post by chrrox » Sat Dec 10, 2011 7:44 pm

jut post the executable of the game and i am sure someone can figure it out in a few seconds.

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Sat Dec 17, 2011 5:35 am

The contents of this post was deleted because of possible forum rules violation.
You do not have the required permissions to view the files attached to this post.

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Fri Jan 06, 2012 3:12 am

Wow ok I just realized the format is is chunk based. I was wondering how to determine how many bones I'm supposed to read.

Now to try to add the bones/weights.

Chunk 0 is the start of the mesh, although the chunk size seems wrong. I would just read the mesh name and move on.

Chunk 1 is the vertex section.

Chunk 2 is the faces.

chunk 3 is the start of the material section, which gives the matCount. The chunk size also seems wrong.

Chunk 4 is a material

chunk 5 is a texture associated with the current material

Chunk 7 is a bone

Chunk 8, 9, 10 I imagine are related to animations, morphs, and stuff.

At the end of each section there's a -1.

Code: Select all

While 1:
   read chunk
   if chunk != -1:
       read chunkSize
       if chunk == 0
           ...
       elif chunk == 1
          ...
       ...
Image

User avatar
Tamao
ultra-n00b
Posts: 5
Joined: Sat Oct 15, 2011 9:29 pm

Re: Touhou Sky arena

Post by Tamao » Fri Jan 06, 2012 7:54 pm

Is a pity that the guy doesn't want make public the GPK tool, i was looking for it D: BTW good work =) I was looking for the models (or the tools) as i played with Touhou Sky Arena *-*

BTW: how i can extract the bones? I hate make them by myself xD It's a looong way T_T Is the first time that i use noesis for that O.O

I red that: If anyone knows how bones work, it's stored in the mdl file located right after the materials. <-- but where exactly? D:

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Fri Jan 06, 2012 9:23 pm

I got in touch with the guy that made it and he gave me the scripts and doesn't mind if I release them.

So I posted them here viewtopic.php?p=64718#p64718
If someone can write it in C++ or something that would be great, cause it's kind of slow with python (and I think even slower since it's using insani rather than directly reading bytes but I don't know)

It works for the hayate patch, but he isn't sure whether it'll still be the same key when kurenai comes out (they might change it if they realize that it's been cracked)

The model format is huge cause it stores absolutely everything.
The geometry is like 10% of the file.

Chunk 7 has a bunch of bone names and parent bone names, so I'm assuming that's defining all the bones.
There are a bunch of floats in some of the bone structs so that might be where the vertex weights are defined.

I still haven't actually written a plugin to load bones with proper weighting (nor do I know how to check), so haven't done anything.

User avatar
Tamao
ultra-n00b
Posts: 5
Joined: Sat Oct 15, 2011 9:29 pm

Re: Touhou Sky arena

Post by Tamao » Tue Jan 24, 2012 11:58 am

Mhh do u know where i can find Aya and Sanae too? The package that u posted is of the prepatch game °^° BTW, i'm boning them by myself ^^ (For MMD)
I'm getting fun XD

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Tue Jan 24, 2012 5:17 pm

Just extract from Hayate patch.

If I get around to it I'll write an exe for it rather than rely on the python. But the python scripts work just fine and pack/repack as well.

User avatar
Tamao
ultra-n00b
Posts: 5
Joined: Sat Oct 15, 2011 9:29 pm

Re: Touhou Sky arena

Post by Tamao » Tue Jan 24, 2012 9:00 pm

extract them from the gpk file right? But i dunno how to do that D:
If u can tell me it will be nice :3 is the first time that i do a similar thing so... but it's a good deal to learn something of new

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Wed Jan 25, 2012 2:32 am

Just download the python extract scripts and insani and drag/drop gpk over it.

User avatar
Tamao
ultra-n00b
Posts: 5
Joined: Sat Oct 15, 2011 9:29 pm

Re: Touhou Sky arena

Post by Tamao » Thu Jan 26, 2012 4:59 pm

finale00 wrote:Just download the python extract scripts and insani and drag/drop gpk over it.
roftl o.o nice xD thnx for your patience =)

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Sun Jun 10, 2012 3:59 am

Here's something I wrote while figuring out C#
http://pastebin.com/HZLX74bM

To use, just drag and drop a bunch of gpk files onto it and let it do its work.

All it does is extract the file. I've dumped the value that's used to determine the xor key into a file called "keys.txt" which will be automatically updated everytime a gpk archive is extracted, and will be used when re-packing.

The keys file is created in the same directory as the executable, so you can call the exe from wherever and ignore the keys file completely.

My assumption is that you can't re-pack unless you have actually unpacked, so as long as you unpack the archive first, an entry for the key will exist for you to re-pack it.

It works for the original release and somewhat for the Hayate patch. I don't have the decrypt keys for other hayate files/any of the kurenai models

Can anyone look over the code and point out where I could make optimizations? It seems kind of slow.
You do not have the required permissions to view the files attached to this post.

Escope12
veteran
Posts: 151
Joined: Tue Feb 28, 2012 12:42 am
Has thanked: 67 times
Been thanked: 3 times

Re: Touhou Sky arena

Post by Escope12 » Mon Nov 18, 2013 1:44 pm

finale00 wrote:Here's something I wrote while figuring out C#
http://pastebin.com/HZLX74bM

To use, just drag and drop a bunch of gpk files onto it and let it do its work.

All it does is extract the file. I've dumped the value that's used to determine the xor key into a file called "keys.txt" which will be automatically updated everytime a gpk archive is extracted, and will be used when re-packing.

The keys file is created in the same directory as the executable, so you can call the exe from wherever and ignore the keys file completely.

My assumption is that you can't re-pack unless you have actually unpacked, so as long as you unpack the archive first, an entry for the key will exist for you to re-pack it.

It works for the original release and somewhat for the Hayate patch. I don't have the decrypt keys for other hayate files/any of the kurenai models

Can anyone look over the code and point out where I could make optimizations? It seems kind of slow.
I tried to rip Reisen Udongein Inaba with the tool but it keeps crashing.

finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 300 times

Re: Touhou Sky arena

Post by finale00 » Fri Nov 22, 2013 5:26 am

Needs the key for the new archives.

Escope12
veteran
Posts: 151
Joined: Tue Feb 28, 2012 12:42 am
Has thanked: 67 times
Been thanked: 3 times

Re: Touhou Sky arena

Post by Escope12 » Fri Nov 22, 2013 5:53 pm

finale00 wrote:Needs the key for the new archives.
What kind of new archives?

Post Reply