Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Error with custom weapon sound  (Read 4187 times)

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Error with custom weapon sound
« on: September 08, 2012, 09:05:08 AM »

I just made myself a new weapon based on the hellbore, the weapon works and looks like its supposed to if i have the original sounds there, but if change it to the sound i want, it crashes to this error whenever i try to mount the weapon on a ship.

Quote
37068 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.OO0O] with id [Anti Aircraft Gun-SoundBible.com-1303768514] not found
java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.OO0O] with id [Anti Aircraft Gun-SoundBible.com-1303768514] not found

Is there something wrong with the sound file? or just me not knowing what im doing? Any help would be awesome. :D
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Error with custom weapon sound
« Reply #1 on: September 08, 2012, 01:34:12 PM »

are you trying to get the game to load a sound from a website....?

you got to have the sound in your folders your know.. and fix the config file too..
Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Error with custom weapon sound
« Reply #2 on: September 08, 2012, 05:25:01 PM »

That is just the name of the sound file, it is in my sounds folder in faction/fx/guns/soundfiles like it should be, and what was that about the config file? is it wrong?
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Error with custom weapon sound
« Reply #3 on: September 08, 2012, 05:39:44 PM »

did make sure the sound file is in .ogg format? it can't be .mp3 or etc

and i'm not completely sure, but i don't think id's with space are very good,

for the config file, you have to have one if you want to use custom sounds, because weapons can't just use directories straight to the sounds, they have to be defined in the:


/data/config/sounds.json
Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Error with custom weapon sound
« Reply #4 on: September 08, 2012, 06:21:34 PM »

They are in .Wav format. maybe thats why? interstellar fed has similar sound file formats so i though it was ok.

EDIT: changed their format to .ogg and i got a different error for that. now its missing ID. probably because i dont have anything that specifies the location of these sound files.

Quote
35056 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.OO0O] with id [Anti_Aircraft_Gun] not found
java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.specs.OO0O] with id [Anti_Aircraft_Gun] not found

Correct?

EDIT2: Figured it out =D i found the config file of another faction, now il just have to make a similar one, and then it should work because i want it to.
« Last Edit: September 08, 2012, 06:40:32 PM by ValkyriaL »
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Error with custom weapon sound
« Reply #5 on: September 08, 2012, 06:40:22 PM »

Possibly, but it seems more normal now  ;D

Take a look into the starfarer-core config files on how to add sounds,

but i would guess to make it work it'll have add this in your sounds.json

   "Anti_Aircraft_Gun":[
      {"file":"sounds/fx/guns/***.ogg","pitch":1,"volume":1.0},
   ],



Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Error with custom weapon sound
« Reply #6 on: September 08, 2012, 06:47:45 PM »

New errors must be a sign of success :P

Quote
25405 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.RuntimeException: Error loading [sounds/fx/guns/Anti_Aircraft_Gun.ogg] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Hekmatyar,C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Nephalem,../starfarer.res/res,CLASSPATH]
java.lang.RuntimeException: Error loading [sounds/fx/guns/Anti_Aircraft_Gun.ogg] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Hekmatyar,C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Nephalem,../starfarer.res/res,CLASSPATH]

EDIT: It freaking works! i can mount my weapon!....there is one slight problem.. there is no sound when i shot =-/

« Last Edit: September 08, 2012, 06:54:15 PM by ValkyriaL »
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Error with custom weapon sound
« Reply #7 on: September 08, 2012, 07:03:05 PM »

In your weapon file:

   "fireSoundTwo":"Anti_Aircraft_Gun",

In your Config file:

   "Anti_Aircraft_Gun":[
      {"file":"sounds/fx/guns/Anti_Aircraft_Gun.ogg","pitch":1,"volume":1.0},
   ],

IN your PROPER directory:

    /Starfarer/mods/hekmatyar/sounds/fx/guns/Anti_Aircraft_Gun.ogg

Pretty sure it's the last part your missing, you didn't actually put the sound file in the location you've specified. ( bad choice to leave it in the original starfarer-core, make a sounds folder in your mod)

Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Error with custom weapon sound
« Reply #8 on: September 08, 2012, 07:12:58 PM »

Forget any of that, its probably class path again. The code is screwing with me because im so tired. :P
EDIT: if you wonder why it says hekmatyar twice, is because i made one folder to much and coulden't be bothered to remove it.  ;)

Quote
24928 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.RuntimeException: Error loading [Starfarer/mods/Hekmatyar/sounds/hekmatyar/fx/guns/Anti_Aircraft_Gun.ogg] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Hekmatyar,C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Nephalem,../starfarer.res/res,CLASSPATH]
java.lang.RuntimeException: Error loading [Starfarer/mods/Hekmatyar/sounds/hekmatyar/fx/guns/Anti_Aircraft_Gun.ogg] resource, not found in [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Hekmatyar,C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\..\mods\Nephalem,../starfarer.res/res,CLASSPATH]
   
« Last Edit: September 08, 2012, 07:33:15 PM by ValkyriaL »
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Error with custom weapon sound
« Reply #9 on: September 08, 2012, 08:17:33 PM »

blargh, I hope you didn't copy and pasted the codes i gave, because those are just assumptions i've made on the basis you would fill in the blanks, lol

but at this point, why not just post up the files/pm , since it seems to be giving you so much issue.

and be careful if those backslashes and forward slashes are incorrect but i doubt they'd have too much an effect.

/ \ /\ /\

« Last Edit: September 08, 2012, 09:09:59 PM by FlashFrozen »
Logged

ValkyriaL

  • Admiral
  • *****
  • Posts: 2145
  • The Guru of Capital Ships.
    • View Profile
Re: Error with custom weapon sound
« Reply #10 on: September 09, 2012, 03:42:48 AM »

My brother helped me in my times of direst need :P  apparently i cant change a sound files original sound format, that's why it didn't work.
now my 3500mm station-class artillery cannon sounds literally like a nuke going off.

EDIT: the codes you pasted did work, i just had to add a few things.
Logged