Community Forum

[Help] How to link hydraulic sound to trailer discharge animatio

Forum Overview >> Farming Simulator 2013

CategoryFarming Simulator 2013
Created04.05.2014 12:13

Valerio Rosario (Unknown) 04.05.2014 12:26
Hello everyone,

I'm not so good at scripting and modding but I'm learning things looking at mods and some tutorials, at the moment I'm working, for personal use, on a FS2011 HKL trailer, I've converted it, edited some parts (textures, little i3d fixes, and so on...), added a couple of scripts, and other little things like a hud with keybinds that I created.

Now I'm frozen with the hydraulic sound, as the title says. I mean that, I've successfully fixed the discharge tip animation but I can't link to it a sound effect like the one you hear when using a front loader or similar (e.g. hydraulicUP.wav).
I don't know/understand where I have to put my hands on, I tried to look at many luas, tried to put the reference in the mod.xml, and so on but with no success!

Any help will be much appreciated. Thanks in advance.

Manuel Leithner - GIANTS Software 05.05.2014 15:12

just use:
<cylinderedHydraulicSound file="data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="0.9" volume="1.0" />

instead of:
<hydraulicSound file="data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="0.9" volume="1.0" />

No the sound depends on the moving parts instead of the tip animation.

Valerio Rosario (Unknown) 05.05.2014 23:57
Firt of all thanks a lot for your answer,

I've tried this solution with no success although the mod has the "cylindered" spec, seems like an index or a kind of reference is missing (if needed for the purpose), or maybe I'm missing to check something, as I said I'm not so good in modding.

Btw thanks again. =D

Manuel Leithner - GIANTS Software 06.05.2014 09:20


<cylinderedHydraulicSound file="$data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="0.9" volume="1.0" />

i think the $ was missing and so the sound file could not be loaded

Valerio Rosario (Unknown) 07.05.2014 17:09
Tried this too without success. This time I've given a look at the lua that manages the animation, I've found that there isn't a playsample call and any reference like vehicle.cylinderedHydraulicSound#file that points to that parameter in the "modname.xml", maybe this is the source of the problem. I'm having another issue, when using the keys to move the hook, there's no RPM increasing, with both code in the lua and powershaft spec, that's another annoying thing.

By the way, forgot to write that I'm testing the mod in a More Realistic environment but the mod isn't MR, don't think this should be related.

Thanks again and again for your help. =D

Manuel Leithner - GIANTS Software 08.05.2014 09:12
vehicle.cylinderedHydraulicSound#file is used in the Cylindered-Spec. The sound will be played if movingParts! are moving (e.g. a cylinder which is animated using movingTools & movingParts. See the default Kroeger HDK Trailer for example).

Please contact the author of the MR-Environment for special support (RPM increase, etc)

Valerio Rosario (Unknown) 09.05.2014 08:32
Sorry if I'm bothering with this issue but its really annoying me =/.
It's so weird that anything I try to fix it doesn't work! I did a compare between this mod and others that have a working sound effect but can't see anything which should solve the problem. Another strange thing is that other HKL trailers that I tried have the same behavior, even though they have the <cylinderedHydraulicSound .../> or the <hydraulicSound .../> in the mod.xml, no sound effect at all.

Speaking about the RPM increase, I must apologize because I went OT and I'll open a new thread eventually, I've mentioned it just 'cause it's another function that doesn't work even if correctly implemented in the mod lua, comparing it with another correctly working mod (in MR environment too) it's all ok, the one I'm working on has 2 functions in addition, the towball and the liftaxis. I'll do a test removing those and trying it in game, even though I don't think those should interfere.

Thank for your attention and have a nice day =)

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