Modding Help Weapon Ability Help

Discussion in 'Starbound Modding' started by Noah Nebula, Dec 4, 2018.

  1. Noah Nebula

    Noah Nebula Sandwich Man

    I am trying to change the Damage of a weapon but it won't change.
    Code:
    "primaryAbility" : {
        "ability" : {
          "fireTime" : 0.5,
          "baseDps" : 22,
          "energyUsage" : 30
        }
      },
     
  2. bk3k

    bk3k Oxygen Tank

    I'm assuming (since you didn't specify) that you are having trouble patching. This can help.
     
  3. Noah Nebula

    Noah Nebula Sandwich Man

    Sorry no, this isn't a patch file. This is a custom weapon.
     
  4. SpazDiesFirst360.0

    SpazDiesFirst360.0 Phantasmal Quasar

    Can you possibly provide every parameter passed into primaryAbility, or better yet the whole .activeitem file?
     
  5. Noah Nebula

    Noah Nebula Sandwich Man

    Ok here you go;
    Code:
    {
      "itemName" : "energyorbl1",
      "level" : 1,
      "price" : 4200,
      "inventoryIcon" : "energyorb.png",
      "maxStack" : 1,
      "rarity" : "Legendary",
      "description" : "Antient collective power",
      "shortdescription" : "^green;Blast Orb^white; - ^yellow;[Lvl 1]^white;",
      "category" : "uniqueWeapon",
      "itemTags" : ["weapon","ranged"],
      "twoHanded" : true,
    
      "learnBlueprintsOnPickup" : [
        "energyorbl2"
      ],
    
      "animation" : "energyorb.animation",
      "animationParts" : {
        "beamorigin" : "beammuzzle.png",
        "blaststart" : "blaststart.png"
      },
      "animationCustom" : {
        "sounds" : {
          "fireStart" : [ "/sfx/gun/erchiuseyebeam_start.ogg" ],
          "fireLoop" : [ "/sfx/gun/erchiuseyebeam_loop.ogg" ],
          "fireEnd" : [ "/sfx/gun/erchiuseyebeam_stop.ogg" ],
          "beamImpact" : [ "/sfx/projectiles/flame_burn.ogg" ]
        }
      },
      "animationScripts" : ["/items/active/effects/chain.lua"],
      "baseOffset" : [0.0, 0.0],
      "muzzleOffset" : [0.0, 0.0],
      "scripts" : ["/items/active/weapons/ranged/gun.lua"],
      "elementalType" : "physical",
      "primaryAbilityType" : "energyorbwave",
      "primaryAbility" : {
        "ability" : {
          "fireTime" : 0.5,
          "baseDps" : 22,
          "energyUsage" : 30
        }
      },
      "builder" : "/items/buildscripts/buildunrandweapon.lua",
      "upgradeParameters" : {
        "inventoryIcon" : "energyorb_l6.png",
        "animationParts" : {
          "energyorb" : "orb_l6.png"
        },
        "shortdescription" : "energy orb ^yellow;^reset;"
      }
    }
    
     
  6. SpazDiesFirst360.0

    SpazDiesFirst360.0 Phantasmal Quasar

    Have you defined "energyorbwave" in a .weaponability file, and patched that to the weaponabilities.config file?
     
  7. Noah Nebula

    Noah Nebula Sandwich Man

    Yes here is the energyorbbeam.weaponability file;
    Code:
    {
      "ability" : {
        "name" : "Energyorb Wave",
        "type" : "energyorbwave",
        "scripts" : ["/items/active/weapons/ranged/abilities/energyorb/energyorbbeam.lua"],
        "class" : "BeamFire",
    
        "fireTime" : 0.5,
        "baseDps" : 22,
        "energyUsage" : 30,
    
        "damageConfig" : {
          "statusEffects" : [ ],
          "damageSourceKind" : "plasma",
          "knockback" : 8
        },
    
        "beamLength" : 100,
    
        "beamTransitionTime" : 0.4,
        "beamTransitionFrames" : 4,
    
        "chain" : {
          "startOffset" : [0, 0],
          "startSegmentImage" : "/items/active/weapons/ranged/abilities/energyorb/beamstart.png:<beamFrame>",
          "segmentImage" : "/items/active/weapons/ranged/abilities/energyorb/beam.png:<beamFrame>",
          "endSegmentImage" : "/items/active/weapons/ranged/abilities/energyorb/beamend.png:<beamFrame>",
          "segmentSize" : 0.48,
          "overdrawLength" : 0.2,
          "taper" : 0,
          "waveform" : {
           "frequency" : 4.0,
            "amplitude" : 0.0,
            "movement" : 0.0
          },
          "fullbright" : true
        },
    
        "stances" : {
          "idle" : {
            "armRotation" : 0,
            "weaponRotation" : 0,
            "twoHanded" : true,
    
            "allowRotate" : true,
            "allowFlip" : true,
    
            "animationStates" : {
              "blaststart" : "idle"
            }
          },
          "fire" : {
            "armRotation" : 0,
            "weaponRotation" : 0,
            "twoHanded" : true,
    
            "allowRotate" : true,
            "allowFlip" : true,
    
            "animationStates" : {
              "blaststart" : "fire"
            }
          },
          "cooldown" : {
            "duration" : 0.5,
            "armRotation" : 0,
            "weaponRotation" : 0,
            "twoHanded" : true,
    
            "allowRotate" : true,
            "allowFlip" : true,
    
            "animationStates" : {
              "blaststart" : "idle"
            }
          }
        }
      }
    }
    
    And the weaponabilities.config.patch;
    Code:
    [
      {
        "op": "add",
        "path": "/energyorbwave",
        "value": "/items/active/weapons/ranged/abilities/energyorb/energyorbbeam.weaponability"
      }
    ]
    
     
  8. SpazDiesFirst360.0

    SpazDiesFirst360.0 Phantasmal Quasar

    If you have not tried already, I would suggest changing the "baseDps" parameters in both the activeitem file and the weaponability file. Other than that, I currently have no idea what is causing the issue.
     
  9. Noah Nebula

    Noah Nebula Sandwich Man

    I can't do that because there are different level items that runoff the .weaponsabilitys file
    "energyorbl1"
    "energyorbl2"
    "energyorbl3"
    "energyorbl4"
     

Share This Page