Stránka 1 z 2

[NÁVOD] Neoplan N4016 AI

PříspěvekNapsal: 07 zář 2013 21:50
od stefco
Dnes tu pre Vás mám opäť návod na úpravu skriptov, tentokrát ide o sfunkčnenie výborného modelu Neoplan N4016 od autorov marcin4590, KaJoTT3D, Przemek!, darek59 ako AI autobusu.
Bude potrebné upraviť 3 (resp. 4) súbory z priečinku ..\OMSI\Vehicles\Neoplan_N4016\Script\, konkrétne:
N4016_main.osc
door_PL.osc
(resp. door_DE.osc)
lights.osc

Predtým, než začnete tieto skripty upravovať, ubrote si ich zálohy, ak by niečo nevyšlo :!:

A. Súbor N4016_main.osc
Otvorte si tento súbor a na koniec pripíšte tento odstavec:
Kód: Vybrat vše
{trigger:ai_scheduled_settarget}

(M.L.Vollmatrix-AI-Setting)

{end}

a zmeny uložte. Týmto opravíte zobrazovanie cieľov na vonkajších paneloch u autobusu použitého ako AI.

B. door_PL.osc (resp. door_DE.osc)
Otvorte tento súbor a nájdite odstavec AI-Ablauf:
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) (C.L.Door_Bremse_Halte_MaxKMH) <
   {if}
'Nur, wenn v < maxkmh, sonst warten
'Taster jeweils nur betätigen, falls noch nicht an
      (L.L.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {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}
'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.bremse_halte_sw) (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.bremse_halte_sw) !
      {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.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {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}


{end}


A prepíšte ho upraveným skriptom:
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) (C.L.Door_Bremse_Halte_MaxKMH) <
   {if}
'Nur, wenn v < maxkmh, sonst warten
'Taster jeweils nur betätigen, falls noch nicht an
      (L.L.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.doorTarget_0) ! (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_doorfront0)
      {endif}
      (L.L.doorTarget_2) ! (L.L.door_AI_timer) 0.6 > &&
      {if}
         (M.L.trg_bus_doorback2)
         (M.L.trg_bus_doorback3)
      {endif}
      (L.L.doorTarget_4) ! (L.L.door_AI_timer) 0.6 > &&
      {if}
         (M.L.trg_bus_doorback4)
         (M.L.trg_bus_doorback5)
      {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_0)
   {if}
      (M.L.trg_bus_doorfront0)
      0 (S.L.door_AI_timer)
   {endif}
   (L.L.doorTarget_5) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorback4)
      (M.L.trg_bus_doorback5)
   {endif}
   (L.L.doorTarget_3) (L.L.door_AI_timer) 0.3 > &&
   {if}
      (M.L.trg_bus_doorback2)
      (M.L.trg_bus_doorback3)
   {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 < &&
   (L.L.door_3) 0.1 < &&
   (L.L.door_4) 0.1 < &&
   (L.L.door_5) 0.1 < &&
   {if}
      (L.L.bremse_halte_sw) (L.L.door_AI_timer) 0.3 > &&
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.bremse_halte_sw) !
      {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.bremse_halte_sw) !
      {if}
         (M.L.trg_bus_dooraft)
      {endif}
      (L.L.doorTarget_0) !
      (L.L.doorTarget_1) ! &&
      (L.L.doorTarget_2) ! &&
      (L.L.doorTarget_3) ! &&
      (L.L.doorTarget_4) ! &&
      (L.L.doorTarget_5) ! &&
      {if}
         0 (S.L.door_AI_timer)
      {endif}
   {endif}
   (L.L.door_AI_timer) (L.S.Timegap) + (S.L.door_AI_timer)
{endif}
{endif}


{end}

A znovu uložte zmeny. Po tejto úprave bude v AI autobus otvárať všetky dvere na zastávkach ak budú chcieť cestujúci nastúpiť alebo vystúpiť.

