Jump to content

[REL] COLIO


cj2000

Recommended Posts

I was able to encrypt the Bully col format, at least that part needed to read the model. Those who are interested can read more about it here.

I have also created a tool, that converts Bully col files to cst. The tool can be downloaded here.

After my succes with Bully col format, I started researches with Manhunt col format, that seems to be used by both Manhunt parts. I have also make some progres here.

I am planing to make some kind of frameworck that provides reading of most R* col formats and writing of some of this formats. Here some kind of table with features the frameworck should provide:

 

COL format read write

 

GTA (III/VC/SA) yes yes

Manhunt (1/2) yes yes

Bully yes no

GTA LCS yes no

GTA VCS yes no

 

LCS and VCS are marked red, because I am very pesimistic about that ones.

 

Also suport for CST2 should be provided, but only write.

 

I would like to make a complete application with this features, but C++ has no own GUI and I hate Qt.

 

During some of my researches I found a tool with similar name, the tool is more than 10 years old and I want to stres out this thread has nothing to do with that tool.

Edited by cj2000
Link to comment
Share on other sites

Here are also some of my first researches about Manhunt (1 & 2) col format.:

There are many similarities with GTA COL1 format that can be seing here. Also are most datastructures the same or quite the same. TBounds, TSurface, TSphere and TVertex seams to be identic, and the only change to TBox and TFace datastructures is the absence of TSurface, rhat reduces each of that structures by 4 bytes. The only new datastructure is TString. The structure can be represented by somthing like char[4][]. The last char[4] bloc always contain '\0' character defining the end of string. If '\0' is not the last one in the block, all folowing characters are 'p', that probably should stand for pading. The col file looks like:

 

unsigned int colmodels;
TModel models[];

 

and the TModel datastructure looks like:

 

TString name;

TBounds bounds;

unsigned int numSpheres;
TSphere spheres[]; // TSphere[numSpheres]

unsigned int numLines;

Lines lines[];//Lines[numLines] sizeof(Lines)=24
unsigned int numBoxes;

TBox boxes[]; // TBox[numBoxes]

int numVertex;
TVertex vertices[]; //TVertex[numVertex]

unsigned int numFaces;
TFace faces[]; //TFace[numFaces]

 

Seems to be some problem with boxes. After some more researches i have made changes to the structure. Looks like a structure called Line, mentioned in the col topic on gtamodding is used. In that topic nothing is said about that structure, in Manhunt col it seems to take 24 byte.

Edited by cj2000
Link to comment
Share on other sites

Like I already said, I am very pesimistic about opening LCS and VCS col files. The file format is realy wired, like all other formats used in LCS and VCS. However even here I made some progres and will present my first results here soon. Everibody having knowledge about this formats is welkome to post here.

 

Like promised here are the results:

This only referes to col2 files not DTZ. Most datatypes have size that is a multiple of 16 and if the data doesn´t feat padings are used. Only Vertex and Faces does not use padings.

 

Surface{

unsigned char material;

unsigned char light;

};

 

Vertex{

unsigned short values[3];

};

Geometry:

 

Sphere{

float pos[3];

float radius;

};

 

Box{

float min[3];

float minZero; //0.f

float max[3];

float maxZero; //0.f

};

 

Bounding objects:

 

BSphere{

Sphere sphere;

Surface surface;

};

 

BBox{

Box box;

Surface surface;

};

 

Face{

unsigned short vertices[3];

Surface surface;

};

 

FaceGroup{

Box box;

unsigned short start;

unsigned short end;

};

 

File:

 

Header{
char forcc[4];//2loc
unsigned zero;//0x0
unsigned listAdr;
unsigned listAdrR;//listAdrR=listAdr
unsigned listCnt;
char pading[8];//0x0
};

 

AdresTableElement{
unsigned id;
unsigned adr;
};

 

Bounding{

Sphere sphere;

Box box;

};

 

This datatypes, I mentioned, are comon for both LCS and VCS. Also have to mention that the filestructure is nonlinear.

 

The begining of a col2 file looks like this:

 

Header header;

AdresTableElement adreses[];

 

The end of adreses array is always marked by endtable element. This element can be defined like:

 

AdresTableElement endtable;

endtable.id=0xFFFFFFFF;

endtable.adr=0;

 

-adr: contains the adres of the Dataheader of the model with the ID having the value of id.

There are some diferences bettween Dataheader representation in LCS and VCS col2 files.

 

LCS version:

