##---------------------------------------------------
## 1991 Honda CR-X
## Replacement for Audi A4 3.2
## Attributes.bin patch script
##---------------------------------------------------

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


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

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

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

## engineaudio[0]
patch	int32	bin:0x2fb54	0x35630a57

## engineaudio[1]
patch	int32	bin:0x2fb60	0x35630a57

## engineaudio[2]
patch	int32	bin:0x2fb6c	0x35630a57

## 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:0x2f970	1
patch	float	bin:0x2f974	2
patch	float	bin:0x2f978	1
patch	float	bin:0x2f97c	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:0x2f9c8	39
patch	float	bin:0x2f9cc	100

## brakes_upgrades
patch	int32	bin:0x2f9a4	4

## induction_upgrades
patch	int32	bin:0x2f9b4	3

## tires_upgrades
patch	int32	bin:0x2f9ac	3

## engine_upgrades
patch	int32	bin:0x2f998	4

## transmission_upgrades
patch	int32	bin:0x2f99c	4

## nos_upgrades
patch	int32	bin:0x2f9a0	3

## chassis_upgrades
patch	int32	bin:0x2f9b8	3


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

## 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:0x3f6b0	1.078
patch	float	bin:0x3f6b4	0.808
patch	float	bin:0x3f6b8	0
patch	float	bin:0x3f6bc	0.32

## front right
patch	float	bin:0x3f6c0	1.078
patch	float	bin:0x3f6c4	-0.808
patch	float	bin:0x3f6c8	0
patch	float	bin:0x3f6cc	0.32

## rear right
patch	float	bin:0x3f6d0	-1.191
patch	float	bin:0x3f6d4	-0.808
patch	float	bin:0x3f6d8	0
patch	float	bin:0x3f6dc	0.32

## rear left
patch	float	bin:0x3f6e0	-1.191
patch	float	bin:0x3f6e4	0.808
patch	float	bin:0x3f6e8	0
patch	float	bin:0x3f6ec	0.32

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

## ReflectionOffset
patch	float	bin:0x3f794	0

## 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:0x3f7a8	0
patch	int8	bin:0x3f7a9	0
patch	int8	bin:0x3f7aa	0
patch	int8	bin:0x3f7ab	0
patch	int8	bin:0x3f7ac	0
patch	int8	bin:0x3f7ad	0

## 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:0x3f7b6	0
patch	int8	bin:0x3f7b7	0
patch	int8	bin:0x3f7b8	0
patch	int8	bin:0x3f7b9	0
patch	int8	bin:0x3f7ba	0
patch	int8	bin:0x3f7bb	0

##---------------------------------------------------
## Node: engine/default/a4
##---------------------------------------------------

## 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:0x13734	0.7
patch	float	bin:0x13738	0.8
patch	float	bin:0x1373c	0.9

## 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:0x1374c	800

## TORQUE; self-explanatory; up to 15 torque values can be used but element count needs to be declared first
## common value range N/A since it differs per car
patch	float	bin:0x136f8	85
patch	float	bin:0x136fc	110
patch	float	bin:0x13700	141
patch	float	bin:0x13704	170
patch	float	bin:0x13708	170
patch	float	bin:0x1370c	155
patch	float	bin:0x13710	145
patch	float	bin:0x13714	135
patch	float	bin:0x13718	125

## 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:0x13744	7500

## 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:0x13740	9

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


##---------------------------------------------------
## Node: engine/default/a4/a4_top
##---------------------------------------------------

## ENGINE_BRAKING
patch	float	bin:0x13af4	0.7
patch	float	bin:0x13af8	0.8
patch	float	bin:0x13afc	0.89

## IDLE
patch	float	bin:0x13b0c	800

