Modding Help Scorpion Spear

Discussion in 'Starbound Modding' started by kirbydunker85, Dec 16, 2013.

  1. kirbydunker85

    kirbydunker85 Poptop Tamer

    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,
     
  2. tifel100

    tifel100 Void-Bound Voyager

    Increase level = lower energy cost
     
  3. RacieB

    RacieB Void-Bound Voyager

    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.)
     
  4. kirbydunker85

    kirbydunker85 Poptop Tamer

    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" } ]
    
    }
    }
    
     
    Last edited: Dec 18, 2013
  5. RacieB

    RacieB Void-Bound Voyager

    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.
     
  6. kirbydunker85

    kirbydunker85 Poptop Tamer

    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?
     
  7. RacieB

    RacieB Void-Bound Voyager

    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?
     
  8. kirbydunker85

    kirbydunker85 Poptop Tamer

    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.
     
    Last edited: Dec 19, 2013
  9. Nightmares

    Nightmares Scruffy Nerf-Herder

    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
     
  10. Nightmares

    Nightmares Scruffy Nerf-Herder

    Your sound needs to be 16-bit .wav
     
  11. kirbydunker85

    kirbydunker85 Poptop Tamer

    I downloaded Audacity and put them all into 16 bit wav, still getting the magic bytes error.
     
  12. Nightmares

    Nightmares Scruffy Nerf-Herder

    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" } ] },
     
  13. tifel100

    tifel100 Void-Bound Voyager

    try putting the .wav file in the same folder as your item, and change the path on the item to the new path.
     
  14. kirbydunker85

    kirbydunker85 Poptop Tamer

    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
     
    Last edited: Dec 19, 2013
  15. kirbydunker85

    kirbydunker85 Poptop Tamer

    [​IMG]

    To prove it's in 16-bit PCM and I'm still getting the magic bytes error.
     
  16. Nightmares

    Nightmares Scruffy Nerf-Herder

    upload all of your assets. I'll try them out and see if I can get them working.
     
  17. kirbydunker85

    kirbydunker85 Poptop Tamer

  18. tifel100

    tifel100 Void-Bound Voyager

    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.
     
    Last edited: Dec 19, 2013
    Nightmares likes this.
  19. kirbydunker85

    kirbydunker85 Poptop Tamer

    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.
     
  20. tifel100

    tifel100 Void-Bound Voyager

    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/....
     
    Last edited: Dec 20, 2013

Share This Page