FFB Custom Settings
FFB Custom Settings
###########################################################
# NAME: rFuktor 5.0.1.2 - By Karsten with Shadak, Panos, Kuku, tUMi
# The original
#
# Any modification/tuning/reposting anywhere is allowed, only requirement is to
# KEEP the 1st line with original name and creds as it is. Additional naming and
creds can be put in the 2nd line.
#
# Special THANKS to Santos for all his early dedication and work.
#
# HUGE THANKS! to everybody for helping this file on the way:
#
# Shadak, Panos, Santos, tUMi, Peter Stefani, Stakanov, GodzillaGTR, Richard
Appleyard, NuScorpii, Kuku, Alegunner, AxisMagi, SlapShot82, Chip, tpw,
inthebagbud, Michael Enright, TorsteinVh, Ray Sheppard, psone, Dean Ogurek, John
Ellis, Gillish, Mikk Schleifer, CycloZeb
# & everybody else I missed in the Reiza forum for continued suggestions, expertise
& help balancing this file!
#
# If you copy this over in full or partly, or base a solution on the same general
methods after seeing it, please credit "Momentum Rack" however
used("included"/"extended"/"modified"/"based on"), I would be pleased - Thanks.
#
###########################################################
#
# Madness bug madness
#
# Create many vars here so the madness bug will hit that.
#
(madness_bug1 1.0)
(madness_bug2 1.0)
(madness_bug3 1.0)
(madness_bug4 1.0)
(madness_bug5 1.0)
(madness_bug6 1.0)
(madness_bug7 1.0)
(madness_bug8 1.0)
(madness_bug9 1.0)
(madness_bug10 1.0)
(madness_bug11 1.0)
(madness_bug12 1.0)
(madness_bug13 1.0)
(madness_bug14 1.0)
(madness_bug15 1.0)
(madness_bug16 1.0)
(madness_bug17 1.0)
(madness_bug18 1.0)
(madness_bug19 1.0)
(madness_bug20 1.0)
(madness_bug21 1.0)
(madness_bug22 1.0)
(madness_bug23 1.0)
(madness_bug24 1.0)
(madness_bug25 1.0)
(madness_bug26 1.0)
(madness_bug27 1.0)
(madness_bug28 1.0)
(madness_bug29 1.0)
(madness_bug30 1.0)
###########################################################
#
# Main dials
#
###########################################################
#
# Set dt to old static value
#
(dt (/ 1 300))
###########################################################
#
# Rack settings
#
###########################################################
#
# Road features settings
#
(texture_scale 1.1)
(micro_bumps_scale 0.375)
(micro_bumps_smooth 0.008)
(kerbs_surface_scale 3.5)
(kerbs_surface_smooth 0.03)
(kerb_bump_scale 3.0) #How big the tall curb bumps are.
(large_track_bump_scale 0.05) #how much bumps on the track are felt.
(large_offroad_bump_scale 0.05) #how much bumps off the track are felt.
###########################################################
#
# Effect scales - Change here to make an effect more or less pronounced.
#
(engine_scale_at_still 0.6)
(engine_scale_at_speed 0.0)
(scrub_scale 1.2)
(tear_scale 0.3)
(tear_hard 0.1)
(scrub_frq_scale 0.2)
(tear_frq_scale 1.2)
(flatspots_scale 0.0) #how much you feel the flat spotting. At
default 1.0 flatspots are nicely felt in a formula V10.
(suspension_scale 0.5) #how much the suspension is felt.
(rear_bump_scale 0.4)
(rear_bump_hard 0.8)
###########################################################
#
# Dynamic adjustment to bump feel based on car weight
#
###########################################################
#
# Kart adjustments
#
(slide_factor 0.9)
(FL_sl (* 1.0 (min 1 (* slide_factor FL_slide))))
(FR_sl (* 1.0 (min 1 (* slide_factor FR_slide))))
(RL_sl (* 1.0 (min 1 (* slide_factor RL_slide))))
(RR_sl (* 1.0 (min 1 (* slide_factor RR_slide))))
(slip_fl FL_sl)
(slip_fr FR_sl)
(slip_rl RL_sl)
(slip_rr RR_sl)
(p slip_crossover_pos)
(w slip_crossover_width)
(grip_fl (- 1 slip_fl2))
(grip_fr (- 1 slip_fr2))
(grip_rl (- 1 slip_rl2))
(grip_rr (- 1 slip_rr2))
(load_norm_wheel 250.0)
(FL_load_norm (* FL_load_norm load_norm_wheel))
(FR_load_norm (* FR_load_norm load_norm_wheel))
(mom_FL mom_FL2)
(mom_FR mom_FR2)
############
#
# Momentum Rack - If you copy this over in full or partly, or base a solution on
the same general methods after seeing it, please credit "Momentum Rack" however
used("included"/"extended"/"modified"/"based on"), I would be pleased - Thanks.
#
# Handles each front wheel separately to calculate FFB when wheels are not in equal
conditions.
#
# Calculations have not been shortened to make it easier to understand what is
going on.
#
# power steering
(a_l (abs angle_d_l))
(a_r (abs angle_d_r))
(f (* (max 0.001 power_steering_angle) 25))
(a_l (- 1 (/ 1 (+ 1 (* f a_l)))))
(a_l (/ a_l (- 1 (/ 1 (+ 1 f)))))
(a_r (- 1 (/ 1 (+ 1 (* f a_r)))))
(a_r (/ a_r (- 1 (/ 1 (+ 1 f)))))
(a_l (/ a_l (max 0.000000001 (abs angle_d_l))))
(a_r (/ a_r (max 0.000000001 (abs angle_d_r))))
(n 0.00001)
(pn (/ (- 1 (/ 1 (+ 1 (* f n)))) (- 1 (/ 1 (+ 1 f)))))
(angle_d_l (* angle_d_l a_l (/ n pn)))
(angle_d_r (* angle_d_r a_r (/ n pn)))
# center full
(angle_d_l2 (* angle_d_l 25))
(angle_d_r2 (* angle_d_r 25))
(angle_d_lfb (* center_full 2.5))
(angle_d_l2 (* (if (min 0 angle_d_l2) -1 1) (/ (+ (* 15 0.8 (abs angle_d_l2))
(- 1 (/ 1 (+ 1 (* 15 angle_d_lfb (abs angle_d_l2)))))) 13)))
(angle_d_r2 (* (if (min 0 angle_d_r2) -1 1) (/ (+ (* 15 0.8 (abs angle_d_r2))
(- 1 (/ 1 (+ 1 (* 15 angle_d_lfb (abs angle_d_r2)))))) 13)))
(angle_d_l2 (/ angle_d_l2 25))
(angle_d_r2 (/ angle_d_r2 25))
(angle_d_l2 (blend grip_fl angle_d_l angle_d_l2))
(angle_d_r2 (blend grip_fr angle_d_r angle_d_r2))
# LFB
# weirdnes line here. without this "rack_momentum_2" does not get assigned in the
next line
(single_lfb_part lfbval)
(rack_momentum (blend single_lfb_part rack_momentum rack_momentum_2))
# Yaw
# Rack effects
# Rack friction
(rack_friction (* 20 sa_delta_rack rack_friction))
(rack_momentum (- rack_momentum rack_friction))
# Rack spring
(steer_spring_strength 1.0)
(want_steer want_steer)
(steer_delta (- want_steer steering_angle_rack))
(steer_delta (if (max 0 (- (abs steer_delta) 0.5)) (* 0.5 (/ steer_delta (abs
steer_delta))) steer_delta))
(want_steer (+ steering_angle_rack steer_delta))
(steer_pull (hard_clip (* steer_spring_strength steer_delta 0.4) 0.5))
(want_steer (- want_steer (- steer_delta (hard_clip steer_delta (* 0.15 (max
0 (- (/ 1 (max kmh 2)) 0.05)))))))
(steer_pull (- steer_pull (* 6 sa_delta_rack)))
#(steer_pull (* 12 (/ 1.5 master_rack) (blend power_steering 1.2 0.8)
steer_pull grip_feel_front (* (/ 1 8) (+ FL_def FR_def 5))))
(steer_pull (* 12 (/ 1.5 master_rack) steer_pull grip_feel_front (* (/ 1 8)
(+ FL_def FR_def 5))))
(rack_momentum (blend (min 1 (/ kmh 3)) steer_pull rack_momentum))
# Smooth slightly
(rack_momentum (smooth rack_momentum 0.01))
###########################################################
#
# Normal static force reduction + Exponential static force reduction(affects the
top end of the force exponentially)
#
###########################################################
#
# Build road slope details & bumps
#
(FL_bump_kerb_active FL_bump_kerb_active)
(FR_bump_kerb_active FR_bump_kerb_active)
(FL_bump_kerb_active (if FL_bump_kerb 1 FL_bump_kerb_active))
(FR_bump_kerb_active (if FR_bump_kerb 1 FR_bump_kerb_active))
(FL_bump_kerb_active (max 0 (- FL_bump_kerb_active (* 4 dt))))
(FR_bump_kerb_active (max 0 (- FR_bump_kerb_active (* 4 dt))))
(FL_bal FL_bal)
(FR_bal FR_bal)
(FL_bal (* FL_bal (power 0.03 dt)))
(FR_bal (* FR_bal (power 0.03 dt)))
(FL_bal (max FL_bal FL_load))
(FR_bal (max FR_bal FR_load))
###########################################################
#
# Road features
#
(supress_micro_bumps 1)
(supress_large_bumps 2)
(left_texture_o left_texture_o)
(right_texture_o right_texture_o)
(left_texture (* 0.002 (if (+ FL_bump_kerb FL_bump_offroad) 0 1) (- FL_load
left_texture_o)))
(right_texture (* 0.002 (if (+ FR_bump_kerb FR_bump_offroad) 0 1) (- FR_load
right_texture_o)))
(left_texture_o FL_load)
(right_texture_o FR_load)
(texture (+ left_texture right_texture))
(texture (smooth texture 0.003))
(texture (hard_clip texture 0.06))
(texture (if (min 0 (- (abs texture) 0.0001)) 0 (power texture (power (abs
texture) 0.02))))
(left_details_pos left_details_pos)
(right_details_pos right_details_pos)
(left_details_pos (+ left_details_pos (* (- left_details left_details_pos) (power
0.001 dt))))
(right_details_pos (+ right_details_pos (* (- right_details right_details_pos)
(power 0.001 dt))))
(left_details_pos (max left_details_pos left_details))
(right_details_pos (max right_details_pos right_details))
(left_details (spring left_details_pos 80000 0.1))
(right_details (spring right_details_pos 80000 0.1))
(left_details (* (power (- 1 (min 1 (abs left_details))) supress_micro_bumps)
left_details))
(right_details (* (power (- 1 (min 1 (abs right_details))) supress_micro_bumps)
right_details))
(left_details (* left_details (if FL_bump_offroad 0 1) (blend (smooth
FL_bump_kerb 0.01) micro_bumps_scale kerbs_surface_scale)))
(right_details (* right_details (if FR_bump_offroad 0 1) (blend (smooth
FR_bump_kerb 0.01) micro_bumps_scale kerbs_surface_scale)))
(left_details (smooth left_details (blend (smooth FL_bump_kerb 0.01)
micro_bumps_smooth kerbs_surface_smooth)))
(right_details (smooth right_details (blend (smooth FR_bump_kerb 0.01)
micro_bumps_smooth kerbs_surface_smooth)))
(kerbs_details (- left_details right_details))
(road_details (blend (smooth (min 1 (+ FL_bump_kerb FR_bump_kerb)) 0.02) (+
left_details right_details) kerbs_details))
# LFB
###########################################################
#
# Scrub FX
#
(scrub_scale_front 0.32)
(scrub_scale_rear 0.28)
(scrub_deadzone 0.0)
(F_scrub (max 0 (- F_scrub scrub_deadzone)))
(R_scrub (max 0 (- R_scrub scrub_deadzone)))
(F_scrub (/ F_scrub (- 1 scrub_deadzone)))
(R_scrub (/ R_scrub (- 1 scrub_deadzone)))
(F_scrubP F_scrubP)
(R_scrubP R_scrubP)
(F_curve1_o F_curve1_o)
(F_curve1 (sin (* 1.23 F_scrubP)))
(F_curve1 (power F_curve1 1.8))
(F_curve1_now (if (min 0 (* F_curve1 (- F_curve1 F_curve1_o))) (* F_curve1 0.5)
F_curve1))
(F_curve1_o F_curve1)
(F_curve1_now (spring F_curve1_now 2000000 1))
(R_curve1_o R_curve1_o)
(R_curve1 (sin (* 1.23 R_scrubP)))
(R_curve1 (power R_curve1 1.8))
(R_curve1_now (if (min 0 (* R_curve1 (- R_curve1 R_curve1_o))) (* R_curve1 0.5)
R_curve1))
(R_curve1_o R_curve1)
(R_curve1_now (spring R_curve1_now 2000000 1))
###########################################################
#
# Tear FX
#
(FL_tear_early_vol (- 1 FL_tear_early))
(FL_tear_early_frq (+ 1 (* 5 FL_tear_early)))
(FR_tear_early_vol (- 1 FR_tear_early))
(FR_tear_early_frq (+ 1 (* 5 FR_tear_early)))
(RL_tear_early_vol (- 1 RL_tear_early))
(RL_tear_early_frq (+ 1 (* 5 RL_tear_early)))
(RR_tear_early_vol (- 1 RR_tear_early))
(RR_tear_early_frq (+ 1 (* 5 RR_tear_early)))
###########################################################
#
# Rolling road slip feel
#
###########################################################
#
# Clipping
#
(rack_big rack_momentum)
(rack_big rack_momentum)
# Smart clip
(rack_big (* gain2 rack_big master_rack))
(rack_big2 (smooth (abs rack_big) 0.04))
(pos_neg (if (min 0.0 rack_big) -1 1))
(rack_big (if (max 0 (- (abs rack_big) 0.5)) (+ (min 0.90 rack_big2) (-
(abs rack_big) rack_big2)) (abs rack_big)))
(rack_big (* rack_big pos_neg))
(max_rack_big max_rack_big)
(rack_big2 (smooth (abs rack_big) 0.01))
(max_rack_big (if (max 0 (- rack_big2 max_rack_big)) rack_big2 max_rack_big))
(rack_big (if (max 0 (- max_rack_big 0.9)) (/ (* 0.9 rack_big)
max_rack_big) rack_big))
(max_rack_big (* max_rack_big (power 0.1 dt)))
###########################################################
#
# Engine FX
#
(max_rps 8000.0)
(cp (+ cp (min 6.28 (* dt crankshaft 0.7))))
(cp (if (min 0 cp) 0 cp))
(cp (if (max 0 (- cp 6.283)) (- cp 6.283) cp))
(cp (if (max 0 (- cp 6.283)) 0 cp))
(cp (max 0 (min cp 6.283)))
(m (min (/ kmh 80.0) 1.0))
(engine_scale (blend m engine_scale_at_still engine_scale_at_speed))
(rps_scale (/ crankshaft max_rps))
(rps_scale (power rps_scale 0.8))
(rps_scale (min rps_scale 0.02))
(rps_scale (max rps_scale 0.14))
(load_mult (smooth throttle 0.1))
(load_mult (max load_mult 0.5))
(n (if (max 0 (- cp 3.14159265)) -1 1))
(x (if (max 0 (- cp 3.14159265)) (- cp 3.14159265) cp))
(engine_vibe (/ (* 16 x (- 3.14159265 x)) (- (* 5 3.14159265 3.14159265) (* 4
x (- 3.14159265 x)))))
(engine_vibe (* engine_vibe n))
(engine_effect (* engine_scale load_mult engine_vibe rps_scale))
###########################################################
#
# Flatspots effect
#
###########################################################
#
# Effects blend & scale
#
###########################################################
#
# Final Rack & Effects Blending
#
# Damping
(damping2 (* (min 1 (/ kmh 250)) 1500 damping))
(all (- all (* damping2 (- sa_delta_rack (smooth sa_delta_rack
0.005)))))
(output all)
###########################################################
#
# Scaler for info, no affect on output
#
(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)
###########################################################
#
# Statistics output
#
(histogram output)
(info2 output)
###########################################################
#
# Lock Stops
#
(custom_lock_stop 2.0)
(stops (bumpstop output 0.15 0.5 0.2 1.0))
(output (+ output (* stops custom_lock_stop)))
(doom_check output)
(output (hard_clip output 1.0))