Need help for object vehicle client and sound.

Making or wanting help making your own asset? Check in here
Post Reply
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Need help for object vehicle client and sound.

Post by anantdeathhawk »

I am trying to mod F16 3p gun sound for my private use and when i put some sound files it says this. :neutral:
even though the drive has 10Gbs of free disk space.Previously i put two files,but it isn't taking anymore files or any files at all.

Image

Thanks.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Need help for object vehicle client and sound.

Post by Mats391 »

It might copy files to a temporary directory on your main drive (I guess C:\) Make sure you have enough space there too.
Image

Mineral: TIL that Wire-guided missiles actually use wire
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: Need help for object vehicle client and sound.

Post by anantdeathhawk »

Yay! thanks that worked. :-D
I only had 1Gb of space left in C drive, so deleted some files on the downloads folder and now i have approx 3Gbs of free space.
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: Need help for object vehicle client and sound.

Post by anantdeathhawk »

Could you please tell me,what these do?

There are 3 sound files linked in this tweak file, how does all the 3 work?
I tried linking the 3P gun tweak file with two sounds although i noticed the "stopType 2" for the F16,that means full auto right?

CODE from US M1a1

Code: Select all

ObjectTemplate.activeSafe Sound S_us_tnk_m1a2_Barrel_Projectile_Looping
ObjectTemplate.modifiedByUser "J.F.Leusch69"
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects/weapons/stationary/usart_lw155/sounds/tank_projectile_01.wav,objects/weapons/stationary/usart_lw155/sounds/tank_projectile_02.wav,objects/weapons/stationary/usart_lw155/sounds/tank_projectile_04.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 0
ObjectTemplate.volume 1
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 0
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.97/1.1/
ObjectTemplate.minDistance 10
ObjectTemplate.halfVolumeDistance 30
Code from IDF F16

Code: Select all

ObjectTemplate.activeSafe Sound S_idf_jet_f16_Cannon_Fire3P
ObjectTemplate.modifiedByUser ljo
ObjectTemplate.lowSamples 2147483647
ObjectTemplate.mediumSamples 2147483647
ObjectTemplate.soundFilename "objects/vehicles/air/us_jet_f16/sounds/F16 Strafe a.wav,objects/vehicles/air/us_jet_f16/sounds/F16 Strafe b.wav"
ObjectTemplate.loopCount 0
ObjectTemplate.is3dSound 1
ObjectTemplate.stopType 2
ObjectTemplate.volume 6
ObjectTemplate.pitch 1
ObjectTemplate.reverbLevel 1
ObjectTemplate.pitchEnvelope 0/1/0.9/1.1/1/1/0/0.95/1/
ObjectTemplate.volumeEnvelope 0/1/0/1/1/1/0/0.901/1/
ObjectTemplate.position -1.6434e-005/-1.66215e-005/-0.620438
ObjectTemplate.minDistance 30
ObjectTemplate.halfVolumeDistance 450
Thanks.
Last edited by anantdeathhawk on 2016-10-31 12:25, edited 1 time in total.
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Need help for object vehicle client and sound.

Post by Mats391 »

The stopTypes corrospond to the way the sound is supposed to loop. I am not sure which stands for what, but I think the loop settings are:
- No loop
- Loop while holding button
- Loop while firing
Image

Mineral: TIL that Wire-guided missiles actually use wire
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: Need help for object vehicle client and sound.

Post by anantdeathhawk »

Ok thank you. :)
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: Need help for object vehicle client and sound.

Post by anantdeathhawk »

So i noticed, the codes;

Code: Select all

ObjectTemplate.minDistance           <<--------------------(defines the minimum distance to hear the sound.)

ObjectTemplate.halfVolumeDistance    <<---------------------(defines the distance for half of the total volume you hear at min distance.)
In most jets' tweak file or gun file in case of harrier,these were the values of these codes for 3P sounds;

Code: Select all

ObjectTemplate.minDistance 30 (20 for Mig 21/20 or 30 for A10)
ObjectTemplate.halfVolumeDistance 450 (350 for Mig 21/250 for A10) 
I don't know if this is intentional or not.

I changed it to:

Code: Select all

ObjectTemplate.minDistance 400
ObjectTemplate.halfVolumeDistance 500
and i was able to hear the guns 400 meters from the target.This video below made me realize what was missing, when a jet in PR straffed a target. :smile:
I also tried the sound from this video, in game.

User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Need help for object vehicle client and sound.

Post by Mats391 »

minDistance is the minimum distance you can hear the sound. That means until it reaches minDistance it will not lose any volume.
After that point it loses half the volume for every halfVolumeDistance until it falls under a certain threshold and sound wont play
Image

Mineral: TIL that Wire-guided missiles actually use wire
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: Need help for object vehicle client and sound.

Post by anantdeathhawk »

Ok, so i interpreted it wrong, but it still means that i'll be able to hear the sound from atmost 400 m, if the min distance is set to 400?
User avatar
Mats391
PR:BF2 Lead Developer
Posts: 7643
Joined: 2010-08-06 18:06

Re: Need help for object vehicle client and sound.

Post by Mats391 »

No. You can hear it to 400m as if you would be standing right next to the gun. Only after that point it will get quieter.
Image

Mineral: TIL that Wire-guided missiles actually use wire
anantdeathhawk
Posts: 641
Joined: 2015-11-12 21:11

Re: Need help for object vehicle client and sound.

Post by anantdeathhawk »

Alright, i understand now.Thank you.Not messing with them anymore. :-)
Post Reply

Return to “PR:BF2 Community Modding”