## TORQUE
patch	float	bin:0x13ab8	202
patch	float	bin:0x13abc	329
patch	float	bin:0x13ac0	500
patch	float	bin:0x13ac4	598
patch	float	bin:0x13ac8	550
patch	float	bin:0x13acc	495
patch	float	bin:0x13ad0	457
patch	float	bin:0x13ad4	424
patch	float	bin:0x13ad8	391

## MAX_RPM
patch	float	bin:0x13b04	7500

## FLYWHEEL_MASS
patch	float	bin:0x13b00	8

## RED_LINE
patch	float	bin:0x13b08	6500


##---------------------------------------------------
## Node: induction/default/a4_base
##---------------------------------------------------

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

## HIGH_BOOST
patch	float	bin:0x11e4c	0.1

## LOW_BOOST
patch	float	bin:0x11e34	0.1

## PSI_ARROW_MOVE_SPEED*; always higher value for stock
patch	float	bin:0x11e44	2.2

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

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

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


##---------------------------------------------------
## Node: induction/default/a4_base/a4_top
##---------------------------------------------------

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

## HIGH_BOOST
patch	float	bin:0x120d0	0.25

## LOW_BOOST
patch	float	bin:0x120b8	0.2

## PSI_ARROW_MOVE_SPEED*; always higher value for stock
patch	float	bin:0x120c8	2

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

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

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

##---------------------------------------------------
## Node: transmission/default/a4
##---------------------------------------------------

## 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:0x1eeea	7

## GEAR_RATIO; drivetrain power transfer ratios
## common value range N/A since it differs per car
patch	float	bin:0x1eef0	3.153
patch	float	bin:0x1eef4	0
patch	float	bin:0x1eef8	3.25
patch	float	bin:0x1eefc	1.894
patch	float	bin:0x1ef00	1.256
patch	float	bin:0x1ef04	0.937
patch	float	bin:0x1ef08	0.771
patch	float	bin:0x1ef0c	0

## 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 if FWD or RWD; 3x0.60-3x0.80 if AWD
patch	float	bin:0x1ef1c	0.75
patch	float	bin:0x1ef20	0.75
patch	float	bin:0x1ef24	0

## 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:0x1ef30	1
patch	float	bin:0x1ef34	1
patch	float	bin:0x1ef38	1
patch	float	bin:0x1ef3c	1
patch	float	bin:0x1ef40	1
patch	float	bin:0x1ef44	1
patch	float	bin:0x1ef48	1
patch	float	bin:0x1ef4c	1
patch	float	bin:0x1ef50	1

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

## 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:0x1ef58	1

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

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

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


##---------------------------------------------------
## Node: transmission/default/a4/a4_top
##---------------------------------------------------

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

## GEAR_RATIO
patch	float	bin:0x1f520	2.6
patch	float	bin:0x1f524	0
patch	float	bin:0x1f528	3.25
patch	float	bin:0x1f52c	1.650
patch	float	bin:0x1f530	1.033
patch	float	bin:0x1f534	0.823
patch	float	bin:0x1f538	0.7
patch	float	bin:0x1f53c	0.624

## DIFFERENTIAL
patch	float	bin:0x1f54c	0.7
patch	float	bin:0x1f550	0.7
patch	float	bin:0x1f554	0

## GEAR_EFFICIENCY
patch	float	bin:0x1f560	1
patch	float	bin:0x1f564	1
patch	float	bin:0x1f568	1
patch	float	bin:0x1f56c	1
patch	float	bin:0x1f570	1
patch	float	bin:0x1f574	1
patch	float	bin:0x1f578	1
patch	float	bin:0x1f57c	1
patch	float	bin:0x1f580	1

## TORQUE_CONVERTER
patch	float	bin:0x1f584	0.6

## TORQUE_SPLIT
patch	float	bin:0x1f588	1

## CLUTCH_SLIP
patch	float	bin:0x1f58c	0.8

## SHIFT_SPEED
patch	float	bin:0x1f594	0.25

## FINAL_GEAR
patch	float	bin:0x1f598	2.5
