Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###########################################################
- ###########################################################
- # NAME: Rack_Force
- #
- # Modified original 'basic' profile to give raw FFB output with properly working clipping and a few other tweaks.
- # This FFB is calculated purely on the game's physics.
- #
- # This has no effects besides minimum force which can be adjusted with the ingame LFB slider.
- # Damper and FX sliders do nothing
- #
- ###########################################################
- #Some constants being defined, not really sure what all this does.
- #Looks like it's basically setting up the raw physics forces to be manipulated and spat out as FFB.
- #Defining some kind of maximum force
- (max_overall_force 11500.0)
- #Calculating the reciprocal of the above
- (recip_force ( / 1.0 max_overall_force))
- #No idea, looks like it's calculating some kind of damping/smoothing value based on a preexisting ingame variable
- (mass_damper ( * M_smooth_samples 0.0))
- #Using the above to apply some smoothing?
- (arm_force_smooth ( spring arm_force 0 0.0 mass_damper))
- (arm_force (if M_smooth_samples arm_force_smooth arm_force))
- #Scaling the output of the physics engine based on physics force output?
- #Looks like the end result is the 'rack' variable which seems to be our force at the rack.
- (rack_scaled ( * arm_force ( / max_overall_force M_max_force_at_rack)))
- (rack_scaled ( * rack_scaled recip_force))
- (rack rack_scaled)
- #Parking lot forces
- #Looks like this is where the forces are reduced below a certain speed to avoid a really heavy wheel when parked.
- (parkingForce (* parkingForceMult rack))
- (parkingForce (* parkingForce (crossover et 0.0 5.0)))
- (parkingForce (* parkingForce (- 1.0 (crossover vel_mag 0.0 7.0))))
- (rack (* rack (crossover vel_mag 0.0 5.0)))
- (rack (+ rack parkingForce))
- #Setting our FFB output variable equal to the output of above calcs
- (output rack)
- #Not sure what this does but doesn't relate to actual force calculations - perhaps used for ingame display of FFB.
- (scale_window_init 10.0)
- (scale_window_nominal 2.0)
- (scale_soft_clear_t 10.0)
- (scale_min 0.2)
- (scale_max 2.0)
- (scale_blend_t 2.0)
- (signal_scale output
- 1.0 1.0 1.0 1.0 1.0
- 0.0
- 0.0 0.0)
- #gain is the value of the ingame gain slider * the car specific multiplier
- #Here the output is multiplied by this overall gain multiplier
- (output (* output gain))
- #Low force boost/minimum force implementation
- #Not sure how exactly this function works
- (output (lfb output 0.0))
- #Test LFB setting to emulate 'minimum force' setting in other games. Uncomment this and comment out above to try it.
- #Minimum force % = 1/4 the value you set in game, so 100% ingame is 25% on your wheel
- #0.05 value is a kind of smoothing to remove the brick wall on/off effect you get with hard minimum force cutoff.
- #(output(tighten output (* lfb_slider 0.0) 0.0))
- #Statistics outputs, potentially for ingame logging that you see in the HUD, not sure how these work but seem to exist in basic file and other edited files.
- (histogram output)
- (info2 output)
- #Bumpstop code, values in brackets are stiffness buffer, stiffness, drag threshold and drag.
- (stops (bumpstop output 0.1 1.0 0.1 0.0)) # Bumpstops parameters: stiffness buffer, stifness, drag threshold and drag. Thresholds are how far back from bumpstops you start blending in some stiffness and drag....basically you cannot be as stiff as a real stop, because it'll get violent...because unlike a real lock stop, there is latency.
- (output (+ output (* stops)))
- #Final output clipping. Not sure what a doom check is!
- (doom_check output)
- (output (hard_clip output 1.0))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement