Gildor's Forums

Author Topic: Tera GPK file format  (Read 17061 times)
castagno4
Newbie
*
Posts: 2


View Profile
Tera GPK file format
« on: May 16, 2012, 01:13 »

Hi all,
just discovered this forum: awesome!
Here comes my kind request: is it possible to have some detailed info on the .gpk Tera format? Package is similar to UPK (list of names, offset, etc), but header fields are a little bit mixed up. Gildor mentioned some kind of simple obfuscation implemented.
I'll never make it, but I'd like to see if it's possible to repack at least some modified textures in the game...
Thanks
Cas
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
Re: Tera GPK file format
« Reply #1 on: May 17, 2012, 08:18 »

Hi.
This obfuscation is really simple. If you're familiar with package format structure, here's the code:
Code:
// de-obfuscate NameCount for Tera
if (S.PackageFlags & 8) S.NameCount -= S.NameOffset;
Logged
castagno4
Newbie
*
Posts: 2


View Profile
Re: Tera GPK file format
« Reply #2 on: May 24, 2012, 17:46 »

Thank you,
it works. I was able to export textures. Digging inside fileformat I realize why everyone's saying that repack back a modified texture/object is a mess: being the package full of offset referenced objects chanaging the size of one object would affect everything.
So it would be necessary to build a complete "pack/unpack" program for everything which is, of course, a huge work. Maybe it's possible insert a single texture and sacrifice consistency of smaller mipmaps if the Tera client is not to "picky". I'll give it a try but of curse any suggestion is welcome...
Logged
ruwo
Newbie
*
Posts: 1


View Profile
Re: Tera GPK file format
« Reply #3 on: June 15, 2012, 19:49 »

It seems some japanese guy wrote a program that can actually repack UPKs. It seems to work on *some* of the TERA GPKs as well (though not all of them, for some reason)...
https://sites.google.com/site/0dd14lab2/upkpacker

EDIT: Actually, it does work on all of them now. The author explicitly mentions Tera support with the latest version.
« Last Edit: June 20, 2012, 21:53 by ruwo » Logged
trumpdog
Newbie
*
Posts: 2


View Profile
Re: Tera GPK file format
« Reply #4 on: June 21, 2012, 04:01 »

Does anyone know of a way to convert the texture2d to tga/dds and back?Or converting the skeletalmesh to something that blender/max can import and then convert back to the original format?
The repacker works great but those are the 2 problems with it.
umodel exports the textures and meshes to tga and psk but cant do anything after editing them to get them back into the gpk.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7973



View Profile WWW
Re: Tera GPK file format
« Reply #5 on: June 21, 2012, 08:51 »

Editing meshes is not possible.
Logged
trumpdog
Newbie
*
Posts: 2


View Profile
Re: Tera GPK file format
« Reply #6 on: June 23, 2012, 13:17 »

In the format that the unpacker/repacker exports the textures and models...yeah its impossible.
Umodel exports manageable formats like tga and psk but cant doing anything beyond editing them since you cant repack them in that format.
I was just curious if anyone knew how to work with the texture2d.
Logged
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS