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. Bigsin

    Bigsin Aquatic Astronaut

    hello, i want add in game new bow, what files i need create/edit? i draw new bow sprite, icon, create recipe, edit player.config, edit .gun file, i see what i can create bow in game, can shot, but i dont see bow in hand. if i replace standart bow sprite on my bow sprite i see my bow.
     
  2. Galleth

    Galleth Void-Bound Voyager

    To answer yes, all I get is the green item. I don't understand what's wrong.. I've edited the PNGs as said, I've edited all the files so that they follow the paths set to the items, and still nothing works.
     
  3. xCybersquid

    xCybersquid Void-Bound Voyager

    Nothing shows up at the anvil or anything. Any ideas? Hears what I have.
     

    Attached Files:

  4. TehPlasmaDucky

    TehPlasmaDucky Aquatic Astronaut

    Yes, it is named right.
     
  5. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    i think it has to be the name of the recipe...

    maybe there's something wrong with the recipe..?

    well there has to be something wrong... ;)

    i think basicly the same as you need for the gun

    in the .gun are some problems:
    at the end of the "description" theres a ", missing
    in the projectile after "power" and "speed" you need to make a comma
    maybe that was the problem...

    hmm then i don't know why it's not working :(
     
  6. KayZizzle

    KayZizzle Orbital Explorer

     
  7. xCybersquid

    xCybersquid Void-Bound Voyager

    I tried it, it still didn't work.

    Also, I tried doing something else and look at what happened.

    Nothing. This didn't show up, but nothing seems wrong. Yet, I was able to get another sword type weapon to show up. Nothing else does though.
     

    Attached Files:

  8. veaseomat

    veaseomat Void-Bound Voyager

    **EDIT: solved**
     
    Last edited: Dec 15, 2013
  9. tomslucky7

    tomslucky7 Void-Bound Voyager

    Ghoul you are terrible at helping others.

    I searched through this thread trying to find an answer to my "Perfectly Generic Item" problem like a lot of others in this thread are having. I didn't find jack shit. Just you saying that path files are wrong or a comma is missing or some other nonsense. I've looked up and down my gun file countless times to see if I could find what was wrong with it. I even downloaded and compared it to the file you submitted and it looks basically Identical. This isn't working for me and I don't know why... Everything should be correct. Unless the patch broke something, why is this wrong?

    I am calling it "MyRapeGun"

    All files are located in the assets folder under the "MyRapeGun" folder

    Here is MyRapeGun.gun

    energyCostPerDamagePoint is not the cause of this, it was a green Perfectly Generic Item even before I put that line in there, and it still is.

    Code:
    {
      "itemName" : "MyRapeGun",
      "inventoryIcon" : "MyRapeGunicon.png",
      "description" : "Prepare your anus",
      "shortdescription" : "Rape Gun",
      "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
      "maxStack" : 2,
      "level" : 100,
      "rarity" : "Rare",
      "inspectionKind" : "gun",
      "image" : "MyRapeGun.png",
      "recoilTime" : 0.1,
      "handPosition" : [-5.5, -3],
      "firePosition" : [12, 3],
    
      "energyCostPerDamagePoint" : 0
      "fireTime" : 0.1,
      "twoHanded" : false,
    
      "projectileType" : "MyRapeGunProjectile",
      "projectile" : {
        "speed" : 60,
        "color" : [10, 255, 10]
      },
    
      "muzzleEffect" : {
        "animation" : "/MyRapeGun/muzzleflash/MyRapeGunMF.animation",
        "fireSound" : [ { "file" : "/MyRapeGun/sfx/MyRapeGunSound.wav" } ]
      }
    }
    
    Here is MyRapeGun.recipe

    Code:
    {
      "input" : [
        { "item" : "ironbar", "count" : 1 },
        { "item" : "money", "count" : 1 }
      ],
      "output" : { "item" : "MyRapeGun", "count" : 1 },
      "groups" : [ "anvil", "weapons", "all" ]
    }
    Here is MyRapeGunProjectile.projectile

    I used a rocket because I want this revolver to spam rockets.

    Code:
    {
      "projectileName" : "MyRapeGunProjectile",
      "frames" : "MyRapeGunProjectile.png",
      "animationCycle" : 0.15,
      "level" : 10,
      "frameNumber" : 1,
      "damageKindImage" : "MyRapeGunProjectileicon.png",
      "energyCostPerDamagePoint" : 0,
      "fallSpeed" : 0,
      "lightColor" : [255, 255, 128],
      "pointLight" : true,
      "actionOnReap" : [
        {
          "action" : "config",
          "file" : "/projectiles/explosions/regularexplosion2/regularexplosion2.config"
        }
      ],
      "power" : 10.0,
      "damageType" : "hitTest",
      "damageKind" : "default"
    }
    Here is player.config

    Code:
     "defaultItems" : [],
    
      "tierBlueprintsUnlockedMessage" : "New blueprints have been unlocked.",
      "blueprintOnPickupMessage" : "New blueprint available.",
      "defaultBlueprints" : {
        "tier1" : [
          { "item" : "MyRapeGun" },
          { "item" : "MyNewGunMod" },
          { "item" : "mininglantern" },

    P.S.

    Your gun doesn't even work. I downloaded it, put the "MyNewGunMod" folder in my assets folder and added MyNewGunMod to player.config but it will not show up on the crafting table.


    *update*

    I tried using the projectile file that you included to replace the rocket projectile I was trying to use, to see if that was the cause of it being a generic item in the crafting menu. Renamed all the files to MyRapeGunProjectile and the icon one to MyRapeGunProjectileicon. Now the game gets stuck on LOADING...

    I'm done.
     
    Last edited: Dec 15, 2013
  10. hsidnomeL

    hsidnomeL Void-Bound Voyager

    tomslucky7, that's uncalled for and quite rude! Everything Ghoul has posted has been extremely helpful to many new modders, myself included. After a bit of experimenting, I can now easily create my own guns, projectile types, explosions, etc. All of this thanks to the initial push by Ghoul's post. Perhaps if you spent more time learning and less time whining that he/she didn't provide you everything for your rather tasteless gun on a silver platter you'd have it working!

    As for the gun, here are a couple reasons why it's not working.
    Code:
     "firePosition" : [12, 3],
    
      "energyCostPerDamagePoint" : 0
      "fireTime" : 0.1,
      "twoHanded" : false,
    
    In this section, you forgot to put a comma after "energyCostPerDamagePoint" : 0
    In JSON, the comma lets the code know there are more arguments coming. Without it, you will get a loading error. Perhaps if you checked your starbound.log, you'd notice this.

    Next,
    Code:
    {
      "input" : [
        { "item" : "ironbar", "count" : 1 },
        { "item" : "money", "count" : 1 }
      ],
      "output" : { "item" : "MyRapeGun", "count" : 1 },
      "groups" : [ "anvil", "weapons", "all" ]
    }
    Change the line "groups" : ["anvil", "weapons", "all"] to "groups" : ["craftingtable", "weapons", "all"]
    This may or may not be stopping it from working, for two reasons. First, I'm not certain the anvil can take 2 inputs for the recipes. Second, the "weapons" part of the line sets the category for sorting in the crafting system. Again, I'm not sure the anvil can handle this argument due to the way it crafts. I could be wrong. However, you already added the recipe to your player.config file so there's no real reason to have it in the anvil anyways.

    Now, I hope this has helped, both with your gun and that whole entitled whiny attitude. Seriously, we don't need that crap here. People are trying to help, whether you can understand what they're offering or not. Don't be a prat about it. :\
     
  11. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    if you are just unsing my file you only have to add it to the player.conifg...


    the file seems right there has to be an other problem what did you write in the player.config?

    well these are just the most common problems that cause the error...
    please don't say that i'm terrible at helping others i really give my best i am constantly on this forum to help others with their problems and there are lots of guys i help per private conversation....
    hsidnomeL got the problems i think....

    thanks for the help :)
     
  12. xCybersquid

    xCybersquid Void-Bound Voyager

    The same thing. I wrote
    Code:
    { "item" : "gohei" },
     
  13. jfu

    jfu Space Hobo

    Does anyone know how to craft a legendary flamethrower? It would be awesome if I could do it but I have no idea how.
     
  14. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    i think you should write "Gohei"...

    i haven't tried this but this should be the code:


    {
    "input" : [
    { "item" : "money", "count" : 10 }
    ],
    "output" : {
    "item" : "generatedgun",
    "data" : { "definition" : "legendaryflamethrower", "level" : 10 } ,
    "count" : 1
    },
    "groups" : [ "plain", "weapons", "all" ]
    }
     
  15. xCybersquid

    xCybersquid Void-Bound Voyager

     
  16. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    hmm it has no inventory icon...
    it doesn't have to have a "level" parameter
    the "image" name is gohei and should be Gohei... (i would suggest writing everything in small or in big letters) there were more big and small letter issues...

    here you go :) (i made the images red because i don't want to upload any finished images from you or the game [ just replace them with your images...]):
     

    Attached Files:

    Last edited: Dec 15, 2013
  17. hungreh

    hungreh Space Hobo

    I downloaded the pistol from the original post, From there I edited the stats and did the same with armor. For some reason they show up solid red and the pistol doesn't do damage, I am also invisible and "not part of the world". Is this an issue I can fix?
     
  18. Ghoul159

    Ghoul159 Scruffy Nerf-Herder

    it's red because i made it red like i said in the tutorial i just wanted to make it quick ;)
    you are invisible? first time hearing that problem xP
     
  19. Slim Taitey

    Slim Taitey Void-Bound Voyager

    I followed this entire thing yet when I go to the crafting table it doesn't show up
     
  20. ExplosiveDiarrhea

    ExplosiveDiarrhea Poptop Tamer

    If you have time, can you please update this tutorial with the new mod patch.

    I've tried to follow guides on the new mod folder, but can't figure out were to place any files.
     
Thread Status:
Not open for further replies.

Share This Page