Quantcast

Jump to content

» «
Photo

[SA]Collision archives

12 replies to this topic
_DK
  • _DK

    Where I Know You From

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#1

Posted 18 April 2014 - 01:50 AM

We know R* used .col files to store few collision models there.
Do anyone have an idea how did they distribute these models through these files? Looks like each .col represents some part of the map or smth? Or maybe it even does not matter which models are united there? (dynamic.col and some other files as example).

Frank.s
  • Frank.s

    PingPang

  • Feroci Racing
  • Joined: 15 Apr 2008
  • None

#2

Posted 18 April 2014 - 05:49 PM Edited by Frank.s, 18 April 2014 - 05:51 PM.

Typically a .col will match the map district or map ide file and map col files have a _[number] incrementing from 1 upwards at the end of their name.

-
.ide files in \data\maps\LA\
.col files in gta3.img

-

dynamic.ide - dynamic.col
dynamic2.ide - dynamic2.col
LAe.ide - LAe_1.col LAe_2.col LAe_3.col LAe_4.col LAe_5.col
LAe2.ide - LAe2_1.col LAe2_2.col LAe2_3.col LAe2_4.col LAe2_5.col
LAhills.ide - LAhills_1.col LAhills_2.col LAhills_3.col LAhills_4.col LAhills_5.col LAhills_6.col

This method is used in the original GTASA map but I'm not sure if this method is totally required or if adding .col files using a different method causes issues or not.
  • _DK likes this

_CP_
  • _CP_

    Group: Vice City Stories team

  • Feroci Racing
  • Joined: 27 Dec 2007
  • Poland
  • Best Map 2013 "ViceCityStories PC Edition"

#3

Posted 18 April 2014 - 08:41 PM

Or maybe it even does not matter which models are united there? (dynamic.col and some other files as example).

 It doesn't matter, you can put any .col model file to any .col set (for example - .col model from LAe2 in vegasE.col set) and game will read it. It just help to organize .col's in one place.
  • _DK and MasterHK like this

NTAuthority
  • NTAuthority

    member_title

  • Feroci Racing
  • Joined: 09 Sep 2008
  • European-Union
  • Most Knowledgeable [Technology] 2013
    Best Map 2013 "ViceCityStories PC Edition"

#4

Posted 20 April 2014 - 06:29 PM

Or maybe it even does not matter which models are united there? (dynamic.col and some other files as example).

 It doesn't matter, you can put any .col model file to any .col set (for example - .col model from LAe2 in vegasE.col set) and game will read it. It just help to organize .col's in one place.
This will break the collision loading optimization, however -- during loading of collisions models get linked with collision files in a quad tree structure, and therefore will cause the collision file to be loaded needlessly.
  • _DK likes this

_DK
  • _DK

    Where I Know You From

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#5

Posted 26 April 2014 - 03:06 PM

Thank you for replying, I have another question.
What are the collision limits in SA? Are there triangles/vertices count limits?

goodidea82
  • goodidea82

    SA Modder

  • Members
  • Joined: 13 Jun 2013

#6

Posted 26 April 2014 - 05:19 PM

 

What are the collision limits in SA? Are there triangles/vertices count limits?

Not a definite answer, but take a look:

http://gtaforums.com...m/?p=1065259916

  • _DK likes this

_DK
  • _DK

    Where I Know You From

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#7

Posted 26 April 2014 - 06:42 PM

Ok, after some researching I found that my game crahes when I have a col model with 32k+ (unsigned short limit) vertices and same for faces (Possibly, this 'limit' is related to faces only). Models with 20k vertices/faces work just fine.

nWo51289
  • nWo51289

    Outcast

  • Feroci Racing
  • Joined: 26 Apr 2008
  • None

#8

Posted 01 May 2014 - 10:27 AM

