Modding Help creating a tech that can target others (helpful not harmful) and a general mod question

Discussion in 'Starbound Modding' started by Ellary, Dec 10, 2013.

  1. Ellary

    Ellary Pangalactic Porcupine

    ahh when I try and use them my game just crashes over and over
    EDIT: wait was my fault I had some bad names, I keep putting caps at the start.
     
    Last edited: Dec 12, 2013
  2. Ellary

    Ellary Pangalactic Porcupine

    It appears to be working! but when I try and delete the play sounds part i crash the game? is there a way to safely remove the play sound...they are being healed not hurt ><
     
  3. Dilwoah

    Dilwoah Void-Bound Voyager

    Your best bet would be to make your own sound for it. Or copy one from somewhere else and make sure it directs to that sound instead.

    But I'm correct in assuming that everything works aside from it being a sound you don't like? If so then good!
     
  4. Ellary

    Ellary Pangalactic Porcupine

    well universal damage is broken atm, even on my friends game they take no universal damage, so cannot test the knock back~ but it appears to be working! just the sound is the problem~ thank you so much for making this!
     
  5. Dilwoah

    Dilwoah Void-Bound Voyager

    Wonderful. Hit me up with your files as well if you have the time. I'd like to pick em apart for my own gun. :p
     
  6. Ellary

    Ellary Pangalactic Porcupine

    oh I can post them here~ as I am kinda a newb at all this sharing files stuff ._.

    Here is the projectile. Remember to create an png for it and set that in the frames file. will list that also below.
    Code:
    {
      "projectileName" : "testhealing",
      "physics" : "hover",
      "bounces" : 0,
      "level" : 3,
      "timeToLive" : 2.000,
      "damageKindImage" : "icon.png",
      "frames" : "testhealing.png",
      "animationCycle" : 0.5,
      "frameNumber" : 1,
    
      "power" : 0,
      "piercing" : true,
      "damageKind" : "heal",
      "damageType" : "ignoresdef",
      "damagePoly" : [ [-36, 0], [-24, -24], [0, -36], [24, -24], [36, 0], [24, 24], [0, 36], [-24, 24] ],
      "flippable" : true,
      "universalDamage" : true,
      "statusEffects" : [
      {
      "kind" : "health",
      "amount" : 15
      }
      ]
    }
    
    Here is the frames file. I used a 10x10 orb, no idea how to make them animate yet >< but this made the full orb show.
    
    Code:
    {
      "frameGrid" : {
        "size" : [10, 10],
        "dimensions" : [10, 10],
    
        "names" : [
          [ "0", "1", "2", "3" ]
        ]
      }
    }
    

    NOW! for the gun, I started using the bubblegun, but it was not working in my game. would crash me. So I edited the bottom and merged it with the brain gun thingy

    Code:
    {
      "itemName" : "bubblegun",
      "inventoryIcon" : "bubblegunIcon.png",
      "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
      "maxStack" : 1,
      "rarity" : "Rare",
      "description" : "A bubble gun! It shoots bubbles! Weeeee!",
      "shortdescription" : "Bubblegun",
      "image" : "bubblegun.png",
      "handPosition" : [-3.5, -1],
      "firePosition" : [20, 1.5],
    
      "fireTime" : 0.08,
      "twoHanded" : false,
    
      "projectileType" : "testheal",
      "projectile" : { "speed" : 2,
        "power" : 0,
        "color" : [10, 255, 10]
      }
    }
    
    then I used the two files you made for healing. the 2.000 made the orb stay in the air for two seconds anyone who went near it got a small heal each tick.
     
  7. Dilwoah

    Dilwoah Void-Bound Voyager

    Awesome, I'll fiddle some more with it after I get to my next goal in game :p
     
  8. tifel100

    tifel100 Void-Bound Voyager

    Changing the damagekind from brain to heal did nothing for me apparently, still knockback and the gun still does 12damage.

    -cut-

    Image of laser :D
    [​IMG]
    Btw, What does flippable mean?:geek:

    Apparently it does work, but there seems to be 2 different guns. My female character has the old 1, and my robot character has the new 1. :O
     
    Last edited: Dec 12, 2013
  9. Dilwoah

    Dilwoah Void-Bound Voyager

    Yes you'll have to spawn a new gun with the new damagetype. Since it isn't fundamentally changing the regular default.damage, the gun you spawned that uses that damage type before still uses it.

    Glad to hear it worked for the both of you. I'm gunna be honest and say that I have no idea what flippable means. It could be something extremely obvious like the projectile can or cannot flip upside down. But I don't know :p. Haven't tested it much.
     
  10. tifel100

    tifel100 Void-Bound Voyager

    Well with my laser, when I had flippable on, when the laser hit the ground, it changed it's angle to straight on the floor. Also does it on walls. So I think that's what it does.
     
  11. tifel100

    tifel100 Void-Bound Voyager

    Managed to make a bow that heals :D. Kept the damage type to bow, and made the power to 0.1.
    (If 0, it will just go throught the enemy) <--- (Could be good for a torch gun.)
     
  12. Ellary

    Ellary Pangalactic Porcupine

    ahh I am so glad to see others working on healing items also!
     
  13. dra6o0n

    dra6o0n Big Damn Hero

    It's not within the gun code as to whether an attack hits a target or not, that's something within the actual game codes
     
  14. tifel100

    tifel100 Void-Bound Voyager

    I don't know what you're talking about? Which post are you referring to?
     
  15. dra6o0n

    dra6o0n Big Damn Hero

    The game mechanic for a pvp or pve setting.
    Basically players hitting other players for instance.
    If we have a 'toggleable' aggression mode to shift between hitting NPCs and monsters, it can help avoid killing and pissing off your guards and villagers.
     
  16. Dilwoah

    Dilwoah Void-Bound Voyager

    Can you post the data for that bow? I have a funny idea for it :p.
     
  17. tifel100

    tifel100 Void-Bound Voyager

    Sure I guess,

    Bow:
    Code:
    {
      "itemName" : "cupidbow",
      "inventoryIcon" : "cupidbowicon.png",
      "dropCollision" : [-8.0, -3.0, 8.0, 3.0],
      "maxStack" : 1,
      "rarity" : "Rare",
      "description" : "Cupid's Bow of Love, Shoot anything with it to heal them!",
      "shortdescription" : "Cupid's Bow",
      "image" : "cupidbow.png:<frame>",
      "imageFrameSelector" : "bowImageSelector",
      "handPosition" : [0, -1],
      "firePosition" : [20, 1.5],
      "level" : 1,
      "fireTime" : 2,
      "twoHanded" : true,
    
      "fireOnRelease" : true,
      "walkWhileFiring" : true,
    
      "projectileType" : "lovearrow",
      "powerProjectileType" : "chargedlovearrow",
      "powerProjectileTime" : [0.9, 1.1],
      "projectile" : {
        "speed" : 60,
        "speedCurve" : "drawTimeMultiplier",
        "power" : 0.001,
        "powerCurve" : "drawTimeMultiplier",
        "color" : [10, 255, 10]
      },
    
      "muzzleEffect" : {
        "fireSound" : [ { "file" : "/sfx/gun/bow_loose.wav" } ]
      }
    
    Projectile - arrow:
    Code:
    {
      "projectileName" : "lovearrow",
      "physics" : "arrow",
      "frames" : "lovearrow.png",
      "level" : 3,
      "animationCycle" : 0.25,
      "frameNumber" : 1,
      "damageKindImage" : "icon.png",
      "timeToLive" : 30,
      "pointLight" : false,
      "actionOnReap" : [
        {
          "action" : "config",
          "file" : "/projectiles/explosions/bulletexplosion/bulletexplosion.config"
        }
      ],
      "power" : 0.001,
      "damageType" : "ignoresdef",
      "damageKind" : "bow",
      "emitters" : [ "health" ],
      "universalDamage" : true,
      "statusEffects" :
      [
        { "kind" : "health", "amount" : 10 }
      ]
    }
    
    
    Projectile - charged arrow:
    Code:
    {
      "projectileName" : "chargedlovearrow",
      "physics" : "arrow",
      "frames" : "chargedlovearrow.png",
      "level" : 3,
      "animationCycle" : 0.25,
      "frameNumber" : 1,
      "emitters" : [ "health" ],
      "damageKindImage" : "icon.png",
      "timeToLive" : 30,
      "pointLight" : false,
      "actionOnReap" : [
        {
          "action" : "config",
          "file" : "/projectiles/explosions/bulletexplosion/bulletexplosion.config"
        }
      ],
      "power" : 0.001,
      "damageType" : "ignoresdef",
      "damageKind" : "bow",
      "universalDamage" : true,
      "statusEffects" :
      [
        { "kind" : "health", "amount" : 25 }
      ]
    }
    

    Make sure you don't forget to add the images! And for the .frames files, they're the same as a titanium bow, wooden arrow and chargedarrow.
     

Share This Page