How do you add a soundscript to a route in TRS2019?

janathan

Member
I have a route that takes place along the coast line. I wanted to add some ambient sounds of waves crashing and seagulls calling. I named these sound files, "ocean.wav" and "seagull.wav." I tried to add these sounds using two different methods I remember seeing in the config file of another route I downloaded that had sound:

soundscript
{
seagull-ocean
{
ambient 1
value-range 1,0.9
volume 0.7

sound
{
0 "soundscript\ocean.wav"
1 "soundscript\seagull.wav"
}
}
}


or...





soundscript
{
0 "soundscript\ocean.wav"
1 "soundscript\seagull.wav"
}

When I tried to submit the edits, I got this:

"Error: The file 'soundscript\ocean.wav' does not exist"
"Error: The file 'soundscript\seagull.wav' does not exist"

This was when I lost my temper because it was 1:15 a.m. and I couldn't figure out why it wasn't recognizing the files. Why would it say the file doesn't exist when it's right there in the bloody folder?! I don't understand. How can a file exist and not exist at the same time?! I don't understand what this error is trying to tell me.
 
I followed the directions exactly. These are the errors I get:
- <kuid:140046:101252> VE101: The file 'ocean.wav' does not exist.
- <kuid:140046:101252> VE101: The file 'seagull.wav' does not exist.
- <kuid:140046:101252> VE101: The file 'ocean.wav' does not exist.

Truth be told, I've been trying to add soundscripts for years and always have a problem of it not working. I don't understand what the error message means. I checked and double-checked and the files are 100% in there. I don't understand why the game refuses to load them and why it's claiming that they don't exist.
Here's how I have it written:

soundscript
{
morning
{
ambient 1
value-range 1,0.1
volume 0.9

sound
{
0 "ocean.wav"
1 "seagull.wav"
}
}

night
{
ambient 1
value-range 0,0.9
volume 0.9

sound
{
0 "ocean.wav"
}
}
}

and those errors make the route faulty.
 
Last edited:
Hello Janathan,

I've noticed your frustration with the soundscript problem. I haven't dealt with that problem, but I have had some issues with getting things into the right containers. I dug around, and found an asset with several sounds in a soundscript that didn't throw errors. It is "SS Log Dump Diesel TS12 <Kuid2:445923:100255:3>. When I looked at the Wiki reference for VE101, it basically said the file doesn't exist - but what that really means is that the file isn't where the program expects it to be. Since I don't have your asset file or the associated config.txt, I can't see how they are organized, but it appears from the code piece in your message, that the references to the wav files are essentially the same as in the SS Log Dump file. The question I have is, where are the actual wav files? According to the SS Log Dump file, they need to be in the asset, and not have any quotes. That's just my take on the problem. Here's hoping you get it working.

Bob Morrison
 
Just in case, with that config, the wav files need to be in the same place as the config.txt, not in a sub folder.

Where did you get the wav files from? there have been cases in the past of mp3 files being given a wav extension which doesn't work, it did in some old versions of Trainz I believe.

The wav files need to be either 8 or 16 bit and 22 or 44 kHz or they won't work, which could be the reason for the error, Trainz error messages sometimes don't quite give the correct information.
 
Malc,

I thought of the possibility of an invalid sound file, but thought that the program would be more likely to show a VE102 error, if that were the case.

Bob
 
I suggest trying a couple of things:
1. Clone an existing sound asset and replace the wav file with your wav file (named identically). This will confirm your wav file works.
2. Edit the config file of your cloned asset and make one change at a time to check it is working with the addition of new containers, files etc.
 
I'm not sure what you mean by, "the sound has to be in the asset." How do I place it in the route? Is there a way to add an attachment point or something? Thanks for the replies so far.
 
I'm not sure what you mean by, "the sound has to be in the asset." How do I place it in the route? Is there a way to add an attachment point or something? Thanks for the replies so far.

Have a look at these.

Should point you in the right direction

Where are you putting the sounds? needs to be a specific asset created for placing on the route.

<kuid2:52682:39283:2> KB_seagulls1
<kuid2:52682:39284:3> KB_seagulls2
<kuid2:52682:39285:2> KB_seagulls3
<kuid2:52682:39282:1> KB_seagulls
<kuid:439337:101054> SAP_Seagulls_Animated_with_Sound
 
I'm a little confused. It sounds like you're saying that the sound can't be attached to a route. Instead, you have to make an object that plays the sound and place it on the route. Either way, I'll try that.
 
Back
Top