fastman92 Posted August 7, 2010 Share Posted August 7, 2010 GTA San Andreas has 254 COL files in IMG archives limit. It means, that game searches COL files in all loaded IMG archives. In unmodified game there are 251 COL files (216 in gta3.img + 35 in gta_int.img) Until we`ll break this limit, we are able to add maximum 3 new COL files. When we add 4 COL files, game will crashes at 50% loading. For noobs: this is sh*tty limit, causing e.g that you can`t install multiple maps including COL files. I`ve tried SA EXE Limit Adjuster by Alexander and SA Limit Adjuster (changed and unhashed Colission values of course), but nothing helped to break this limit. Did someone try to break this limit? Or someone has proper solution (must be tested) ? Gramps 1 Link to comment Share on other sites More sharing options...
Gramps Posted January 8, 2014 Share Posted January 8, 2014 Sorry for the bump on this, but does anyone have a solution? None of the Limit Adjuster's seem to help. Currently, my game crashes @ 50% load screen, but I've only added one .col file to a new .img. I have added 15 seperate collisions in this one .col for new objects I've added to the game, and all works fine. But when I try to add the 16th one (using the same method I successfully added the other 15); game crashes during 50% of load screen. I also tried adding this 16th collision to 2nd .col file, and I get the same thing. Any ideas? Link to comment Share on other sites More sharing options...
fastman92 Posted January 8, 2014 Author Share Posted January 8, 2014 (edited) Sorry for the bump on this, but does anyone have a solution? None of the Limit Adjuster's seem to help. Currently, my game crashes @ 50% load screen, but I've only added one .col file to a new .img. I have added 15 seperate collisions in this one .col for new objects I've added to the game, and all works fine. But when I try to add the 16th one (using the same method I successfully added the other 15); game crashes during 50% of load screen. I also tried adding this 16th collision to 2nd .col file, and I get the same thing. Any ideas? You can bump any of my topic. Read this post: "25000 - 25254 (255) - COL collision archives." http://gtaforums.com/topic/504006-rel-carcolsdat-unlim/?p=1061221494 It won't be easily possible to hack this limit if possible at all. Edited January 9, 2014 by fastman92 Link to comment Share on other sites More sharing options...
Gramps Posted January 8, 2014 Share Posted January 8, 2014 In unmodified game there are 251 COL files (216 in gta3.img + 35 in gta_int.img) Until we`ll break this limit, we are able to add maximum 3 new COL files. When we add 4 COL files, game will crashes at 50% loading. I've only added one .COL to my game though, that's what I don't understand. The ID's are free according to your generator as well. Is there a limit on the number of collisions allowed in an archive (.col)? Link to comment Share on other sites More sharing options...
fastman92 Posted January 8, 2014 Author Share Posted January 8, 2014 Sorry, i can't respond to the question about limit of collisions in an archive. I never had a deal with reverse engineering COL loading functions. Link to comment Share on other sites More sharing options...
Link2012 Posted January 9, 2014 Share Posted January 9, 2014 (edited) The only thing that looks like a problem (a big problem) is the number of COL slots in the model info array. As fastman92 said COL ids range from 25000 to 25254 in the model info array, after that, comes the streamed IPLs indices... Edited January 9, 2014 by LINK/2012 Link to comment Share on other sites More sharing options...
HackMan128 Posted January 10, 2014 Share Posted January 10, 2014 (edited) But can we load COL files from GTA.DAT? There is limit too? Edited January 10, 2014 by HackMan128 Link to comment Share on other sites More sharing options...
fastman92 Posted April 8, 2015 Author Share Posted April 8, 2015 (edited) There's no limit. COL files from directories on HDD will be read to memory and will never be unloaded, they won't be streamed. Collision file ID in CColModel will be zero - "generic" slot. 4 years after this topic was created I found a solution to increase the limit of number of COL files - use this: http://gtaforums.com/topic/733982-relvcsaiv-fastman92-limit-adjuster/ But can we load COL files from GTA.DAT? There is limit too? Edited April 8, 2015 by fastman92 Link to comment Share on other sites More sharing options...
Link2012 Posted April 8, 2015 Share Posted April 8, 2015 (edited) tho gta_sa's COLFILE dat entry is broken, modloader fixes it. Edited April 8, 2015 by LINK/2012 Link to comment Share on other sites More sharing options...
The_GTA Posted April 8, 2015 Share Posted April 8, 2015 I'd say that a proper way to do it is to create special loading channels for COL and IPL, so they can be 'unlimited'. Link to comment Share on other sites More sharing options...
fastman92 Posted April 8, 2015 Author Share Posted April 8, 2015 Can you explain your reply further? Why it's broken? tho gta_sa's COLFILE is broken, modloader fixes it. Link to comment Share on other sites More sharing options...
Link2012 Posted April 8, 2015 Share Posted April 8, 2015 @0x5B4F21 if ( v5->m_pColModel ) { v4 = v5->m_pColModel; } else { v7 = ColModelPool__allocate(); v12 = 0; if ( v7 ) v8 = CColModel::CColModel((CColModel *)v7); else v8 = 0; v12 = -1; CBaseModelInfo::SetColModel(v6, v8, 1); } if ( v3 ) { if ( v3 == 1 ) { CFileLoader::LoadCollisionModelVer2(&colfileReadBuffer, buf.dataSize - 24, v4); }[...] Notice that LoadCollisionModelVer2 (Ver1 and Ver3 calls too) receives v4 as the CColModel pointer but the else block that allocates a generic colmodel doesn't set v4 to the recently allocated object instead it receives garbage. This is a issue only for cols to models without a preallocated colmodel, weapons work because they have a preallocated colmodel. Buildings doesn't. By the way, there's a very low limit for the collision models in the COLFILE loading, modloader also takes care of this issue. Link to comment Share on other sites More sharing options...
fastman92 Posted April 8, 2015 Author Share Posted April 8, 2015 (edited) Thank you for the explanation. So the problem is caused by missing v5->m_pColModel = v4; And your ModLoader adds this code. Edited April 8, 2015 by fastman92 Link to comment Share on other sites More sharing options...
Wesser Posted April 9, 2015 Share Posted April 9, 2015 No, the newly allocated ColModel is saved by CBaseModelInfo::SetColModel (0x004C4BC0) but not stored into v4. There's a missing mov edi, eax at 0x005B4F51. 012 345 678 9A BCD EFG HIJK LMN OPQR STUV WX YZ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now