Modding Help Hammer doesn't hit ground? (Solved)

Discussion in 'Starbound Modding' started by ImHereForTheMods, Feb 6, 2017.

  1. MetaFace

    MetaFace Guest

    Well I have some reference on this Chromebook... from my files, I didn't mess with weapon offset but lots with arm and weapon rotation, problem with this is that my weapon was axe cleave, not hammer smash. If those settings aren't changing anything then something is wrong.

    Edit:
    From my time testing, no, but it can't hurt to respawn the weapon and try.
     
  2. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    That's what I'm assuming, something's wrong, I just don't know what. Myabe my layout is off? I don't know.

    The hammer I referenced from frackin universe's files .activeitem file looked like this :
    Code:
    {
      "itemName" : "titaniumhammer",
      "price" : 500,
      "level" : 3,
      "maxStack" : 1,
      "rarity" : "Uncommon",
      "description" : "An extremely durable titanium hammer.",
      "shortdescription" : "Titanium Hammer",
      "tooltipKind" : "sword",
      "category" : "hammer",
      "twoHanded" : true,
      "itemTags" : ["weapon","melee","hammer"],
    
      "inventoryIcon" : "titaniumhammer.png",
    
      "animation" : "/items/active/weapons/melee/hammer/hammer.animation",
      "animationParts" : {
        "handle" : "",
        "blade" : "titaniumhammer.png"
      },
      "animationCustom" : {
        "sounds" : {
          "fire" : [ "/sfx/melee/swing_hammer.ogg" ]
        }
      },
    
      "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"],
    
      "elementalType" : "physical",
    
      "primaryAbilityType" : "hammersmash",
      "primaryAbility" : {
        "fireTime" : 1.2,
        "baseDps" : 11.5
      },
    
      "palette" : "/items/active/weapons/colors/tier1melee.weaponcolors",
    
      "altAbilityType" : "physicalshockwave",
    
      "builder" : "/items/buildscripts/buildunrandweapon.lua"
    }
    
    But that doesn't seem to be customizable at all, for offset / rotation?
     
  3. IHart

    IHart Scruffy Nerf-Herder

    the error has revealed itself! you primary ability object closed too soon
    Code:
    {
      "itemName": "aviantier1hammerbasic",
      "price": 150,
      "maxStack": 1,
      "rarity": "Common",
      "description": "The Carver. A sword perfect for carving meat.",
      "shortdescription": "The Carver",
      "tooltipKind": "sword",
      "category": "hammer",
      "twoHanded": true,
      "itemTags": ["weapon", "melee", "shortsword"],
      "level": 1,
      "inventoryIcon": "hammericon1.png",
    
      "animation": "hammer.animation",
      "animationParts": {
      "blade": "aviantier1hammer.png",
      "handle": ""
      },
       
      "animationCustom" : {
      "sounds" : {
      "fire" : [ "/sfx/melee/swing_hammer.ogg" ]
      }
      },
    
    
    
    
      "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"],
    
    
    
      "elementalType": "physical",
    
      "aimOffset": 0.0,
       
      "colorOptions" : [
      /* GREY */
      { "E0975C" : "B5B5B5", "A85636" : "5B5B5B" },
      /* BLACK */
      { "E0975C" : "555555", "A85636" : "333333" },
      /* WHITE */
      { "E0975C" : "EAEAEA", "A85636" : "CCCCCC" }
    
      ],   
       
       
       
       
       
      "primaryAbilityType" : "hammersmash",
      "primaryAbility" : {
      "fireTime" : 1.2,
      "baseDps" : 11.5,
      "damageConfig" : {
      "knockback" : 16,
      "statusEffects" : [ "bleedingshort" ]
      },
      "baseWeaponRotation" : 10,
      "stances" : {
      "idle" : {
      "armRotation" : -90,
      "weaponRotation" : -10,
      "weaponOffset" : [-2.9, 2.0],
    
      "allowRotate" : false,
      "allowFlip" : true
      },
      "windup" : {
      "duration" : 0.8,
      "armRotation" : 90,
      "weaponRotation" : -10,
      "twoHanded" : true,
      "weaponOffset" : [0, 0],
    
      "allowRotate" : false,
      "allowFlip" : true,
      "idleHammerAngle" : -20,
      "windupHammerAngle" : 0,
      "dropHammerAngle" : 90,
      "bounceHammerAngle" : 55,
       
      "minWindup" : 0.7,
      "windupBaseAngle" : -90,
      "windupAngleRange" : 140
      },
      "preslash" : {
      "duration" : 0.025,
      "armRotation" : 55,
      "weaponRotation" : -45,
      "twoHanded" : true,
      "weaponOffset" : [2.0, 2.0],
    
      "allowRotate" : false,
      "allowFlip" : false
      },
      "fire" : {
      "duration" : 0.4,
      "armRotation" : -45,
      "weaponRotation" : -175,
      "twoHanded" : true,
      "smashTimer" : 1.5,
      "weaponOffset" : [1.0, 3.0],
    
      "allowRotate" : false,
      "allowFlip" : false
      }
      }
      },
    
      "altAbilityType" : "physicalshockwave",
    
      "builder" : "/items/buildscripts/buildunrandweapon.lua",
      "critChance": 2,
      "critBonus": 6
       
       
    
    }
    Loading this up you will see that you have your work cut out for you. I recommend looking at hammersmash.weaponability and using those as your default values, then working from there.
     
    ImHereForTheMods and MetaFace like this.
  4. MetaFace

    MetaFace Guest

    So the fact you are using Frackin probably means you have it installed, but do you have the mod referenced in your mod's metadata file?

    mine looks as such
    Code:
    {
    "version" : "any number or such really",
    "friendlyName" : "Display name",
    "link" : "website link",
    "steamContentId" : "",
    "name" : "mod name",
    "description" : "Describes mod",
    "author" : "you go here",
    "requires" : ["Mod that is required here"]
    }
    "requires" of course needs the exact name that is listed in the metadata file of the mod needed.
    I still have little reference to hammers, so I'm not sure what Frackin changes.
     
    ImHereForTheMods likes this.
  5. IHart

    IHart Scruffy Nerf-Herder

    The primary ability has its default values defined in it's own file. The customizable fields act as an over-ride and can be added to any weapon.
     
    ImHereForTheMods likes this.
  6. MetaFace

    MetaFace Guest

    This is the easier way and is recommended, unless you're me and really dumb.
    Then you for some reason recreate the ability files as your own and customize them for your use, which takes more time because you have to make a new ability and add it to the game via patch file, the only upside being that the weapon file will seem "cleaner". I don't recommend this, it is painful, especially when you don't really need to. (again im dumb, so I did.)
     
    ImHereForTheMods and IHart like this.
  7. IHart

    IHart Scruffy Nerf-Herder

    The only thing that would require a recraft is if you change the primary or alt ability types themselves.
    From in-game you can just "/reload" and toss the item to the ground, when you pick it up itll be updated to your most recent changes. This is much quicker and slightly less annoying than restarting the entire game.
     
    Cyel, ImHereForTheMods and MetaFace like this.
  8. MetaFace

    MetaFace Guest

    Hehe, wish I learned that, I just restarted everytime.
     
  9. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal


    So, should it look like this then?
    Code:
    {
        "itemName": "aviantier1hammerbasic",
        "price": 150,
        "maxStack": 1,
        "rarity": "Common",
        "description": "Brick-on-a-Stick. A chunk of iron on a stick.",
        "shortdescription": "Brick-on-a-Stick",
        "tooltipKind": "sword",
        "category": "hammer",
        "twoHanded": true,
        "itemTags": ["weapon", "melee", "shortsword"],
        "level": 1,
        "inventoryIcon": "hammericon1.png",
    
        "animation": "hammer.animation",
        "animationParts": {
            "blade": "aviantier1hammer.png",
            "handle": ""
        },
    
        "animationCustom": {
            "sounds": {
                "fire": ["/sfx/melee/swing_hammer.ogg"]
            }
        },
    
    
    
    
        "scripts": ["/items/active/weapons/melee/meleeweapon.lua"],
    
    
    
        "elementalType": "physical",
    
        "aimOffset": 0.0,
    
    
    
    
    
    
    
        "primaryAbilityType": "hammersmash",
        "primaryAbility": {
            "fireTime": 1.2,
            "baseDps": 11.5,
            "damageConfig": {
                "knockback": 16,
                "statusEffects": ["bleedingshort"],
    
    
    
    
                "baseWeaponRotation": 10,
                "stances": {
                    "idle": {
                        "armRotation": -90,
                        "weaponRotation": -10,
                        "weaponOffset": [-2.9, 2.0],
    
                        "allowRotate": false,
                        "allowFlip": true
                    },
                    "windup": {
                        "duration": 0.8,
                        "armRotation": 90,
                        "weaponRotation": -10,
                        "twoHanded": true,
                        "weaponOffset": [0, 0],
    
                        "allowRotate": false,
                        "allowFlip": true,
    
    
                        "idleHammerAngle": -20,
                        "windupHammerAngle": 0,
                        "dropHammerAngle": 90,
                        "bounceHammerAngle": 55,
    
                        "minWindup": 0.7,
                        "windupBaseAngle": -90,
                        "windupAngleRange": 140
                    },
                    "preslash": {
                        "duration": 0.025,
                        "armRotation": 55,
                        "weaponRotation": -45,
                        "twoHanded": true,
                        "weaponOffset": [2.0, 2.0],
    
                        "allowRotate": false,
                        "allowFlip": false
                    },
                    "fire": {
                        "duration": 0.4,
                        "armRotation": -45,
                        "weaponRotation": -175,
                        "twoHanded": true,
                        "smashTimer": 1.5,
                        "weaponOffset": [1.0, 3.0],
    
                        "allowRotate": false,
                        "allowFlip": false
                    }
                },
    
                "altAbilityType": "physicalshockwave",
    
                "builder": "/items/buildscripts/buildunrandweapon.lua",
                "critChance": 2,
                "critBonus": 6
    
    
    
            }
        }
    }
    It's apparently valid in jsonlint that way.

    BUT... This is the log now...
    Code:
    [12:44:34.638] [Error] Exception while calling script init: (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:375: bad argument #1 to 'for iterator' (table expected, got nil)
    stack traceback:
        [C]: in ?
        [C]: in for iterator 'for iterator'
        [string "/items/active/weapons/weapon.lua"]:375: in function <[string "/items/active/weapons/weapon.lua"]:374>
        (...tail calls...)
        [string "/items/active/weapons/melee/meleeweapon.lua"]:15: in function <[string "/items/active/weapons/melee/meleeweapon.lua"]:5>
    [0] 7ff75b793763 Star::captureStack
    [1] 7ff75b7924ee Star::StarException::StarException
    [2] 7ff75b767091 Star::LuaEngine::handleError
    [3] 7ff75b9355cd Star::LuaEngine::callFunction<>
    [4] 7ff75b938e91 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [5] 7ff75bd7e6f3 Star::LuaContext::invokePath<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [6] 7ff75bd800b7 Star::LuaBaseComponent::init
    [7] 7ff75bd39b76 Star::ActiveItem::init
    [8] 7ff75bbdd2f2 Star::ToolUser::initPrimaryHandItem
    [9] 7ff75bbdfa2b Star::ToolUser::setItems
    [10] 7ff75ba6f760 Star::Player::refreshEquipment
    [11] 7ff75ba745b7 Star::Player::update
    [12] 7ff75bc5cff8 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [13] 7ff75b8ca197 Star::EntityMap::updateAllEntities
    [14] 7ff75bc73418 Star::WorldClient::update
    [15] 7ff75bbee427 Star::UniverseClient::update
    [16] 7ff75b6ddad7 Star::ClientApplication::updateRunning
    [17] 7ff75b6dc3bf Star::ClientApplication::update
    [18] 7ff75be4d401 Star::SdlPlatform::run
    [19] 7ff75be4d5bd Star::runMainApplication
    [20] 7ff75b6df4d6 WinMain
    [21] 7ff75c034573 __scrt_common_main_seh
    [22] 7fff5f778364 BaseThreadInitThunk
    [23] 7fff610d70d1 RtlUserThreadStart
    [12:44:39.623] [Error] Exception while calling script init: (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:375: bad argument #1 to 'for iterator' (table expected, got nil)
    stack traceback:
        [C]: in ?
        [C]: in for iterator 'for iterator'
        [string "/items/active/weapons/weapon.lua"]:375: in function <[string "/items/active/weapons/weapon.lua"]:374>
        (...tail calls...)
        [string "/items/active/weapons/melee/meleeweapon.lua"]:15: in function <[string "/items/active/weapons/melee/meleeweapon.lua"]:5>
    [0] 7ff75b793763 Star::captureStack
    [1] 7ff75b7924ee Star::StarException::StarException
    [2] 7ff75b767091 Star::LuaEngine::handleError
    [3] 7ff75b9355cd Star::LuaEngine::callFunction<>
    [4] 7ff75b938e91 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [5] 7ff75bd7e6f3 Star::LuaContext::invokePath<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [6] 7ff75bd800b7 Star::LuaBaseComponent::init
    [7] 7ff75bd39b76 Star::ActiveItem::init
    [8] 7ff75bbdd2f2 Star::ToolUser::initPrimaryHandItem
    [9] 7ff75bbdfa2b Star::ToolUser::setItems
    [10] 7ff75ba6f760 Star::Player::refreshEquipment
    [11] 7ff75ba745b7 Star::Player::update
    [12] 7ff75bc5cff8 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [13] 7ff75b8ca197 Star::EntityMap::updateAllEntities
    [14] 7ff75bc73418 Star::WorldClient::update
    [15] 7ff75bbee427 Star::UniverseClient::update
    [16] 7ff75b6ddad7 Star::ClientApplication::updateRunning
    [17] 7ff75b6dc3bf Star::ClientApplication::update
    [18] 7ff75be4d401 Star::SdlPlatform::run
    [19] 7ff75be4d5bd Star::runMainApplication
    [20] 7ff75b6df4d6 WinMain
    [21] 7ff75c034573 __scrt_common_main_seh
    [22] 7fff5f778364 BaseThreadInitThunk
    [23] 7fff610d70d1 RtlUserThreadStart
    [12:44:43.457] [Error] Exception while calling script init: (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:375: bad argument #1 to 'for iterator' (table expected, got nil)
    stack traceback:
        [C]: in ?
        [C]: in for iterator 'for iterator'
        [string "/items/active/weapons/weapon.lua"]:375: in function <[string "/items/active/weapons/weapon.lua"]:374>
        (...tail calls...)
        [string "/items/active/weapons/melee/meleeweapon.lua"]:15: in function <[string "/items/active/weapons/melee/meleeweapon.lua"]:5>
    [0] 7ff75b793763 Star::captureStack
    [1] 7ff75b7924ee Star::StarException::StarException
    [2] 7ff75b767091 Star::LuaEngine::handleError
    [3] 7ff75b9355cd Star::LuaEngine::callFunction<>
    [4] 7ff75b938e91 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [5] 7ff75bd7e6f3 Star::LuaContext::invokePath<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [6] 7ff75bd800b7 Star::LuaBaseComponent::init
    [7] 7ff75bd39b76 Star::ActiveItem::init
    [8] 7ff75bbdd2f2 Star::ToolUser::initPrimaryHandItem
    [9] 7ff75bbdfa2b Star::ToolUser::setItems
    [10] 7ff75ba6f760 Star::Player::refreshEquipment
    [11] 7ff75ba745b7 Star::Player::update
    [12] 7ff75bc5cff8 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [13] 7ff75b8ca197 Star::EntityMap::updateAllEntities
    [14] 7ff75bc73418 Star::WorldClient::update
    [15] 7ff75bbee427 Star::UniverseClient::update
    [16] 7ff75b6ddad7 Star::ClientApplication::updateRunning
    [17] 7ff75b6dc3bf Star::ClientApplication::update
    [18] 7ff75be4d401 Star::SdlPlatform::run
    [19] 7ff75be4d5bd Star::runMainApplication
    [20] 7ff75b6df4d6 WinMain
    [21] 7ff75c034573 __scrt_common_main_seh
    [22] 7fff5f778364 BaseThreadInitThunk
    [23] 7fff610d70d1 RtlUserThreadStart
    [12:44:48.008] [Error] Exception while calling script init: (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:375: bad argument #1 to 'for iterator' (table expected, got nil)
    stack traceback:
        [C]: in ?
        [C]: in for iterator 'for iterator'
        [string "/items/active/weapons/weapon.lua"]:375: in function <[string "/items/active/weapons/weapon.lua"]:374>
        (...tail calls...)
        [string "/items/active/weapons/melee/meleeweapon.lua"]:15: in function <[string "/items/active/weapons/melee/meleeweapon.lua"]:5>
    [0] 7ff75b793763 Star::captureStack
    [1] 7ff75b7924ee Star::StarException::StarException
    [2] 7ff75b767091 Star::LuaEngine::handleError
    [3] 7ff75b9355cd Star::LuaEngine::callFunction<>
    [4] 7ff75b938e91 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [5] 7ff75bd7e6f3 Star::LuaContext::invokePath<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [6] 7ff75bd800b7 Star::LuaBaseComponent::init
    [7] 7ff75bd39b76 Star::ActiveItem::init
    [8] 7ff75bbdd2f2 Star::ToolUser::initPrimaryHandItem
    [9] 7ff75bbdfa2b Star::ToolUser::setItems
    [10] 7ff75ba6f760 Star::Player::refreshEquipment
    [11] 7ff75ba745b7 Star::Player::update
    [12] 7ff75bc5cff8 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [13] 7ff75b8ca197 Star::EntityMap::updateAllEntities
    [14] 7ff75bc73418 Star::WorldClient::update
    [15] 7ff75bbee427 Star::UniverseClient::update
    [16] 7ff75b6ddad7 Star::ClientApplication::updateRunning
    [17] 7ff75b6dc3bf Star::ClientApplication::update
    [18] 7ff75be4d401 Star::SdlPlatform::run
    [19] 7ff75be4d5bd Star::runMainApplication
    [20] 7ff75b6df4d6 WinMain
    [21] 7ff75c034573 __scrt_common_main_seh
    [22] 7fff5f778364 BaseThreadInitThunk
    [23] 7fff610d70d1 RtlUserThreadStart
    [12:44:49.624] [Error] Exception while calling script init: (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:375: bad argument #1 to 'for iterator' (table expected, got nil)
    stack traceback:
        [C]: in ?
        [C]: in for iterator 'for iterator'
        [string "/items/active/weapons/weapon.lua"]:375: in function <[string "/items/active/weapons/weapon.lua"]:374>
        (...tail calls...)
        [string "/items/active/weapons/melee/meleeweapon.lua"]:15: in function <[string "/items/active/weapons/melee/meleeweapon.lua"]:5>
    [0] 7ff75b793763 Star::captureStack
    [1] 7ff75b7924ee Star::StarException::StarException
    [2] 7ff75b767091 Star::LuaEngine::handleError
    [3] 7ff75b9355cd Star::LuaEngine::callFunction<>
    [4] 7ff75b938e91 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [5] 7ff75bd7e6f3 Star::LuaContext::invokePath<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [6] 7ff75bd800b7 Star::LuaBaseComponent::init
    [7] 7ff75bd39b76 Star::ActiveItem::init
    [8] 7ff75bbdd2f2 Star::ToolUser::initPrimaryHandItem
    [9] 7ff75bbdfa2b Star::ToolUser::setItems
    [10] 7ff75ba6f760 Star::Player::refreshEquipment
    [11] 7ff75ba745b7 Star::Player::update
    [12] 7ff75bc5cff8 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [13] 7ff75b8ca197 Star::EntityMap::updateAllEntities
    [14] 7ff75bc73418 Star::WorldClient::update
    [15] 7ff75bbee427 Star::UniverseClient::update
    [16] 7ff75b6ddad7 Star::ClientApplication::updateRunning
    [17] 7ff75b6dc3bf Star::ClientApplication::update
    [18] 7ff75be4d401 Star::SdlPlatform::run
    [19] 7ff75be4d5bd Star::runMainApplication
    [20] 7ff75b6df4d6 WinMain
    [21] 7ff75c034573 __scrt_common_main_seh
    [22] 7fff5f778364 BaseThreadInitThunk
    [23] 7fff610d70d1 RtlUserThreadStart
    [12:44:53.507] [Error] Exception while calling script init: (LuaException) Error code 2, [string "/items/active/weapons/weapon.lua"]:375: bad argument #1 to 'for iterator' (table expected, got nil)
    stack traceback:
        [C]: in ?
        [C]: in for iterator 'for iterator'
        [string "/items/active/weapons/weapon.lua"]:375: in function <[string "/items/active/weapons/weapon.lua"]:374>
        (...tail calls...)
        [string "/items/active/weapons/melee/meleeweapon.lua"]:15: in function <[string "/items/active/weapons/melee/meleeweapon.lua"]:5>
    [0] 7ff75b793763 Star::captureStack
    [1] 7ff75b7924ee Star::StarException::StarException
    [2] 7ff75b767091 Star::LuaEngine::handleError
    [3] 7ff75b9355cd Star::LuaEngine::callFunction<>
    [4] 7ff75b938e91 Star::LuaFunction::invoke<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [5] 7ff75bd7e6f3 Star::LuaContext::invokePath<Star::Variant<Star::Empty,bool,__int64,double,Star::String,Star::LuaTable,Star::LuaFunction,Star::LuaThread,Star::LuaUserData> >
    [6] 7ff75bd800b7 Star::LuaBaseComponent::init
    [7] 7ff75bd39b76 Star::ActiveItem::init
    [8] 7ff75bbdd2f2 Star::ToolUser::initPrimaryHandItem
    [9] 7ff75bbdfa2b Star::ToolUser::setItems
    [10] 7ff75ba6f760 Star::Player::refreshEquipment
    [11] 7ff75ba745b7 Star::Player::update
    [12] 7ff75bc5cff8 <lambda_9fc580ae40b93070d912cafafa15880e>::operator()
    [13] 7ff75b8ca197 Star::EntityMap::updateAllEntities
    [14] 7ff75bc73418 Star::WorldClient::update
    [15] 7ff75bbee427 Star::UniverseClient::update
    [16] 7ff75b6ddad7 Star::ClientApplication::updateRunning
    [17] 7ff75b6dc3bf Star::ClientApplication::update
    [18] 7ff75be4d401 Star::SdlPlatform::run
    [19] 7ff75be4d5bd Star::runMainApplication
    [20] 7ff75b6df4d6 WinMain
    [21] 7ff75c034573 __scrt_common_main_seh
    [22] 7fff5f778364 BaseThreadInitThunk
    [23] 7fff610d70d1 RtlUserThreadStart
    [12:44:56.770] [Info] UniverseClient: Client disconnecting...
    [12:44:56.872] [Info] Client received world stop packet, leaving: Removed
    [12:44:57.106] [Info] UniverseServer: Client 'Eztl' <1> (local) disconnected for reason:
    [12:44:57.106] [Info] UniverseServer: Stopping idle world ClientShipWorld:911545829e83b11226d4cc617feeb19f
    [12:44:57.443] [Info] UniverseServer: Stopping UniverseServer
    [12:44:58.025] [Info] Application: quit requested
    [12:44:58.025] [Info] Application: quitting...
    [12:44:58.025] [Info] Application: shutdown...
    [12:44:58.298] [Info] Root: Shutting down Root
    [12:44:58.779] [Info] Application: Destroying SDL Window
    [12:44:58.788] [Info] Application: stopped gracefully
    
    So, am lost now, the path seems to be fine for the lua, and it seems to be the right file.

    Thanks again for the help.
     
  10. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    I don't think fracking universe would be a dependency, so, I don't think that is necessary.

    Thanks for the info.
     
  11. Cyel

    Cyel Scruffy Nerf-Herder

    Hey yo thanks, when I searched for this, the only thread I found said that it wasn't possible


    I think the fact that your hammer's not touching ground is because, right now, hammers' heads are generally bigger (you can count pixels, yours' head is ~16 pixels wide, while newer hammers' are... bigger, I stopped counting past 20 pixels and seeing there were more), so they tweaked the default values accordingly.

    Your log says the error started from meleeweapon.lua's 15th line, and it's the line where getPrimaryAbility() is called. Looking at your activeitem, your file is wrong; you never close the damageConfig object, and start going into the weapon's stances.
    Code:
    "primaryAbilityType": "hammersmash",
        "primaryAbility": {
            "fireTime": 1.2,
            "baseDps": 11.5,
            "damageConfig": {
                "knockback": 16,
                "statusEffects": ["bleedingshort"],
    
    
    
    
                "baseWeaponRotation": 10,
                "stances": {
    (when reading a log file, if it mentions something like "/path/filename.extension: X", X being any number (here 15), X would be the line number. This is common debug syntax)

    If you want an easier time when editing json formated files, I'd recommend using a built-for-code editor (N++, Sublime Text, Ultra Edit Pro, atom.io ...), which support json syntax coloration, and which generally mark related [], (), {}. You should also clean your tabulations, it'd make it easier to read.

    Since you're using a hammer that's in one part, instead of separated blade/handle, you could look into items/weapons/melee/hammer/foldingchair.activeitem and tweak the values from there?
     
    Last edited: Feb 7, 2017
    ImHereForTheMods, IHart and MetaFace like this.
  12. MetaFace

    MetaFace Guest

    Right, try a better text editor which shows syntax highlights, I use notepad++ since it is free. Also I can't say for sure, but I don't think your png determines whether or not the item actually hits the floor, rotation determines the angle which it is held at during certain frames, the png itself actually doesn't collide (since I know this due to my testing, the weapon png can go right through the ground and it doesn't matter), the collisions are defined in the animation file as hit box bounds.

    I still can't give concrete help, and this makes me sad. I'm left with more or less suggestions.

    If you are getting an error and it blames the melee lua file then you are calling something in your file that isn't right, this is usually a hint that it is something other than syntax (again had the same problem once, was not syntax).
     
    ImHereForTheMods likes this.
  13. IHart

    IHart Scruffy Nerf-Herder

    linux, so im stuck using atom :(
     
  14. Cyel

    Cyel Scruffy Nerf-Herder

    ^Sublime Text is available on linux, otherwise vim masterrace

    Indeed, the picture file doesn't determines whether or not the item actually hits the floor, they're all pointing upward, but settings are based on it and are made to do it. If your settings are based on a head that'd touch the ground with X rotation, then using a smaller head with the same settings won't match.

    By the way, using the Melee aiming mod ( http://steamcommunity.com/sharedfiles/filedetails/?id=817468961 ) makes me able to aim the hammer so that it touches the ground with the basic attack, and all it does seems to be patching allowRotate from false to true in .weaponability files. Defaults of what you need to change in your .activeitem can then probably be found, as IHart said, in hammersmash.weaponability
     
    Last edited: Feb 7, 2017
    ImHereForTheMods likes this.
  15. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    I just tried that, and that did it! Thank you sooooo much! Also thanks for the in-depth description! Very much appreciated! =D

    I can adjust all the settings now, and it actually affects the hammer's position!

    Here is my code now : (Just in case somone sees this in the future and wonders what changed, or needs a reference)
    Code:
    {
        "itemName": "aviantier1hammerbasic",
        "price": 150,
        "maxStack": 1,
        "rarity": "Common",
        "description": "Brick-on-a-Stick. A chunk of iron on a stick.",
        "shortdescription": "Brick-on-a-Stick",
        "tooltipKind": "sword",
        "category": "hammer",
        "twoHanded": true,
        "itemTags": ["weapon", "melee", "shortsword"],
        "level": 1,
    
    "inventoryIcon" : "hammericon1.png",
    
      "animation" : "/items/active/weapons/melee/hammer/hammer.animation",
      "animationParts" : {
        "handle" : "",
        "blade" : "aviantier1hammer.png"
      },
      "animationCustom" : {
        "animatedParts" : { "parts" : { "swoosh" : { "properties" : {
          "offset" : [-3.0, 1.5]
        }}}},
        "sounds" : {
          "fire" : [ "/sfx/melee/swing_hammer.ogg" ]
        }
      },
    
      "scripts" : ["/items/active/weapons/melee/meleeweapon.lua"],
    
      "elementalType" : "physical",
    
      "primaryAbilityType" : "hammersmash",
      "primaryAbility" : {
        "fireTime" : 1.3,
        "baseDps" : 11,
        "damageConfig" : {
          "damageSourceKind" : "bleedingshort"
        },
        "stances" : {
          "idle" : {
            "armRotation" : -10,
            "weaponRotation" : -10,
            "weaponOffset" : [0.0, 1.75]
          },
          "windup" : {
            "duration" : 0.8,
            "armRotation" : 90,
            "weaponRotation" : -10,
            "weaponOffset" : [0.0, 1.75],
    
            // Windup animation
            "idleHammerAngle" : -10,
            "windupHammerAngle" : 0,
            "dropHammerAngle" : 60,
            "bounceHammerAngle" : 55,
    
            "minWindup" : 0.7,
            "windupBaseAngle" : -10,
            "windupAngleRange" : 70
          },
          "preslash" : {
            "duration" : 0.025,
            "armRotation" : 55,
            "weaponRotation" : -45,
            "weaponOffset" : [0.0, 2.0]
          },
          "fire" : {
            "duration" : 0.4,
            "armRotation" : -35,
            "weaponRotation" : -55,
            "smashTimer" : 1.5,
            "weaponOffset" : [10.0, 2.0]
          }
        }
      },
    
      "altAbilityType" : "physicalshockwave",
      "altAbility" : { },
    
      "builder" : "/items/buildscripts/buildunrandweapon.lua"
      }
    Consider it solved! (For now) !
    All is well in waffleville!
     
    Cyel likes this.
  16. IHart

    IHart Scruffy Nerf-Herder

    I did not enjoy sublime, and am still too reliant on the mouse to be comfortable on vim. Im a recent convert from windows.
     
    Cyel likes this.
  17. MetaFace

    MetaFace Guest

    @Cyel saves the day again. You did the one thing I could not... give an actual answer (I just got my files from my computer saved on a flash drive in case I need them when im out of the house).
     
  18. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Haha, well, you did try your best to help, and that in itself is appreciated. =P
     
    MetaFace likes this.

Share This Page