Modding Help A few directory probs.

Discussion in 'Starbound Modding' started by danmanr98, May 21, 2015.

  1. danmanr98

    danmanr98 Subatomic Cosmonaut

    I made a custom gun, and wish to use custom SFX.
    Within my modded folder, I have ModName/sfx/gun/GunSFXname and in my code, I tell it to access that directory, but ingame, it uses the "assetmissing" sound instead.

    Any ideas?

    Here's my code:

    {
    "itemName" : "foxblaster",
    "inventoryIcon" : "foxblaster.png",
    "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
    "maxStack" : 1,
    "rarity" : "Common",
    "description" : "A rusty old revolver, it doesn't have much fire power.",
    "shortdescription" : "Fox-Blaster",
    "image" : "foxblaster.png",
    "handPosition" : [-4, -2],
    "firePosition" : [17, 3],
    "recoilTime" : 0.1,
    "level" : 0.5,
    "tooltipKind" : "gun",
    "weaponType" : "Pistol",
    "fireTime" : 0.6,
    "inaccuracy" : 0.02,
    "twoHanded" : false,
    "walkWhileFiring" : false,

    "projectileType" : "bullet-2",
    "projectile" : {
    "speed" : 75,
    "life" : 3,
    "power" : 2.7,
    "color" : [255, 10, 10]
    },
    "muzzleEffect" : {
    "fireSound" : [ { "file" : "foxblaster.wav" } ],
    "animation" : "/animations/muzzleflash/bulletmuzzle4/bulletmuzzle4.animation"
    }
    }

    As you can see, I also attempted to put the Wav file in the current folder, changing the directory it accesses within the code, but it still doesn't work.

    I'm new to this, any tutorials or potential help I can get?
     
  2. Kayuko

    Kayuko Oxygen Tank

    fireSound accesses the absolute filepath.
    Short:

    "fireSound" : [{ "file" : "/sfx/gun/GunSFXname/foxblaster.wav"}]

    assuming the soundfiles location is "starbound/giraffe_storage/mods/sfx/gun/GunSFXname/foxblaster.wav".
     
  3. danmanr98

    danmanr98 Subatomic Cosmonaut

    Thanks for the reply. Ill try that soon, but may I ask, what do you mean by "Absolute path" ?
     
  4. Kayuko

    Kayuko Oxygen Tank

    An absolute path is the path respective to the root dir of the mod.
    For example, /sfx/xxx/xxx.wav loads "C:\Program Files (x86)\steam\steamapps\common\starbound\giraffe_storage\mods\yourmod(<--- this is the mod's root directory, declared through the .modinfo file)\sfx\xxx\xxx.wav"
     
  5. danmanr98

    danmanr98 Subatomic Cosmonaut

    Ah I see. Thanks ^^

    Unfortunately, having changed my to:


    {
    "itemName" : "foxblaster",
    "inventoryIcon" : "foxblaster.png",
    "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
    "maxStack" : 1,
    "rarity" : "Common",
    "description" : "A rusty old revolver, it doesn't have much fire power.",
    "shortdescription" : "Fox-Blaster",
    "image" : "foxblaster.png",
    "handPosition" : [-4, -2],
    "firePosition" : [17, 3],
    "recoilTime" : 0.1,
    "level" : 0.5,
    "tooltipKind" : "gun",
    "weaponType" : "Pistol",
    "fireTime" : 0.6,
    "inaccuracy" : 0.02,
    "twoHanded" : false,
    "walkWhileFiring" : false,

    "projectileType" : "bullet-2",
    "projectile" : {
    "speed" : 75,
    "life" : 3,
    "power" : 2.7,
    "color" : [255, 10, 10]
    },
    "muzzleEffect" : {
    "fireSound" : [ { "file" : "/sfx/gun/fox/foxblaster.wav" } ],
    "animation" : "/animations/muzzleflash/bulletmuzzle4/bulletmuzzle4.animation"
    }
    }

    Proved to be unsuccessful.

    So, This is the layout of the mod folder:

    • mods -/ModName - /items - /guns -/ModNameguns -/"foxblaster.gun" "foxblaster.png"
    • mods -/ModName - /sfx - /gun -/fox -/foxblaster.wav
     
    Last edited: May 21, 2015
  6. Kayuko

    Kayuko Oxygen Tank

    Okay, the only thing I can do to help you now is reading the logfile, maybe this'll get me some hints.

    Not entirely sure, but it should work like this.
     
  7. danmanr98

    danmanr98 Subatomic Cosmonaut

    Is there a limitation to the length of a sound file?
     
  8. danmanr98

    danmanr98 Subatomic Cosmonaut

    For what ever reason, my modded .gun doesn't successfuly aquire the SFX file I want for the FireSound, but instead replaces it with "Assetmissing" sound.

    Is there anything i'm doing wrong?

    I checked the BitRate of the Wav, and compared it: My file is 1411kbps whilst starbound vanilla sfx seem to be 705kbps. Should this affect whether the sound is viable or not?
    my Code:
    Code:
    {
      "itemName" : "foxblaster",
      "inventoryIcon" : "foxblaster.png",
      "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
      "maxStack" : 1,
      "rarity" : "Common",
      "description" : "A rusty old revolver, it doesn't have much fire power.",
      "shortdescription" : "Fox-Blaster",
      "image" : "foxblaster.png",
      "handPosition" : [-4, -2],
      "firePosition" : [17, 3],
      "recoilTime" : 0.1,
      "level" : 0.5,
      "tooltipKind" : "gun",
      "weaponType" : "Pistol",
      "fireTime" : 0.6,
      "inaccuracy" : 0.02,
      "twoHanded" : false,
      "walkWhileFiring" : false,
    
      "projectileType" : "bullet-2",
      "projectile" : {
      "speed" : 75,
      "life" : 3,
      "power" : 2.7,
      "color" : [255, 10, 10]
      },
      "muzzleEffect" : {
      "animation" : "/animations/muzzleflash/bulletmuzzle4/bulletmuzzle4.animation",
      "fireSound" : [ { "file" : "/smashitems/sfx/gun/fox/foxblasterFireSound.wav" } ]
      }
    }
     
    Last edited by a moderator: May 22, 2015
  9. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    1. Check your file path: Caps sensitive I believe.
    2. Double check the sound asset, then .gun file.
    3. Lastly, if all else fails, post your Starbound log so we can see why the asset isn't loading:

    Did I not see this post yesterday? (Never mind posts merged)
     
  10. The | Suit

    The | Suit Agent S. Forum Moderator

    Merged the threads.
    Please do not make another thread on the exact same topic.
     
    danmanr98 likes this.
  11. danmanr98

    danmanr98 Subatomic Cosmonaut

    I may be just not seeing things correctly, but as far as I know, everything looks like it should work, in terms of Naming and Directories and etc. I'll upload the mod:[DOUBLEPOST=1432304195][/DOUBLEPOST]Mod:
     

    Attached Files:

  12. The | Suit

    The | Suit Agent S. Forum Moderator

    You could try to lower encode stream and give it a shot.
    Since that is the one thing you haven't tried.
     
  13. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Well, from that .zip you uploaded, are the assets in one folder? Or are the individual folders just in your mods folder?

    The format should be /mods/(MOD_NAME)/(ASSETS)...
    You may have the file structure incorrect, or try playing with Steam like swat said.

    I'm saying this cause I loaded the mod fine and had no errors:
    Code:
     
    Start logging at: 2015-05-22 10:24:43.223
    [10:24:43.228] Info: Star::Root using bootstrap file 'C:\Games\Starbound\SG\win32\sbboot.config'
    [10:24:43.228] Info: Star::Root using storage directory 'C:\Games\Starbound\SG\giraffe_storage\'
    [10:24:43.228] Info: Preparing Star::Root...
    [10:24:43.234] Info: Detected mod 'smashmod' at '../giraffe_storage/mods\smashmod\.'
    [10:24:43.234] Info: Detected mod 'HeroicWeaponMod' at '../giraffe_storage/mods\HeroicWeaponMod\.'
    [10:24:43.235] Info: Detected mod 'GunbladeArsenal' at '../giraffe_storage/mods\GunbladeArsenal\.'
    [10:24:43.235] Info: Loading Configuration with config file: 'starbound.config'
    [10:24:43.235] Info: Loading Star::Configuration from 'Just (.\..\giraffe_storage\starbound.config)'
    [10:24:43.240] Info: Writing Star::Configuration to '.\..\giraffe_storage\starbound.config'
    [10:24:43.254] Info: Initializing Star::Root with 5 assets sources
    [10:24:43.254] Info: Done preparing Star::Root.
    [10:24:43.254] Info: Client Version 'Beta v. Spirited Giraffe - Update 1' Revision: ad8c08794fbd2ae040844b1fc1bba8debd0d5eb6 Protocol: 677
    [10:24:43.255] Info: Initialized SDL
    [10:24:43.288] Info: Initialized SDL Video
    [10:24:43.340] Info: Initialized SDL Joystick
    [10:24:43.346] Info: Initialized SDL Sound
    [10:24:43.384] Info: Opened default audio device with 44khz / 16 bit stereo audio, 2048 sample size buffer
    [10:24:43.385] Info: Loading Assets
    [10:24:43.385] Info: Loading Star::Assets from: '../assets/packed.pak'
    [10:24:43.421] Info: Loading Star::Assets from: '../assets/user'
    [10:24:43.421] Info: Loading Star::Assets from: '../giraffe_storage/mods\smashmod\.'
    [10:24:43.422] Info: Loading Star::Assets from: '../giraffe_storage/mods\HeroicWeaponMod\.'
    [10:24:43.422] Info: Loading Star::Assets from: '../giraffe_storage/mods\GunbladeArsenal\.'
    [10:24:45.283] Info: Done loading Assets
    [10:24:45.331] Info: Fully loading Star::Root...
    [10:24:45.332] Info: Loading NameGenerator
    [10:24:45.333] Info: Loading PlayerFactory
    [10:24:45.333] Info: Loading PlantDatabase
    [10:24:45.333] Info: Loading ProjectileDatabase
    [10:24:45.333] Info: Loading MonsterDatabase
    [10:24:45.333] Info: Loading NpcDatabase
    [10:24:45.334] Info: Loading EntityFactory
    [10:24:45.334] Info: Loading ObjectDatabase
    [10:24:45.507] Info: Done loading NameGenerator
    [10:24:45.507] Info: Loading ItemDatabase
    [10:24:45.576] Info: Done loading PlayerFactory
    [10:24:45.576] Info: Loading MaterialDatabase
    [10:24:45.576] Info: Loading ParticleDatabase
    [10:24:45.928] Info: Initializing SDL Window
    [10:24:47.670] Info: Created initial window 1000x600
    [10:24:47.704] Info: Renderer initialized
    [10:24:47.707] Info: Renderer destroyed
    [10:24:47.707] Info: Initializing SDL Window
    [10:24:47.752] Info: Re-created window 1366x745
    [10:24:47.805] Info: Renderer initialized
    [10:24:48.255] Info: Writing Star::Configuration to '.\..\giraffe_storage\starbound.config'
    [10:24:52.788] Info: Done loading NpcDatabase
    [10:24:52.788] Info: Loading TerrainDatabase
    [10:24:53.642] Info: Done loading TerrainDatabase
    [10:24:53.643] Info: Loading BiomeDatabase
    [10:24:57.956] Info: Done loading BiomeDatabase
    [10:24:57.956] Info: Loading LiquidsDatabase
    [10:24:58.013] Info: Done loading ParticleDatabase
    [10:25:02.084] Info: Done loading PlantDatabase
    [10:25:02.084] Info: Loading StatusEffectDatabase
    [10:25:05.528] Info: Done loading StatusEffectDatabase
    [10:25:05.528] Info: Loading DamageDatabase
    [10:25:06.162] Info: Done loading ProjectileDatabase
    [10:25:06.162] Info: Loading EffectSourceDatabase
    [10:25:06.957] Info: Done loading MaterialDatabase
    [10:25:06.957] Info: Loading FunctionDatabase
    [10:25:06.961] Info: Done loading LiquidsDatabase
    [10:25:06.961] Info: Loading TreasureDatabase
    [10:25:07.277] Info: Done loading FunctionDatabase
    [10:25:07.277] Info: Loading DungeonDefinitions
    [10:25:07.804] Info: Done loading TreasureDatabase
    [10:25:07.804] Info: Loading EmoteProcessor
    [10:25:07.805] Info: Done loading EmoteProcessor
    [10:25:07.805] Info: Loading SpeciesDatabase
    [10:25:08.389] Info: Done loading SpeciesDatabase
    [10:25:08.389] Info: Loading ImageMetadataDatabase
    [10:25:08.389] Info: Done loading ImageMetadataDatabase
    [10:25:08.389] Info: Loading VersioningDatabase
    [10:25:08.391] Info: Done loading VersioningDatabase
    [10:25:08.391] Info: Loading QuestTemplateDatabase
    [10:25:08.481] Info: Done loading EffectSourceDatabase
    [10:25:08.481] Info: Loading AiDatabase
    [10:25:10.108] Info: Done loading QuestTemplateDatabase
    [10:25:10.108] Info: Loading TechDatabase
    [10:25:10.207] Info: Done loading AiDatabase
    [10:25:10.207] Info: Loading CodexDatabase
    [10:25:11.414] Info: Done loading TechDatabase
    [10:25:12.322] Info: Done loading DamageDatabase
    [10:25:17.600] Info: Done loading CodexDatabase
    [10:25:19.923] Info: Done loading MonsterDatabase
    [10:25:23.786] Info: Done loading ObjectDatabase
    [10:25:23.786] Info: Done loading EntityFactory
    [10:25:58.041] Info: Done loading DungeonDefinitions
    [10:26:25.681] Info: Done loading ItemDatabase
    [10:26:25.683] Info: Done fully loading Star::Root
    [10:26:25.692] Info: Renderer destroyed
    [10:26:27.464] Info: Creating default Star::Configuration
    [10:26:27.464] Info: Creating default Star::Configuration
    [10:26:27.601] Info: Renderer initialized
    [10:26:34.554] Info: Renderer destroyed
    [10:26:34.564] Info: Application quitting!
    [10:26:34.564] Info: Client shutdown gracefully
    [10:26:34.731] Info: Shutting down Star::Root
    
    No error, all assets appear to load fine, AND the sound works on your gun. (At least for me)
     
    The | Suit likes this.
  14. danmanr98

    danmanr98 Subatomic Cosmonaut

    How's that done ? Or rather, I don't understand what that means :p sorry[DOUBLEPOST=1432306756][/DOUBLEPOST]

    Yeah it's in mods/(modname)/(assets)
     
  15. The | Suit

    The | Suit Agent S. Forum Moderator

    Use an Audio Encoder to Lower the bitrate
    Or to put it plainly rencoder to a lower bitrate and see if that fixes the issue.
     
  16. danmanr98

    danmanr98 Subatomic Cosmonaut

    According to Inf_Wolf the sound is working correctly, but somehow for some reason, it doesn't use the correct sound for me.
    Since I haven't made a recipy for the gun, I hack it in via the use of an external software called "StarCheat". I think that may be also a possibility for a mess up in loading the sound?
     
    Last edited: May 22, 2015
  17. The | Suit

    The | Suit Agent S. Forum Moderator

    No idea dude - I don't bother with star cheat
    For me it an't real modding so I don't bother.
     
  18. danmanr98

    danmanr98 Subatomic Cosmonaut

    No no no, I use starcheat as a form to spawn my Modded gun ingame. Anyways, i've been researching a lil and from what I've seen .WAV bitrate cannot be modified? imma look further into this.
     
  19. Inf_Wolf14

    Inf_Wolf14 Parsec Taste Tester

    Well between us, I launch Starbound from a standalone .exe, 'cause I personally don't like to use Steam anymore.

    So your only option is to either remake your .wav to become compliant with the vanilla sound engine, or figure out why Steam does what it does. (Actually one of the reasons I left Steam was it screwing with my games. :up:)
     
  20. The | Suit

    The | Suit Agent S. Forum Moderator

    I actually wrote stream.
     

Share This Page