Mod Request: Tesla Gun

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

  1. Gene

    Gene Phantasmal Quasar

    Similar to the Tesla Trooper in Red Alert.

    Visually, it would look like a gun with a tesla coil for a barrel. Kinda similar to the Tesla Spike traps already in the game.

    Mechanically, it would be "powered up" similar to a bow - the longer you hold left click, the more your charge builds up. As your charge builds up, the tesla gun barrel becomes surrounded by strong and stronger electric sparks. At maximum charge, the gun would vibrate, make noises, and throw small sparks around - similar to the Anti Gravity Gun in Half Life 2.

    Once you fire, the Tesla gun discharges towards where you aim, doing more damage if you powered up longer. So you'd be choosing between spamming low-damage shots, or powering up and doing a high damage shot.

    Visually, an electric spark trace would appear between your gun and the target, once you fire. The "projectile" speed would ideally be infinite (hitscan) because eletricity travels at near light-speed (too fast to discern), but since I don't think the game engine does hitscans, just have it be as quick as possible, ideally so quick it would seem as a hitscan to players. The animation would look something like this:

    [​IMG]

    The Tesla gun would consume energy - ideally (if the game engine permits) the amount of energy cost depends on how much you powered up the shot.
     
    Last edited: Dec 8, 2013
  2. Gulfen

    Gulfen Void-Bound Voyager

    Sounds like a fun project. I might try making this.
     
    Gene likes this.
  3. Platoonsgt1

    Platoonsgt1 Big Damn Hero

    There is the brain extractor with a similar particle effect, you want something like that except with a gun sprite, more epic and which doesn't only drop brains?
     
  4. Witt

    Witt Starship Captain

    Yeah, what he's thinking of is ingame, it could just stand to be longer-range than practically melee, possibly a different sprite, and it won't net you nothing but brains.
     
  5. Gene

    Gene Phantasmal Quasar

    The brain extractor has a comparable animation, but what I'm really looking for is the "power-up" mechanic similar to current in-game bows. The more you powerup, the stronger the charge, and the higher the energy cost.

    And yes, long range, regular weapon (not for brains), awesome tesla sound effects and sparks flying around, etc.
     
  6. Platoonsgt1

    Platoonsgt1 Big Damn Hero

    Aah, I see. Does it need to charge up to fire? You could always have a long use time, making it passively charge up, although I can see why carrying a charged weapon could be problematic.
    I'll probably give it a try, but anyone else is welcome to try themselves.

    Edit: Looking at the files, the Brain extractor creates a lightning sprite in front of the weapon, which deals damage, and it does not look easy to stop wall piercing with it. I'll need to make something with longer range to test...
     
    Last edited: Dec 9, 2013
  7. Gene

    Gene Phantasmal Quasar

    You know how SB bows work, right? If you left click right away, you release a weak arrow. The more you hold left click, the more you pull back on the bow (up to a max amount) and release a progressively stronger arrow.

    I was thinking along the same lines - you can left click right away (repeatedly if you want to) to release one or many weak charges with low energy cost and no cooldown, or you can press and hold left click to power up the gun (up to a max amount) and then release a very strong charge.
     
  8. Gulfen

    Gulfen Void-Bound Voyager

    Yeah I can make this, I'm just trying to figure out how to make it a super long laser :S
     
  9. Platoonsgt1

    Platoonsgt1 Big Damn Hero

    For the super long laser, make a new, wider sprite, and change the hitbox of it in the .projectile file

    Edit: Turns out there's already a teslabolt.projectile, I'll see what that does first. (It conflicted, causing my game to fail launching :facepalm:)

    Edit2: Very short range, not sure if it's possible to extend it without changing the sprite.
     
    Last edited: Dec 9, 2013

Share This Page