The Forum is up for sale: XeNTaX Forum looking for new owner

Star Wars The Force Unleashed - PC Version .z files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
UberBlack
advanced
Posts: 44
Joined: Thu Oct 22, 2009 8:54 pm
Has thanked: 3 times
Been thanked: 6 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by UberBlack »

Any help would be great!

..|Ultra911|..
melechdude
ultra-n00b
Posts: 1
Joined: Wed Dec 23, 2009 9:58 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Star Wars The Force Unleashed - PC Version .z files

Post by melechdude »

so is there any news with this?

or did it die...
reappper
beginner
Posts: 21
Joined: Mon Jan 11, 2010 1:03 am
Has thanked: 1 time

Re: Star Wars The Force Unleashed - PC Version .z files

Post by reappper »

so whats the news about the project?

I mean can we now mod the force unleashed?

I really would love the models from tfu....

I hope its not dead any body?
revelation
mega-veteran
mega-veteran
Posts: 183
Joined: Mon May 12, 2008 5:15 pm
Has thanked: 5 times
Been thanked: 85 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by revelation »

Things are not dead, i just haven't had time to look into the conversion to max script yet. Reading the format is not an issue as like i said, i listed how everything works above. just that i don't normally need art import support, so i don't currently have a code path in place that allows it to be done. Once i get some time i will look into what i can do in that regard.
rogueclarkey
ultra-n00b
Posts: 6
Joined: Tue Jul 22, 2008 4:01 pm
Has thanked: 3 times
Been thanked: 5 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by rogueclarkey »

Hi All,

Just thought I'd post my findings so far. I'm interested in the animation data format which seem to be held in the .animations files. No surprise there ;-)

I wrote a some code over the weekend to try and extract the key data, but can't quite get there.

I got the data from http://www.zshare.net/download/6802877050e22834/ and once I decompressed the lp file with quickbms I found the animations in Scum\animation\characters\PCDX\MaleAverage\Player\navigation.

I think I've managed to get the overall structure right, but I've not managed to extract any keyframe data for translations or rotations.

I hope some finds this useful and can help me get the key data.

