TOPlist

[NÁVOD] Úpravy pre správnu funkčnosť B951/E v AI

[NÁVOD] Úpravy pre správnu funkčnosť B951/E v AI

Příspěvekod stefco » 30 lis 2014 16:14

Zdravím opäť. Dnes som prichystal zopár vylepšení pre čerstvo vydanú Karosu B951/E, konkrétne pre jej korektné správanie v AI. Samozrejme než začnete, nezabudnite na zálohu :) Rozdelím to do niekoľkých krokov:

1. Zobrazenie ŠPZ a čísla garáže
Tu je oprava jednoduchá. Do skritpu MAN_D86_main_AI.osc dopíšte
Kód: Vybrat vše
(L.$.SPZ_DPP) "" $=
{if}
   (M.L.SPZ_DPP_MOD)
{endif}

napr. za riadok (S.L.Debug_5). ŠPZ to nahodí síce až pri zmene cieľa, ale lepšie ako nič.

2. Podsvietené vonkajšie BUSE panely v noci
Opäť postačí jednoduchá úprava skriptu v tomto prípade lights.osc.
Nájdeme odstavec
Kód: Vybrat vše
      (L.L.AI_Light)
      {if}
         (L.L.AI_Engine) 0.5 >
         {if}
            (L.L.AI_Light) 0.75 >
            {if}
               1
            {else}
               0.5
            {endif}
            (S.L.cp_schluessel_rot)

            (L.L.AI_Light) 1.5 > (S.L.lights_sw_fern)
         {else}
            0.5 (S.L.cp_schluessel_rot)
         {endif}
      {else}
         0 (S.L.cp_schluessel_rot) (S.L.lights_sw_fern)
      {endif}

A zmeníme ho nasledovne:
Kód: Vybrat vše
      (L.L.AI_Light)
      {if}
      1 (S.L.BUSE_svetlo)
         (L.L.AI_Engine) 0.5 >
         {if}
            (L.L.AI_Light) 0.75 >
            {if}
               1
            {else}
               0.5
            {endif}
            (S.L.cp_schluessel_rot)

            (L.L.AI_Light) 1.5 > (S.L.lights_sw_fern)
         {else}
            0.5 (S.L.cp_schluessel_rot)
         {endif}
      {else}
         0 (S.L.cp_schluessel_rot) (S.L.lights_sw_fern) (S.L.BUSE_svetlo)
      {endif}


3. Oprava chovania dverí v AI
V tomto prípade sa bude úprava týkať skriptu door_nd.osc
Nájdeme odstavec:
Kód: Vybrat vše
'----------------------
'   AI-Ablauf:

(L.L.AI_Scheduled_AtStation) s0
1 =
{if}
'Wenn Türen geöffnet werden sollen:
   (L.L.Velocity) 3 <
   {if}
'Nur, wenn v < maxkmh, sonst warten
'Taster jeweils nur betätigen, falls noch nicht an
      (L.L.doorTarget_23) ! (L.L.haltewunsch) &&
      {if}
         (M.L.trg_bus_doorback2)
      {endif}
      (L.L.doorTarget_23) ! (L.L.haltewunsch) ! &&
      {if}
         (M.L.trg_bus_doorback2)
         2 (S.L.AI_123)
      {endif}
      (L.L.doorTarget_0) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront0)
      {endif}
      (L.L.doorTarget_1) ! (L.L.door_AI_timer) 0.6 > &&
      {if}
         (M.L.trg_bus_doorfront1)
      {endif}
   {else}
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{else}
l0 -1 =
{if}
1 (S.L.AI_123)
'Wenn Türen geschlossen werden sollen:
'Taster jeweils nur betätigen, falls noch nicht aus:
   (L.L.doorTarget_1)
   {if}
      (M.L.trg_bus_doorfront1)
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.doorTarget_0) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront0)
   {endif}
'Haltestellenbremse erst wegnehmen, wenn alle Türen zu. Dann auch erst den Bus AI-mäßig freigeben:
   (L.L.door_0) 0.1 <
   (L.L.door_1) 0.1 < &&
   (L.L.door_2) 0.1 < &&
   {if}
      (L.L.doorTarget_23) (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorback2)
      {endif}
      (L.L.doorTarget_23) !
      {if}
         0 (S.L.AI_Scheduled_AtStation)
      {endif}
   {else}
'Sollte eine der Türen auf sein und die Haltestellenbremse aus, dann sofort diese einlegen
      (L.L.doorTarget_23) ! (L.L.haltewunsch) &&
      {if}
         (M.L.trg_bus_doorback2)
      {endif}
      (L.L.doorTarget_0) !
      (L.L.doorTarget_1) ! &&
      {if}
         0 (S.L.door_AI_timer)
      {endif}
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{endif}
{endif}

