Quantcast

Jump to content

» «
Photo

[REL] COLIO

21 replies to this topic
cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#1

Posted 17 March 2015 - 02:23 PM Edited by cj2000, 20 March 2015 - 12:33 PM.

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.

  • Gforce, Frank.s, Leeao and 9 others like this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#2

Posted 18 March 2015 - 03:40 PM Edited by cj2000, 02 April 2015 - 01:00 PM.

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.


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#3

Posted 19 March 2015 - 12:28 PM Edited by cj2000, 09 April 2015 - 01:47 PM.

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;
};


Ezekiel
  • Ezekiel

  • Members
  • Joined: 11 Nov 2012
  • None
  • Best Map 2016 [San Andreas INSANITY]

#4

Posted 19 March 2015 - 12:43 PM

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:


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#5

Posted 19 March 2015 - 02:36 PM Edited by cj2000, 20 March 2015 - 12:52 PM.

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.


Leeao
  • Leeao

    Player Hater

  • Members
  • Joined: 07 May 2008
  • China

#6

Posted 22 March 2015 - 11:48 AM Edited by Leeao, 22 March 2015 - 11:48 AM.

cj2000,  good job! :lol:

  • cj2000 and The_GTA like this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#7

Posted 23 March 2015 - 02:20 PM

cj2000,  good job! :lol:

Thanks, but the job is still not done completely.


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#8

Posted 30 March 2015 - 01:35 PM Edited by cj2000, 13 April 2015 - 01:48 PM.

So here is the current progres:
  





COL format read write 
GTA (III/VC/SA)to do?done
Manhunt (1/2)done?to do?
Bullydoneno
GTA LCSdoneno
GTA VCSdoneno
CST2nodone

 

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.

  • Frank.s likes this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#9

Posted 13 April 2015 - 01:54 PM

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?

  • Frank.s likes this

Blackbird88
  • Blackbird88

    DualShock 3 Buttons EVERYWHERE

  • Members
  • Joined: 21 Jul 2008
  • Czech-Republic

#10

Posted 27 April 2015 - 09:04 AM

This is some cool stuff. Good job.

  • cj2000 likes this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#11

Posted 15 June 2015 - 12:39 PM Edited by cj2000, 25 June 2015 - 01:49 PM.

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.

  • atfburner, Blackbird88, ALMOST610 and 1 other like this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#12

Posted 14 July 2015 - 01:32 PM

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.

  • Blackbird88, ALMOST610 and dkluin like this

Leeao
  • Leeao

    Player Hater

  • Members
  • Joined: 07 May 2008
  • China

#13

Posted 27 October 2015 - 12:07 PM Edited by Leeao, 27 October 2015 - 12:20 PM.

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;
  • cj2000 likes this

reditec
  • reditec

    DEV / SocialMediaManager / Translator / 18

  • BUSTED!
  • Joined: 16 Nov 2013
  • Germany

#14

Posted 27 October 2015 - 01:34 PM

This is very interesting!
Maybe I can use some of your findings for future version of my tool OpenRW :-)
  • The_GTA likes this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#15

Posted 29 October 2015 - 03:25 PM

This is very interesting!
Maybe I can use some of your findings for future version of my tool OpenRW :-)

You welcome.

  • reditec likes this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#16

Posted 11 December 2015 - 12:56 PM

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.

  • Frank.s, Blackbird88 and cabron-jon like this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#17

Posted 14 April 2016 - 11:00 AM

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

  • Blackbird88 and The_GTA like this

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#18

Posted 13 April 2017 - 01:32 PM Edited by cj2000, 18 April 2017 - 11:45 AM.

So the current progres looks like this:

 





COL format read write 
GTA (III/VC/SA)donedone
Manhunt (1/2)doneto do
Bullydoneno
GTA LCSdoneno
GTA VCSdoneno
CST2nodone

 

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.


Davve95
  • Davve95

    CJ - You wanna get back down so?

  • Members
  • Joined: 10 Jan 2012
  • Sweden

#19

Posted 14 April 2017 - 08:34 AM

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?

cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#20

Posted 18 April 2017 - 10:21 AM

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.


cj2000
  • cj2000

    Homeboy

  • Members
  • Joined: 17 Jun 2008
  • None
  • Best Conversion 2016 [GTA: Underground]

#21

Posted 21 April 2017 - 09:54 AM

OK, the collision converter tool is oficially avaible here.

  • guard3 likes this

guard3
  • guard3

    Liberty City's Finest

  • Members
  • Joined: 21 Jul 2013
  • Greece

#22

Posted 07 May 2017 - 11:02 AM

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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users