Quantcast

Jump to content

» «
Photo

GTA San Andreas 254 COL files limit

13 replies to this topic
fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#1

Posted 07 August 2010 - 05:15 PM

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 likes this

Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#2

Posted 08 January 2014 - 07:31 AM

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?


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#3

Posted 08 January 2014 - 03:22 PM Edited by fastman92, 09 January 2014 - 05:53 PM.

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...m/?p=1061221494

It won't be easily possible to hack this limit if possible at all.

Gramps
  • Gramps

    ★★★★★

  • GTA Mods Staff
  • Joined: 23 May 2008
  • New-Zealand
  • Helpfulness Award
    Contribution Award [Mods]

#4

Posted 08 January 2014 - 07:35 PM

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)?


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#5

Posted 08 January 2014 - 08:14 PM

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/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#6

Posted 09 January 2014 - 06:10 AM Edited by LINK/2012, 09 January 2014 - 06:10 AM.

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...

HM128
  • HM128

    alovelyday

  • Feroci
  • Joined: 09 Jul 2006
  • None
  • Best Map 2013 "ViceCityStories PC Edition"

#7

Posted 10 January 2014 - 12:55 AM Edited by HackMan128, 10 January 2014 - 12:56 AM.

But can we load COL files from GTA.DAT?

There is limit too?


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#8

Posted 08 April 2015 - 06:45 PM Edited by fastman92, 08 April 2015 - 06:45 PM.

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...limit-adjuster/

But can we load COL files from GTA.DAT?

There is limit too?


LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#9

Posted 08 April 2015 - 06:55 PM Edited by LINK/2012, 08 April 2015 - 06:57 PM.

tho gta_sa's COLFILE dat entry is broken, modloader fixes it.


The_GTA
  • The_GTA

    revenclaw

  • Members
  • Joined: 27 Dec 2012
  • Germany

#10

Posted 08 April 2015 - 06:56 PM

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'.

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#11

Posted 08 April 2015 - 06:57 PM

Can you explain your reply further? Why it's broken?

tho gta_sa's COLFILE is broken, modloader fixes it.


LINK/2012
  • LINK/2012

    LIVIN' IN CODE

  • Feroci
  • Joined: 30 Jan 2011
  • Brazil
  • Best Tool 2014 [Mod Loader]
    Contribution Award [Mods]

#12

Posted 08 April 2015 - 07:03 PM

@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.


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None
  • Contribution Award [Mods]

#13

Posted 08 April 2015 - 07:26 PM Edited by fastman92, 08 April 2015 - 07:27 PM.

Thank you for the explanation.

 

So the problem is caused by missing

v5->m_pColModel = v4;

And your ModLoader adds this code.


Wesser
  • Wesser

    The complexity simplifier, the efficiency optimizer.

  • Feroci
  • Joined: 19 Aug 2006
  • Unknown
  • Contribution Award [Mods]

#14

Posted 09 April 2015 - 10:07 AM

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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users