###################################################### # NAME: Gunboat Diplomat [LOU] (NuScorpii) V1.01 # Gunboat Diplomat [LOU], a Special Circumstances craft; its name is a play on the gunboat diplomacy concept. # From - The Player of Games - Iain M. Banks ########################################################### # # Thanks to Karsten Hvidberg for the concept of splitting the rack force # # This allows transformations to be done on different parts of the rack force # without affecting other parts and then recombining them later. # ########################################################### ########################################################### # # Wheel type ingame settings recommendations: # # DD wheel bases: # LFB 5-10 # FX 50 # # Belt wheels # LFB ?? # FX 50 # # Gear # LFB ?? # FX 50 # ########################################################### ########################################################### # # Scaling settings # # Rack - amplification of rack forces (micro_details 0.4) (macro_details 0.2) (rack_load 0.6) (brake_load 0.8) # FX - generated effects (affected by FX slider) (scrub_scale 0.5) (kerb_scale 0.3) (gyro_scale 0.8) (engine_scale_slow 0.6) (engine_scale_fast 0.03) # Rack smoothing - removes some of the harsher details (output_smoothing 0.2) ########################################################### # # Scrub settings # # Overall scrub scale - used to scale both front and back (scrub_scale_master (* scrub_scale 30.0)) # Scrub scale (0.0 - 2.0) # Set to 0.0 to disable (scrub_scale_front 1.2) (scrub_scale_rear 0.7) # Scrub lambda (inversely proportional to frequency of effect) # Higher values give lower freq. Best range 1.1 - 1.8 (scrub_lambda_front 1.6) (scrub_lambda_rear 1.2) ########################################################### # # Reiza variables # (lever_mode 0) (smooth_level 0) (max_change 1.0) (min_force 0.00) (scrub_rack 0.0) (scrub_rear 0.0) (rack_damping_scale 0.0) ########################################################### # # Reiza code # # general multipliers (from ams1) (max_overall_force 11500.0) (recip_force ( / 1.0 max_overall_force)) #mfasr scaler (rack_scaled ( * arm_force ( / max_overall_force M_max_force_at_rack))) (rack_scaled ( * rack_scaled recip_force)) (rack rack_scaled) (rack_smooth (smooth rack M_force_smoothing)) (rack (if M_force_smoothing rack_smooth rack)) # PARKING LOT FORCE :) (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)) ########################################################### # # Kerb enhancement # (prd 1.0) (FL_bump_period (* 0.15 FL_bump_kerb)) (FL_bump_amplitude (* 0.1 FL_bump_kerb)) (FL_bump_sharpness 0.9) (inv_period (/ 1.0 (+ FL_bump_period 0.001))) (dphase (* FL_vel_x dt inv_period)) (sin1 (oscillator (* prd 1.0 dphase))) (sin2 (oscillator (* prd 2.0 dphase))) (sin3 (oscillator (* prd 3.0 dphase))) (term1 (* (/ -2.0 prd) sin1)) (term2 (* (/ -1.0 prd) sin2)) (term3 (* (/ -0.6667 prd) sin3)) (sawtooth (+ term1 term2 term3)) (FL_bump (* sawtooth (* FL_load 1.0) FL_bump_amplitude FL_angvel)) (FR_bump_period (* 0.15 FR_bump_kerb)) (FR_bump_amplitude (* 0.1 FR_bump_kerb)) (FR_bump_sharpness 0.9) (inv_period (/ 1.0 (+ FR_bump_period 0.001))) (dphase (* FR_vel_x dt inv_period)) (sin1 (oscillator (* prd 1.0 dphase))) (sin2 (oscillator (* prd 2.0 dphase))) (sin3 (oscillator (* prd 3.0 dphase))) (term1 (* (/ -2.0 prd) sin1)) (term2 (* (/ -1.0 prd) sin2)) (term3 (* (/ -0.6667 prd) sin3)) (sawtooth (+ term1 term2 term3)) (FR_bump (* sawtooth (* FR_load -1.0) FR_bump_amplitude FR_angvel)) (kerb_tex (* (+ FL_bump FR_bump) 0.0012 kerb_scale)) ########################################################### # # Scrub FX # # Scrub Front (sf_s 0.55) (FL_scrub (soft_clip FL_scrub 2.0 0.0)) (FL_scrub (* (/ 1 (- 1.0 sf_s)) (max 0.0 (- FL_scrub sf_s)))) (FL_scrub (power FL_scrub 2.0)) (FL_scrub (* FL_scrub (oscillator scrub_lambda_front))) (FR_scrub (soft_clip FR_scrub 2.0 0.0)) (FR_scrub (* (/ 1 (- 1.0 sf_s)) (max 0.0 (- FR_scrub sf_s)))) (FR_scrub (power FR_scrub 2.0)) (FR_scrub (* FR_scrub (oscillator scrub_lambda_front))) (scrub_k 20000.0) (scrub_d 1.0) (scrub_scale_factor (* scrub_scale_master scrub_scale_front)) (FL_scrub (* scrub_scale_factor FL_scrub)) (FL_scrub (split FL_scrub 0.0 1.0 1.0 2.0 0.01)) (FL_scrub (spring FL_scrub scrub_k scrub_d 1.0)) (FR_scrub (* scrub_scale_factor FR_scrub)) (FR_scrub (split FR_scrub 0.0 1.0 1.0 2.0 0.01)) (FR_scrub (spring FR_scrub scrub_k scrub_d 1.0)) # Scrub Rear (sr_s 0.52) (RL_scrub (soft_clip RL_scrub 2.0 0.0)) (RL_scrub (* (/ 1 (- 1.0 sr_s)) (max 0.0 (- RL_scrub sr_s)))) (RL_scrub (power RL_scrub 2.0)) (RL_scrub (* RL_scrub (oscillator scrub_lambda_rear))) (RR_scrub (soft_clip RR_scrub 2.0 0.0)) (RR_scrub (* (/ 1 (- 1.0 sr_s)) (max 0.0 (- RR_scrub sr_s)))) (RR_scrub (power RR_scrub 2.0)) (RR_scrub (* RR_scrub (oscillator scrub_lambda_rear))) (scrub_k 20000.0) (scrub_d 1.0) (scrub_scale_factor (* scrub_scale_master scrub_scale_rear)) (RL_scrub (* scrub_scale_factor RL_scrub)) (RL_scrub (split RL_scrub 0.0 1.0 1.0 2.0 0.01)) (RL_scrub (spring RL_scrub scrub_k scrub_d 1.0)) (RR_scrub (* scrub_scale_factor RR_scrub)) (RR_scrub (split RR_scrub 0.0 1.0 1.0 2.0 0.01)) (RR_scrub (spring RR_scrub scrub_k scrub_d 1.0)) ########################################################### # # Texture # # Combining road effects (FL_tex (+ FL_scrub RL_scrub FL_road)) (FR_tex (+ FR_scrub RR_scrub FR_road)) (tex (+ FL_tex FR_tex rumbling kerb_tex)) (tex (soft_clip tex 1.0 0.0)) # Smooth texture at standstill / very low speeds (slow_tex (smooth tex 0.1)) (slow_tex (drag slow_tex 0.0001 0.0)) (speed_bias (max 0.0 (min 1.0 (/ vel_mag 10.0)))) (tex (blend speed_bias slow_tex tex)) # Engine (max_rps 8000.0) (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 (+ 0.8 throttle)) (load_mult (max load_mult 1.0)) (engine_scale (blend (min 1.0 (/ vel_mag 50.0)) engine_scale_slow engine_scale_fast)) (engine_vibe (sin crankPos)) (engine_vibe ( * load_mult engine_vibe rps_scale engine_scale)) (feel ( + tex engine_vibe)) ########################################################### # # Pseudo Gyro forces # (ratio_scale ( / 10.0 (max 10 steer_ratio))) (ac (power (min 1.0 (/ vel_mag 100)) 1.5)) (mx (blend (max 0.0 (- (/ vel_mag 77) 0.3)) 0.0 ac)) (ms (power (* 0.1 (smooth steering_vel 0.01)) 1.0)) (pseudo_gyro_force (* 20.0 ms mx ratio_scale fx gyro_scale)) ########################################################### # # Rack # # brake_factor affects the influence of the brake on the rack load gamma (brake_factor 1.0) # Gamma values (base_gamma 2.6) (micro_gamma (- base_gamma micro_details)) (macro_gamma (- base_gamma macro_details)) (rack_gamma (- base_gamma (* rack_load (+ 1.0 (* brake_load (* brake_factor -0.5)) (* brake brake_load brake_factor))))) # Detail gamma using fx (ug (+ 1.0 (* (power fx micro_gamma)))) (mg (+ 1.0 (* (power fx macro_gamma)))) # Dynamic Load gamma - increases rack force under high loads e.g. downforce or braking (f_load_avg (/ (+ FL_load FR_load) 2.0)) (counter (+ counter 1.0)) (counter (if (max 0 (- et 0.5)) (counter) (0.0) )) (moving_avg (+ moving_avg 0.0)) (moving_avg (if moving_avg moving_avg f_load_avg)) (moving_avg (+ (* moving_avg (/ (- counter 1.0) counter)) (* f_load_avg (/ 1.0 counter)))) #(static_load (smooth moving_avg 0.1)) (static_load moving_avg) (smooth_load (/ (max 0.0 (- (smooth f_load_avg 0.1) (* 0.8 static_load))) (- 50.0 (* 30.0 brake)))) (sig_load (* 1.0 (- (/ 1.0 (+ 1.0 (power 2 (* -5.0 smooth_load)))) 0.5))) (rg (+ 1.0 (* (power sig_load rack_gamma)))) # Split out detail levels (rack_fine_detail (split rack 0.0 0.0 1.0 1.0 0.002)) (rack_bump_detail (split (- rack rack_fine_detail) 0.0 0.0 1.0 1.0 0.02)) (rack_coarse_detail (- rack (+ rack_fine_detail rack_bump_detail))) # Apply gamma to details (rack_fine_detail (power rack_fine_detail (/ 1.0 ug))) (rack_bump_detail (power rack_bump_detail (/ 1.0 mg))) # Apply LFB and dynamic load gamma to rack (rack_coarse_lfb (lfb rack_coarse_detail 0.15)) (rack_coarse_lfb (power rack_coarse_lfb (/ 1.0 rg))) # Combine rack and details (rack (+ rack_coarse_lfb rack_fine_detail rack_bump_detail)) ########################################################### # # Construct Output # # Smooth rack at standstill / very low speeds (slow_rack (drag rack 0.0001 0.0)) (slow_rack (smooth slow_rack 0.1)) (ms (* 0.25 (smooth steering_vel 0.005))) (speed_bias (max 0.1 (min 1.0 (/ vel_mag 3.0)))) (rack (blend speed_bias (+ slow_rack ms) rack)) # FX LFB (feel ( lfb feel 0.15)) # Combine rack and FX forces (output ( + rack ( * feel fx 0.8) pseudo_gyro_force)) (output (blend output_smoothing output (smooth output 0.001))) ########################################################### # # 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) ########################################################### # # Clipping # #allow 30% headroom (headroom ( - 0.7 gain)) (clipTo ( + 1.3 headroom)) (clipTo ( if (max 0.0 headroom) 1.3 clipTo)) (output (hard_clip output clipTo)) (output (* output gain)) ########################################################### # # Lock stops # (custom_lock_stop 2.0) (stops (bumpstop wheel_dir 0.1 0.5 0.2 1.0)) (output (+ output (* stops custom_lock_stop))) ########################################################### # # Statistics output # (histogram output) (info2 output)