I got it to play a sound when thrown, and when it makes contact using a .gun file, I don't think the .throwingitem file supports fireSound, because it isn't working with it. However I don't want to use a .gun file because of the energy cost,
Try replacing it with a default game sound file to see if it's the file itself causing the problem or your code, it may be that your custom sound is the wrong bitrate or something (I'm currently having a problem where I can't get some custom species hurt sounds to work even though they're 16bit, if the player is hit by something it causes an instant crash.)
The file I was using when it did work, now doesn't work. It's very frustrating. Also, when everything stopped working, is when I moved everything into my 'mods' folder. I actually had everything working before that. This error is popping up, even though I have the file exactly where it's saying it isn't. Code: Error: Could not load /sfx/mk_harpoon.wav asset, attempting to use default. AssetException: No such asset '/sfx/mk_harpoon.wav' here is the .gun file code I'm using. Code: { "itemName" : "scorpionspear", "inventoryIcon" : "scorpionspearicon.png", "image" : "scorpionspear.png", "dropCollision" : [-8.0, -3.0, 8.0, 3.0], "maxStack" : 1, "rarity" : "Legendary", "description" : "Get Over Here!", "shortdescription" : "The Get Over Here Spear", "level" : 666, "handPosition" : [2, -1], "firePosition" : [150, 3], "fireTime" : 0.1, "twoHanded" : true, "cooldown" : 900.0, "projectileType" : "scorpionspearprojectile1", "projectile" : { "speed" : 65, "power" : 1 }, "muzzleEffect" : { "fireSound" : [ { "file" : "/sfx/mk_harpoon.wav" } ] } }
Hmm, maybe try sticking that one file in the assets folder rather than mods and seeing if it behaves there? If so then it might be a folder mishap with mods (it's currently in mods\*yourmod*\sfx correct?) Or possibly try sfx\gun maybe it's being picky and weird about asset hierarchy.
It's exactly that, when I stuck the files back into the starbound/assets folder, everything works. Is there a way to get the game to read from the mod folders?
It's supposed to read from the mod folders first so I can't think what the problem might be, ughhh :S You've got a modinfo file and all that good stuff right?
It seems like the mod folder is messing me up, saying I need an absolute path, when the files are in the same folder as the .config and .projectile files! I'm also getting this error when loading my audio file from the mods folder, but I don't get the error when i load it from the assets/sfx/projectiles folder! Code: Error: Exception caught loading asset: /mods/mk_mod/sfx/mk_harpoon.wav, AudioException: Wav file data subchunk has wrong magic bytes, got `LIST' but expected `data' Error: Could not load /mods/mk_mod/sfx/mk_harpoon.wav asset, attempting to use default. AssetException: No such asset '/mods/mk_mod/sfx/mk_harpoon.wav' I'm not sure how to tell the program to look to a previous folder, than inside it's own folder and folders inside the folder it's sitting in. I tried using complete path like this Code: "C:/Program Files (x86)/Steam/steamapps/common/Starbound/mods/mk_mod/sfx/mk_harpoon.wav" that didn't work either. It also doesn't load the .projectile file have in the mod folder either. I'm just completely lost.
That's the absolute path. Relative means relative to where your file is. If you want it to look a file back, put .. in front of your file path. By default it starts looking in assets or mods, you don't need to tell it Starbound
I remember you mentioned you couldn't use the fireSound attribute unless it wazs a .gun. Did you ever try using a soundEffect attribute in your .projectile or .thrownitem? would look something like this: "soundEffect" : { "fireSound" : [ { "file" : "/sfx/melee/swing_hammer.wav" } ] },
try putting the .wav file in the same folder as your item, and change the path on the item to the new path.
Whenever I do that, I'm getting this error Code: Error: Could not load scorpionspearconfig.config asset, attempting to use default. AssetException: Path 'scorpionspearconfig.config' must be absolute this is my code for the .gun file at the moment Code: "action" : "config", "file" : "/Starbound/mods/mk_mod/projectiles/scorpionspearprojectile/configspear/scorpionspearconfig.config" I'm getting this error Code: Warn: Slow asset 0.059 : /Starbound/mods/mk_mod/projectiles/scorpionspearprojectile/configspear/scorpionspearconfig.config Error: WorldServerThread exception caught: VariantException: Cannot convert from null to string
I managed to get the sound to work, but I got another error about scorptionspear.config Trying to fix that I did it! The spear shoots and does the spear sound effect + comehere/getoverhere sound! Btw, You had scorpionspear in your player.config, but you have no recipe file, you also had tabularasa and stuff, Those should be added by themselfs. The whole point of tabularasa is so you don't edit PLAYER.CONFIG. You make the .recipe use the tabularasa table, so you don't have to put it in the player.config. (Should be uploading your fixed mod soon) I didn't modify your dependencies neither your player.config, I left them as you had them(I did change them to test myself but I reverted them back). And you said you feel like this forum doesn't help.
Yeah, sorry about that. Long days + learning this gave me brain fatigue. I'm guessing the problem was the path to the sound effects was off? Tell me what the problem was please.
Yes, you just started most of the paths at the wrong spot. you have to start them from the folders inside mk_mod I believe. so /weapons/... or /projectiles/....