##---------------------------------------------------
## BMW M3 GTR(E46) ALMS
## Replacement for Lotus Elise
## Attributes.bin patch script
##---------------------------------------------------

memfile GLOBAL\GlobalMemoryFile.bin
vpak GLOBAL\ATTRIBUTES.BIN db


##---------------------------------------------------
## Node: pvehicle/default/cars/racers/elise
##---------------------------------------------------

## TurboSND[0]
patch	int32	bin:0x2fc0c	0x2b16df5d # TURBO_EXOTIC_2_MB

## TurboSND[1]
patch	int32	bin:0x2fc1c	0x0ae4739d # TURBO_LRG_1_MB

## TurboSND[2]
patch	int32	bin:0x2fc2c	0x572af7ce # TURBO_SC_GENERIC_MB

## VerbalType; copspeech related; code determines what cops will call your car
## PATCH LENGTH ADDRESS, NOT DATA
patch	int32	bin:0x2fbc0	0x80000000 # skipped

## MASS; self-explanatory; mass of car expressed in kilograms
patch	float	bin:0x2fbb8	1219

## engineaudio[0]
patch	int32	bin:0x2fd24	0x799fb9ea

## engineaudio[1]
patch	int32	bin:0x2fd30	0x799fb9ea

## TENSOR_SCALE; seems to be overall handling speed scale balancing
## the bigger 2nd value is the slower the car will respond to steering input
## countered by increasing of 1st and 3rd value
patch	float	bin:0x2fb80	1
patch	float	bin:0x2fb84	2.2
patch	float	bin:0x2fb88	1
patch	float	bin:0x2fb8c	0

## HandlingRating; used to set min and max handling bars length; doesn't take effect from base or end grip values but its increase is dependent
## on chassis and tires values
## values range from 37-98 for 1st set and 90-100 for 2nd set
patch	float	bin:0x2fbf8	87
patch	float	bin:0x2fbfc	94




##---------------------------------------------------
## Node: ecar/default/racers/elise
##---------------------------------------------------

## BodyDive; maximum vector-based movement of front of car body
1st - Degrees/G
2nd - Max G
3rd - Degrees/sec
patch	float	bin:0x3d128	1.25
patch	float	bin:0x3d12c	1
patch	float	bin:0x3d130	8

## RideHeight; in-race only; visible body height
patch	float	bin:0x3d16c	0.8

## TireOffsets
## in format x, y, z, w
## x axis; car front = +; car rear = -
## y axis; left side = +; right = -
## z axis; up = +; down = - note: will move WHEELS [up or down] regarding CAR BODY, during race body will be on normal level
## unlike wheels that might be BELOW ground
## w - wheel diameter scaling; default game values range between 0.31 [elise] and 0.35 [mustanggt]
## NOTE: CAR BODY height will be changed to match wheel size
## all axles have point 0 in center of line between front left and rear right wheel or between front right and rear left

## front left
patch	float	bin:0x3d080	1.35
patch	float	bin:0x3d084	0.93
patch	float	bin:0x3d088	0
patch	float	bin:0x3d08c	0.335

## front right
patch	float	bin:0x3d090	1.35
patch	float	bin:0x3d094	-0.93
patch	float	bin:0x3d098	0
patch	float	bin:0x3d09c	0.335

## rear right
patch	float	bin:0x3d0a0	-1.35
patch	float	bin:0x3d0a4	-0.94
patch	float	bin:0x3d0a8	0
patch	float	bin:0x3d0ac	0.35

## rear left
patch	float	bin:0x3d0b0	-1.35
patch	float	bin:0x3d0b4	0.94
patch	float	bin:0x3d0b8	0
patch	float	bin:0x3d0bc	0.350

## BodySquat; maximum vector-based movement of rear of car body
1st - Degrees/G
2nd - Max G
3rd - Degrees/sec
patch	float	bin:0x3d11c	1.25
patch	float	bin:0x3d120	1
patch	float	bin:0x3d124	8

## CamberRear; angle between the vertical axis of the wheel and the vertical axis of the vehicle
## positive values for bottom of wheel being further out than top, negative for opposite effect
## common value is 0.18
patch	float	bin:0x3d168	0.14

