Virtual Transportation Center

Advertisement

Giving Buses Exterior Announcements

Started by Dash5155, March 04, 2019, 10:42:29 am

0 Members and 1 Guest are viewing this topic.

Dash5155

Get Exterior Announcements on ANY OMSI 2 Bus

This tutorial will show you how to get exterior announcements on your buses, based on the schedule you're on. Make sure you make backups of all your files, and attempt at your own risk! I will not be held responsible if you didn't make backups!!


So like look up which door OSC your bus uses (it's usually named door.osc but make sure you look at your.bus file to be sure) and then find this:

{macro:Door Frame}
scroll down until you find something similar to this:

(L.L.door_0) 0.9 > (S.L.PAX_Entry0_Open) (S.L.PAX_Exit0_Open)
 (L.L.door_2) 0.9 > (S.L.PAX_Entry1_Open) (S.L.PAX_Exit1_Open)
 (L.L.door_3) 0.9 > (S.L.PAX_Entry2_Open) (S.L.PAX_Exit2_Open)
 (L.L.door_4) 0.9 > (S.L.PAX_Entry3_Open) (S.L.PAX_Exit3_Open)
 (L.L.door_5) 0.9 > (S.L.PAX_Entry4_Open) (S.L.PAX_Exit4_Open)

Now I must warn it won't be exactly the same, so that's why I never outright told people to do this because if it doesn't work, I know for a fact that people will get angery with me and tell me I broke their games. So I warn it won't be the same, and if you're unsure MAKE BACKUPS. Anyways, under the last door Entry/exit, in this case the last one is 5, hit return to add an extra space, then add in this:

(L.L.door_0) 0.05 >
 (L.L.external_announcement) 1 = &&
 {if}
 "..\..\Announcements\"
 0 (M.V.GetDepotStringGlobal) $+   
 "\" $+ 
 (M.V.GetTTLineString) $+
 "_EXT_" $+
 (M.V.GetTTTerminusIndex) 0 (M.V.GetTerminusString) $+
 ".wav" $+
 $msg (T.F.ev_ext_announce)
 0 (S.L.external_announcement)
 {endif}

 (L.L.door_0) 0.04 <
 (L.L.external_announcement) 0 = &&
 {if}
 "ditto.wav" $msg (T.F.ev_ext_announce)
 1 (S.L.external_announcement)
 {endif}
 

Then save.

NEXT, we open up the varlist for that same bus, mind you it's usually door_varlist.txt but it could be named something differently so check your .bus file under varlists to be sure.

anyway all you do in this case is add in this:

external_announcement and save

We're almost done.

LAST STEP:

Open up the sound cfg file for whatever bus you're using. In this case, it's in the sound folder and normally named sound_[bus name].cfg but it could be named differently so make sure, again, you check your .bus files.

Anyways, just add in this small bit of code and save.

[sound]

1

[3d]
1.386
5.502
2.573
5

[trigger]
ev_ext_announce


and save and viola, you've just given your bus automatic exterior announcements!



NOTES:
  • Depending on your scheduled trip and whatnot, so far this only works by default with Cayuga USA as it's the only map that has announcements made with this function in mind, but it could be expanded to other maps if other developers work with this, or if you make announcements yourself.
  • In order to have announcements play in other maps, you must create .wav files in the GLOBAL announcements directory relative to the .hof file with the name:
    [SCHEDULED ROUTE NUMBER]_EXT_[SCHEDULED ROUTE IBIS TERMINUS STRING].wav
    For example,
    47_EXT_CITY HALL.wav
  • To make buses announce when the front doors close, you can add a .wav file to your vehicle named "ditto.wav" in your vehicle's sound folder.

Thank me by sharing this tutorial if it works for you! Special thanks to user "John" for creating the originals as well!

dhaben81


htownman25

Just tested it out on the NovaBus LFSAs and it worked as expected.

*sigh*  Now to get to work on the buses that I may want to drive in Cayuga - including the buses that are already there (the AI buses).

NOTE:  I managed to get it working on the buses that I wanted this to work on - except on the MCI D4500CTs.

Other than that, great work on the tutorial Dash!

p.s.  :P

The Lycanroc Gamer


openbve092

Hi there everyone!

 I'm having some major troubles putting in the scripts in the XD40 / LFS series. I already got it working using the directions above on the orion v, so there is that. Could anyone help out please? Been trying pretty much everything, even the ditto script doesn't work and I have the sound file in the respective sound folder.

Thanks in advance.

vincekaufman

Quote from: openbve092 on April 14, 2019, 05:01:45 pmHi there everyone!

 I'm having some major troubles putting in the scripts in the XD40 / LFS series. I already got it working using the directions above on the orion v, so there is that. Could anyone help out please? Been trying pretty much everything, even the ditto script doesn't work and I have the sound file in the respective sound folder.

Thanks in advance.

So when I did the whole thing, I couldn't figure out why the bus wasn't retrieving the files. Be sure your .hof file is set to have global strings, especially if you're using an older hof file.


MillerRichard1

Hey, I have a question regarding the Exterior Announcements for buses. When doing step 2 and step 3 you said add in the codes in the varlist and the sound cfg files but when you open them, can you be specific as to where they should be placed? Like in step 1, you said specifically where to put the code under which was under something like this:

(L.L.door_0) 0.9 > (S.L.PAX_Entry0_Open) (S.L.PAX_Exit0_Open)
 (L.L.door_2) 0.9 > (S.L.PAX_Entry1_Open) (S.L.PAX_Exit1_Open)
 (L.L.door_3) 0.9 > (S.L.PAX_Entry2_Open) (S.L.PAX_Exit2_Open)
 (L.L.door_4) 0.9 > (S.L.PAX_Entry3_Open) (S.L.PAX_Exit3_Open)
 (L.L.door_5) 0.9 > (S.L.PAX_Entry4_Open) (S.L.PAX_Exit4_Open)

I'm asking for the same thing right here as you didn't specify the specifics as to where the remaining codes should go under. You only said to "add in this" but never where it should be placed. I want to do this for my Xcelsiors, NovaLFS' and NovaLFSAs. Also, I'm doing this for the Cayuga USA Map

Dash5155

For the sound cfg and varlist, it doesn't matter where you put the remaining lines, as long as they exist. That's why locations for those are not specified. You could put it at the very top, the very bottom, or after any line of your chosing.

MillerRichard1

Quote from: Dash5155 on April 29, 2019, 09:32:03 pmFor the sound cfg and varlist, it doesn't matter where you put the remaining lines, as long as they exist. That's why locations for those are not specified. You could put it at the very top, the very bottom, or after any line of your chosing.

I've done that and when I go into OMSI (I always make sure to Load Map without Buses) and select a bus (for example, XDE40) I never get anything. Just the swoosh sound the door makes when it opens

openbve092

Which bus are you testing it out on? It should work like Dash said before, unless you didn't put the OSC external announcement script correctly. My advice is try doing it with the Orion V first, since it's script is mostly identical to the tutorial one.

However, for future reference, that's a file called door auto OSC, try doing that one instead of the normal door. OSC, especially for the XD series and LFSAs.mIt worked for me! (Through trial and error) I highly recommend you make backups just in case.

MillerRichard1

Im just doing it for the Xcelsiors and NovaLFSA

openbve092

If you're doing it for the Xcelsiors and LFSA, then try to look for a door_auto.OSC file. Follow the tutorial up above that dash made, and it should work. That's what worked for me.

MillerRichard1

Quote from: openbve092 on May 10, 2019, 11:19:51 amIf you're doing it for the Xcelsiors and LFSA, then try to look for a door_auto.OSC file. Follow the tutorial up above that dash made, and it should work. That's what worked for me.

Alright I'll try that later on. Thanks!

openbve092

You're welcome! Just remember to always back up your files Incase anything goes wrong.

MillerRichard1

Quote from: openbve092 on May 10, 2019, 01:13:00 pmYou're welcome! Just remember to always back up your files Incase anything goes wrong.

Tried it and it didn't work.. Im not sure what I could be doing wrong ??? I tried everything

Advertisement

Powered by EzPortal