The online racing simulator
.set files
(3 posts, started )
.set files
Sorry to dig this up form RSC forums but...


S2 .SET file specification.
---------------------------


TYPES :
=======

char : 1-byte ascii character
byte : 1-byte integer
word : 2-byte integer
float: 4-byte float


offsettypenumberdescription
--------------------------

000 char 6 SRSETT
006 byte 1 0
007 byte 1 Version byte (0.5P is 250)
008 byte 1 Unknown
009 byte 3 0
012 byte 1 Unknown (1 for some cars 0 for others)
013 byte 3 0
016 float 1 brakeStrength (Nm)
020 byte 1 rearWingAngle (degrees)
021 byte 1 frontWingAngle (degrees)
022 byte 2 0
024 byte 1 max steer lock (degrees)
025 byte 1 parallel steer(divide by 100 for decimal value)
026 byte 1 brakeBalance(divide by 100 for decimal value)
027 byte 1 0
028 byte 1 CentreDiffType (0=open, 1=viscous)
029 byte 1 CentreDiffViscous (Nms/rad)
030 byte 1 0
031 byte 1 CentreDiffTorqueSplit (divide by 100 for decimal value)
032 byte 2 0
034 word 1 gearFinal (0 to 65535 = 0.5 to 7.5)
036 word 1 gear1 (0 to 65535 = 0.5 to 7.5)
038 word 1 gear2 (0 to 65535 = 0.5 to 7.5)
040 word 1 gear3 (0 to 65535 = 0.5 to 7.5)
042 word 1 gear4 (0 to 65535 = 0.5 to 7.5)
044 word 1 gear5 (0 to 65535 = 0.5 to 7.5)
046 word 1 gear6 (0 to 65535 = 0.5 to 7.5)
048 byte 1 passengerByte (0x11001111 1=MaleF ; 2:FemF ; 4:MaleRL ; 8:FemRL ; 64:MaleRR ; 128: FemRR)
049 byte 1 carConfig (roof on LX4/6 and UF)
050 byte 2 0
052 float 1 rearTravel (strange value, relative to car model origin or something)
056 float 1 rearSpring (N/mm)
060 float 1 rearComp (N/mm)
064 float 1 rearRebound (N/mm)
068 float 1 rearAR (N/mm)
072 byte 4 0
076 byte 1 rearToe(0 to 18 = -0.9 to 0.9 deg)
077 byte 1 0
078 byte 1 rearTyreType (0:R1 , 1:R2 , 2:R3 , 3:R4, 4:Road Super , 5:Road Normal, 6:Hybrid, 7:Knobbly)
079 byte 1 0
080 byte 1 LR camberAdjust (0 to 90 = -4.5 to 4.5 deg)
081 byte 1 RR camberAdjust (0 to 90 = -4.5 to 4.5 deg)
082 byte 2 0
084 byte 1 rearDiffType (0=open, 1=locked, 2=viscous, 3=clutchpack)
085 byte 1 rearViscousLock (in Nms/Rad)
086 byte 1 rearPowerLock (in %)
087 byte 1 rearCoastLock (in %)
088 word 1 LR TyrePressure (kPa)
090 word 1 RR TyrePressure (kPa)
092 float 1 frontTravel (strange value, relative to car model origin or something)
096 float 1 frontSpring (N/mm)
100 float 1 frontComp (N/mm)
104 float 1 frontRebound (N/mm)
108 float 1 frontAR (N/mm)
112 byte 4 0
116 byte 1 frontToe(0 to 18 = -0.9 to 0.9 deg)
117 byte 1 Caster (10=1.0, 60=6.0)
118 byte 1 frontTyreType
119 byte 1 0
120 byte 1 LF camberAdjust (0 to 90 = -4.5 to 4.5 deg)
121 byte 1 RF camberAdjust (0 to 90 = -4.5 to 4.5 deg)
122 byte 2 0
124 byte 1 frontDiffType (0=open, 1=locked, 2=viscous, 3=clutchpack)
125 byte 1 frontViscousLock (in Nms/Rad)
126 byte 1 frontPowerLock (in %)
127 byte 1 frontCoastLock (in %)
128 word 1 LF TyrePressure (kPa)
130 word 1 RF TyrePressure (kPa)

In the middle of writing a class to load, update and save .set files and i was wondering how to properly convert the frontTravel and rearTravel to actual values ingame (rideHeight)

Any other ideas would be greatly appreciated. I am writing the class in C#. anybody who is interested in the source can plead with me ina PM

Oh and i would like to thank colcob for this stuff.
Glad to be of assistance.

Basically, there is an arbitrary model origin for each car, the height of which we'll call k. The actual value in the setup file is k-suspensionTravel.

So if your k = 0.35 and you want your suspension travel to be 0.15, you enter 0.2 in the text entry field.

In S1, the way to calculate k for each car was just to keep entering something in the text box until you get a valid value, then just add together what you typed in and the value thats displayed. Ie. suspensionTravel+textInput = k.

For S2, you cant text enter values, so you'll have to keep hex-editing the .set file instead.

Attached is a little spreadsheet I did for S1 which demonstrates the principle, although I would re-check the values of k for the S1 cars as the model origins may have changed in S2.
Attached files
set-file calc.zip - 2.3 KB - 198 views
thanks for the reply col

and also thanks for the assistence. Am i right in thinking that the value. I think i will find an easy time finding a value for 'k' since i can open the .set file with LFS and with my parser at the same time.

If:
frontTravel = k - suspensionTravel
Then for each car:
k = frontTravel + suspensionTravel

I'll have this setup so that the user wont need to burden him/herself with k or front/rearTravel values.

.set files
(3 posts, started )
FGED GREDG RDFGDR GSFDG