Can anyone please elaborate on this 'collision loading optimization'? Guessing when game is loading it caches the cols? Even adding one small custom col (which works in game by the way in it's own col archive) to any of the default collision archives will break the game when starting a game (black screen before the Liberty City text appears), but game will load fine when loading a save.

 

Does SA have some sort of hard coded 'list' of archives that exists in gta3.img? Game also loads fine when using a clean main.scm. I've been in the past few days trying to find any small clue on the web to why adding a new col to any of the default col archives would just break this optimization? Same result happens when combining any of the default cols.


_DK
  • _DK

    Where I Know You From

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#9

Posted 02 May 2014 - 07:15 PM Edited by _DK, 02 May 2014 - 07:17 PM.

SA has 2 limits related to collisions - one is number of collision files (default 256), second is number of collision models (default 10500). Maybe try to increase them with limit adjuster.
And I don't think there's a limit per one .col file, I even had over than 1000 models inside it (it also had 16 mb in size) and it worked just fine.

nWo51289
  • nWo51289

    Outcast

  • Feroci Racing
  • Joined: 26 Apr 2008
  • None

#10

Posted 19 May 2014 - 07:05 AM

My game is slightly different at the moment, doesn't have any Binary IPLs  :lol:. Without them the game doesn't like combining collision archives for some reason, hopefully once I put them back it will be fine again. Trying to figure out why the game doesn't start up with collision archives combined and no binary ipls, disabling start_mission 0 makes the game start up with default main.scm but obviously game crashes a few seconds later, explains why a clean main.scm works fine.


_DK
  • _DK

    Where I Know You From

  • Feroci Racing
  • Joined: 12 Apr 2009
  • Ukraine

#11

Posted 20 May 2014 - 08:19 AM

If you can,
1) Install SALA and get the crashing address from MessageBox when game crashes
2) Install ML and see the crashing address in a log file.

nWo51289
  • nWo51289

    Outcast

  • Feroci Racing
  • Joined: 26 Apr 2008
  • None

#12

Posted 21 May 2014 - 09:00 AM

Game doesn't want to crash with any combine collisions (testing purposes I've combined only lae_1.col to lae_5.col into lae.col. The game doesn't even spawn the player on the map. I got a 0x015613C1 error once but I'm not sure if that was anything to do with this collision problem. Below is caused by putting a /// before mission_start 0. Don't think it's got anything to do with collisions and having no binary ipls. Thanks for looking.

GTA:SA Crashed, Debug Info Follows:



GTA Info:



Version: US 1.0

Last File Loaded: AUDIO\STREAMS\BEATS

Last Library Loaded: Kernel32.dll

Error: Unknown



Assembly Info:



Exception At Address: 0x00465FA1

Exception Code: 0xc0000005 (EXCEPTION_ACCESS_VIOLATION)



Registers:

EAX: 0xFFFFFFFF	EBX: 0x00000001

ECX: 0x00A90670	EDX: 0x00000000

ESI: 0x00A90670	EDI: 0x00000000

EBP: 0x00000000	ESP: 0x0028FD1C
GTA:SA Crashed, Debug Info Follows:



GTA Info:



Version: US 1.0

Last File Loaded: modloader\.data\cache\std-cleo\cache.bin

Last Library Loaded: Kernel32.dll

Error: Unknown



Assembly Info:



Exception At Address: 0x00465FA1

Exception Code: 0xc0000005 (EXCEPTION_ACCESS_VIOLATION)



Registers:

EAX: 0xFFFFFFFF	EBX: 0x00000001

ECX: 0x00A90670	EDX: 0x00000000

ESI: 0x00A90670	EDI: 0x00000000

EBP: 0x00000000	ESP: 0x0028FCBC

NTAuthority
  • NTAuthority

    member_title

  • Feroci Racing
  • Joined: 09 Sep 2008
  • European-Union
  • Most Knowledgeable [Technology] 2013
    Best Map 2013 "ViceCityStories PC Edition"

#13

Posted 23 May 2014 - 09:56 AM Edited by NTAuthority, 23 May 2014 - 09:56 AM.

0x465FA1 - handler for script command 0006, SET_LVAR_INT. Seeing the value of EDI, I'm assuming that this command wasn't passed an actual variable, but instead another parameter type in its place.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users