## CamberFront; angle between the vertical axis of the wheel and the vertical axis of the vehicle
## positive values for bottom of wheel being further out than top, negative for opposite effect
## common value is 0.22
patch	float	bin:0x3d160	0.30

## FECompressions; used to adjust height of car body regarding wheels in frontend menus
## common value range is 2x0.10-2x0.20
patch	float	bin:0x3d198	0.15
patch	float	bin:0x3d19c	0.15

## TireSkidWidth; aka tire width
## common value range is 2x0.225 for front wheels and 2x0.335 for rear wheels
patch	float	bin:0x3d14c	0.255
patch	float	bin:0x3d150	0.255
patch	float	bin:0x3d154	0.345
patch	float	bin:0x3d158	0.345

## WheelSpokeCount; number of spokes in rims
## common value range N/A since it differs per car
patch	int8	bin:0x3d18c	5

## ReflectionOffset
patch	float	bin:0x3d164	-0.06

## KitWheelOffsetRear; used to move wheels along axis Y when bodykits are used
## values range from 0 to 128; applies to REAR axle
patch	int8	bin:0x3d178	0
patch	int8	bin:0x3d179	0
patch	int8	bin:0x3d17a	0
patch	int8	bin:0x3d17b	0
patch	int8	bin:0x3d17c	0
patch	int8	bin:0x3d17d	0

## BodyRoll; maximum vector-based movement of entire car body towards left or right
## simply put - car body leaning sideways
1st - Degrees/G
2nd - Max G
3rd - Degrees/sec
patch	float	bin:0x3d110	1.35
patch	float	bin:0x3d114	1
patch	float	bin:0x3d118	6

## KitWheelOffsetFront; used to move wheels along axis Y when bodykits are used
## values range from 0 to 128; applies to FRONT axle
patch	int8	bin:0x3d186	0
patch	int8	bin:0x3d187	0
patch	int8	bin:0x3d188	0
patch	int8	bin:0x3d189	0
patch	int8	bin:0x3d18a	0
patch	int8	bin:0x3d18b	0


##---------------------------------------------------
## Node: brakes/default/elise
##---------------------------------------------------

## BRAKES; overall braking power per axle
## common value range is 300/400-650/700; mass dependent
patch	float	bin:0x2440c	365
patch	float	bin:0x24410	400

## EBRAKE; handbrake power; should be larger than BRAKES value by at least 10% and larger than overall car horsepower
## common value range is 400-800; mass dependent
patch	float	bin:0x24414	320

## BRAKE_LOCK; BRAKES field values multiplier and braking force distribution ratio
## common value range is 1.00 for front axle and 3.20-3.60 for rear axle
patch	float	bin:0x24404	0.60
patch	float	bin:0x24408	1.15


##---------------------------------------------------
## Node: brakes/default/elise/elise_top
##---------------------------------------------------

## BRAKES
patch	float	bin:0x247e0	390
patch	float	bin:0x247e4	435

## EBRAKE
patch	float	bin:0x247e8	360

## BRAKE_LOCK
patch	float	bin:0x247d8	0.75
patch	float	bin:0x247dc	1.00


##---------------------------------------------------
## Node: chassis/default/elise
##---------------------------------------------------

## WHEEL_BASE; distance between the centers of the front and rear wheels
## common value range N/A since it differs per car
patch	float	bin:0x860c	2.800

## DRAG_COEFFICIENT; air resistance of object travelling in a non-vacuum environment such as air
## common value range is 0.25-0.42
patch	float	bin:0x8628	0.415

## SHOCK_VALVING; shock absorber oil flow restriction
## common value range is 2x15-2x24
patch	float	bin:0x85f8	24
patch	float	bin:0x85fc	24

## RIDE_HEIGHT; aka ground clearance
## common value range is 2x6-2x9
patch	float	bin:0x85d0	8
patch	float	bin:0x85d4	8

## SHOCK_STIFFNESS; minimum pressure inside shock absorber in pounds per square inch
## common value range is 2x30-2x80; acceleration and mass-dependent
patch	float	bin:0x85e8	60
patch	float	bin:0x85ec	60

## SHOCK_BLOWOUT; maximum size by which a dampener can compress in inches; stock same as upgraded
## common value range is 5-8
patch	float	bin:0x8610	5