(L.L.doorTarget_23) (L.L.ai) (L.L.AI_123) 2 = && &&
(L.L.AI_Scheduled_AtStation) -1 = (L.L.AI_123) 1 = && ||
{if}
   (L.L.haltewunsch) !
   {if}
      (L.L.doorAftLastOpen) (L.S.Timegap) + (S.L.doorAftLastOpen)
      
      (L.L.doorAftLastOpen) (C.L.doorAftOpenTime) > &&
      {if}
         (T.L.ev_doortriggerclose_2)
         0 (S.L.doorTarget_23)
         (C.L.door_druckluft)
         {if}
         (L.L.bremse_p_Tank04) 100000 - 0.96 * 100000 + (S.L.bremse_p_Tank04)
         0 (S.L.AI_123)
         {endif}
   {endif}
      {endif}
{else}
   0 (S.L.doorAftLastOpen)
{endif}

A prepíšeme ho týmto:
Kód: Vybrat vše
'----------------------
'   AI-Ablauf:

(L.L.AI_Scheduled_AtStation) s0
1 =
{if}
'Wenn Türen geöffnet werden sollen:
   (L.L.Velocity) 3 <
   {if}
'Nur, wenn v < maxkmh, sonst warten
'Taster jeweils nur betätigen, falls noch nicht an

      (L.L.doorTarget_0) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront0)
      {endif}

      (L.L.doorTarget_1) ! (L.L.door_AI_timer) 0.1 > &&
      {if}
         (M.L.trg_bus_doorfront1)
      {endif}

      (L.L.doorTarget_23) ! (L.L.door_AI_timer) 0.6 > &&
      {if}
         (M.L.trg_bus_doorback2)
      {endif}
   {else}
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{else}
l0 -1 =
{if}
'Wenn Türen geschlossen werden sollen:
'Taster jeweils nur betätigen, falls noch nicht aus:
   (L.L.doorTarget_1)
   {if}
      (M.L.trg_bus_doorfront1)
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.doorTarget_0) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorfront0)
   {endif}

   (L.L.doorTarget_23) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorback2)
   {endif}
   1 (S.L.zvonek_volume)
'Haltestellenbremse erst wegnehmen, wenn alle Türen zu. Dann auch erst den Bus AI-mäßig freigeben:
   (L.L.door_0) 0.1 <
   (L.L.door_1) 0.1 < &&
   (L.L.door_2) 0.1 < &&
   (L.L.door_3) 0.1 < &&
   (L.L.door_4) 0.1 < &&
   
   {if}

      0 (S.L.AI_Scheduled_AtStation) (S.L.zvonek_volume)
   {endif}
   {else}
'Sollte eine der Türen auf sein und die Haltestellenbremse aus, dann sofort diese einlegen
      (L.L.doorTarget_0) !
      (L.L.doorTarget_23) !
      {if}
         0 (S.L.door_AI_timer)
      {endif}

   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{endif}
{endif}

Týmto sa pri zatváraní dverí rozsvieti aj výstraha.

Čo sa týka nedobrzďovania, to sa prejavuje len v prípade, že sa do AI prepnete, ale ešte neprevezmete riadenie. Inak je všetko v poriadku.
Nezabudnite tiež, že skripty bude potrebné upraviť zvlášť pre B951 a zvlášť pre B951E, keďže majú samostatné priečinky.
Uživatelský avatar
stefco
Zasloužilý scripter
Zasloužilý scripter
 
Příspěvky: 1004
Registrován: 12 srp 2011 22:17

Re: [NÁVOD] Úpravy pre správnu funkčnosť B951/E v AI

Příspěvekod Driver2000 » 07 pro 2014 13:37

Asi bys nedal ke stažení, prosím.
Obrázek
Driver2000
Diskutující člen
Diskutující člen
 
Příspěvky: 267
Registrován: 13 srp 2013 16:34

Re: [NÁVOD] Úpravy pre správnu funkčnosť B951/E v AI

Příspěvekod stefco » 25 pro 2014 23:29

Uvedené úpravy sú súčasťou dnes vydaného patchu 1.01: http://forum.omsi.cz/viewtopic.php?f=8& ... 80#p214523
Uživatelský avatar
stefco
Zasloužilý scripter
Zasloužilý scripter
 
Příspěvky: 1004
Registrován: 12 srp 2011 22:17


Zpět na Scripty a zvuky

Kdo je online

Uživatelé procházející toto fórum: Žádní registrovaní uživatelé a 15 návštevníků

cron