Modding Help Creating a new weapon type (and some projectile questions)

Discussion in 'Starbound Modding' started by GamerXP, Dec 14, 2013.

  1. GamerXP

    GamerXP Big Damn Hero

    Hello, people. I have been trying to make new weapon type and, of course, I got some problems with it. I will be gratefull if someone answer at least some of them:

    1. Weapons with type "sword" use some stance system now. There are 3 frames in common swords: "idle", "windup" and "cooldown". Is there a way to add inbetween frames? Or even code new a weapon type from a scratch?
    2. "armAngle" controls both hands' angles in the frame. But can I control them separately?
    3. Can I make aimable melee weapon like spears from Terraria? I'm using bow as base for such thing now, but it don't have stance system in them.
    4. Is there a way to show hitboxes in the game? I though about admin commands, but looks like developers disabled them.
    5. If projectile is rotated - do hitbox rotate with it too? I think no and it's bad.
    6. Can I make projectile make sound on creation? I want normal and charged attacks make different sounds. I think I can make dummy projectile and make it play sounds and create actual projectile on it's death, but it's just a workaround and can have some problems with direction inheritance.
    7. Can I make projectile be drawn OVER player?

    Thank you for the answer in advance.
     
  2. Platoonsgt1

    Platoonsgt1 Big Damn Hero

    1: The frames themselves are likely animated, and additional images could probably be added to the animations.
    2: With a 2-handed tool/weapon, both hands would be controlled by this, but a 1-handed weapon would only control the relevant hand. I don't know if this can be changed.
    3: You could spawn a projectile which looks like a thrusting spear, as this has been done before.

    I can't really help you with 4-7, I haven't messed with projectiles/ranged weapons much.
     
  3. GamerXP

    GamerXP Big Damn Hero

    Thanks for your reply.
    1. Well, I think they are, but I didn't find a way to add new frames there.
    3. Yeah, I'm doing something like this right now. I just want to make some hand animations as well as weapon animation there. And bow-type weapon do not support it

    About 5:
    Looks like they are not rotating. After some advanced pot-smashing I figured, that hitbox itself is just flipped by x to the direction of the player.
    Right now I'll try a workaround - maybe I could spawn a lot of small hitboxes along the direction of the slash.
     
  4. GamerXP

    GamerXP Big Damn Hero

    Found some workarounds if someone interested:
    5. You need to create projectile, that immediately destroys and creates slash effect and few hitbox rectangles, that move very fast, but destroys really fast. Just tweak those numbers so they will stay in slash area.
    6. Same way, as above. Just add sound to destroy events.
    7. Probably found a way. You need to make slash effect with particle. But I still don't know how to place particle at correct angle

    So..
    Does anybody know how to make "action" : "particle" use same angle, as projectile? Or maybe at least full list of arguments?
     
  5. Lynx88

    Lynx88 Phantasmal Quasar

    I don't think you can add frames in between the stances, that seems to be handled internally.

    Also I've been trying to get animated weapons to work (like a sword with a lightning effect on the blade), by combining the animation method for stuff like sci-fi displays, but the game doesn't seem to like that. Neither does it seem to like the animation code for stuff like drills:

     

Share This Page