Talk:CARS (IDE Section)

From GTAMods Wiki
Revision as of 14:12, 30 July 2010 by Aschratt (talk | contribs)
Jump to navigation Jump to search

San Andreas format

Guess it is like this:

ID, modelName, textureName, type, handlingID, gxtKey, animation, vehicleClass, frequency, flags, comprules

types:

  • bmx
  • car
  • bike
  • quad
  • boat
  • train
  • plane
  • heli
  • mtruck
  • trailer

Flag range: 0001 to 0100, where 0x01 is an streamer flag (object does not stay in memory). 0x02 and 0x04 do only get used by vehicle #579 (Huntley).

Update: apparently the flags were previously known as "level". Vice City uses the values 6 and 7 for almost each vehicle, but sometimes it also uses 0.

For all classes except boat there are additional wheel information (since wheels are no longer located inside the wheel.dff file):

wheelFlags, scaleFront, scaleRear, wheelType

Wheel flag range: 0000 0001 to 0001 0000 (?), where almost all vehicles got all flags (-1). Some bikes use the following masks: 0001 0111 or 0001 0000. This is why I think flag 5 (= 0x10) is something like IgnoreModelScale. If this flag is enabled only the wheel model does not get scaled. Flag 0x08 could be IgnoreCollisionScale. If this flag is enabled collision models do not get scaled. I have no idea what the last 3 flags could be just as I am unsure if my thoughts here are correct!

Wheel flags are always -1 for cars. Changing it to 0 will disable scaling for the model, but not for the collision of the wheels. For bikes this is 16 or 23 and corresponds to the unknown value also used in Vice City.

Wheel types:

  • -1 – default
  • 0 – regular (Transfender)
  • 1 – sports (Wheels Arch Angles)
  • 2 – lowrider (Loco Low Co)

--Aschratt - oO 11:15, 30 July 2010 (UTC)

Bugs

Unsure how the game's internal parser works, but for some reason it is messy implemented and there are apparently no real regular expressions used. There are 3 "bugs" at the for the vehicles #585, #586 and #593 in the standart game:

585,	emperor		emperor, 	car, 		EMPEROR,	...
586,	wayfarer	wayfarer,	bike,		WAYFARER,	...
593,	dodo		dodo, 		plane, 		DODO,	 	...

There are missing commas right after the model name. For some reason the game does parse those lines, anyway. I got to test this, but if the game really uses whitespaces for seperating values R*'s parsers are messy implemented. Also this can be the reason for several crashes and bugs. --Aschratt - oO 14:12, 30 July 2010 (UTC)