Tutorial MOD-TUTORIAL 3: How to make your own Gun (OUTDATED)

Discussion in 'Starbound Modding' started by Ghoul159, Dec 8, 2013.

Thread Status:
Not open for further replies.
  1. Strickman101

    Strickman101 Void-Bound Voyager

  2. ScratchMaster

    ScratchMaster Intergalactic Tourist

    I followed the mod instructions, but I cant start up starbound because of this error message:

    Error: Graphics exception during render, re-initializing: GraphicsException: Could not set vertex shader parameter for texelOffset (8876086c)
    004DACDF (E:/Steamworks/Starbound/git/starbound/source/graphics/StarGraphicsCommon.hpp:8)
    004D4237 (E:/Steamworks/Starbound/git/starbound/source/graphics/StarRenderer_direct3d.cpp:275)
    00A1E506 (E:/Steamworks/Starbound/git/starbound/source/graphics/StarRenderer.hpp:319)
    0044C0BA (E:/Steamworks/Starbound/git/starbound/source/frontend/StarEnvironmentPainter.cpp:81)
    00419CE4 (E:/Steamworks/Starbound/git/starbound/source/frontend/StarTitle.cpp:45)
    0040380B (E:/Steamworks/Starbound/git/starbound/source/client/StarClientApplication.cpp:713)
    0040A2AE (E:/Steamworks/Starbound/git/starbound/source/application/StarApplicationBase.cpp:230)
    00407C30 (E:/Steamworks/Starbound/git/starbound/source/client/main.cpp:48)
    004DBBD1 (c:\SDL-1.2.15/./src/main/win32/SDL_win32_main.c:318)
     
  3. druid

    druid Scruffy Nerf-Herder

    Okay, here's my problem.
    when i use the mod files in my mods folder, absolutely nothing happens. However, When i move the files into my assets folder, I am able to craft a perfectly generic item for the same recipe. strangely, there are actually two options to craft the same thing. the perfectly generic item makes me beleive it's a problem with the code for the item. Here it is:
    Code:
    {
      "itemName" : "oversizedgun",
      "inventoryIcon" : "oversizedgunicon.png",
      "description" : "BLAMBLAMBLAMBLAMBLAMBLAM!"
      "shortdescription" : "Oversized Gun"
      "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
      "maxStack" : 1,
      "level" : 15,
      "rarity" : "Legendary",
      "inspectionKind" : "gun",
      "image" : "oversizedgun.png",
      "recoilTime" : 0.1,
      "handPosition" : [-5.5, -3],
      "firePosition" : [12, 3],
    
      "fireTime" : 0.5,
      "twoHanded" : false,
    
      "projectileType" : "bullet-1",
      "projectile" : {
        "power" : 450
        "speed" : 60
        "color" : [10, 255, 10]
      },
    
      "muzzleEffect" : {
        "animation" : "/animations/muzzleflash/bulletmuzzle3/bulletmuzzle3.animation",
        "fireSound" : [ { "file" : "/sfx/gun/pistol2.wav" } ]
      }
    }
    
     
  4. p0pp3t

    p0pp3t Void-Bound Voyager


    In your code you forgot two commas.

    "projectile" : {
    "power" : 450
    "speed" : 60
    "color" : [10, 255, 10]
    },
    should be

    "projectile" : {
    "power" : 450,
    "speed" : 60,
    "color" : [10, 255, 10]
    },

    Also here :

    "description" : "BLAMBLAMBLAMBLAMBLAMBLAM!"
    "shortdescription" : "Oversized Gun"

    Should be

    "description" : "BLAMBLAMBLAMBLAMBLAMBLAM!",
    "shortdescription" : "Oversized Gun",
     
    Ghoul159 likes this.
  5. RockRaid

    RockRaid Scruffy Nerf-Herder

    Geez, got myself through a metric ton of crashes, now my gun works just fine, there is only one problem remaining:

    My bullets are invisible, and I have no clue what this crash report means:
    Error: Could not load /projectiles/projectile.png:0 asset, attempting to use default.
    AssetException: No associated frames file found for image '/projectiles/projectile.png' while resolving image frame '/projectiles/projectile.png:0'

    Hope anyone can help me.
    BTW: Check my progress on my little project:
    http://steamcommunity.com/sharedfiles/filedetails/?id=213218563
    You FPS guys recognize this gun? ;)
     
  6. GARGOZETH

    GARGOZETH Orbital Explorer

    The gun I created was doing fine up until I added the muzzleFlash and fireSound. I compared my code the the Revolver's, and they appear to be in order. Do I need any other files to execute the muzzlelflash and firesound correctly? I just have my .gun file and .recipe file, since I was using an existant projectile.
     
  7. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    it sounds like you named the frames ? but you shouldn't have to...

    i uploaded a new example file here look at it:
    https://www.dropbox.com/s/avad4ogu87jh8uw/MyNewGunMod.zip
     
  8. Edgewalker_001

    Edgewalker_001 Big Damn Hero

    I just tried using the buster gun that was in the test folder for maybe two hours. I changed the color of it to distinguish it from the regular version and after much fiddling I actually got my character to be able to make one.
    Now I'm stuck with a green buster that has a custom icon and can be pointed at things.

    However, it makes no sound, shoots nothing, and nothing I do to the file seems to affect this. I tried to remove the charge function so it shoots like a normal gun instead of a bow? No dice, still absolutely no reaction when I pull the trigger...

    Another thing I noticed was that the recipe was extremely annoying to get the game to accept, in my previous modded item attempts I usually get the recipes into the basic recipes with no problems, here I had to temporarily delete the in game bow.gun file and piggyback on the built in hunting bow recipe to make it.
     
  9. GARGOZETH

    GARGOZETH Orbital Explorer

  10. Edgewalker_001

    Edgewalker_001 Big Damn Hero

    After some more fiddling I got it to be able to charge and shoot, but now the sprite for it has disappeared. Causing the projectiles to appear from thin air. This may be a blessing in disguise for anyone wanting to implement magic or psionic powers though...
     
  11. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    for sound no and for muzzleflash you need a .animation and .frames...

    hmm are you shure there is no error in the starbound.log? because if you provide a image it should at least output an error...
     
  12. Edgewalker_001

    Edgewalker_001 Big Damn Hero

    Error: Could not load /items/guns/test/ebusterfull.png:4 asset, attempting to use default.
    AssetException: No associated frames file found for image '/items/guns/test/ebusterfull.png' while resolving image frame '/items/guns/test/ebusterfull.png:4'
    004EEBC8
    004ECA2B
    004ED2BC
    004ED3CC
    004ED9EA
    0040B5E5
    0040B776
    00435A0C
    004370DE
    00437E42
    004037C8
    00409E44
    00407C30
    004D97F1

    Info: Shutting down world alpha:-59174721:62818035:-7458275:4
    Info: Shutting down world alpha:12523672:-71324093:-14932260:10:3
    Warn: Perf: UniverseServer::run.innerloop millis: 171

    The weird thing is that the animation cycle is 80x8 but the frames file says every frame is 16 pixels wide. Which fits the animation but not the file. It's almost as if they made it mismatched on purpose...
     
    Last edited: Jan 6, 2014
  13. GARGOZETH

    GARGOZETH Orbital Explorer

    Ok. I followed the updated example, and finished my mod. However, for some reason, I can't even see the item in the crafting window. My recipe file seems to be in order, and I copied over the merge thing labeled player, and changed the item to merge to "Musket", my item. I just don't know what the problem could be. The recipe file was working fine before and I didn't change anything about it, so I think the problem must be the merge code.

    {
    "__merge" : [],
    "defaultBlueprints" : {
    "__merge" : [],
    "tier1": [
    { "item" : "Musket" }
    ]
    }
    }
     
  14. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    that sound really weird and you shouldn't need a frame file for your normal gun image too which he is seemingly asking for...
    look at my newly uploaded example mod at the end of the post and compare it with yours...
    or you could try to use my "gun" modmaker ;)

    i just noticed a mistake i made in the example mod!
    in the .projectile
    it should be:

    damageType = default
    damageTypeImage = ...imagefile

    it was the other way arround... that could be the problem
     
  15. Edgewalker_001

    Edgewalker_001 Big Damn Hero

    Yeah but I didn't make a normal gun, I tried to make a bow. That charges up like the MegaMan buster. There's an animation sprite sheet and everything all set up for it in the test folder, but for some reason it does not work. So instead I used the glitchy bow together with some horrible hand drawn sprites and boom! Magic in Starbound.
    [​IMG]
    Flame arrow!
     
  16. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    nice :D
    if you would like to upload it and let me take a look i would do that tomorrow... you can send me a pm if you want...
     
  17. Edgewalker_001

    Edgewalker_001 Big Damn Hero

  18. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

  19. GARGOZETH

    GARGOZETH Orbital Explorer

    Yeah. Do I need to do anything else to the mod folder I created for it to show up in the game? The gun was working perfectly except for a crash on fire when I added sfx, but when I migrated all those files to my mod folder, the recipe dissapeared from the game.
     
  20. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    did you merge the player.config? i'll update these tutorials with an example...
     
Thread Status:
Not open for further replies.

Share This Page