Dataheader{
TBounds bounds;
unsigned short numSpheres;
unsigned short numBoxes;
unsigned short numFaces;
unsigned char numUndefs;
unsigned char numFaceGroups;
unsigned char fileID;
char numPading[3];
unsigned spheresAdr;
unsigned unk;
unsigned boxesAdr;
unsigned faceGroupsAdr;
unsigned vertexAdr;
unsigned facesAdr;
unsigned undefsAdr;
};

 

VCS version:

Dataheader{
TBounds bounds;
unsigned short numBoxes;
unsigned short numFaces;
unsigned short numSpheres;
unsigned char numFaceGroups;
unsigned char fileID;
unsigned spheresAdr;
unsigned unk;
unsigned boxesAdr;
unsigned faceGroupsAdr;
unsigned vertexAdr;
unsigned facesAdr;
unsigned unk2;
};

Edited by cj2000
Link to comment
Share on other sites

modding just GTA SA for while has brought me some experience related to collision....breakable collision object's ...Shadows..terrain effects on col mesh,brightness...some basic modding knowledge

 

How you mean wired formats... :bored:

Link to comment
Share on other sites

modding just GTA SA for while has brought me some experience related to collision....breakable collision object's ...Shadows..terrain effects on col mesh,brightness...some basic modding knowledge

 

How you mean wired formats... :bored:

I am really not familiar with this language, so I meaned something like strange or a bit crazy formats. I know this doesn´t also really feat. And if you read my post more precise, you´ll see, I was not tallking about SA formats, they are really OK, but only LCS/VCS ones.

Edited by cj2000
Link to comment
Share on other sites

cj2000, good job! :lol:

Thanks, but the job is still not done completely.

Link to comment
Share on other sites

So here is the current progres:

[table]

 

COL format read write

 

GTA (III/VC/SA)to do?done

 

Manhunt (1/2)done?to do?

 

Bullydoneno
GTA LCSdoneno
GTA VCSdoneno
CST2nodone
[/table]

At the moment only stories col2 files are suported, but GTAG (DTZ) suport will be added soon.
I have made a pac of comandline tools to open Manhunt (1/2), LCS and VCS col files and extract the colisions as cst. Unforzunatelly there were some bugs, but I hope to have fixed all of them now.

Edited by cj2000
Link to comment
Share on other sites

  • 2 weeks later...

The import for both stories parts and GTA (III/VC/SA) export (COLL and COL2) also CST are worcking properly.

Bully models can be imported, but without faceGroups. Manhunt 1&2 models can be partikulary imported. Also have problem with material convertion from VC to SA. Can somebody tell me how this material convertion worcks?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

So have created some comandline tools, that can convert stories col2 files to SA col. The tools can be downloaded here.

This is an improoved version.

Edited by cj2000
Link to comment
Share on other sites

  • 5 weeks later...

Now my stories col2 to SA col converter has a worcking GUI, making worcking with that tool much easier. The tool can handle both LCS and VCS format, it just have to be selected, like can be seeing on the pic.

 

7f2864ab31f09929b64b819c4b0e0fde.jpeg

The tool can be downloaded here.

  • Like 3
Link to comment
Share on other sites

  • 3 months later...

Here are also some of my first researches about Manhunt (1 & 2) col format.:

There are many similarities with GTA COL1 format that can be seing here. Also are most datastructures the same or quite the same. TBounds, TSurface, TSphere and TVertex seams to be identic, and the only change to TBox and TFace datastructures is the absence of TSurface, rhat reduces each of that structures by 4 bytes. The only new datastructure is TString. The structure can be represented by somthing like char[4][]. The last char[4] bloc always contain '\0' character defining the end of string. If '\0' is not the last one in the block, all folowing characters are 'p', that probably should stand for pading. The col file looks like:

 

unsigned int colmodels;

TModel models[];

 

and the TModel datastructure looks like:

 

TString name;

TBounds bounds;

unsigned int numSpheres;

TSphere spheres[]; // TSphere[numSpheres]

unsigned int numLines;

Lines lines[];//Lines[numLines] sizeof(Lines)=24

unsigned int numBoxes;

TBox boxes[]; // TBox[numBoxes]

int numVertex;

TVertex vertices[]; //TVertex[numVertex]

unsigned int numFaces;

TFace faces[]; //TFace[numFaces]

 

Seems to be some problem with boxes. After some more researches i have made changes to the structure. Looks like a structure called Line, mentioned in the col topic on gtamodding is used. In that topic nothing is said about that structure, in Manhunt col it seems to take 24 byte.

By testing the TBox and TSurface unused in manhunt 1/2.

 

