I agree. It is hacky and ugly and it obviously would be nice if the devs would simply include that one-liner in the next update. The only reason I see why it could be useful is that people have a simple way to package custom sounds with their newly released vehicles all in one place. But as you said that's just a minor difference to replacing sounds.lua... I don't really see why it would make you loose the ability to load sounds from vehicles/common though.
Well what I was basically saying is that you lose the ability to access sounds in "vehicles/common/sounds/<etc>" without having to make a "sounds.cs" file. Meaning that there's a common sound called "GenericEngineSound", and I want my car to use it - instead of having to define new sounds for it, I simply add to my JBeam this: Code: "engineSound":"GenericEngineSound" I just find it a lot simpler and easier to do it without using per-vehicle Lua. Sure, it works, but it's just asking for trouble in the future...imagine how many mod authors would have to update their mods just so their sounds work properly. I don't see that going down very well.
Personally I think this is still wrong, the vehicles should not be the ones that define the engine sound... the actual ENGINE JBEAM should be the files that decide what sounds are used as we all like to sometimes have v8's or what ever... an I4 soundfile when you selected a v8.... seems total legit...
If it was C++ you'd have Code: string vehicleName = "Ibishu Covet"; SFXProfile HatchEngine = new SFXProfile(); HatchEngine.fileName = "vehicles/hatch/moonhawk_engine.ogg"; HatchEngine.description = "AudioDefaultLoop3D"; Buuut it's torquescript
If only this were compatible with the current BeamNG exp so it wouldn't break stuff like the large cannon's controls.
To update this (found by Dummiesman a while back) for the new version... Put this file in C:\Program Files (x86)\Steam\SteamApps\common\BeamNG.drive\lua\vehicle\[replace sounds.lua] Some black magic in the file that I don't get makes this system work again
can somone walk me threw this i want this sound so bad i dont care if its for every car or truck i just want it to work somone please dumb it down for me or help something lol i want this sound for the yota stock runner looks like a ford ranger please help lol
Any idea why, when using this mod, any car that spawns will initially have no engine sound until swapping it out then back in again? Is this normal? If not, how can I fix it? EDIT: Nevermind, I figured it out. However, I'm now having an issue that is baffling me. Suddenly my mod that has been extensively using this script has stopped working; I'm getting an error in the console saying that the game engine couldn't find the sound profile specified, even though it is correctly scripted in name.cs. It seems like name.cs is not loading for whatever reason... EDIT2: Okay, after completely reinstalling Beam I got the engine sounds working again. However, now I've run into another seemingly inexplicable issue: Now, none of my custom sounds are working. Every different engine that I use that uses custom sounds uses the same generic Beam engine sound, and when I check in the console, the Lua debug says that each one IS correctly loading the sound profile. Can anyone help me with this? It's getting very frustrating and I'm losing the motivation to work on a mod I'm developing because of this. I literally didn't change anything related to the sound processing when the sounds broke. I'll be more than happy to provide the files if someone could help :| I also tried editing the custom_sounds.lua file so that it ONLY uses the custom sound, not the EngineTestSound, and when I do that, my engines no longer use the default sounds... They're silent. And the debug text still shows that the correct sound profiles are being loaded, they're just.. not playing. All of these sounds I have been using for hours now, they're all 96k and mono.
So I'm either retarded and need help or I just am doing this wrong.... I don't ever usually script or do anything in LUA or CS, could one of the OPs please upload a new version of the code/instructions or upload a pack of all the vehicles with the replacement CS/JBeam files so all we have to do is replace the ogg files and file names in the entries? Thanks