## SHOCK_EXT_STIFFNESS; maximum shock absorber rebound force
## common value range is 2x40-2x80; acceleration-, downforce- and mass-dependent
patch	float	bin:0x85e0	65
patch	float	bin:0x85e4	65

## SWAYBAR_STIFFNESS; self-explanatory; probably expressed in pounds per square inch
## common value range is 2x200-2x450; acceleration and mass dependent
patch	float	bin:0x8600	280
patch	float	bin:0x8604	280

## ROLL_CENTER; vertical center of gravity [probably in inches]
## common value range is 8-10
patch	float	bin:0x8608	8

## TRAVEL; maximum length by which a shock can be extended if car wheels don't have contact with road surface; stock commonly higher than upgraded
## common value range is 2x6-2x8; acceleration and mass dependent
patch	float	bin:0x85c8	7
patch	float	bin:0x85cc	7

## SPRING_STIFFNESS; overall coilover pressure in pounds square inch
## common value range is 2x400-2x700
patch	float	bin:0x85f0	580
patch	float	bin:0x85f4	565

## AERO_CG; overall distribution of aerodynamic force on the car body; values between 0 and 100; 0 for max in rear, 100 for max in front
## common value range is 47-51
patch	float	bin:0x8614	48

## SPRING_PROGRESSION; maximum compression speed/rate for spring to achieve maximum stiffness; stock smaller than upgraded
## higher values will make springs stiffer faster so car won't shove ground on slopes but will also increase bouncing on curbs
## common value range is 2x5-2x8
patch	float	bin:0x85c0	7.75
patch	float	bin:0x85c4	7.75

## TRACK_WIDTH; axle length; distance between wheels on a single axle; measured in metres
## common value range N/A since it differs per car
patch	float	bin:0x85d8	1.612
patch	float	bin:0x85dc	1.600

## SHOCK_DIGRESSION; digressive shocks provide smoother ride at higher speeds and absorb body roll also improving cornering; smaller value for smoother ride
## common value range is 2x0.1-2x0.5
patch	float	bin:0x85b8	0.175
patch	float	bin:0x85bc	0.175

## RENDER_MOTION; dependent on ecar node settings in body roll, dive and squat; used as a multiplier of the mentioned values to calculate car body movement
## common value range is 0.50-1.00
patch	float	bin:0x8618	1.00

## AERO_COEFFICIENT; used to define car aerodynamics factor and overall downforce; value too small will make it slow and too high will push it down to
## ground too hard making it difficult to drive and car will be constantly hitting road due to excessive amount of downforce
## common value range is 0.15-0.30
patch	float	bin:0x8620	0.265

## FRONT_AXLE; front axle diameter in inches
## common value range is 1.2-1.5
patch	float	bin:0x861c	1.295

## FRONT_WEIGHT_BIAS; overall mass distribution; values from 0 to 100; 0 for max rear bias; 100 for max front bias
## common value range is 51-55
patch	float	bin:0x8624	48.70


##---------------------------------------------------
## Node: chassis/default/elise/elise_top
##---------------------------------------------------

## WHEEL_BASE
patch	float	bin:0xa964	2.800

## DRAG_COEFFICIENT
patch	float	bin:0xa980	0.420

## SHOCK_VALVING
patch	float	bin:0xa950	28
patch	float	bin:0xa954	28

## RIDE_HEIGHT
patch	float	bin:0xa928	7.80
patch	float	bin:0xa92c	7.80

## SHOCK_STIFFNESS
patch	float	bin:0xa940	62
patch	float	bin:0xa944	62

## SHOCK_BLOWOUT
patch	float	bin:0xa968	5

## SHOCK_EXT_STIFFNESS
patch	float	bin:0xa938	67
patch	float	bin:0xa93c	67

## SWAYBAR_STIFFNESS
patch	float	bin:0xa958	250
patch	float	bin:0xa95c	250

## ROLL_CENTER
patch	float	bin:0xa960	7.85

## TRAVEL
patch	float	bin:0xa920	6.50
patch	float	bin:0xa924	6.50

## SPRING_STIFFNESS
patch	float	bin:0xa948	615
patch	float	bin:0xa94c	605

## AERO_CG
patch	float	bin:0xa96c	47.75

## SPRING_PROGRESSION
patch	float	bin:0xa918	8
patch	float	bin:0xa91c	8

