Modding Help Why is my Broken Shortsword not spawning?!? D:

Discussion in 'Starbound Modding' started by Cen Silver, Apr 14, 2017.

  1. Cen Silver

    Cen Silver Phantasmal Quasar

    From what I can tell here:

    [Error] Could not instantiate item '[brokenprotectorateshortsword, 1, {}]'. (LuaException) Error code 2, [string "/items/buildscripts/buildunrandweapon.lua"]:64: attempt to perform arithmetic on a table value
    stack traceback:
    [C]: in metamethod '__mul'
    [string "/items/buildscripts/buildunrandweapon.lua"]:64: in function <[string "/items/buildscripts/buildunrandweapon.lua"]:6>
    [13:28:31.970]

    The problem with my sord is the... buildunrandweapon.lua file?!? But I didn't even make that file... and it's identical on all other swords I saw... D :

    WHAT IS THIS SORCERY?!? I DO NOT UNDERSTAND!!! HALP!!! ->A<-
     
  2. IHart

    IHart Scruffy Nerf-Herder

    That lua file uses values defined in your item file. What does your item file say?
     
  3. Cen Silver

    Cen Silver Phantasmal Quasar

    Oh... thank goodness... I was scared for a second there... o3o"""

    Here's the Activeitem file...

    Code:
    {
        "itemName": "brokenprotectorateshortsword",
        "price": 500,
        "level": 1,
        "maxStack": 1,
        "rarity": "Common",
        "description": "A very nice sword in very poor condition.",
        "shortdescription": "Broken Shortsword",
        "tooltipKind": "sword",
        "category": "shortsword",
        "twoHanded": false,
        "itemTags": [
            "weapon",
            "melee",
            "shortsword"
        ],
        "inventoryIcon": [
            {
                "image": "brokenprotectorateshortswordblade.png"
            },
            {
                "image": "brokenprotectorateshortswordhandle.png"
            }
        ],
        "animation": "comboshortsword.animation",
        "animationParts": {
            "handle": "brokenprotectorateshortswordhandle.png",
            "blade": "brokenprotectorateshortswordblade.png"
        },
        "animationCustom": {},
        "scripts": [
            "/items/active/weapons/melee/meleeweapon.lua"
        ],
        "elementalType": "physical",
        "primaryAbilityType": "shortswordcombo",
        "primaryAbility": {
            "fireTime": [
                0.5
            ],
            "baseDps": [
                7.5
            ]
        },
        "builder": "/items/buildscripts/buildunrandweapon.lua"
    }
     
  4. IHart

    IHart Scruffy Nerf-Herder

    it's because of the fire time and base dps values. For these cases you either use brackets for a pair of values or use no brackets for a single value.
     
    Cen Silver likes this.
  5. Cen Silver

    Cen Silver Phantasmal Quasar

    Ah crab!!! Thank you!!! >.<""" /
     
  6. bk3k

    bk3k Oxygen Tank

    Why is my Broken Shortsword not spawning?!?
    because it is broken, duh!

    /couldn't help myself
     
    IHart and Cen Silver like this.
  7. Cen Silver

    Cen Silver Phantasmal Quasar

    I said spawning, Not working. u silly~ ; P

    X D
     

Share This Page