Sammie wrote:Download: s7bbaex.rarTaylorMouse wrote:I have the settlers 7, so could you upload the s7bbaex extracter so i can do the extraction of the bba file myself. Thnx
T.
Thnx
T.

Sammie wrote:Download: s7bbaex.rarTaylorMouse wrote:I have the settlers 7, so could you upload the s7bbaex extracter so i can do the extraction of the bba file myself. Thnx
T.

4L= Unsigned Long Integer (Standardsize = 4)TaylorMouse wrote:what does the
read('4L') mean ?
T.

Code: Select all
string file = @"C:\Temp\A_Sheep\A_Sheep_Shorn_01.s7m";
try
{
using(System.IO.BinaryReader r = new System.IO.BinaryReader(System.IO.File.Open(file, FileMode.Open, FileAccess.Read)))
{
char[] chars = r.ReadChars(4);
Debug.WriteLine(chars[0].ToString() + chars[1].ToString() + chars[2].ToString() + chars[3].ToString() );
Debug.WriteLine(String.Format("Minor Version {0}", r.ReadUInt32()));
Debug.WriteLine(String.Format("Major Version {0}", r.ReadUInt32()));
int nVerts = (int)r.ReadUInt32();
Debug.WriteLine(String.Format("Number Verts {0}",nVerts ));
Debug.WriteLine(String.Format("Number Indexes {0}", r.ReadUInt32()));
for (int i = 0; i < 8; i++)
{
r.ReadUInt32();
}
int len = (int)r.ReadUInt32();
len = len - (len%16) + 16; // 16 byte chunks
Debug.WriteLine(String.Format("Texture Names Length {0}", len));
r.ReadUInt32();
r.ReadUInt32();
char[] textures = r.ReadChars(len);
string tmp = "";
for (int i = 0; i < len; i++)
{ tmp += textures[i].ToString(); }
string[] texNames = tmp.Split('\0');
for(int i = 0; i < texNames.Length; i++)
{
if( texNames[i].Length > 0)
Debug.WriteLine(texNames[i]);
}
int chunkType = (int) r.ReadUInt16();
int chunkSize = (int)r.ReadUInt16();
int structSize = (int)r.ReadUInt32();
Debug.WriteLine(String.Format("Chunk Type {0}", chunkType ));
Debug.WriteLine(String.Format("Chunk Size {0}", chunkSize ));
Debug.WriteLine(String.Format("Struct Size {0}", structSize ));
Debug.WriteLine(String.Format("This must be 24 => {0}", r.ReadUInt32() ));
char[] chunkName = r.ReadChars(4);
Debug.WriteLine(chunkName[0].ToString() + chunkName[1].ToString() + chunkName[2].ToString() + chunkName[3].ToString() );
for(int i = 0; i < nVerts; i++)
{
Debug.WriteLine(String.Format("[{0},{1},{2}] uv [{3},{4}]" , r.ReadSingle(),r.ReadSingle(),r.ReadSingle(),r.ReadSingle(),r.ReadSingle() ));
r.ReadSingle();
}
r.Close();
}
}
catch(Exception ex)
{
Debug.WriteLine(ex);
}
Code: Select all
S7MF
Minor Version 1
Major Version 1
Number Verts 461
Number Indexes 1656
Texture Names Length 112
A_Sheep_A_Sheep_Shorn
Textures\Animals\A_Sheep_01_Shorn_D.dds
Models\Animals\A_Sheep\A_Sheep_Shorn_01.s7m
Chunk Type 1
Chunk Size 1383
Struct Size 11064
This must be 24 => 24
VST0
[5.652521E+08,2.943147E-41,0.0001288966] uv [1.642716E-38,-6.431651E+37]
[5.631549E+08,2.943147E-41,6.159579E-05] uv [1.642734E-38,-6.431651E+37]
[1.186988E+09,2.895503E-41,0.0001603965] uv [1.120339E-38,-6.431651E+37]
[2.074171E+09,2.928854E-41,0.0002157032] uv [1.198274E-38,NaN]

Code: Select all
int chunkType = (int) r.ReadUInt16();
int unk = r.ReadUInt16();
int chunkSize = (int)r.ReadUInt32();
int structSize = (int)r.ReadUInt32();

Code: Select all
int chunkType = (int)r.ReadUInt16();
int unk = (int)r.ReadUInt16();
int chunkSize = (int)r.ReadUInt32();
int structSize = (int)r.ReadUInt32();
char[] chunkName = r.ReadChars(4);
Code: Select all
FF FF FF FF

Code: Select all
FF FF FF FF


Code: Select all
struct VST0 {
Halffloat[3] vx, vy, vz
byte[18] ?
}



Yes, UVs can have positve and negatives values.. The UV-Space has a default 0-1 range (the upper right), but if the gameengine supports UV-repeating or if the mesh have multiple UVs or the UVs are just bad, then they can have -1 or +2,3,4... - in X or Y. I saw it in old settler-games where many UVs are in 1|1 or -1|0 space. Its allowed.TaylorMouse wrote:the uv2, mostly ends up in -1, but is that an ok uv value?
VST0 ->24 I assume 5 floats + 1 Signed Int ( could be if this is the w coordinate), being the xyz of the vertex, then the uvw of the vertex, but when I read them, they result in something weird like

Hmm, I think the normals und specular maps sharing the same UVs from VST0.finale00 wrote: I'll look into VST1 and VST2 later. I don't think there are normals or UV's in VST0 though.
If anything I would think the other values to be related to bone indices and weights. I mean, there really isn't anywhere else you'd put them...