## TRACK_WIDTH
patch	float	bin:0xa930	1.612
patch	float	bin:0xa934	1.600

## SHOCK_DIGRESSION
patch	float	bin:0xa910	0.150
patch	float	bin:0xa914	0.150

## RENDER_MOTION
patch	float	bin:0xa970	0.80

## AERO_COEFFICIENT
patch	float	bin:0xa978	0.285

## FRONT_AXLE
patch	float	bin:0xa974	1.295

## FRONT_WEIGHT_BIAS
patch	float	bin:0xa97c	49.00


##---------------------------------------------------
## Node: engine/default/elise
##---------------------------------------------------

## ENGINE_BRAKING; multiplies maximum torque at current gear and uses it to calculate speed loss with no throttle used
## common value range is 0.70-0.90
patch	float	bin:0x13254	0.72
patch	float	bin:0x13258	0.80
patch	float	bin:0x1325c	0.87

## IDLE; minimum operating speed of engine necessary to sustain its work but not enough to move drivetrain components
## common value range is 800-950
patch	float	bin:0x1326c	950

## TORQUE; self-explanatory; field count suggest game used to support up to 15 torque values; can only use 9 now
## common value range N/A since it differs per car
patch	float	bin:0x13218	160
patch	float	bin:0x1321c	200
patch	float	bin:0x13220	275
patch	float	bin:0x13224	380
patch	float	bin:0x13228	530
patch	float	bin:0x1322c	620
patch	float	bin:0x13230	600
patch	float	bin:0x13234	500
patch	float	bin:0x13238	415

## MAX_RPM; maximum operating speed of engine before its destruction [drag racing only]
## common value range N/A since it differs per car
patch	float	bin:0x13264	8200

## FLYWHEEL_MASS; the higher the mass, the higher the maximum inertia moment and therefore larger amounts of kinetic energy can be stored
## also the lower the mass, the faster the top speed can be achieved and maintained
## common value range is 9-15
patch	float	bin:0x13260	14

## RED_LINE; maximum safe operating speed of engine
## common value range N/A since it differs per car
patch	float	bin:0x13268	7200


##---------------------------------------------------
## Node: engine/default/elise/elise_top
##---------------------------------------------------

## ENGINE_BRAKING
patch	float	bin:0x145d4	0.74
patch	float	bin:0x145d8	0.81
patch	float	bin:0x145dc	0.87

## IDLE
patch	float	bin:0x145ec	950

## TORQUE
patch	float	bin:0x14598	160
patch	float	bin:0x1459c	200
patch	float	bin:0x145a0	275
patch	float	bin:0x145a4	380
patch	float	bin:0x145a8	530
patch	float	bin:0x145ac	620
patch	float	bin:0x145b0	600
patch	float	bin:0x145b4	500
patch	float	bin:0x145b8	415

## MAX_RPM
patch	float	bin:0x145e4	8200

## FLYWHEEL_MASS
patch	float	bin:0x145e0	12

## RED_LINE
patch	float	bin:0x145e8	7200


##---------------------------------------------------
## Node: induction/default/elise_base
##---------------------------------------------------

## AIR_PRESSURE*; commonly 0.25
patch	float	bin:0x11c94	0.25

## HIGH_BOOST
patch	float	bin:0x11ca8	0.100

## LOW_BOOST
patch	float	bin:0x11c90	0.075

## PSI_ARROW_MOVE_SPEED*; always higher value for stock
patch	float	bin:0x11ca0	1.60

## PSI; maximum pressure of air taken into the turbine
## common value range is 12-15
patch	float	bin:0x11ca4	24

## SPOOL; turbine lag; 0 for 'supercharger'; anything higher will give 'turbo' upgrade
## common value range is 0.00-0.20
patch	float	bin:0x11c9c	0.20

## BOOST_VARIANCE*; pressure drop/rise in chamber
patch	float	bin:0x11c98	-0.125


##---------------------------------------------------
## Node: induction/default/elise_base/elise_top
##---------------------------------------------------

## AIR_PRESSURE*; commonly 0.25
patch	float	bin:0x12164	0.25

## HIGH_BOOST
patch	float	bin:0x12178	0.100

## LOW_BOOST
patch	float	bin:0x12160	0.075

## PSI_ARROW_MOVE_SPEED*; always higher value for stock
patch	float	bin:0x12170	1.45

