Community Forum

external horn file setup

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created24.11.2019 16:48


Dave Chuckry (CaptainD430) 24.11.2019 16:48
im trying to add in a horn sound file that it not ingame what do i need to add in the xml for this to work or is it not possible?

Bilbo Beutlin (BBeutlin) 24.11.2019 17:18
<honk>
<sound template="XYZ" file="myHonk.wav"/>
</honk>

If you don't use a template from "$data/sounds/soundTemplates.xml" you need to add the attributes like radius, volume, pitch etc.

The soundfile should be converted to *.ogg, else you might lose performance (due to internal conversion) and you'll get a warning in log.

Dave Chuckry (CaptainD430) 24.11.2019 17:23
ya thats what i did
<honk>
<sound externalSoundFile="sounds/Dixie.ogg" innerRadius="18.775">
<volume indoor="0.45" outdoor="1.25"/>
<pitch outdoor="0.90"/>
<lowpassGain indoor="0.90"/>
</sound>
</honk>

and i get an erro 2019-11-23 19:12 Warning: Filename not defined in 'vehicle.honk.sound'. Ignoring it!

Dave Chuckry (CaptainD430) 24.11.2019 17:27
ya thats what i did
<honk>
<sound externalSoundFile="sounds/Dixie.ogg" innerRadius="18.775">
<volume indoor="0.45" outdoor="1.25"/>
<pitch outdoor="0.90"/>
<lowpassGain indoor="0.90"/>
</sound>
</honk>

and i get an erro 2019-11-23 19:12 Warning: Filename not defined in 'vehicle.honk.sound'. Ignoring it!

Bilbo Beutlin (BBeutlin) 24.11.2019 17:30
The attribute 'externalSoundFile' is obsolete - use 'file' instead.

Dave Chuckry (CaptainD430) 24.11.2019 17:32
sound file= correct?

<honk>
<sound File="sounds/Dixie.ogg" innerRadius="18.775">
<volume indoor="0.45" outdoor="1.25"/>
<pitch outdoor="0.90"/>
<lowpassGain indoor="0.90"/>
</sound>
</honk>
im still getting the same error

Bilbo Beutlin (BBeutlin) 24.11.2019 17:36
Yes - like I've written already in my post 17:18

Dave Chuckry (CaptainD430) 24.11.2019 17:42
ok so i got it wrong what is the name i put for XYZ or do i leave it at XYZ

Dave Chuckry (CaptainD430) 24.11.2019 17:46
<!--
<honk>
<sound template="HONK_LIZARD_TRUCK" linkNode="0>"/>
</honk>
-->

<honk>
<sound File="sounds/Dixie.ogg" innerRadius="18.775">
<volume indoor="0.45" outdoor="1.25"/>
<pitch outdoor="0.90"/>
<lowpassGain indoor="0.90"/>
</sound>
</honk>

this is fully what i have in the xml what is it im doing wrong

Bilbo Beutlin (BBeutlin) 24.11.2019 17:50
No - my 'XYZ' is a placeholder/example.
Look into "$data/sounds/soundTemplates.xml". Search for "<!-- Horn -->". The following templates "HONK_..." contain various setups which you CAN use - but you may also use your own attributes.


XML is CASE SENSITIVE - "File" is wrong - right is "file".

Dave Chuckry (CaptainD430) 24.11.2019 18:30
<honk>
<sound template="HONK_PICKUP" file="sounds/Dixie3.ogg" innerRadius="18.775">
<volume indoor="0.45" outdoor="1.25"/>
<pitch outdoor="0.90"/>
<lowpassGain indoor="0.90"/>
</honk>

more help pls im just not getting it lol

Bilbo Beutlin (BBeutlin) 24.11.2019 19:16
Here it works fine with
<honk>
<sound template="HONK_TRUCK" file="sounds/truckHorn.ogg"/>
</honk>

Any errors in your log?

Make sure your mod isn't double in your mod folder (zipped and unpacked). The .zip is always preferred.

Dave Chuckry (CaptainD430) 24.11.2019 19:39
<honk>
<sound template="HONK_TRUCK" file="sounds/Dixie3.ogg" >
</honk>

i used this and im still getting this error 2019-11-24 12:37 Warning: Filename not defined in 'vehicle.honk.sound'. Ignoring it!

