Page 1 of 1
Posted: 14 Jun 2013, 23:43
jigebren
As I said in
the Blazer 4x4 topic, while working on this car I had the pleasure to notice that the parameters.txt file format parser was a bit more powerful that we may think.
For numbered items like WHEELS, SPRING, etc. it's possible to use
a list instead of a single item, which makes it possible to set parameters to several items at once.
For example we use to set the parameters this way:
Code: Select all
WHEEL 0 {
parameter1 foo
parameter2 bar
...
}
WHEEL 1 {
parameter1 foo
parameter2 bar
...
}
it is in fact possible to use this syntax:
Code: Select all
WHEEL 0,1 {
parameter1 foo
parameter2 bar
...
}
which does exactly the same as above, using half the number of lines.
Two syntaxes are supported:
- comma separated list
WHEEL 0,2,3
which means WHEEL 0, WHEEL 2 and WHEEL 3.
- dash separated list:
WHEEL 1-3
which means WHEEL 1, WHEEL 2 and WHEEL 3.
So if you're using the same 4 wheels for your car, you can simply add this to "Car Wheel details":
Code: Select all
WHEEL 0-3 {
EngineRatio 35000.000000
Radius 11.000000
Mass 0.450000
Gravity 2200.000000
AxleFriction 0.050000
Grip 0.015000
StaticFriction 1.500000
KineticFriction 1.300000
}
and remove the now-useless corresponding entries in each WHEEL section (WHEEL 0 {}, WHEEL 1 {}, etc.), making the parameters.txt file lighter at the same time.
You have to know that an entry can be set several times for the same item, it doesn't matter. Only the last occurrence will be taken into account.
And the most important: this is not a v1.2 feature, it works with v1.1 as well (tested with 1207), so this format can be used without legacy compatibility concern. Just keep in mind though not to use it if you plan to use a car tool that is not aware of this format (which is likely to be all car tools until now except Re-Volt itself).
Well, that's it. This feature is likely to make car tweaking noticeably easier (if a parameters is shared amongst several wheels, it's only 1 parameters to edit instead of 2 or 4).
I just wonder why it has not been used in any of the stock cars. Maybe it was not considered useful, or has simply been forgotten...
Posted: 15 Jun 2013, 02:14
KDL
erm a fast question:
We have this:
WHEEL 0-3 {
EngineRatio 35000.000000
Radius 11.000000
Mass 0.450000
Gravity 2200.000000
AxleFriction 0.050000
Grip 0.015000
StaticFriction 1.500000
KineticFriction 1.300000
}
Is it possible to add other singletons containing for example
wheel 0 {offset x' y' z'} wheel 1{offset x'' y'' z''} wheel 2{offset x''' y''' z'''} wheel 3 {offset x4 y4 z4}
where offset is offset1?
Posted: 15 Jun 2013, 04:12
jigebren
I'm not sure to properly fathom your question, Kay, but if you're wondering about using at the same time a WHEEL 0-3 section and the regular WHEEL 0 to WHEEL 3 sections, yes, it is possible.
In the example above, I explained that after adding the section WHEEL 0-3 {} you just have to delete the useless entries in each regular section, which means actually you don't have to remove the whole section...
I have edited the Wheels details of my WIP Blazer 4x4, I can display it here if a real and complete example can help to see what (and how it) can be done.
Posted: 15 Jun 2013, 16:11
KDL
That's actually amazing!
But it also means there is a lot to be modified and redone in RVCS xD
Thanks for replying and for the hard work
Posted: 15 Jun 2013, 19:11
Manmountain
So, just to clarify.
All generic physics values can be specified in the one section whether it be wheel, spring, pin or axel, but the individual values for models and offset positions need to be specified in thier own sections ? unless the values are generic and have no real item to modify.
IE Toyeca modified;
Code: Select all
;====================
; Car Wheel details
;====================
WHEEL 0-3 {
IsPresent TRUE
IsPowered TRUE
EngineRatio 20000.000000
Radius 11.000000
Mass 0.150000
Gravity 2200.000000
MaxPos 3.000000
SkidWidth 10.000000
ToeIn 0.000000
Grip 0.018000
KineticFriction 1.850000
}
WHEEL 0 { ; Start Wheel
ModelNum 1
Offset1 -22.500000 -6.750000 35.500000
Offset2 -2.500000 0.000000 0.000000
IsTurnable TRUE
SteerRatio -0.250000
AxleFriction 0.020000
StaticFriction 1.900000
} ; End Wheel
WHEEL 1 { ; Start Wheel
ModelNum 2
Offset1 22.500000 -6.750000 35.500000
Offset2 2.500000 0.000000 0.000000
IsTurnable TRUE
SteerRatio -0.250000
AxleFriction 0.020000
StaticFriction 1.900000
} ; End Wheel
WHEEL 2 { ; Start Wheel
ModelNum 3
Offset1 -24.000000 -6.750000 -33.000000
Offset2 -2.000000 0.000000 0.000000
IsTurnable FALSE
SteerRatio 1.000000
AxleFriction 0.050000
StaticFriction 1.880000
} ; End Wheel
WHEEL 3 { ; Start Wheel
ModelNum 4
Offset1 24.000000 -6.750000 -33.000000
Offset2 2.000000 0.000000 0.000000
IsTurnable FALSE
SteerRatio 1.000000
AxleFriction 0.050000
StaticFriction 1.880000
} ; End Wheel
;====================
; Car Spring details
;====================
SPRING 0-3 { ; Start Spring
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
Stiffness 1000.000000
Damping 15.000000
Restitution -0.750000
} ; End Spring
;====================
; Car Pin details
;====================
PIN 0-3 { ; Start Pin
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End Pin
;====================
; Car axle details
;====================
AXLE 0-3 { ; Start Axle
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End axle
Posted: 15 Jun 2013, 20:06
jigebren
Manmountain @ Jun 15 2013, 02:41 PM wrote: All generic physics values can be specified in the one section whether it be wheel, spring, pin or axel, but the individual values for models and offset positions need to be specified in thier own sections ? unless the values are generic and have no real item to modify.
That's it. But you can still go further than in your example. Here's the Blazer 4x4 modified wheel section to show what I mean:
Code: Select all
;====================
; Car Wheel details
;====================
WHEEL 0 {; Start Wheel
ModelNum 1
Offset1 -21.000000 16.000000 27.000000
Offset2 -2.000000 0.000000 0.000000
} ; End Wheel
WHEEL 1 {; Start Wheel
ModelNum 2
Offset1 21.000000 16.000000 27.000000
Offset2 2.000000 0.000000 0.000000
} ; End Wheel
WHEEL 2 {; Start Wheel
ModelNum 3
Offset1 -21.000000 16.000000 -26.000000
Offset2 -2.000000 0.000000 0.000000
} ; End Wheel
WHEEL 3 {; Start Wheel
ModelNum 4
Offset1 21.000000 16.000000 -26.000000
Offset2 2.000000 0.000000 0.000000
} ; End Wheel
WHEEL 0,1 {
IsTurnable TRUE
SteerRatio -0.500000
}
WHEEL 2,3 {
IsTurnable FALSE
SteerRatio 0.100000
}
WHEEL 0-3 {
IsPresent TRUE
IsPowered TRUE
EngineRatio 35000.000000
Radius 11.000000
Mass 0.450000
Gravity 2200.000000
AxleFriction 0.050000
Grip 0.015000
StaticFriction 1.500000
KineticFriction 1.300000
MaxPos 5.000000
SkidWidth 14.000000
ToeIn 0.000000
}
In this case it is would still have been possible to regroup Offset2 in WHEEL 0,2 and WHEEL 1,3 extra sections...
Just for info, it doesn't matter whether the extra sections are added before or after the regular sections. Since it is possible for example to set default values for all parameters in a generic WHEEL 0-3, then tweak any parameters in the wheel own section, it may be a good idea to place the generic section as the first one (to be sure the specific parameters will overwrite the generic ones).
Posted: 15 Jun 2013, 20:20
Manmountain
just one word
COOL
Now to save space I just need to edit all the cars I have... LOL
Posted: 15 Jun 2013, 21:34
Citywalker
Weeelll, this needs some getting used to.
But thanks for the info, anyway!
Posted: 16 Jun 2013, 01:12
Skarma
I'm assuming that can make more than one of these? Like if you want the front and back wheels to be different, you can do wheel0-1 and wheel2-3, yes?
Posted: 20 Jun 2013, 14:57
KDL
Yes
I have investigated this and I found it's because All the cars were inside one big carinfo.txt using 0-1 and 2-3
Later, the car info were split and as a consequence we got what we're seeing today.
Man, if anyone releases a car using such parameters... The same time, a person will have to rewrite a whole loading engine
Posted: 30 Jul 2013, 14:49
Kenny
KDL @ Jun 20 2013, 10:27 AM wrote: Yes
I have investigated this and I found it's because All the cars were inside one big carinfo.txt using 0-1 and 2-3
Later, the car info were split and as a consequence we got what we're seeing today.
Exactly, it seems like it worked even for multiple car definitions:
Code: Select all
CAR 0-32 {
Name "Right about now"
; Model Filenames
MODEL 0 NONE ; Body model
MODEL 1 NONE ; wheel front left
MODEL 2 NONE ; wheel front right
MODEL 3 NONE ; wheel back left
....
....
....
AERIAL {
SECMODELNUM -1
TOPMODELNUM -1
OFFSET 12, -33, -27,
DIRECTION 0, -1, 0
LENGTH 13
STIFFNESS 2000
DAMPING 5.5
}
}
Which makes sense to have for a single CarInfo file to save quite a few lines. But its still a very useful feature, even if we don't use a single CarInfo anymore
Posted: 10 Feb 2015, 23:35
Manmountain
Just to catch up with the new RV1.2.
Some demo's used the carinfo.txt to set up global default values if specific values were not specified in an individual car section, right ?
Could we use anything like that now with RV1.2 or do all individual car values have to be defined within their own folder ?
Posted: 11 Feb 2015, 05:58
jigebren
Manmountain @ Feb 10 2015, 07:05 PM wrote: Some demo's used the carinfo.txt to set up global default values if specific values were not specified in an individual car section, right ?
Could we use anything like that now with RV1.2 or do all individual car values have to be defined within their own folder ?
I'm not aware of the demo, but no, there's no such feature like a global parameters.txt in v1.2. Each car its own parameters...
Why would you use that BTW?
Posted: 11 Feb 2015, 06:15
revolting
I guess when you are running out of time
, so you're right why would you need that feature.
"He has made everything beautiful in its time. He has even put eternity in their heart"
So we are meant to be forever there's no rush
Posted: 11 Feb 2015, 12:41
Abc
jigebren @ Feb 10 2015, 09:28 PM wrote: Manmountain @ Feb 10 2015, 07:05 PM wrote: Some demo's used the carinfo.txt to set up global default values if specific values were not specified in an individual car section, right ?
Could we use anything like that now with RV1.2 or do all individual car values have to be defined within their own folder ?
I'm not aware of the demo, but no, there's no such feature like a global parameters.txt in v1.2. Each car its own parameters...
Why would you use that BTW?
he's right, all acclaim demos (except the demos after retail release) do have a carinfo.txt
that's pretty "strict" because all cars parameters are dumped in a single file, each folder/parameter is better because of its flexibility and modding. otherwise you would have a numbering mess, probably a CRC error (if its inserted/injected in the exe and file haves checksum written on the end) or whatever.
offtopic ps: why is revolting spamming "poems"? on almost every latest thread?
Posted: 11 Feb 2015, 18:04
Manmountain
Abc @ Feb 11 2015, 08:11 AM wrote:he's right, all acclaim demos (except the demos after retail release) do have a carinfo.txt
that's pretty "strict" because all cars parameters are dumped in a single file, each folder/parameter is better because of its flexibility and modding. otherwise you would have a numbering mess, probably a CRC error (if its inserted/injected in the exe and file haves checksum written on the end) or whatever.
offtopic ps: why is revolting spamming "poems"? on almost every latest thread?
My Idea is so that a global default is pre set so that you can just have specific parameter content without a full set of unused variables.
Not all cars have axel's and pin's, most spring and frontend settings rarely differ.
It was just a thought, a way of been lazier when setting params.
I have missed a lot over the past few years so some of my points/request's are grasping of the unknown possabilities of RV1.2.
If you want, you could all just ignore my ridiculous statements.
As to
revolting, if he does not reel in the preaching he will experience my wrath as Admin.
Posted: 11 Feb 2015, 18:43
jigebren
Manmountain @ Feb 11 2015, 01:34 PM wrote:My Idea is so that a global default is pre set so that you can just have specific parameter content without a full set of unused variables.
Not all cars have axel's and pin's, most spring and frontend settings rarely differ.
I still don't see a where this would really be useful... Except maybe for the Aerial models filename, the default model number for each car part (wheel, spring...), and the IsPresent / IsPowered / IsTurnable default values. But it's no much lines in the parameters.txt file...
BTW, when axel and spin are not used, the section may simply be deleted (not tried yet though), the default internal values will then be used.
Posted: 11 Feb 2015, 19:07
Manmountain
jigebren @ Feb 11 2015, 02:13 PM wrote:
BTW, when axel and spin are not used, the section may simply be deleted (not tried yet though), the default internal values will then be used.
So, are you suggesting there already is a default setting for none specified parameter sections ?
Posted: 11 Feb 2015, 19:16
jigebren
For the wheels, IsPresent is set to TRUE by default, which is a bit weird IMO.
For other parts, the default model is -1 (NONE).
Anyway, I think there's a way to export a parameters.txt file from v1.2 (with fixed comments in some places
). So you may try to load a parameters.txt with most value deleted, and export it. Then you'll get all the default values...
EDIT:
Ok, I've done it for you. Method is:
Launch v1.2 in DEV mode (use the -dev command line switch), start a race. Then open your car parameters.txt in Notepad, delete everything but the name and the first and last { } braces. Refresh the car in Re-Volt ([Ctrl+R]), then in the menu choose "Save current car info", and voila.
Here are all the default parameters.txt settings in v1.2:
Code: Select all
{
;============================================================
;============================================================
; ...
;============================================================
;============================================================
Name "..."
;====================
; Stuff mainly for frontend display and car selectability
;====================
BestTime FALSE
Selectable FALSE
;)CPUSelectable FALSE
;)Statistics TRUE
Class 2 ; Engine type (0=Elec, 1=Glow, 2=Other)
Obtain -1 ; Obtain method
Rating -1 ; Skill level (rookie, amateur, ...)
TopEnd 2325.581299 ; Actual top speed (mph) for frontend bars
Acc 12.000000 ; Acceleration rating (empirical)
Weight 0.600000 ; Scaled weight (for frontend bars)
Trans 0 ; Transmission type (0=4WD, 1=FWD, 2=RWD)
MaxRevs 0.005590 ; Max Revs (for rev counter, deprecated...)
;)TCARBOX "NONE" ; Carbox texture
;====================
; Model Filenames
;====================
MODEL 0 "NONE"
MODEL 1 "NONE"
MODEL 2 "NONE"
MODEL 3 "NONE"
MODEL 4 "NONE"
MODEL 5 "NONE"
MODEL 6 "NONE"
MODEL 7 "NONE"
MODEL 8 "NONE"
MODEL 9 "NONE"
MODEL 10 "NONE"
MODEL 11 "NONE"
MODEL 12 "NONE"
MODEL 13 "NONE"
MODEL 14 "NONE"
MODEL 15 "NONE"
MODEL 16 "NONE"
MODEL 17 "NONE"
MODEL 18 "NONE"
COLL "NONE"
TPAGE "NONE"
;)TSHADOW "NONE"
;)SHADOWINDEX -1
;)SHADOWTABLE 0.000000 0.000000 0.000000 0.000000 0.000000; Left, right, front, back, height (relative to model center)
EnvRGB 255 255 255
;====================
; Handling related stuff
;====================
SteerRate 2.500000 ; Rate at which steer angle approaches value from input
SteerMod 0.400000 ;
EngineRate 4.500000 ; Rate at which Engine voltage approaches set value
TopSpeed 0.503100 ; Car's theoretical top speed (not including friction...)
DownForceMod 2.000000 ; Down force modifier when car on floor
CoM 0.000000 0.000000 0.000000 ; Centre of mass relative to model centre
Weapon 0.000000 -32.000000 64.000000 ; Weapon generation offset
;)Flippable TRUE ; Rotor car effect
;)Flying FALSE ; Flying like the UFO car
;)ClothFx FALSE ; Mystery car cloth effect
;====================
; Car Body details
;====================
BODY {; Start Body
ModelNum -1 ; Model Number in above list
Offset 0.000000 0.000000 0.000000
Mass 1.000000
Inertia 870.000000 0.000000 0.000000
0.000000 1250.000000 0.000000
0.000000 0.000000 440.000000
Gravity 2200 ; No longer used
Hardness 0.000000
Resistance 0.001000 ; Linear air resistance
AngRes 0.001000 ; Angular air resistance
ResMod 15.000000 ; AngRes scale when in air
Grip 0.010000 ; Converts downforce to friction value
StaticFriction 0.800000
KineticFriction 0.400000
} ; End Body
;====================
; Car Wheel details
;====================
WHEEL 0 {; Start Wheel
ModelNum -1
Offset1 -16.000000 14.000000 32.000000
Offset2 -4.500000 0.000000 0.000000
IsPresent TRUE
IsPowered TRUE
IsTurnable TRUE
SteerRatio -0.500000
EngineRatio 5000.000000
Radius 10.000000
Mass 0.200000
Gravity 2200.000000
MaxPos 8.000000
SkidWidth 10.000000
ToeIn 0.000000
;)Camber 0.000000
AxleFriction 0.040000
Grip 0.018000
StaticFriction 1.580000
KineticFriction 1.100000
} ; End Wheel
WHEEL 1 {; Start Wheel
ModelNum -1
Offset1 16.000000 14.000000 32.000000
Offset2 4.500000 0.000000 0.000000
IsPresent TRUE
IsPowered TRUE
IsTurnable TRUE
SteerRatio -0.500000
EngineRatio 5000.000000
Radius 10.000000
Mass 0.200000
Gravity 2200.000000
MaxPos 8.000000
SkidWidth 10.000000
ToeIn 0.000000
;)Camber 0.000000
AxleFriction 0.040000
Grip 0.018000
StaticFriction 1.580000
KineticFriction 1.100000
} ; End Wheel
WHEEL 2 {; Start Wheel
ModelNum -1
Offset1 -16.000000 14.000000 -38.000000
Offset2 -6.000000 0.000000 0.000000
IsPresent TRUE
IsPowered TRUE
IsTurnable FALSE
SteerRatio 0.100000
EngineRatio 5000.000000
Radius 10.000000
Mass 0.200000
Gravity 2200.000000
MaxPos 8.000000
SkidWidth 10.000000
ToeIn 0.000000
;)Camber 0.000000
AxleFriction 0.040000
Grip 0.018000
StaticFriction 1.530000
KineticFriction 1.090000
} ; End Wheel
WHEEL 3 {; Start Wheel
ModelNum -1
Offset1 16.000000 14.000000 -38.000000
Offset2 6.000000 0.000000 0.000000
IsPresent TRUE
IsPowered TRUE
IsTurnable FALSE
SteerRatio 0.100000
EngineRatio 5000.000000
Radius 10.000000
Mass 0.200000
Gravity 2200.000000
MaxPos 8.000000
SkidWidth 10.000000
ToeIn 0.000000
;)Camber 0.000000
AxleFriction 0.040000
Grip 0.018000
StaticFriction 1.530000
KineticFriction 1.090000
} ; End Wheel
;====================
; Car Spring details
;====================
SPRING 0 {; Start Spring
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
Stiffness 250.000000
Damping 7.000000
Restitution -0.850000
} ; End Spring
SPRING 1 {; Start Spring
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
Stiffness 250.000000
Damping 7.000000
Restitution -0.850000
} ; End Spring
SPRING 2 {; Start Spring
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
Stiffness 250.000000
Damping 7.000000
Restitution -0.850000
} ; End Spring
SPRING 3 {; Start Spring
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
Stiffness 250.000000
Damping 7.000000
Restitution -0.850000
} ; End Spring
;====================
; Car Pin details
;====================
PIN 0 { ; Start Pin
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End Pin
PIN 1 { ; Start Pin
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End Pin
PIN 2 { ; Start Pin
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End Pin
PIN 3 { ; Start Pin
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End Pin
;====================
; Car axle details
;====================
AXLE 0 { ; Start Axle
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End axle
AXLE 1 { ; Start Axle
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End axle
AXLE 2 { ; Start Axle
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End axle
AXLE 3 { ; Start Axle
ModelNum -1
Offset 0.000000 0.000000 0.000000
Length 0.000000
} ; End axle
;====================
; Car spinner details
;====================
SPINNER { ; Start spinner
ModelNum -1
Offset 0.000000 0.000000 0.000000
Axis 0.000000 1.000000 0.000000
AngVel 0.000000
;)Type 1 ; 1: Default rot, 2: Turn with steer, 4: Translate with speed, 6: 2 and 4
;)Trans 0.000000 3.000000 6.000000 ; Translation max
;)TransVel 0.001000 ; Velocity factor
} ; End Spinner
;====================
; Car Aerial details
;====================
AERIAL { ; Start Aerial
SecModelNum -1
TopModelNum -1
Offset 12.000000 -33.000000 -27.000000
Direction 0.000000 -1.000000 0.000000
Length 13.000000
Stiffness 2000.000000
Damping 5.500000
} ; End Aerial
;====================
; Car AI details
;====================
AI { ;Start AI
UnderThresh 500.000000
UnderRange 3000.000000
UnderFront 2000.000000
UnderRear 1500.000000
UnderMax 0.500000
OverThresh 500.000000
OverRange 2000.000000
OverMax 0.900000
OverAccThresh 100.000000
OverAccRange 400.000000
PickupBias 0
BlockBias 0
OvertakeBias 0
Suspension 0
Aggression 0
} ; End AI
}
Posted: 11 Feb 2015, 21:21
Manmountain
So which did you use, or is the point it does not matter ?
So at what point is a default setting used ?
When a whole section is missing or specific variable ?
Posted: 11 Feb 2015, 23:50
jigebren
I used the Rotor but it actually doesn't matter.
The point to default settings is just providing something consistent (and avoid possible crash with random value) in case something is missing, a section or a variable.
It might also been used as a baseline when creating a new car...
Posted: 12 Feb 2015, 00:04
Manmountain
OK
, thanks for the work you've input, or output, lol
Posted: 12 Feb 2015, 20:25
Skarma
jigebren @ Feb 11 2015, 01:46 PM wrote: Ok, I've done it for you. Method is:
Launch v1.2 in DEV mode (use the -dev command line switch), start a race. Then open your car parameters.txt in Notepad, delete everything but the name and the first and last { } braces. Refresh the car in Re-Volt ([Ctrl+R]), then in the menu choose "Save current car info", and voila.
I'd just like to point out that it's only recommended to do this if you have a copy of the parameters of the car you're going to do this to, as it seems to default all the values somehow, including the wheel offsets. That's what happened to me in the past.
Unless, this is how you're supposed to use the "Save current car info" option? I've always avoided it because of this.
Posted: 12 Feb 2015, 20:54
jigebren
@Skarma
Either you miss the point here since the method I gave was precisely to default all the values, or - as I believe - you're implying that simply using "Save current car info" was resetting values... Well, I don't know in the past or with any car but I've just tried with Panga and it works perfectly, so you can use it rather safely (though it's up to you to always have a backup).
Posted: 13 Feb 2015, 08:21
revolting
Thanks for those insights Jig