'######################################## '# # '# AI MAIN SCRIPT # '# # '# S400LE Business Series # '# # '# Generic # '# # '######################################## '(c) 01.11.2012 Marcel Kuhnt, Rüdiger Hülsmann 'Script Version: 1.0 'Omsi release: 1.0 'Revision History: '- Marcel Kuhnt 10.08.2009 Added Revision History '- Modified by Notio3D '------------------------------------------------------------------------------------------ '###################### ' Hauptteil '###################### {init} (M.L.Engine_Init) (M.L.Antrieb_Init) (M.L.Elec_Init) (M.L.Door_Init) (M.L.Wiper_init) (M.L.Lights_init) (M.L.Bremse_init) (M.L.IVU_Ticketbox_init) (M.L.Matrix_init) (M.L.Dashboard_init) (M.L.Heizung_init) (M.L.Collision_Init) {end} {frame} '================================================================================= ' Schaltwagen fahren - keine leichte Angelegenheit, auch nicht für die KI! :-) (L.L.AI) {if} 900000 (S.L.bremse_p_tank01) (S.L.bremse_p_tank02) (S.L.bremse_p_tank03) (S.L.bremse_p_tank04) (S.L.bremse_p_leitung01) (S.L.bremse_p_leitung02) (L.L.engine_n) 500 < (L.L.AI_Scheduled_AtStation) 1 = || {if} 0 (S.L.antrieb_getr_gang) (S.L.antrieb_shifter_posy_target) {else} (L.L.antrieb_getr_gang) 0 = (L.L.Velocity) 15 < && {if} 1 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 1 = (L.L.Velocity) 10 > && {if} 2 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 2 = (L.L.Velocity) 20 > && {if} 3 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 3 = (L.L.Velocity) 30 > && {if} 4 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 4 = (L.L.Velocity) 50 > && {if} 5 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 5 = (L.L.Velocity) 75 > && {if} 6 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 2 = (L.L.Velocity) 5 < && {if} 1 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 3 = (L.L.Velocity) 10 < && {if} 2 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 4 = (L.L.Velocity) 28 < && {if} 3 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 5 = (L.L.Velocity) 45 < && {if} 4 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} (L.L.antrieb_getr_gang) 6 = (L.L.Velocity) 65 < && {if} 5 (S.L.antrieb_getr_gang) 0 (S.L.antrieb_shifter_posy_target) (S.L.antrieb_getr_ratio_act) (S.L.AI_clutchtimer) {endif} {endif} {endif} (L.L.AI) (L.S.AutoClutch) || {if} (L.L.antrieb_getr_ratio_act) 0 = ! {if} 'Kupplungspedal variiert abhängig von Drehzahl und Gaspedal: 'Schwankungsbereich 100 UPM bei Leerlauf bis 1100 UPM bei Vollgas, 'Drehzahl bei komplett "losgelassener" Kupplung 550 (unterhalb 10km/h) bzw. 750 UPM bei Leerlauf, '1950 / 2150 UPM (Leerlauf + 1400UPM) bei Vollgas 'Geschwindigkeitsabhängig oberhalb oder unterhalb Leerlaufdrehzahl auskuppeln: (L.L.Velocity) 10 > {if} 550 {else} 750 {endif} (L.L.Throttle) 1400 * + s0 'Drehzahlschwankungsspanne ist ebenfalls abhängig vom Gaspedal: (L.L.Throttle) 1000 * 100 + s1 l0 (L.L.engine_n) - l1 / 0 max 1 min (L.L.Clutch) (L.S.Timegap) 0.25 * - max s0 l0 1 (L.L.AI_clutchtimer) 0 max - max (S.L.Clutch) (L.L.Throttle) (L.L.AI_clutchtimer) 0 max min (S.L.Throttle) (L.L.AI_clutchtimer) 1 < {if} (L.L.AI_clutchtimer) (L.S.Timegap) + (S.L.AI_clutchtimer) {endif} {else} 0 (S.L.Throttle) (L.L.antrieb_getr_gang) 0 = {if} 0 {else} 1 {endif} (S.L.Clutch) -0.8 (S.L.AI_clutchtimer) {endif} {endif} '............................... (M.L.Engine_Frame) (M.L.Antrieb_Frame) (M.L.Elec_Frame) (M.L.Door_frame) (M.L.Dashboard_frame) (M.L.lights_frame) (M.L.Wiper_frame) (M.L.Bremse_frame) (M.L.Klappern_frame) (M.L.IVU_Ticketbox_frame) (M.L.Matrix_frame) (M.L.FF_frame) (M.L.Rain_frame) (M.L.Dirt_frame) (M.L.Sound_volume_frame) (M.L.Heizung_frame) (M.L.Cashdesk_frame) (M.L.Onboard_frame) '............................... 'AI: (L.L.AI_Engine) 0.5 > (L.L.engine_on) 0.5 < && {if} 0 (S.L.bremse_feststell_sw) (S.L.bremse_feststell) 1 (S.L.engine_injection_on) 400 (S.L.engine_n) 1 (S.L.engine_on) {endif} (L.L.AI_Engine) -0.5 < (L.L.engine_on) 0.5 > && {if} 0 (S.L.engine_on) 0 (S.L.engine_injection_on) 1 (S.L.bremse_feststell_sw) (S.L.bremse_feststell) {endif} {end} '---------------------------------- 'Crash: {trigger:collision} (M.L.Collision_Trigger) {end} '---------------------------------- 'malfunction reset: {trigger:malfunction_reset} 1.0 (S.L.elec_V_battery) (M.L.Collision_Malfunction_Reset) {end}