the next thing i did was rename my file to truckHorn and im still getting that erro last thing i can think of is sound file isnt converted correctly but then i used audacity to convert to mono ogg im stumped


Bilbo Beutlin (BBeutlin) 24.11.2019 20:27
Syntax error: <sound .. is not closed by />
If the <sound> tag contains other tags, it must be closed by </sound>. This was your error in above post.

For test use a file from default sounds, something which you can identify very well, eg. try
<honk>
<sound template="HONK_TRUCK" file="$data/sounds/shared/train_crossing_bell_loop_01.ogg"/>
</honk>

If this doesn't work, there's something wrong in your vehicle.xml - perhaps section <honk> existing multiple?

Dave Chuckry (CaptainD430) 24.11.2019 21:39
no no and no i put in the closed tag tried it your way as above even name it with an ingame name and still the same error and no it doesnt exist more then once in the xml

Bilbo Beutlin (BBeutlin) 24.11.2019 21:48
*sigh* what you posted 19:39 was FAULTY:
<sound template="HONK_TRUCK" file="sounds/Dixie3.ogg" >
.. missing "/"

RIGHT is
<sound template="HONK_TRUCK" file="sounds/Dixie3.ogg" />
Copy and paste this into your vehicle.xml

You need to improve your XML knowledge.

Dave Chuckry (CaptainD430) 24.11.2019 22:33
that still gives the error it does not work

Bilbo Beutlin (BBeutlin) 24.11.2019 23:02
The message "Warning: Filename not defined" means the attribute 'file' could not be evaluated.
Post your complete <honk> section. Copy and paste it directly from your xml file.
You can also use Notepad++ for a rough XML check by syntax highlight.

And once more: are you ABSOLUTELY sure, there's no .zip copy of the mod in modfolder?

Dave Chuckry (CaptainD430) 24.11.2019 23:10
<honk>
<sound template="HONK_TRUCK" file="sounds/Dixie_Horn.ogg" />
</honk>

thats the entire honk xml lines and no i dont havve a zip copy oiiiiii

Bilbo Beutlin (BBeutlin) 24.11.2019 23:19
That's curious. Here it works fine.
Is your game on actual patch version 1.5.1.0 ?

Dave Chuckry (CaptainD430) 24.11.2019 23:19
yes steam game so yes it up to sdate

Bilbo Beutlin (BBeutlin) 25.11.2019 00:57
The only idea I've remaining is an inproper filename/path resolving. The Giants engine reacts a little bitchy on spaces or special characters in filenames. Though this seems fixed in general, there might be still some stuff where it fails.
I've redirected my modfolder to "E:/FS19mods" and no problems anymore.

So if you want to try, create a folder on local drive with plain ASCII name, move your mods to this place and change in "gameSettings.xml"
<modsDirectoryOverride active="true" directory="..."/>
where 'directory' is an absolute path like eg. "E:/FS19mods"

Dave Chuckry (CaptainD430) 25.11.2019 04:41
i went back and renamed the file horn so it cant be spaces or special characters sighhh

Bilbo Beutlin (BBeutlin) 25.11.2019 13:14
You don't get it? It's the pathname which can contain special chars. By default the modfolder is on
"C:\Users\USERNAME\Documents\My Games\FarmingSimulator2019\mods". Now the soundfile is
"C:\Users\USERNAME\Documents\My Games\FarmingSimulator2019\mods\MODNAME\sounds\mySound.wav".
If eg. your USERNAME contains spaces or special chars it can confuse a simple path resolving.

Another difficulty can be cloud storage like OneDrive or Steam cloud. You should never use such for FS files - all should be on local drives since cloud storage decreases performance significantly and the enhanced access time can lead to read errors.

Bilbo Beutlin (BBeutlin) 25.11.2019 13:20
*deleted* (wrong thread)

Dave Chuckry (CaptainD430) 26.11.2019 01:35
<honk>
<sound template="horn.ogg" file="sounds/horn.ogg" innerRadius="18.775">
<volume indoor="0.45" outdoor="1.25"/>
<pitch outdoor="0.90"/>
<lowpassGain indoor="0.90"/>
</sound>
</honk>


got it working thanks for all the help


Note: Log in to post. Create a new account here.