Modding Help Melee Weapons With Projectiles?

Discussion in 'Starbound Modding' started by EclipticWulf, May 2, 2017.

  1. EclipticWulf

    EclipticWulf Scruffy Nerf-Herder

    Haven't modded in awhile. Back when I still did, you could add ranged projectiles/effects to melee weapons. Is this still possible? If so, how would I go about doing it now?

    I'm aiming to create a solarium melee weapon that shoots out a puff of yellow 'smoke' that poisons the enemy, as an example.

    Thanks for any help!
     
  2. lazarus78

    lazarus78 The Waste of Time

    Did you break down a melee weapon to see?

    Weapons can use scripts, and scripts can spawn projectiles, so yes, it is possible.
     
    EclipticWulf likes this.
  3. EclipticWulf

    EclipticWulf Scruffy Nerf-Herder

    I did, but didn't see any reference to projectiles like in the old system. I wasn't sure where to look after I didn't see anything in the referenced LUA file, which is why I felt the need to ask. I must have simply overlooked it, though, so thank you.
     
  4. lazarus78

    lazarus78 The Waste of Time

    They use "damage areas" which are defined in the animation file associated with the weapon. But like I said, you can attach scripts to weapons so they can spawn projectiles that way, so it is possible.
     
    EclipticWulf likes this.
  5. bk3k

    bk3k Oxygen Tank

    Look at /items/active/weapons/melee/abilities/broadsword/travelingslash/
    for an example of a melee ability that does this
     
    EclipticWulf likes this.
  6. EclipticWulf

    EclipticWulf Scruffy Nerf-Herder

    Is there a further tutorial anywhere? I don't have much experience with LUA, so it would help with understanding it a bit more. I'm having a bit of difficulty figuring out what's what. I'm having trouble figuring out what's what, mostly.
     
    Last edited: May 4, 2017
  7. lazarus78

    lazarus78 The Waste of Time

    There aren't many tutorials because most of nodding is applied knowledge.
     
    EclipticWulf likes this.
  8. bk3k

    bk3k Oxygen Tank

    Indeed. There is no getting better that doesn't involve jumping in, trying things, failing repeatedly. Also the .ability files are JSON. You can see them defining projectiles in that. Look at the abilities. Look at the weapons which use them. Look at the projectiles they reference. Plenty of JSON to examine.

    The Vanilla files have the answer. Attempt to emulate them. Slowly change one thing at at time til you get what you want, and revert/learn where things don't work. Look at things that do something close to what you want, and things that do something different to see what they changed.

    There are tutorials of course too. And where you have specific questions you can't solve, let us know.
     
    EclipticWulf likes this.
  9. Melendroach

    Melendroach Subatomic Cosmonaut

    You can just modify solus katana using projectile parameters if this is what you're looking for. You can change projectile count to 1, change speed and texture, all sorts of things.
     
    EclipticWulf likes this.
  10. EclipticWulf

    EclipticWulf Scruffy Nerf-Herder

    Thank you all. I will take this to mind and try to understand it further. And thanks for giving me a good starting location, bk3k and Melendroach.
     
    Melendroach likes this.
  11. salad_dodger

    salad_dodger Scruffy Nerf-Herder

    If u were to do a melee weapon with a projectile you would need to have the alt set to flying slash or something :3
     
    EclipticWulf likes this.
  12. lazarus78

    lazarus78 The Waste of Time

    Why? Whats special about that particular alt that you couldnt do in another?
     

Share This Page