## PSI; maximum pressure of air taken into the turbine
## common value range is 12-15
patch	float	bin:0x12174	24

## SPOOL; turbine lag; 0 for 'supercharger'; anything higher will give 'turbo' upgrade
## common value range is 0.00-0.20
patch	float	bin:0x1216c	0.175

## BOOST_VARIANCE*; pressure drop/rise in chamber
patch	float	bin:0x12168	-0.100


##---------------------------------------------------
## Node: tires/default/elise
##---------------------------------------------------

## SECTION_WIDTH; self-explanatory; measured in milimetres
## common value range N/A since it differs per car
patch	float	bin:0x227d0	255
patch	float	bin:0x227d4	345

## YAW_CONTROL; equivalent of section-based traction and stability control system; values 1 and 2 for front; values 3 and 4 for rear
## effect similar to dynamic mass bias shifting; highly dependent on WEIGHT_BIAS, AERO_CG, TORQUE_SPLIT and DYNAMIC/STATIC_GRIP values
## common value range N/A since it differs per car; mass and acceleration dependent
patch	float	bin:0x22798	0.375
patch	float	bin:0x2279c	0.375
patch	float	bin:0x227a0	0.350
patch	float	bin:0x227a4	0.350

## DYNAMIC_GRIP; amount of friction the tires produce when traction is broken, ie when the car is sliding or in a burnout
## common value range N/A since it differs per car; mass and acceleration dependent
patch	float	bin:0x227b0	1.50
patch	float	bin:0x227b4	1.48

## RIM_SIZE; self-explanatory; measured in inches
## common value range is 2x16-2x19
patch	float	bin:0x227c0	20
patch	float	bin:0x227c4	20

## YAW_SPEED; self-explanatory; rate at which car enters yaw state
## common value range is 0.30-0.70
patch	float	bin:0x227dc	0.310

## ASPECT_RATIO; self-explanatory; ratio of section height to section width
## common value range is 2x30-2x55
patch	float	bin:0x227b8	30
patch	float	bin:0x227bc	30

## STATIC_GRIP; static grip is the amount of friction the tires are able to produce when they are not spinning, though they can be rolling
## common value range N/A since it differs per car; mass and acceleration dependent
patch	float	bin:0x227c8	1.75
patch	float	bin:0x227cc	1.73

## GRIP_SCALE; tire grip scaling per axle
## common value range is 2x1.00-2x1.10
patch	float	bin:0x227a8	1.00
patch	float	bin:0x227ac	1.00

## STEERING; steering ratio; value of 1.00 means that turning steering wheel by 360 degrees will turn wheels by 36 degrees
## common value range is 0.90-1.10
patch	float	bin:0x227d8	1.00


##---------------------------------------------------
## Node: tires/default/elise/elise_top
##---------------------------------------------------

## SECTION_WIDTH
patch	float	bin:0x23590	255
patch	float	bin:0x23594	345

## YAW_CONTROL
patch	float	bin:0x23558	0.350
patch	float	bin:0x2355c	0.350
patch	float	bin:0x23560	0.320
patch	float	bin:0x23564	0.320

## DYNAMIC_GRIP
patch	float	bin:0x23570	1.56
patch	float	bin:0x23574	1.54

## RIM_SIZE
patch	float	bin:0x23580	20
patch	float	bin:0x23584	20

## YAW_SPEED
patch	float	bin:0x2359c	0.315

## ASPECT_RATIO
patch	float	bin:0x23578	30
patch	float	bin:0x2357c	30

## STATIC_GRIP
patch	float	bin:0x23588	1.76
patch	float	bin:0x2358c	1.74

## GRIP_SCALE
patch	float	bin:0x23568	1.015
patch	float	bin:0x2356c	1.015

## STEERING
patch	float	bin:0x23598	0.98


##---------------------------------------------------
## Node: transmission/default/elise
##---------------------------------------------------

## GEAR_COUNT; 1st GEAR_RATIO offset -6; total amount of gears including reverse, neutral and forward gears
## maximum number of elements is 11 but only 10 are proven to cause no problems with car drivability
## common value range is 7-9
patch	int16	bin:0x1deee	8

