Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

cj2000

[REL] COLIO

Recommended Posts

cj2000

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

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
Ezekiel

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:

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
Leeao

cj2000, good job! :lol:

Edited by Leeao

Share this post


Link to post
Share on other sites
cj2000

cj2000, good job! :lol:

Thanks, but the job is still not done completely.

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
cj2000

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?

Share this post


Link to post
Share on other sites
Blackbird88

This is some cool stuff. Good job.

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
cj2000

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.

Share this post


Link to post
Share on other sites
Leeao

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

Share this post


Link to post
Share on other sites
reditec

This is very interesting!

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

Share this post


Link to post
Share on other sites
cj2000

This is very interesting!

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

You welcome.

Share this post


Link to post
Share on other sites
cj2000

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.

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
Davve95

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?

Share this post


Link to post
Share on other sites
cj2000

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.

Share this post


Link to post
Share on other sites
cj2000

OK, the collision converter tool is oficially avaible here.

Share this post


Link to post
Share on other sites
guard3

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

Share this post


Link to post
Share on other sites
cj2000

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

Share this post


Link to post
Share on other sites
cj2000

Manhunt col converter is now officially avaible here.

Share this post


Link to post
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

×

Important Information

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