Modding Help I can't get my .weaponability to work

Discussion in 'Starbound Modding' started by LucaEpic, Aug 29, 2017.

  1. LucaEpic

    LucaEpic Scruffy Nerf-Herder

    Right now I don't care about custom LUA files. All I want to do is rename Flip Slash, so it fits my weapon, but I keep getting this;
    Code:
    [C]: in ?
    [C]: in field 'assetJson'
    [string "/items/buildscripts/abilities.lua"]:27: in global 'addAbility'
    [string "/items/buildscripts/abilities.lua"]:59: in global 'setupAbility'
    [string "/items/buildscripts/buildunrandweapon.lua"]:22: in function <[string "/items/buildscripts/buildunrandweapon.lua"]:6>
    
    This is my .weaponability
    Code:
    {
      "animationParts" : { },
      "animationCustom" : {
        "animatedParts" : {
          "stateTypes" : {
            "swoosh" : {
              "states" : {
                "flip" : {}
              }
            }
          },
    
          "parts" : {
            "swoosh" : {
              "partStates" : {
                "swoosh" : {
                  "flip" : {
                    "properties" : {
                      "image" : "/items/active/weapons/melee/abilities/broadsword/flipslash/<elementalType>swoosh.png",
                      "offset" : [2.25, 2.75],
                      "damageArea" : [[-6.0, -3.5], [-6.0, 0], [-3.5, 2.5], [0, 2.5], [2.5, 0], [2.5, -3.5], [0, -6.0], [-3.5, -6.0]]
                    }
                  }
                }
              }
            }
          }
        },
        "particleEmitters" : {
          "flip" : {
            "active" : false,
            "transformationGroups" : ["weapon"],
            "offsetRegion" : [-4, -4, 5, 5],
            "emissionRate" : 70,
            "particles" : [
              { "particle" : "exodus1"},
              { "particle" : "exodus2"}
            ]
          }
        },
        "sounds" : {
          "flipSlash" : [ "/sfx/melee/laser_flip_slash.ogg" ]
        }
      },
    
      "ability" : {
        "name" : "Exo Slash",
        "type" : "exodus",
        "scripts" : ["/items/active/weapons/melee/abilities/broadsword/flipslash/flipslash.lua"],
        "class" : "FlipSlash",
    
        "cooldownTime" : 0.5,
    
        "damageConfig" : {
          "damageSourceKind" : "broadsword",
          "statusEffects" : [ ],
          "baseDamage" : 6,
          "knockback" : [0, -35],
          "timeout" : 0.2,
          "timeoutGroup" : "alt"
        },
    
        "flipMovementParameters" : {
          "collisionPoly" : [ [-2.0, -1.0], [-1.0, -2.0], [1.0, -2.0], [2.0, -1.0], [2.0, 1.0], [1.0, 2.0], [-1.0, 2.0], [-2.0, 1.0] ]
        },
    
        "energyUsage" : 60.0,
        "rotations" : 3,
        "rotationTime" : 0.2,
    
        "jumpVelocity" : [35, 20],
        "jumpDuration" : 0.2,
    
        "stances" : {
          "windup" : {
            "duration" : 0.2,
            "armRotation" : 30,
            "weaponRotation" : 0,
            "twoHanded" : true,
    
            "allowRotate" : false,
            "allowFlip" : true
          },
          "flip" : {
            "armRotation" : 0,
            "weaponRotation" : 0,
            "twoHanded" : true,
    
            "allowRotate" : false,
            "allowFlip" : false
          }
        }
      }
    }
    
    Anybody know what's wrong? Thx in advance. Oh, and I have a weaponabilities.config.patch, so it can't be that.
     
    Last edited: Aug 29, 2017
  2. Peelz

    Peelz Giant Laser Beams

    Did you rename the "type" field to "exodus"? That might be your problem. I'm not sure, but I think weapons may only accept a specified set of "type" values.
     
  3. LucaEpic

    LucaEpic Scruffy Nerf-Herder

    No, that doesn't work. Rip me.
     
  4. MetaFace

    MetaFace Guest

    You renamed type, in the weapon, does the alt ability say "exodus" instead of "flipslash" (or something like that)?
     
  5. Iaeyan Elyuex

    Iaeyan Elyuex Cosmic Narwhal

    I'm having the exact same problem. Only my weapon has multiple frames, and they all appear at once, as the entire image.
    [​IMG]
     
  6. LucaEpic

    LucaEpic Scruffy Nerf-Herder

    Yes, my weapons altAbilityType is exodus but, it still comes up with that error.
     
  7. MetaFace

    MetaFace Guest

    Hmm... I have a deal for you... if you upload your weapon and ability (with the corresponding Lua), I'll take a look at it and fix it.

    Cuz I'm a nice guy, and I kinda can't do much without more information.
     
  8. Peelz

    Peelz Giant Laser Beams

    I suspect that your issue is different. I would make sure that you have all the proper .frames and .animation files defined for your object.
     
  9. LucaEpic

    LucaEpic Scruffy Nerf-Herder

  10. Iaeyan Elyuex

    Iaeyan Elyuex Cosmic Narwhal

    Yeah, I copypaste a lot. A lot of us probably do that. I recently modded in a gun that fires blue linerifle bolts, so I'm feeling pretty confident.
     
  11. MetaFace

    MetaFace Guest

    Well if you mod, you copy and paste, it's common sense to do less work by taking something that ALMOST works and changing it just a little to make it do what you want it to. I've done that with everything I've made, then made some serious changes.

    I'm going to take a hard look today, I got home late then spent the rest of the night watching a movie and I didn't want to be distracted by my laptop. :rofl:
     
  12. MetaFace

    MetaFace Guest

    Oh my god, the solution was so easy.

    So in your abilities folder, after a very brief test, I saw that your folder for "broadsword" abilities was named "broadword", you're missing an "s" in your folder name and that's literally it.
     
  13. LucaEpic

    LucaEpic Scruffy Nerf-Herder

    That sound like me. Well, thank you so much!
     
  14. LucaEpic

    LucaEpic Scruffy Nerf-Herder

    And, it works. I feel so stupid. Thx again, MetaFace.
     
  15. MetaFace

    MetaFace Guest

    No problem, (like literally almost no problem) I've made some simple stupid mistakes a lot before.
     

Share This Page