Modding Help Custom Weapon

Discussion in 'Starbound Modding' started by BasicallyNuclear, Jul 11, 2015.

  1. BasicallyNuclear

    BasicallyNuclear Big Damn Hero

    Is there any way I make a custom sword or a gun the shoots pixels
     
  2. lillgrinn

    lillgrinn Phantasmal Quasar

    Best Answer
    For Example:
    1. Take any *.gun file (Example: items\guns\novakid\revolver\novastarter.gun)
    Code:
    {
      "itemName" : "novastarter",
      "price" : 60,
      "inventoryIcon" : "novastarter.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" : "Rusty Revolver",
      "image" : "novastarter.png",
      "handPosition" : [-4, -2],
      "firePosition" : [17, 3],
      "recoilTime" : 0.1,
      "level" : 1,
      "tooltipKind" : "gun",
      "weaponType" : "Pistol",
      "fireTime" : 0.62,
      "inaccuracy" : 0.016,
      "twoHanded" : false,
      "walkWhileFiring" : false,
    
      "projectileType" : "standardbullet",
      "projectile" : {
        "speed" : 150,
        "life" : 3,
        "power" : 2.25,
        "color" : [255, 10, 10]
      },
      "muzzleEffect" : {
        "fireSound" : [ { "file" : "/sfx/gun/revolver2.wav" } ],
        "animation" : "/animations/muzzleflash/bulletmuzzle4/bulletmuzzle4.animation"
      }
    }
    2. Replace "novastarter" in "itemName" (Example: "moneystarter")
    3. Replace "standartbullet" to "money" in "projectileType".
    4. Replace 150 in "speed" to 20 or 10. If you don't do this - your mone fly away. :)
    5. After string "level" : 1, add this:
    Code:
    "projectileCount" : 20,
    6. Save this file with new name (Example: moneystarter.gun) in ../mods/[your_mod_name]/items/guns/novakid/revolver/ (i take this path for example)
    6. Edit money.projectile and save edited file in ../mods/[your_mod_name]/projectile/unsorted/money/. If you skip this step, your gun will be doing one pixel per shot.
    7. Create and save recipe for this gun.
    8. Add patch-string in player.config.patch in /mods/[your_mod_name]/

    That's it.

    Execute the game and do shots from your new gun for making the money.
     
    Last edited: Jul 12, 2015
    Sock_Bunny and kyleetehkitty like this.
  3. Hatsya Souji

    Hatsya Souji Parsec Taste Tester

    You mean, use your Pixels as ammunition instead of energy?
     
  4. SleepySquidd

    SleepySquidd Tragically Magic Hands

    I feel like it'd be possible with a few custom scripts.
     
  5. lillgrinn

    lillgrinn Phantasmal Quasar

    You mean, use Pixels as projectile? (Example: One shot - one ore more pixels on ground)
     
  6. BasicallyNuclear

    BasicallyNuclear Big Damn Hero

    Yes it shoots pixels you can collect and a sword that can do 10000 with a instant swing speed[DOUBLEPOST=1436648765][/DOUBLEPOST]
    An example:

    [​IMG]
     
    Last edited: Jul 11, 2015
  7. lillgrinn

    lillgrinn Phantasmal Quasar

    You need this: projectiles\unsorted\money\money.projectile

    Code:
    {
      "projectileName" : "money",
      "speed" : 20,
      "bounces" : 1,
      "physics" : "grenade",
      "frames" : "money.png",
      "animationCycle" : 0.5,
      "power" : 0,
      "frameNumber" : 1,
      "damageKind" : "hidden",
      "actionOnReap" : [
        {
          "action" : "item",
          "name" : "money"
        }
      ],
        "emitters" : [ "lighttrailfast" ]
    } 

    If you want more money for shoot replace
    Code:
    "name" : "money"
    to
    Code:
    "name" : "money",
    "quantity" : 100  
    Number after "quantity" is how much money you take from one shoot.

    P.S.: My version is Unstable (nightly). For unpack the asset you can use this: ModPakHelper
     
    Last edited: Jul 11, 2015
  8. BasicallyNuclear

    BasicallyNuclear Big Damn Hero

    So I can make a money gun with this? also how to I make the gun part with it? liek the description, rarity, name, crafting?
     
  9. lillgrinn

    lillgrinn Phantasmal Quasar

    Best Answer
    For Example:
    1. Take any *.gun file (Example: items\guns\novakid\revolver\novastarter.gun)
    Code:
    {
      "itemName" : "novastarter",
      "price" : 60,
      "inventoryIcon" : "novastarter.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" : "Rusty Revolver",
      "image" : "novastarter.png",
      "handPosition" : [-4, -2],
      "firePosition" : [17, 3],
      "recoilTime" : 0.1,
      "level" : 1,
      "tooltipKind" : "gun",
      "weaponType" : "Pistol",
      "fireTime" : 0.62,
      "inaccuracy" : 0.016,
      "twoHanded" : false,
      "walkWhileFiring" : false,
    
      "projectileType" : "standardbullet",
      "projectile" : {
        "speed" : 150,
        "life" : 3,
        "power" : 2.25,
        "color" : [255, 10, 10]
      },
      "muzzleEffect" : {
        "fireSound" : [ { "file" : "/sfx/gun/revolver2.wav" } ],
        "animation" : "/animations/muzzleflash/bulletmuzzle4/bulletmuzzle4.animation"
      }
    }
    2. Replace "novastarter" in "itemName" (Example: "moneystarter")
    3. Replace "standartbullet" to "money" in "projectileType".
    4. Replace 150 in "speed" to 20 or 10. If you don't do this - your mone fly away. :)
    5. After string "level" : 1, add this:
    Code:
    "projectileCount" : 20,
    6. Save this file with new name (Example: moneystarter.gun) in ../mods/[your_mod_name]/items/guns/novakid/revolver/ (i take this path for example)
    6. Edit money.projectile and save edited file in ../mods/[your_mod_name]/projectile/unsorted/money/. If you skip this step, your gun will be doing one pixel per shot.
    7. Create and save recipe for this gun.
    8. Add patch-string in player.config.patch in /mods/[your_mod_name]/

    That's it.

    Execute the game and do shots from your new gun for making the money.
     
    Last edited: Jul 12, 2015
    Sock_Bunny and kyleetehkitty like this.

Share This Page