## GEAR_RATIO; drivetrain power transfer ratios
## common value range N/A since it differs per car
patch	float	bin:0x1def4	3.350 # 3.200 # 95
patch	float	bin:0x1def8	0
patch	float	bin:0x1defc	2.980 # 2.610 # 106
patch	float	bin:0x1df00	1.955 # 1.710 # 161
patch	float	bin:0x1df04	1.405 # 1.230 # 224
patch	float	bin:0x1df08	1.076 # 0.940 # 293
patch	float	bin:0x1df0c	0.880 # 0.770 # 358
patch	float	bin:0x1df10	0.720 # 0.630 # 438
##patch	float	bin:0x1df14	

## DIFFERENTIAL; self-explanatory; differential bias; 0.00 for rear, 0.50 for mid and 1.00 for front
## setting towards front will lock the front wheels more, causing the car to be prone to oversteer; inverse effect if bias set towards rear
## common value range is 2x0.60-2x0.80; 3x0.60-3x0.80 if car is AWD
patch	float	bin:0x1df20	0.800
patch	float	bin:0x1df24	0.800
patch	float	bin:0x1df28	0.000

## GEAR_EFFICIENCY; overall power multiplier on current gear and rpm used to quickly change speed at each gear without any major reconfigurations
## common value set is 9x1.00
patch	float	bin:0x1df34	0.75
patch	float	bin:0x1df38	1.00
patch	float	bin:0x1df3c	1.00
patch	float	bin:0x1df40	1.00
patch	float	bin:0x1df44	1.00
patch	float	bin:0x1df48	1.00
patch	float	bin:0x1df4c	1.00
patch	float	bin:0x1df50	1.00
patch	float	bin:0x1df54	1.00

## TORQUE_CONVERTER; percentage ratio of torque converter efficiency with automatic transmission usage
## common value range is 0.20-0.80
patch	float	bin:0x1df58	0.475

## TORQUE_SPLIT; torque-to-axle transfer ratio; 0 for RWD, 0.5 for AWD and 1 for FWD
## common value range N/A since it differs per car
patch	float	bin:0x1df5c	0.00

## CLUTCH_SLIP; self-explanatory; manual gearbox efficiency ratio
## common value range is 0.70-0.90
patch	float	bin:0x1df60	0.725

## SHIFT_SPEED; shifting interval; stock [should be] higher than upgraded
## common value range is 0.10-0.25
patch	float	bin:0x1df68	0.275

## FINAL_GEAR; final gear ratio determining top speed
## common value range N/A since it differs per car
patch	float	bin:0x1df6c	3.08 # 3.52 # 438


##---------------------------------------------------
## Node: transmission/default/elise/elise_top
##---------------------------------------------------

## GEAR_COUNT; 1st GEAR_RATIO offset -6
patch	int16	bin:0x20072	8

## GEAR_RATIO
patch	float	bin:0x20078	3.200 # 3.300 # 95
patch	float	bin:0x2007c	0
patch	float	bin:0x20080	2.980 # 2.610 # 106
patch	float	bin:0x20084	1.955 # 1.710 # 161
patch	float	bin:0x20088	1.405 # 1.230 # 224
patch	float	bin:0x2008c	1.076 # 0.940 # 293
patch	float	bin:0x20090	0.880 # 0.770 # 358
patch	float	bin:0x20094	0.720 # 0.630 # 438
##patch	float	bin:0x20098	

## DIFFERENTIAL
patch	float	bin:0x200a4	0.775
patch	float	bin:0x200a8	0.775
patch	float	bin:0x200ac	0.000

## GEAR_EFFICIENCY
patch	float	bin:0x200b8	0.775
patch	float	bin:0x200bc	1.00
patch	float	bin:0x200c0	1.00
patch	float	bin:0x200c4	1.00
patch	float	bin:0x200c8	1.00
patch	float	bin:0x200cc	1.00
patch	float	bin:0x200d0	1.00
patch	float	bin:0x200d4	1.00
patch	float	bin:0x200d8	1.00

## TORQUE_CONVERTER
patch	float	bin:0x200dc	0.500

## TORQUE_SPLIT
patch	float	bin:0x200e0	0.00

## CLUTCH_SLIP
patch	float	bin:0x200e4	0.750

## SHIFT_SPEED
patch	float	bin:0x200ec	0.250

## FINAL_GEAR
patch	float	bin:0x200f0	3.08 # 3.52 # 438

