Commandos2&3 SEC File Structure Table

Commandos2&3 SEC File Structure Table

 

Arranged by F.R.C.

 

Data Area

Data Block

Data Section

Data

Data Type

Length

Description

Sample Data

Head DA

Identifying DB

DS 0

Version Sign

Int64

8

Fixed

01000000 01000000

/

02000000 01000000

DS 1

 

 

 

Not fixed, it may exist or not exist, can be deleted

...POSTE...

DS 2

Identifying Sign

 

36

Fixed

...MAP1...

Basic Info DB

 

Number of Points

Int32

4

This define the amount of points

15010000

Number of Borders

Int32

4

This define the amount of borders

47030000

Number of Districts

Int32

4

This define the amount of districts, including special districts

A4000000

Number of Special Districts

Int32

4

This define the amount of special districts

00000000

Main DA

Point DB

Point DS

x

Single

4

X-coordinate

EE5C0DC3

y

Single

4

Y-coordinate

42E04543

... Point DSs: total number defined by Number of Points

The total length of the Point DB is: Number of Points * 8

Border DB

Border DS

Start Point Index

Int32

4

Index for Start Point

00000000

End Point Index

Int32

4

Index for End Point

01000000

Parent District Index

Int32

4

Index for the district which the border belongs to

00000000

Neighbor District Index

Int32

4

Index for the district with the border as a boundary between it and the Parent District. 0xFFFFFFFF represents the border is on the edge of the map

11000000

Unknown

Int32

4

Unknown data

00000000

... Border DSs: total number is defined by Number of Borders, and the borders of a district are in anticlockwise order.

The total length of the Border DBs is: Number of Borders * 20

District DB

District DS

n

Int32

4

 

05000000

Terrain

TerrainInfo

8

 

00000000 14000000

kx

Single

4

The tangent of the angle to the X-axis

00000080

ky

Single

4

The tangent of the angle to the Y-axis

00000080

bz

Single

4

The intercept for Z-axis

00001C42

Unknown Data

 

24/16

 

00000000 00000000 00000000 00000000 00000000 00000000

MinPx

Single

4

The minimum X-coordinate of the points

21300FC3

MinPy

Single

4

The minimum Y-coordinate of the points

87564243

MinPz

Single

4

The minimum Z-coordinate of the points

00001C42

MaxPx

Single

4

The maximum X-coordinate of the points

8115D0C2

MaxPy

Single

4

The maximum Y-coordinate of the points

04B65B43

MaxPz

Single

4

The maximum Z-coordinate of the points

00001C42

Border 0

Int32

4

Border of the district

00000000

Border 1

Int32

4

Border of the district

01000000

... Borders: total number is defined by n

... District DSs: total number is defined by Number of Districts

Tail DA

Symbol DB

 

Symbol

Int32

4

The start of the Tail DA

32534148

Basic info DB

 

Total Number of Districts

Int32

4

Total Number of Districts contained in Reseaus

6E050000

Unknown

Int32

4

Unknown data

06000000

Number of Reseaus in X

Int32

4

Number of Reseaus in the X direction

17000000

Number of Reseaus in Y

Int32

4

Number of Reseaus in the Y direction

18000000

Reseau DB

Reseau DS

Number of Districts in the Reseau

Int32

4

Number of Districts contained in the Reseau

03000000

District Index

Int32

4

Index for the District

DC000000

... District Index: total number is defined by Number of Districts in the Reseau

Reseau DSs: total number is defined by Number of Reseaus in X * Number of Reseaus in Y

 

Terrain

Byte(Bit)

Name

Description

00

01

02

03

04

05

06

07

08

09

10

11

12

13

14

15

16

17

18

19

20

21

22

0

MajorType

 

Land

Snow

Deep Water

Nontransparent  Water

Transparent Water

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

MinorType

Control the sound effects

Soil or Sand

Grass

Road or Deck

KWEX

294

SBEX

1400

3TE

627

Wood Bridge

CZEX

1172

KWEX

174

Snow

 

CZEX

1565

3TV

12

Metal Cells

 

Slope to Water

Water

Cobble Road

 

 

 

 

 

 

 

2

Unknown

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3

Unknown

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                                                   
4(1) MustCreep People must creep on the district -
4(3) NoView No view will be displayed in the district -
4(4)      
4(5) IsBarrier The district could block human view -
4(7) IsEnterable People could enter the district if it's set -
5 Darkness   0-255

5(1)

IsShadow

People will be dark when they step into a district with this attribute set

-

5(7)

IsDiggable

Commandos could dig holes in the district if set(1#, 5#)

-

6

IsBound

 

False

 

True

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7

Unknown

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Notice:

1. All numerical data types are in little-endian.

2.In the items with "/", names in the right is for Commandos 2, and names in the right is for Commandos 3.

3. Further understanding of the Commandos 2 model indicates,

A Point is a plumb line with the equation:

x = x0

y = y0

A Border is a plane between two "Point".

A District is actually a columniation with several trapezoid side, and the equation for the ceiling plane is:

z = kx * x + ky *y + bz

The floor plane is a horizontal plane. The side planes are all vertical with the horizontal plane.

A Special District is a District. One or more of its side planes are not solid, and can be distinguished with Neighbor District Index = -1 for the corresponding Borders. So, Special District is not divided from other Districts.

These names are not exact, but to avoid big changes, we still use these names.

 

Reference:

[1]invox4C2_3keyfiles.doc, invox, 2006

posted @ 2007-02-05 00:17  地狱门神  阅读(400)  评论(0编辑  收藏  举报