Modding Discussion How do I add Elements and Special attacks to custom weapons?

Discussion in 'Starbound Modding' started by ShirtyScarab554, Apr 21, 2016.

  1. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    So I'm starting to mod for the first time and so far it's going pretty well, I already added the Penguin Pistol back in (wich I'm sure other people have done before) and i made my own rocket launcher. I want to add a poison element to it and a special attack, but I don't know how, can anyone help?

    P.S. If it helps here is the .gun file i have for the rocket launcher.

    {
    "itemName" : "shadowindrocket",
    "price" : 2250,
    "inventoryIcon" : "shadowindrocket.png",
    "maxStack" : 1,
    "rarity" : "Legendary",
    "description" : "Part of Shadow Industrie's finest weapons series. .",
    "shortdescription" : "Shadow Ind. Rocket Launcher",
    "image" : "shadowindrocket.png",
    "handPosition" : [4, -3],
    "firePosition" : [40, 3],
    "recoilTime" : 0.1,
    "level" : 7,
    "tooltipKind" : "gun",
    "weaponType" : "Rocket Launcher",
    "itemTags" : ["weapon","ranged","rocketlauncher"],
    "fireTime" : 1.5,
    "inaccuracy" : 0.01,
    "twoHanded" : true,
    "walkWhileFiring" : false,

    "projectileType" : "rocketshell",
    "projectile" : {
    "speed" : 1.5,
    "acceleration" : 175,
    "life" : 4,
    "power" : 16
    },
    "muzzleEffect" : {
    "fireSound" : [ { "file" : "/sfx/gun/rocket3.ogg" } ],
    "animation" : "/animations/muzzleflash/meteorflash/meteorflash.animation"
    }
    }
     

    Attached Files:

  2. The | Suit

    The | Suit Agent S. Forum Moderator

    If you mean special attack as in those fancy animated attacks you see in the videos.
    Those unfortunately require you to have very good knowledge of Lua.

    Status effects on the other hand can easily be added to the projectile file, it is not added to the gun.
     
  3. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    So how would I add an element to a projectile?
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    You don't - you add a status effect - there are no elements.
    Look through all the projectiles for a status effect - and then look through all the status effects for the one you want to apply.
     
  5. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    I'm sure I sound dumb asking this because I'm new but after I find the Projectile I want (fire plasma rocket), and the status effect I want (burning status projectile) how do I apply the status to the rocket?
     
  6. C0bra5

    C0bra5 Oxygen Tank

    I think either make your own projectile or I think there is a projectileConfig element for active items
     
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    Modding is all about exploring files.
    Like I said look through the projectiles for one which gives a status effect.
    For example

    Code:
    \unpacked\projectiles\fire\firefinish
     
  8. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    Ok but how do i apply this to the fire plasma rocket?
     
  9. The | Suit

    The | Suit Agent S. Forum Moderator

    Look at the file you provided earlier.
    It will tell you which projectile it uses.

    Then you add the status effect to that projectile the same way the example listed above does it.
    Or you make your own projectile and add a status effect to it, and then change the gun file to use yours.
     
  10. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    So "projectile" : {\unpacked\projectiles\fire\firefinish}, ?
     
  11. The | Suit

    The | Suit Agent S. Forum Moderator

    If you want yes - but that would change the projectile completely.
    All you need to do is add the status effect line to the original projectile.

    If you experiment your self a little you would honestly figure it out by now.
     
  12. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    Well sorry, I'm new to programming in general and what you are saying doesn't make much sense for me, and I have been experimenting all day and no luck.
    Can you please give me an example of adding a status effect to the projectile?
    And I'm sorry if I'm annoying you, but I just can't grasp programming like you and other modders.
     
  13. C0bra5

    C0bra5 Oxygen Tank

    Na just "projectile" : "projectilename"
     
  14. ShirtyScarab554

    ShirtyScarab554 Subatomic Cosmonaut

    What?
     
  15. lazarus78

    lazarus78 The Waste of Time

    You should probably start with the basics of modding starbound.
     
    The | Suit and ShirtyScarab554 like this.
  16. Aimlessimp05

    Aimlessimp05 Pangalactic Porcupine

    On the topic of adding "elements" Would it be possible to have aweapon do fire damage with one attack and then ice with the alt ability? I have already made a few weapons my slef, guns included, so i have some ok knowlege to making stuff. It would be cool to have a weapin shoot ice or what ever " element" then do a nother type of "elemental" damage with its alt ability such as the gernades or the lance ability. If i manage to figure this out i will post more here on what i found out or just check back and give thanks if someone else found out before me.
     
  17. C0bra5

    C0bra5 Oxygen Tank

    probably by editing/creating a new alt ability that would set the elemental type of the alt ability to what you want
     

Share This Page