Fractal Softworks Forum
Starsector => Mods => Modding => Topic started by: Inhilicon on April 12, 2021, 07:12:52 AM
-
Is there something I'm missing? I've tried pointing to it in various ways via the .weapon file, the standard way appears to be "gun_fire", for example. I've tried including the format; "gun_fire.ogg" and "gun_fire_01" as well as "gun_fire_01.ogg" and nothing seems to work. It does not have the exact same bitrate or audio sample rate as the vanilla sound effects but I don't know if that matters.
What're the general ground rules I should follow to make sound effects play in the game?
EDIT: I realized there is a thread for minor questions that don't warrant their own thread, how do I delete my own thread?
-
As far as I know, the bit rate does not matter. But the sample must be MONO.
Did you create your "sounds.json" on your data/config folder? if you don't you'll need to make something like this:
"my_weapon_fire":
[
{"file":"my_sounds_folder/weapon_fire.ogg","pitch":1.00,"volume":1.00},
],
then, on your "weapon.wpn" file:
"fireSoundTwo":"my_weapon_fire",
-
I was following the "Intro to Modding" guide on the Starsector fandom site and it entirely glossed over anything to do with audio, so I was veritably left in the dark.
Have not yet created a sounds.json file, that must be the missing step! I really should've looked at the data/config folder of other mods earlier. Whoops.
That should fix everything, thank you very much!
-
Hmmm is it possible to make multiple "file" entries to include multiple slightly different sounds that it would choose from? Or would it just play all of them all the time?
-
Hmmm is it possible to make multiple "file" entries to include multiple slightly different sounds that it would choose from? Or would it just play all of them all the time?
If you want them to be randomly chosen, its simple.
same sample, slightly different pitch:
"my_weapon_fire":
[
{"file":"my_sounds_folder/weapon_fire.ogg","pitch":1.10,"volume":1.00},
{"file":"my_sounds_folder/weapon_fire.ogg","pitch":1.00,"volume":1.00},
{"file":"my_sounds_folder/weapon_fire.ogg","pitch":0.90,"volume":1.00},
],
Different sample:
"my_weapon_fire":
[
{"file":"my_sounds_folder/weapon_fire_01.ogg","pitch":1.00,"volume":1.00},
{"file":"my_sounds_folder/weapon_fire_02.ogg","pitch":1.00,"volume":1.00},
{"file":"my_sounds_folder/weapon_fire_03.ogg","pitch":1.00,"volume":1.00},
],
-
That answers it, thx ;)
Makes for some interesting possibilities....