[Noob disclaimer - I've never tried this before and I'm guessing about the entire format so best not to assume I've got anything correct :-) ]

Code: Select all

#include <stdio.h>

typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned long uint32;

typedef char int8;
typedef short int16;
typedef long int32;

struct R2D2PACK_HEADER
{
	uint8 id[8];
	uint32 unknown0x04;
	uint32 size;
};

struct PACK_HEADER
{
	uint8 id[4];
	uint8 unknown0x04[20];
	uint32 size;
	uint32 intNumber;
};

struct R2D2MULT_HEADER
{
	uint8 id[8];
	uint32 unknown0x04;
	uint32 size;
};

struct MINA_HEADER
{
	uint8 id[4];				// 0x0
	uint8 unknown0x04[16];		// 0x04
	uint32 numBones;			// 0x14
	float floatNumber;			// 0x18
	uint8 unknown0x1C[20];		// 0x1c
	uint32 boneDataSize;		// 0x30
	uint32 size1;				// 0x34
	uint32 unknown0x38;			// 0x38
	uint32 size2;				// 0x3C
};

struct BONE_INFO
{
	uint32 boneCRC;
	uint32 unknown0x04;
	uint32 offset;
	uint16 numKeys;
	uint16 unknown0x0E;
};


void main(int argc, char* argv[])
{
	char* pAnimName = "player_ma_nav_airdash_start";
	char fullPath[256];

	sprintf(fullPath, "%s.animations", pAnimName);

	FILE* pAnimFile = fopen(fullPath, "rb");
	FILE *pAnimExportFile = fopen("anim.txt", "w");

	if(pAnimFile && pAnimExportFile)
	{
		// file size
		fseek(pAnimFile, 0, SEEK_END);
		int fileSize = ftell(pAnimFile);
		fseek(pAnimFile, 0, SEEK_SET);
		fprintf(pAnimExportFile, "fileSize: %d\n", fileSize);

		// R2D2PACK header
		R2D2PACK_HEADER r2d2packHeader;
		fread(&r2d2packHeader, sizeof(R2D2PACK_HEADER), 1, pAnimFile);
		fprintf(pAnimExportFile, "%s\n", r2d2packHeader.id);
		fprintf(pAnimExportFile, "size: %d (fileSize - sizeof(R2D2PACK_HEADER)\n", r2d2packHeader.size);
		fprintf(pAnimExportFile, "\n");

		PACK_HEADER packHeader;
		fread(&packHeader, sizeof(PACK_HEADER), 1, pAnimFile);
		fprintf(pAnimExportFile, "%s\n", packHeader.id);
		fprintf(pAnimExportFile, "size: %d (fileSize)\n", packHeader.size);
		fprintf(pAnimExportFile, "int number: %d\n", packHeader.intNumber);
		fprintf(pAnimExportFile, "\n");


		// R2D2MULT header
		R2D2MULT_HEADER r2d2multHeader;
		fread(&r2d2multHeader, sizeof(R2D2MULT_HEADER), 1, pAnimFile);
		fprintf(pAnimExportFile, "%s\n", r2d2multHeader.id);
		fprintf(pAnimExportFile, "size: %d (fileSize - %d)\n", r2d2multHeader.size, fileSize - r2d2multHeader.size);
		fprintf(pAnimExportFile, "\n");
		
		// MINA header
		MINA_HEADER minaHeader;
		fread(&minaHeader, sizeof(MINA_HEADER), 1, pAnimFile);
		fprintf(pAnimExportFile, "%s\n", minaHeader.id);
		fprintf(pAnimExportFile, "numBones+1: %d\n", minaHeader.numBones);
		fprintf(pAnimExportFile, "float number (anim length?): %f\n", minaHeader.floatNumber);
		fprintf(pAnimExportFile, "\n");


		uint32 boneDataOffset = ftell(pAnimFile);
		fprintf(pAnimExportFile, "Bone Data - Offset: %d\n\n", boneDataOffset);

		uint32 boneInfoOffset = boneDataOffset+minaHeader.boneDataSize;
		fprintf(pAnimExportFile, "Bone Info - Offset: %d\n", boneInfoOffset);
		fseek(pAnimFile, boneInfoOffset, SEEK_SET);


		// BONE INFO

		uint32 lastOffset = 0;

		uint32 offsetTotal = 0;

		for(int boneIndex=0;boneIndex<minaHeader.numBones;boneIndex++)
		{
			BONE_INFO boneInfo;
			fread(&boneInfo, sizeof(BONE_INFO), 1, pAnimFile);

			fprintf(pAnimExportFile, "boneCRC: 0x%x\n", boneInfo.boneCRC);
			fprintf(pAnimExportFile, "offset: %d\n", boneInfo.offset);
			fprintf(pAnimExportFile, "numKeys?: %d\n", boneInfo.numKeys);

//			uint32 fileOffset = ftell(pAnimFile);
//			fseek(pAnimFile, boneDataOffset+boneInfo.offset, SEEK_SET);
			// hopefully the anim data for the bone is here...
//			fseek(pAnimFile, fileOffset, SEEK_SET);


			uint32 boneDataSize = boneInfo.offset - lastOffset;
			fprintf(pAnimExportFile, "previous bone data size: %d\n", boneDataSize);

			offsetTotal += boneInfo.offset - lastOffset;

			lastOffset = boneInfo.offset;


			fprintf(pAnimExportFile, "\n");
		}

		fprintf(pAnimExportFile, "offsetTotal: %d\n", offsetTotal);

		fclose(pAnimFile);
		fclose(pAnimExportFile);
	}
}
CeeX
ultra-n00b
Posts: 1
Joined: Mon Mar 22, 2010 2:45 am

Re: Star Wars The Force Unleashed - PC Version .z files

Post by CeeX »

Hello to all!

This is my first post on these forums and I actually joined the XeNTaX community to ask for help by making a request.

What I need help with is as this topic's title suggests, extracting a specific file from the game's archives. What I am looking for is the "Cybernetic Reconstruction" 3D model and it's textures.

I am not very knowledgeable about these reverse-engineering/HEX tweaking operations so it's nearly impossible for me to do this by myself...

So here I am, unsure that I'm even posting my request in the right place, asking someone to extract 2 files that I'll be able to open in a modeling program.

Thank you very much in advance!

Cheers
User avatar
Savage
VIP member
VIP member
Posts: 559
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 18 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Savage »

Any chance for the sounds?
I found some sounds like tem_jeditemple_b.st.nv.pcp are RAW PCM (so maybe game can works with uncompressed audios), but normally the files are like "crypted" o compressed, looks the same header in a lot of files.
The compression ratio in Winrar it's 60-65% (not too bad) this indicates is not a dpcm (maybe i'm wrong in this) or mp3..(but who knows) can be a xma?
C0 00 40 00 F0 00 00 00 02
sounds.rar - 6.86MB
Image
User avatar
Savage
VIP member
VIP member
Posts: 559
Joined: Sun Apr 17, 2005 11:00 am
Has thanked: 16 times
Been thanked: 18 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Savage »