C. Súbor lights.osc
Otvorte súbor a nájdite odstavec:
Kód: Vybrat vše
{macro:lights_AI}
'AI-Einfluss auf Beleuchtung:
   (L.L.AI)
   {if}
      (L.L.AI_Blinker_L) (L.L.AI_Engine) 0.5 > &&
      {if}
         1 (S.L.lights_sw_blinker)
         (M.L.lights_startblinkgeber)
      {else}
         (L.L.AI_Blinker_R) (L.L.AI_Engine) 0.5 > &&
         {if}
            2 (S.L.lights_sw_blinker)
            (M.L.lights_startblinkgeber)
         {else}
            0 (S.L.lights_sw_blinker)
         {endif}

      {endif}
      
      (L.L.AI_Blinker_R) (L.L.AI_Blinker_L) &&
      {if}
         1 (S.L.lights_sw_warnblinker)
         (M.L.lights_startblinkgeber)
      {else}
         0 (S.L.lights_sw_warnblinker)
      {endif}


'   {endif}

      (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}

      (L.L.AI_Interiorlight) (S.L.cp_licht_oberdeck_sw)
   {endif}
{end}

a za riadok (L.L.AI_Interiorlight) (S.L.cp_licht_oberdeck_sw) doplňte:
Kód: Vybrat vše
      (L.L.AI_Engine) 0.5 > (L.L.AI_Light) 0.75 < &&
      {if}
         1
      {else}   
         0
      {endif}   
      (S.L.cp_licht_dzien_sw)

Tento odstavec umožní AI busu počas dňa využívať LED-ky na denné svietenie, ktoré budú svietiť, ak bude autobus naštartovaný a nebudú svietiť stretávacie alebo parkovacie svetlá. Odstavec bude teda po úprave vyzerať nasledovne:

Kód: Vybrat vše
{macro:lights_AI}
'AI-Einfluss auf Beleuchtung:
   (L.L.AI)
   {if}
      (L.L.AI_Blinker_L) (L.L.AI_Engine) 0.5 > &&
      {if}
         1 (S.L.lights_sw_blinker)
         (M.L.lights_startblinkgeber)
      {else}
         (L.L.AI_Blinker_R) (L.L.AI_Engine) 0.5 > &&
         {if}
            2 (S.L.lights_sw_blinker)
            (M.L.lights_startblinkgeber)
         {else}
            0 (S.L.lights_sw_blinker)
         {endif}

      {endif}
      
      (L.L.AI_Blinker_R) (L.L.AI_Blinker_L) &&
      {if}
         1 (S.L.lights_sw_warnblinker)
         (M.L.lights_startblinkgeber)
      {else}
         0 (S.L.lights_sw_warnblinker)
      {endif}


'   {endif}

      (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}

      (L.L.AI_Interiorlight) (S.L.cp_licht_oberdeck_sw)

      (L.L.AI_Engine) 0.5 > (L.L.AI_Light) 0.75 < &&
      {if}
         1
      {else}   
         0
      {endif}   
      (S.L.cp_licht_dzien_sw)

      {endif}   
{end}


Týmto je úprava hotová a autobus Neoplan N4016 môžete pripísať do AI listu a využívať aj ako AI dopravu, pokým nebude vydaná oficiálna oprava, kde by toto mali mať autori už ošetrené.
Veľa kilometrov bez nehody praje Stefco ;)

Re: Neoplan N4016 AI

PříspěvekNapsal: 07 zář 2013 21:57
od lukasek1973
Šlo by to i na B731/2 ?

Re: Neoplan N4016 AI

PříspěvekNapsal: 07 zář 2013 22:06
od stefco
B732 má samostatnú verziu pre AI. Ak myslíš to, že sa nezatvára druhé krídlo tretích dverí, tak to som zatiaľ neskúšal opraviť, ale tam sú aj iné názvy pre makrá a preto by to asi nefungovalo.

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 08:28
od hugomm
Stefco, ty sa musíš strašne nudiť, či? :D

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 09:28
od peternr79
to je dobre, len nech sa nudí. :)

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 09:47
od dwarf253
Ty jsi vážně borec! 8-) Moc díky za návod.

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 12:50
od NicolasFI
Měl bys dostat nějakou hodnost seš fakt dobrej.

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 13:37
od hugomm
inak stefco, tak ma napadlo (aby to bolo pre nás prehľadnejšie), či by si si nezaložil svoj topic (napr. stefcove úpravy) a tam by si dával tieto svoje úpravy ;)

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 14:18
od TAMBUS 3700
stefco je naozaj dobrý,kľudne by mal urobiť svoj autobus s unikátnymi skriptami... Je fakt zručný ;)

Re: Neoplan N4016 AI

PříspěvekNapsal: 08 zář 2013 14:19
od Trolejbusák
No tak vyrobit autobus není jen o scriptech ale i o modelování.... Nevím možná tohle stefco taky umí