Project X/Scheme file

From Worms Knowledge Base

Jump to: navigation, search
(Up to Project X)

A scheme file has scheme flags affecting general game behavior and contains one or more weapon tables. After this, attached files and scripts follow. A list of libraries can be found before the attached scheme file.

The data types are in C# notation.

Header

The header provides general information about the scheme file details.

Offset Size Type Description Default value Remarks
0 12 raw string Identification "SCHM OF WAPX" This string is not prefixed with an integer and also does not contain a terminating postfix.
12 4 int Version 0x0000000A

Scheme Flags

Scheme flags affect the general game behavior and are set as a group of 1-byte booleans.

Offset Size Type Description Default value Remarks
16 1 bool Cyclic Maps 0x00
17 1 bool Underwater Jetpack 0x00
18 1 bool Underwater Rope 0x00
19 1 bool Unused 0x00
20 1 bool Unused 0x00
21 1 bool Unused 0x00
22 1 bool Unused 0x00
23 1 bool Unused 0x00
24 1 bool Unused 0x00
25 1 bool Unused 0x00
26 1 bool Unused 0x00
27 1 bool Shoot doesn't end turn 0x00
28 1 bool No loss of control 0x00
29 1 bool Firing pauses timer 0x01
30 1 bool Allow WA scheme to tweak power 0x01

Weapon Tables

A scheme must contain at least 1 weapon table. Theoretically, up to 2^16 tables are possible. Each weapon table consists of 71 weapon entries (of which several are utilites and not literally "weapons"). The header tells how many weapon tables are available in the file, following one after another. Information on about how to parse a single weapon can be found here.

Offset Size Type Description Default value Remarks
31 4 int Table Count 0x01 Cannot be zero.
35 (first) diff. Weapon Weapon of table Repeated 71 times for each table.

Placeholder

The meaning of the following integer is most possibly a counter for a type of structure not implemented in the most recent Project X version. Thus, it is always zero.

Offset Size Type Description Default value Remarks
diff. 4 int Unknown Structure Count 0x00000000 Always zero.

Files

Attached files follow. Again, an integer specifies how many files are attached.

Offset Size Type Description Default value Remarks
diff. 4 int File Count

A single attached file is described with the following structure, which of course repeats for the number of files in the scheme:

Offset Size Type Description Default value Remarks
diff. diff. string Name
diff. 4 int Length The length of the file data in bytes following without this describing structure.
diff. s. Length int Data The raw bytes of the attached file.

Scripts

Scripts are attached to the scheme as strings with an additional name. As you might have guessed, an integer reveals how many of the scripts are found.

Offset Size Type Description Default value Remarks
diff. 4 int Script Count

For each script, the following structure follows:

Offset Size Type Description Default value Remarks
diff. diff. string Name
diff. diff. string Script contents The source code of the script.

Libraries

Libraries can be "attached" to a scheme. However, the library file contents are of course not copied into the scheme file, but referenced with the library file name, and so only the library file names are listed. Surprisingly, we have an integer giving the number of attached libraries (or, to say, the number of library file name strings following).

Offset Size Type Description Default value Remarks
diff. 4 int Library Count

Repeated the times Library Count gave you:

Offset Size Type Description Default value Remarks
diff. diff. string Library File Name This is the file name including the extension ".pxl".

Scheme

Optionally, a typical WSC scheme can be included in the Project X scheme. A 1-byte boolean tells you if this is the case.

Offset Size Type Description Default value Remarks
diff. 1 byte Scheme attached flag If true, the following details about the scheme file exist.
diff. 4 int Length Length of data in bytes without this descriptive header
diff. s. Length byte[] Data
diff. diff. string Name Original file name of the scheme including the .wsc extension.
Personal tools