Hallo,
da es sicher einige interessieren könnte, eine automatische Fortschaltung der Haltestellen (und somit auch automatische Ansagen) in Bussen einzubauen, die soetwas noch nicht besitzen, hier mal ein Tutorial. Diese Version funktioniert vollautomatisch, unabhängig von der Haltestellenbremse, aber nur, wenn ein Fahrplan aktiv ist!
maybe some of you are interested in having automatic busstop announcements in busses that don't have this feature. Therefore I'm making this tutorial. This version works fully automatic and does not check the busstop brake. But you have to have an active schedule!
Das sollte für alle Busse funktionieren, die ein IBIS-Gerät besitzen, das auf den IBIS-Geräten der SD-Busse basiert.
This should work for all busses that have an IBIS device that is based on the IBIS device of the SD busses.
Hinweis: Ich bin nicht verantwortlich für eventuelle Fehlfunktionen von OMSI, die möglicherweise durch Befolgen des Tutorials entstehen. Dieser Code darf auch gerne in Projekten (nicht-kommerziell und kommerziell) verwendet werden, aber die Erwähnung meines Namens ist notwendig.
Notice: I'm not responsible for possible errors which were caused by following this tutorial. You may use that code in your projects (non-commercial and commercial) but it is necessary to mention my name.
Alle zu ändernden Dateien befinden sich im Script-Ordner des jeweiligen Busses!
All files you need to change are located in the Script folder of the bus you want to change!
1. Den Frame-Teil in der IBIS-2.osc suchen, der Teil sieht so aus:
1. Search for the Frame-part in the file IBIS-2.osc, this part looks like that:
2. Diesen Teil unter (L.L.elec_busbar_main) und dem {if} einfügen:
2. Append the following part underneath (L.L.elec_busbar_main) and the {if}:
- ' Bei Beenden/Löschen eines Fahrplans soll auch nicht weitergeschalten werden. Dies wird durch Umgehung der Änderungsprüfung (unten) verhindert (auf -1 setzen).
- (M.V.GetTTBusstopIndex) -1 =
- {if}
- (M.V.GetTTBusstopIndex) (S.L.current_stopindex)
- {endif}
- ' Wenn sich der Haltestellenindex geändert hat, den state auf 1 setzten, damit beim nächsten Überschreiten von 40m Entfernung ausgelöst werden kann
- (L.L.current_stopindex) (M.V.GetTTBusstopIndex) = ! (M.V.GetTTBusstopIndex) 1 = ! &&
- {if}
- (L.L.current_stopindex) -1 =
- {if}
- (M.V.GetTTBusstopIndex) (S.L.current_stopindex)
- {else}
- 1 (S.L.IBIS_State)
- (L.L.kmcounter_m) (S.L.meter_startwert)
- (M.V.GetTTBusstopIndex) (S.L.current_stopindex)
- {endif}
- {endif}
- ' Wenn ausgelöst werden soll, die dazu benötigten Befehle aufrufen und state zurücksetzen, damit nur 1 Mal ausgelöst wird
- (L.L.kmcounter_m) (L.L.meter_startwert) - 40 > (L.L.IBIS_State) 1 = &&
- {if}
- (L.L.IBIS_busstop) (M.V.GetTTBusstopIndex) =
- {if}
- 0 (S.L.IBIS_State)
- {else}
- (L.L.IBIS_busstop) 1 + (S.L.IBIS_busstop)
- (M.L.IBIS_RefreshBusstop)
- (M.L.IBIS_PlayAnnouncement)
- ' Nullsetzen des Timers für den Zeilenwechsel der LCD-Innenanzeige
- 0 (S.L.IBIS_LCD-zeilentimer) (S.L.IBIS_LCD-zeile)
- ' 1 (S.L.IBIS_reload)
- (M.L.IBIS_LCD-refresh)
- 0 (S.L.IBIS_State)
- {endif}
- {endif}
- ' Folgender Vergleich wirkt vielleicht blöd (kmcounter_m minus meter_startwert kann eigentlich nicht negativ sein, ist es aber manchmal!) liegt daran, dass der kmcounter_m nach einem Überlauf (wenn er größer als ~1000 ist) wieder auf 0 gesetzt wird
- (L.L.kmcounter_m) (L.L.meter_startwert) - 0 < (L.L.IBIS_State) 1 = &&
- {if}
- (L.L.IBIS_busstop) 1 + (S.L.IBIS_busstop)
- (M.L.IBIS_RefreshBusstop)
- (M.L.IBIS_PlayAnnouncement)
- ' Nullsetzen des Timers für den Zeilenwechsel der LCD-Innenanzeige
- 0 (S.L.IBIS_LCD-zeilentimer) (S.L.IBIS_LCD-zeile)
- ' 1 (S.L.IBIS_reload)
- (M.L.IBIS_LCD-refresh)
- 0 (S.L.IBIS_State)
- {endif}
3. Den Init-Teil suchen (nach {macro:IBIS_init} suchen) und das zwischen -1 (S.L.IBIS_RouteIndex) und {end} einfügen:
3. Search for the Init-part (look for {macro:IBIS_init}) and insert the following part between -1 (S.L.IBIS_RouteIndex) and {end}:
4. Die folgenden Variablen in der IBIS_varlist.txt am Ende hinzufügen:
4. Append the following variables at the end of the file IBIS_varlist.txt:
Das wars! Viel Spaß mit dem Mod. Bei Fragen, Anregungen usw. stehe ich gerne zur Verfügung.
That's it! Have fun with this mod. If you have any questions or suggestions for improvements feel free to leave me a message.
lG, David