unsigned int numBoxes;// Unused

TSurface;//Unused

 

There are some correction:

//from 010 editor template

typedef struct{

local byte padLen = 4-(FTell() % 4);

if ((padLen < 4) && (padLen > 0)) byte pad[padLen];

}Padding;

 

typedef struct{

TVector center;

float radius;

TVector min;//seems min.z and max.z swap order.

TVector max;

}TBounds;

 

typedef struct{

TVector center;

float radius;

TSurface surface;//Unused , 4 bytes zeros.

}TSphere;

 

typedef struct{

TVector point[2];

}Lines;

 

typedef struct{

TVector XYZ;

}TVertex;

 

typedef struct{

DWORD VertID[3];

}TFace;

 

typedef struct{

string name;

Padding padding;

TBounds bounds;

DWORD numSpheres;

TSphere spheres[numSpheres];

DWORD numLines;

Lines lines[numLines];

DWORD numBoxes;//unused in manhunt 1/2

TBox boxes[numBoxes];

int numVertex;

TVertex vertices[numVertex];

DWORD numFaces;

TFace faces[numFaces];

}TModel;

Edited by Leeao
Link to comment
Share on other sites

This is very interesting!

Maybe I can use some of your findings for future version of my tool OpenRW :-)

Link to comment
Share on other sites

This is very interesting!

Maybe I can use some of your findings for future version of my tool OpenRW :-)

You welcome.

Link to comment
Share on other sites

  • 1 month later...

Have reuploaded my BullyToCst converter here. To convert Bully col files put my tool into the folder where the col file are, than start it in comandline with "bullytocst name1 name2 ..." where name1, name2 etc. are names of col files, but without .col extension.

  • Like 3
Link to comment
Share on other sites

  • 4 months later...

A tool converting Bully colls to GTA one can be downloaded here. This tool has GUI, so no more comandline necesary.

  • Like 2
Link to comment
Share on other sites

  • 11 months later...

So the current progres looks like this:

 

[table]

 

COL format read write

 

GTA (III/VC/SA)donedone

 

Manhunt (1/2)doneto do

 

Bullydoneno
GTA LCSdoneno
GTA VCSdoneno
CST2nodone
[/table]

 

Thanks to Leeao for his corrections to Manhunt format.

 

Also have made the first converter, that is able to convert diferent GTA 3 era collision formats to COL2 format from SA. The tool also has an option for automatc material convertion. Some bugs still need to be fixed, but hope to have a final version worcking next week. Here is a pic of how the tool look like:

 

a67729f83677.png

 

The tool can be downloaded here.

 

For Bully and LCS you need to put the coresponding ide file in the same folder as the col (col2) file to make collisions have names. This should worck for VCS to, once ide files are avaible for it. If Bully col file has no ide with the same name, than default.ide is used.

Material convertion is fully worcking only for GTA, LCS and VCS, for Bully only vehicle material can be converted at the moment, for other materials the bully_dictionary must be edited. Manhunt doesn´t suport any material convertion.

Edited by cj2000
Link to comment
Share on other sites

Don't get it to fully. But I guess it's like this: Do you need col files if you example want to port a map or some object?

Link to comment
Share on other sites

Don't get it to fully. But I guess it's like this: Do you need col files if you example want to port a map or some object?

If you want that objects to have collision, than you need col files.

Link to comment
Share on other sites

OK, the collision converter tool is oficially avaible here.

Link to comment
Share on other sites

  • 3 weeks later...

Haven't tested it yet, but seems promising. Great work!

Link to comment
Share on other sites

  • 1 year later...

Wrote a new version of R* collision converter, that can convert any number of collision files at once. The tool worcks more or les the same as the previous one, the diference is you have to select the folder with the files that should be converted. The ide files, if necesary for the format also have to be in the selected folder. The new version is now avaible here and looks like this:

 

c95c234ec66d.png

 

As seen on the pic, manhunt format is mising in the tool, but there is a separate tool which converts collisions from all levels at once, just need to select the level folder. The tool is now awaible here and looks like this:

 

295607eccb96.png

  • Like 3
Link to comment
Share on other sites

Manhunt col converter is now officially avaible here.

Link to comment
Share on other sites

  • 2 years later...

hello brother please fix the downoad links because all the links is dead, i just want sa col to vc :)

Link to comment
Share on other sites

  • 3 months later...
On 1/31/2022 at 9:50 PM, GTA_MODS_YT said:

hello brother please fix the downoad links because all the links is dead, i just want sa col to vc :)

Which links exactly?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.