How to replace pie files in regular game?

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

How to replace pie files in regular game?

Post by Azraiel »

I made a new body and modified a texpage and I would like to use both in the regular game. How do I go about doing this? I just want to replace something already in the game with these new files is all.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: How to replace pie files in regular game?

Post by Watermelon »

Azraiel wrote: I made a new body and modified a texpage and I would like to use both in the regular game. How do I go about doing this? I just want to replace something already in the game with these new files is all.
just create a new 'components\bodies\' folder and a new 'texpages' folder for your new pie/texpage respectively in your warzone exe directory and put the new pie there,e.g:

body pies:
C:\warzone2100\components\bodies\

texture pages:
C:\warzone2100\texpages\
tasks postponed until the trunk is relatively stable again.
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

What about name?
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: How to replace pie files in regular game?

Post by Watermelon »

Azraiel wrote: What about name?
sp campaign:
warzone2100\messages\strings\names.txt

mp/skirmish:
warzone2100\mp\messages\strings\names.txt
tasks postponed until the trunk is relatively stable again.
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

There is no messages folder in my warzone 2100 directory.
Kyor
Trained
Trained
Posts: 73
Joined: 03 Apr 2007, 15:28

Re: How to replace pie files in regular game?

Post by Kyor »

warzone.wz\components\bodies\
warzone.wz\texpages
warzone.wz\messages\strings\names.txt
warzone.wz\mp\messages\strings\names.txt
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

OK, how do I open that file up?
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

Never mind. Figured out that I can just use winrar.
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

Now I have a new error. When I try to launch the game with my new PIE file, the game crashes when it tries to load up a new game.
Giel
Regular
Regular
Posts: 725
Joined: 26 Dec 2006, 19:18
Contact:

Re: How to replace pie files in regular game?

Post by Giel »

Azraiel wrote: Now I have a new error. When I try to launch the game with my new PIE file, the game crashes when it tries to load up a new game.
It should produce an stderr.txt file, if it does just post that here.
"First make sure it works good, only then make it look good." -- Giel
Want to tip/donate? bitcoin:1EaqP4ZPMvUffazTxm7stoduhprzeabeFh
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

Here you go.
Attachments
stderr.txt
(22.21 KiB) Downloaded 359 times
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to replace pie files in regular game?

Post by DevUrandom »

If you'd read that file, you see that the error it runs into is this one:
error:      iV_ProcessIMD: file corrupt -F (TEXTURE)
error:      IMD load failed - drlbod01.pie
A bit of research tells that -F means that the file extension is wrong. It has to be ".png".
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

I supplied the texpage as .png though.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: How to replace pie files in regular game?

Post by DevUrandom »

Code: Select all

			if (sscanf(pFileData, "%s %d%n", buffer, &ptype, &cnt) != 2) {
				debug(LOG_ERROR, "iV_ProcessIMD: file corrupt -D (%s)", buffer);
				return NULL;
			}
			pFileData += cnt;

			if (strcmp(buffer, "TEXTURE") == 0) {
				ch = *pFileData++;

				for( i = 0; (i < 80) &&  ((ch = *pFileData++) != EOF) && (ch != '.'); i++ )	// yummy
				{
 					texfile[i] = (char)ch;
				}

				if (sscanf(pFileData,"%s%n", texType,&cnt) != 1) {
					debug(LOG_ERROR, "iV_ProcessIMD: file corrupt -E (%s)", buffer);
					return NULL;
				}
				pFileData += cnt;

				if (strcmp(texType,"png") != 0) {
					debug(LOG_ERROR, "iV_ProcessIMD: file corrupt -F (%s)", buffer);
					return NULL;
				}

				texfile[i] = 0;

				strcat(texfile,".png");

				if (sscanf(pFileData,"%d %d%n", &pwidth, &pheight,&cnt) != 2) {
					debug(LOG_ERROR, "iV_ProcessIMD: file corrupt -G (%s)", buffer);
					return NULL;
				}
				pFileData += cnt;
				bTextured = TRUE;
			}
I read that as:
- Read a string and a number. The string has to be "TEXTURE".
- Read until the first dot "." and use that as the filename.
- The part after the filename is the extension, which has to be "png". If it is not, the file is corrupt-F.
Azraiel
Trained
Trained
Posts: 56
Joined: 05 Apr 2007, 14:09

Re: How to replace pie files in regular game?

Post by Azraiel »

The only texpage involved in this pie file that isn't .png is the.pcx file used by PIE slicer.

If the texpage is suppose to be .png somehow for PIE Slicer, then I don't know how to get PIE slicer to use something other than .pcx for the model texture.
Post Reply