I tried to follow some hints from here http://hcs64.com/mboard/forum.php?showt ... 8&lastpage
But i failed.. :(
Image
reappper
beginner
Posts: 21
Joined: Mon Jan 11, 2010 1:03 am
Has thanked: 1 time

Re: Star Wars The Force Unleashed - PC Version .z files

Post by reappper »

so hey has any one got some of the models out of the force unleashed or at least one a program that can?
Zerovisibilite
n00b
Posts: 19
Joined: Sun Jun 13, 2010 2:41 am
Been thanked: 11 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Zerovisibilite »

Ok, So I'm Brand spanking new here(as a registered user). I have taken some of the development that has been done here and moved forward with it. Using VB i was able to make an automated model extractor for this. It is still in the raw stage, but should be cleaned up enough to post a link in a short while.
Zerovisibilite
n00b
Posts: 19
Joined: Sun Jun 13, 2010 2:41 am
Been thanked: 11 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Zerovisibilite »

Ok, Her is the automated ripper. I used the BMS script above to get the GTO files then this program to ripp them into .obj. There are 2 radio buttons to select which bone weight to use 3 or 5. I have found that 3 works for most and for those that dont the 5 will work. It prompts for an export folder on first run, then never again unless you click change export folder.

Use the dds files that are ripped with the bms script above to skin the models when done.

Hope you enjoy

No credit necessary as all i did was take the maxscript(by the way is brilliant on how the face points are handled,Still having a wonder on why it works that way but, hey it works) and code it in vb and automate the front end. So if you thank anyone thank the above that paved the way
You do not have the required permissions to view the files attached to this post.
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1020
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 266 times
Been thanked: 147 times
Contact:

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Tosyk »

Zerovisibilite wrote:Ok, Her is the automated ripper. I used the BMS script above to get the GTO files then this program to ripp them into .obj. There are 2 radio buttons to select which bone weight to use 3 or 5. I have found that 3 works for most and for those that dont the 5 will work. It prompts for an export folder on first run, then never again unless you click change export folder.

Use the dds files that are ripped with the bms script above to skin the models when done.

Hope you enjoy

No credit necessary as all i did was take the maxscript(by the way is brilliant on how the face points are handled,Still having a wonder on why it works that way but, hey it works) and code it in vb and automate the front end. So if you thank anyone thank the above that paved the way
You talking about weight data, but .obj format do not support bones. So how can i convert models with bones from .gto to my 3ds max?
Thank you for all you do here
my blog | my forum
Zerovisibilite
n00b
Posts: 19
Joined: Sun Jun 13, 2010 2:41 am
Been thanked: 11 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Zerovisibilite »

The boneweight in the App is for placement of the typedata I used. It will not export bone weight or bones for that matter. Until I (or someone else) spends some time on the bone and animation stuff, t is what it is. Sorry
User avatar
Tosyk
double-veteran
double-veteran
Posts: 1020
Joined: Thu Oct 22, 2009 10:24 am
Location: Russia, Siberia
Has thanked: 266 times
Been thanked: 147 times
Contact:

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Tosyk »

Zerovisibilite wrote:The boneweight in the App is for placement of the typedata I used. It will not export bone weight or bones for that matter. Until I (or someone else) spends some time on the bone and animation stuff, t is what it is. Sorry
:( oh, it's to bad. But any way your tool it's great progress. I'll be waiting for support weight data and bones in your tool. Thank you :)
Thank you for all you do here
my blog | my forum
Zerovisibilite
n00b
Posts: 19
Joined: Sun Jun 13, 2010 2:41 am
Been thanked: 11 times

Re: Star Wars The Force Unleashed - PC Version .z files

Post by Zerovisibilite »

Here is the latest Ripper. It auto finds the number of "Weights" for each verts segment. Exports as one obj, however I cant figure out the Material assignments so that is still manual. IE the .mtl file is bogus and just a place holder. I am looking at a different format to export to that will make the bones easier to attach but haven't had much time to play with it.
You do not have the required permissions to view the files attached to this post.
Post Reply