Modding Help Custom sword doesn't fit well

Discussion in 'Starbound Modding' started by sesh4774, Jul 17, 2021.

  1. sesh4774

    sesh4774 Void-Bound Voyager

    I don't know how to use .JSON files but I decided to mess with the code of some custom weapons for fun, i'm not a modder or anything. Recently i turned a modified two-handed katana into a one-handed weapon, but it doesn't sit well in the player's hand when one-handed, could anyone help me fix this?


    How it should look:
    [​IMG]

    How it looks:
    [​IMG]

    Here's the code:

    Code:
    /spawnitem commonshortsword 1 '{"shortdescription":"Handmade Katana","level":1,"inventoryIcon":"/items/active/weapons/bossdrop/soluskatana/handle.png","tooltipKind":"base","animationParts":{"blade":"","handle":"/items/active/weapons/bossdrop/soluskatana/handle.png"},"animationCustom":{"animatedParts":{"stateTypes":{"swoosh":{"default":"idle","states":{"idle":{},"fire":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire2":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire3":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire4":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire5":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire6":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"}}}},"parts":{"blade":{"properties":{"zLevel":0,"centered":true,"image":"<partImage><paletteSwaps>?<directives>?<bladeDirectives>","offset":[0,1.875],"transformationGroups":["weapon"],"rotationCenter":[0,0],"damageArea":[[-0.7,-1.0],[-0.7,2.5],[0.5,2.5],[0.5,-1.0]]}},"handle":{"properties":{"zLevel":1,"centered":true,"image":"<partImage><paletteSwaps>?<directives>","offset":[0,1.875],"transformationGroups":["weapon"],"rotationCenter":[0,0]}},"swoosh":{"properties":{"zLevel":-1,"centered":true,"transformationGroups":["swoosh"],"rotationCenter":[0,0]},"partStates":{"swoosh":{"idle":{"properties":{"image":""}},"fire":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>","offset":[1,2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}},"fire2":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh3/<elementalType>swoosh.png:<frame>","offset":[3.5,0],"damageArea":[[-4.75,1.5],[3,1],[3,-1],[-4.75,-1.5]]}},"fire3":{"properties":{"image":"/items/active/weapons/melee/abilities/broadsword/spinslash/spinswoosh.png:<frame>?scalenearest=1.5","offset":[-2,0],"damageArea":[[-8,2],[5,2],[8,0],[6,-2],[4,-2],[2,0],[-8,0]]}},"fire4":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy","offset":[1,-2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}},"fire5":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy?flipx","offset":[3,-2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}},"fire6":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy?flipx","offset":[3,-2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}}}}}}},"sounds":{"fire":["/sfx/melee/swing_spear.ogg"],"fire2":["/sfx/melee/swing_shortsword.ogg"],"fire3":["/sfx/melee/swing_spear.ogg"],"fire4":["/sfx/melee/swing_shortsword.ogg"],"fire5":["/sfx/melee/swing_broadsword.ogg"],"fire6":["/sfx/melee/swing_spear.ogg"]}},"primaryAbility":{"comboSteps":6,"swooshOffsetRegions":[[1.5,-1.0,5.5,1.0],[3.0,-0.5,6.5,2.0],[1.5,-1.0,5.5,1.0],[1.5,-1.0,5.5,1.0],[1.5,-1.0,5.5,1.0],[3.0,-0.5,6.5,2.0]],"fireTime":0.6,"baseDps":11.5,"damageConfig":{"damageSourceKind":"broadsword","statusEffects":[],"knockbackMode":"facing","timeout":0.5},"stepDamageConfig":[{"baseDamageFactor":1.0,"knockback":10},{"baseDamageFactor":0.9,"knockback":7},{"baseDamageFactor":0.7,"knockback":10},{"baseDamageFactor":1.3,"knockback":10},{"baseDamageFactor":2.0,"knockback":7},{"baseDamageFactor":2.0,"knockback":25}],"stances":{"idle":{"armRotation":30,"weaponRotation":50,"allowRotate":false,"twoHanded":false,"allowFlip":true},"windup1":{"duration":0.15,"armRotation":95,"weaponRotation":10,"twoHanded":false,"allowRotate":false,"allowFlip":true},"preslash1":{"duration":0.05,"armRotation":45,"weaponRotation":70,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"fire1":{"duration":0.2,"armRotation":-40,"weaponRotation":-70,"twoHanded":false,"allowRotate":false,"allowFlip":true},"wait1":{"duration":0.2,"armRotation":-40,"weaponRotation":-70,"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup2":{"duration":0.15,"armRotation":-150,"weaponRotation":55,"weaponOffset":[0,0],"twoHanded":false,"allowFlip":true,"allowRotate":false},"fire2":{"duration":0.2,"armRotation":0,"weaponRotation":-90,"weaponOffset":[0,0],"twoHanded":false,"allowFlip":true,"allowRotate":false},"wait2":{"duration":0.2,"armRotation":0,"weaponRotation":-90,"weaponOffset":[0,0],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup3":{"duration":0.1,"armRotation":10,"weaponRotation":-80,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"preslash3":{"duration":0.05,"armRotation":-15,"weaponRotation":-105,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"fire3":{"duration":0.15,"armRotation":-105,"weaponRotation":-150,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"wait3":{"duration":0.2,"armRotation":-105,"weaponRotation":-150,"weaponOffset":[0,0],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup4":{"duration":0.15,"armRotation":-100,"weaponRotation":-160,"twoHanded":false,"allowRotate":false,"allowFlip":true},"fire4":{"duration":0.2,"armRotation":80,"weaponRotation":-140,"twoHanded":false,"allowRotate":false,"allowFlip":true},"wait4":{"duration":0.2,"armRotation":80,"weaponRotation":-140,"twoHanded":false,"allowRotate":false,"allowFlip":true},"windup5":{"duration":0.3,"armRotation":90,"weaponRotation":0,"weaponAngularVelocity":-1080,"weaponOffset":[0,-1.5],"twoHanded":false,"allowFlip":true,"allowRotate":false},"fire5":{"duration":0.2,"armRotation":-40,"weaponRotation":130,"weaponOffset":[0,-3.5],"twoHanded":false,"allowFlip":true,"allowRotate":false},"wait5":{"duration":0.2,"armRotation":-40,"weaponRotation":130,"weaponOffset":[0,-3.5],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup6":{"duration":0.3,"armRotation":-40,"weaponRotation":-180,"armAngularVelocity":500,"twoHanded":false,"allowRotate":false,"allowFlip":true,"weaponOffset":[0,-3.5]},"preslash6":{"duration":0.05,"armRotation":100,"weaponRotation":-180,"twoHanded":false,"allowRotate":false,"allowFlip":true,"weaponOffset":[0,-3.5]},"fire6":{"duration":0.4,"armRotation":-50,"weaponRotation":140,"twoHanded":false,"allowRotate":false,"allowFlip":true,"weaponOffset":[0,-3.5]}}}}'
     
  2. Zaakari

    Zaakari Pangalactic Porcupine

    Greetings,

    Sorry for the late reply. You just lack some "weaponOffset" arrays in your idle and first attack stances.
    Code is generally easier to debug when it isn't written on a single line, so I'll expand that to better show you where the issue lies (also you may have received help sooner had you posted the code like this):
    Code:
    {
       "shortdescription":"Handmade Katana",
       "level":1,
       "inventoryIcon":"/items/active/weapons/bossdrop/soluskatana/handle.png",
       "tooltipKind":"base",
       "animationParts":
       { "blade":"",
         "handle":"/items/active/weapons/bossdrop/soluskatana/handle.png"
       },
       "animationCustom":
       { "animatedParts":
         { "stateTypes":
           { "swoosh":
             { "default":"idle",
               "states":
               { "idle":{},
                 "fire":
                 { "frames":3,
                   "cycle":0.1,
                   "mode":"transition",
                   "transition":"idle"
                 },
                 "fire2":
                 { "frames":3,
                   "cycle":0.1,
                   "mode":"transition",
                   "transition":"idle"
                 },
                 "fire3":
                 { "frames":3,
                   "cycle":0.1,
                   "mode":"transition",
                   "transition":"idle"
                 },
                 "fire4":
                 { "frames":3,
                   "cycle":0.1,
                   "mode":"transition",
                   "transition":"idle"
                 },
                 "fire5":
                 { "frames":3,
                   "cycle":0.1,
                   "mode":"transition",
                   "transition":"idle"
                 },
                 "fire6":
                 { "frames":3,
                   "cycle":0.1,
                   "mode":"transition",
                   "transition":"idle"
                 }
               }
             }
           },
           "parts":
           { "blade":
             { "properties":
               { "zLevel":0,
                 "centered":true,
                 "image":"<partImage><paletteSwaps>?<directives>?<bladeDirectives>",
                 "offset":[0,1.875],
                 "transformationGroups":["weapon"],
                 "rotationCenter":[0,0],
                 "damageArea":[[-0.7,-1.0],[-0.7,2.5],[0.5,2.5],[0.5,-1.0]]
               }
             },
             "handle":
             { "properties":
               { "zLevel":1,
                 "centered":true,
                 "image":"<partImage><paletteSwaps>?<directives>",
                 "offset":[0,1.875],
                 "transformationGroups":["weapon"],
                 "rotationCenter":[0,0]
               }
             },
             "swoosh":
             { "properties":
               { "zLevel":-1,
                 "centered":true,
                 "transformationGroups":["swoosh"],
                 "rotationCenter":[0,0]
               },
               "partStates":
               { "swoosh":
                 { "idle":
                   { "properties":
                     { "image":""
                     }
                   },
                   "fire":
                   { "properties":
                     { "image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>",
                       "offset":[1,2.5],
                       "damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]
                     }
                   },
                   "fire2":
                   { "properties":
                     { "image":"/items/active/weapons/melee/broadsword/swoosh3/<elementalType>swoosh.png:<frame>",
                       "offset":[3.5,0],
                       "damageArea":[[-4.75,1.5],[3,1],[3,-1],[-4.75,-1.5]]
                     }
                   },
                   "fire3":
                   { "properties":
                     { "image":"/items/active/weapons/melee/abilities/broadsword/spinslash/spinswoosh.png:<frame>?scalenearest=1.5",
                       "offset":[-2,0],
                       "damageArea":[[-8,2],[5,2],[8,0],[6,-2],[4,-2],[2,0],[-8,0]]
                     }
                   },
                   "fire4":
                   { "properties":
                     { "image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy",
                       "offset":[1,-2.5],
                       "damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]
                     }
                   },
                   "fire5":
                   { "properties":
                     { "image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy?flipx",
                       "offset":[3,-2.5],
                       "damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]
                     }
                   },
                   "fire6":
                   { "properties":
                     { "image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy?flipx",
                       "offset":[3,-2.5],
                       "damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]
                     }
                   }
                 }
               }
             }
           }
         },
         "sounds":
         { "fire":["/sfx/melee/swing_spear.ogg"],
           "fire2":["/sfx/melee/swing_shortsword.ogg"],
           "fire3":["/sfx/melee/swing_spear.ogg"],
           "fire4":["/sfx/melee/swing_shortsword.ogg"],
           "fire5":["/sfx/melee/swing_broadsword.ogg"],
           "fire6":["/sfx/melee/swing_spear.ogg"]
         }
       },
       "primaryAbility":
       { "comboSteps":6,
         "swooshOffsetRegions":
         [ [1.5,-1.0,5.5,1.0],
           [3.0,-0.5,6.5,2.0],
           [1.5,-1.0,5.5,1.0],
           [1.5,-1.0,5.5,1.0],
           [1.5,-1.0,5.5,1.0],
           [3.0,-0.5,6.5,2.0]
         ],
         "fireTime":0.6,
         "baseDps":11.5,
         "damageConfig":
         { "damageSourceKind":"broadsword",
           "statusEffects":[],
           "knockbackMode":"facing",
           "timeout":0.5
         },
         "stepDamageConfig":
         [ {"baseDamageFactor":1.0,"knockback":10},
           {"baseDamageFactor":0.9,"knockback":7},
           {"baseDamageFactor":0.7,"knockback":10},
           {"baseDamageFactor":1.3,"knockback":10},
           {"baseDamageFactor":2.0,"knockback":7},
           {"baseDamageFactor":2.0,"knockback":25}
         ],
         "stances":
         { "idle":
           { "armRotation":30,
             "weaponRotation":50,
             "weaponOffset":[0,0],   // New.
             "allowRotate":false,
             "twoHanded":false,
             "allowFlip":true
           },
           "windup1":
           { "duration":0.15,
             "armRotation":95,
             "weaponRotation":10,
             "weaponOffset":[0,0],   // New.
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true
           },
           "preslash1":
           { "duration":0.05,
             "armRotation":45,
             "weaponRotation":70,
             "weaponOffset":[0,0],
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":false
           },
           "fire1":
           { "duration":0.2,
             "armRotation":-40,
             "weaponRotation":-70,
             "weaponOffset":[0,0],   // New.
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true
           },
           "wait1":
           { "duration":0.2,
             "armRotation":-40,
             "weaponRotation":-70,
             "weaponOffset":[0,0],   // New.
             "allowRotate":false,
             "allowFlip":true,
             "twoHanded":false
           },
           "windup2":
           { "duration":0.15,
             "armRotation":-150,
             "weaponRotation":55,
             "weaponOffset":[0,0],
             "twoHanded":false,
             "allowFlip":true,
             "allowRotate":false
           },
           "fire2":
           { "duration":0.2,
             "armRotation":0,
             "weaponRotation":-90,
             "weaponOffset":[0,0],
             "twoHanded":false,
             "allowFlip":true,
             "allowRotate":false
           },
           "wait2":
           { "duration":0.2,
             "armRotation":0,
             "weaponRotation":-90,
             "weaponOffset":[0,0],
             "allowRotate":false,
             "allowFlip":true,
             "twoHanded":false
           },
           "windup3":
           { "duration":0.1,
             "armRotation":10,
             "weaponRotation":-80,
             "weaponOffset":[0,0],
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":false
           },
           "preslash3":
           { "duration":0.05,
             "armRotation":-15,
             "weaponRotation":-105,
             "weaponOffset":[0,0],
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":false
           },
           "fire3":
           { "duration":0.15,
             "armRotation":-105,
             "weaponRotation":-150,
             "weaponOffset":[0,0],
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":false
           },
           "wait3":
           { "duration":0.2,
             "armRotation":-105,
             "weaponRotation":-150,
             "weaponOffset":[0,0],
             "allowRotate":false,
             "allowFlip":true,
             "twoHanded":false
           },
           "windup4":
           { "duration":0.15,
             "armRotation":-100,
             "weaponRotation":-160,
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true
           },
           "fire4":
           { "duration":0.2,
             "armRotation":80,
             "weaponRotation":-140,
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true
           },
           "wait4":
           { "duration":0.2,
             "armRotation":80,
             "weaponRotation":-140,
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true
           },
           "windup5":
           { "duration":0.3,
             "armRotation":90,
             "weaponRotation":0,
             "weaponAngularVelocity":-1080,
             "weaponOffset":[0,-1.5],
             "twoHanded":false,
             "allowFlip":true,
             "allowRotate":false
           },
           "fire5":
           { "duration":0.2,
             "armRotation":-40,
             "weaponRotation":130,
             "weaponOffset":[0,-3.5],
             "twoHanded":false,
             "allowFlip":true,
             "allowRotate":false
           },
           "wait5":
           { "duration":0.2,
             "armRotation":-40,
             "weaponRotation":130,
             "weaponOffset":[0,-3.5],
             "allowRotate":false,
             "allowFlip":true,
             "twoHanded":false
           },
           "windup6":
           { "duration":0.3,
             "armRotation":-40,
             "weaponRotation":-180,
             "armAngularVelocity":500,
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true,
             "weaponOffset":[0,-3.5]
           },
           "preslash6":
           { "duration":0.05,
             "armRotation":100,
             "weaponRotation":-180,
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true,
             "weaponOffset":[0,-3.5]
           },
           "fire6":
           { "duration":0.4,
             "armRotation":-50,
             "weaponRotation":140,
             "twoHanded":false,
             "allowRotate":false,
             "allowFlip":true,
             "weaponOffset":[0,-3.5]
           }
         }
       }
    }
    
    I realize this cannot be pasted into starbound's chat box, but it's much easier to see what's going on. Scrolling way down to the bottom you should see the "stances" object (within "primaryAbility"). The first few stances were missing the "weaponOffset:[0,0]" line--I marked those with the comments "// New." I'm not sure what the default value is supposed to be--I would have thought [0,0]--but you can modify those numbers to alter the x:y location of the weapon; but you probably just want [0,0].

    And so you don't have to re-collapse all of that, here's the new one-liner:
    Code:
    /spawnitem commonshortsword 1 '{"shortdescription":"Handmade Katana","level":1,"inventoryIcon":"/items/active/weapons/bossdrop/soluskatana/handle.png","tooltipKind":"base","animationParts":{"blade":"","handle":"/items/active/weapons/bossdrop/soluskatana/handle.png"},"animationCustom":{"animatedParts":{"stateTypes":{"swoosh":{"default":"idle","states":{"idle":{},"fire":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire2":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire3":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire4":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire5":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"},"fire6":{"frames":3,"cycle":0.1,"mode":"transition","transition":"idle"}}}},"parts":{"blade":{"properties":{"zLevel":0,"centered":true,"image":"<partImage><paletteSwaps>?<directives>?<bladeDirectives>","offset":[0,1.875],"transformationGroups":["weapon"],"rotationCenter":[0,0],"damageArea":[[-0.7,-1.0],[-0.7,2.5],[0.5,2.5],[0.5,-1.0]]}},"handle":{"properties":{"zLevel":1,"centered":true,"image":"<partImage><paletteSwaps>?<directives>","offset":[0,1.875],"transformationGroups":["weapon"],"rotationCenter":[0,0]}},"swoosh":{"properties":{"zLevel":-1,"centered":true,"transformationGroups":["swoosh"],"rotationCenter":[0,0]},"partStates":{"swoosh":{"idle":{"properties":{"image":""}},"fire":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>","offset":[1,2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}},"fire2":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh3/<elementalType>swoosh.png:<frame>","offset":[3.5,0],"damageArea":[[-4.75,1.5],[3,1],[3,-1],[-4.75,-1.5]]}},"fire3":{"properties":{"image":"/items/active/weapons/melee/abilities/broadsword/spinslash/spinswoosh.png:<frame>?scalenearest=1.5","offset":[-2,0],"damageArea":[[-8,2],[5,2],[8,0],[6,-2],[4,-2],[2,0],[-8,0]]}},"fire4":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy","offset":[1,-2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}},"fire5":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy?flipx","offset":[3,-2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}},"fire6":{"properties":{"image":"/items/active/weapons/melee/broadsword/swoosh/<elementalType>swoosh.png:<frame>?flipy?flipx","offset":[3,-2.5],"damageArea":[[-5,2],[-2.5,3],[1,3],[4,1.75],[5,-0.25],[5,-2.25],[4,-3.25],[0,-2.5]]}}}}}}},"sounds":{"fire":["/sfx/melee/swing_spear.ogg"],"fire2":["/sfx/melee/swing_shortsword.ogg"],"fire3":["/sfx/melee/swing_spear.ogg"],"fire4":["/sfx/melee/swing_shortsword.ogg"],"fire5":["/sfx/melee/swing_broadsword.ogg"],"fire6":["/sfx/melee/swing_spear.ogg"]}},"primaryAbility":{"comboSteps":6,"swooshOffsetRegions":[[1.5,-1.0,5.5,1.0],[3.0,-0.5,6.5,2.0],[1.5,-1.0,5.5,1.0],[1.5,-1.0,5.5,1.0],[1.5,-1.0,5.5,1.0],[3.0,-0.5,6.5,2.0]],"fireTime":0.6,"baseDps":11.5,"damageConfig":{"damageSourceKind":"broadsword","statusEffects":[],"knockbackMode":"facing","timeout":0.5},"stepDamageConfig":[{"baseDamageFactor":1.0,"knockback":10},{"baseDamageFactor":0.9,"knockback":7},{"baseDamageFactor":0.7,"knockback":10},{"baseDamageFactor":1.3,"knockback":10},{"baseDamageFactor":2.0,"knockback":7},{"baseDamageFactor":2.0,"knockback":25}],"stances":{"idle":{"armRotation":30,"weaponRotation":50,"weaponOffset":[0,0],"allowRotate":false,"twoHanded":false,"allowFlip":true},"windup1":{"duration":0.15,"armRotation":95,"weaponRotation":10,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":true},"preslash1":{"duration":0.05,"armRotation":45,"weaponRotation":70,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"fire1":{"duration":0.2,"armRotation":-40,"weaponRotation":-70,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":true},"wait1":{"duration":0.2,"armRotation":-40,"weaponRotation":-70,"weaponOffset":[0,0],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup2":{"duration":0.15,"armRotation":-150,"weaponRotation":55,"weaponOffset":[0,0],"twoHanded":false,"allowFlip":true,"allowRotate":false},"fire2":{"duration":0.2,"armRotation":0,"weaponRotation":-90,"weaponOffset":[0,0],"twoHanded":false,"allowFlip":true,"allowRotate":false},"wait2":{"duration":0.2,"armRotation":0,"weaponRotation":-90,"weaponOffset":[0,0],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup3":{"duration":0.1,"armRotation":10,"weaponRotation":-80,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"preslash3":{"duration":0.05,"armRotation":-15,"weaponRotation":-105,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"fire3":{"duration":0.15,"armRotation":-105,"weaponRotation":-150,"weaponOffset":[0,0],"twoHanded":false,"allowRotate":false,"allowFlip":false},"wait3":{"duration":0.2,"armRotation":-105,"weaponRotation":-150,"weaponOffset":[0,0],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup4":{"duration":0.15,"armRotation":-100,"weaponRotation":-160,"twoHanded":false,"allowRotate":false,"allowFlip":true},"fire4":{"duration":0.2,"armRotation":80,"weaponRotation":-140,"twoHanded":false,"allowRotate":false,"allowFlip":true},"wait4":{"duration":0.2,"armRotation":80,"weaponRotation":-140,"twoHanded":false,"allowRotate":false,"allowFlip":true},"windup5":{"duration":0.3,"armRotation":90,"weaponRotation":0,"weaponAngularVelocity":-1080,"weaponOffset":[0,-1.5],"twoHanded":false,"allowFlip":true,"allowRotate":false},"fire5":{"duration":0.2,"armRotation":-40,"weaponRotation":130,"weaponOffset":[0,-3.5],"twoHanded":false,"allowFlip":true,"allowRotate":false},"wait5":{"duration":0.2,"armRotation":-40,"weaponRotation":130,"weaponOffset":[0,-3.5],"allowRotate":false,"allowFlip":true,"twoHanded":false},"windup6":{"duration":0.3,"armRotation":-40,"weaponRotation":-180,"armAngularVelocity":500,"twoHanded":false,"allowRotate":false,"allowFlip":true,"weaponOffset":[0,-3.5]},"preslash6":{"duration":0.05,"armRotation":100,"weaponRotation":-180,"twoHanded":false,"allowRotate":false,"allowFlip":true,"weaponOffset":[0,-3.5]},"fire6":{"duration":0.4,"armRotation":-50,"weaponRotation":140,"twoHanded":false,"allowRotate":false,"allowFlip":true,"weaponOffset":[0,-3.5]}}}}'
     
    sesh4774 likes this.
  3. sesh4774

    sesh4774 Void-Bound Voyager

    Thank you so much and sorry for the late too. Actually all I did was copy the custom weapons codes I found in the community and I tried to make different versions of it on my own, but I have no idea what I'm doing, so at best I go with the code when the parameters work and seems to make sense. Tbh I was trying to fix this by changing the zLevel in the animatedParts, but I didn't have success with that, so thanks again for helping me, now i can wield the katana and a flashlight at the same time.
     
  4. Zaakari

    Zaakari Pangalactic Porcupine

    Ah, yes a modder's beginning: poking things until knowledge is acquired and the desired result is achieved :nuruwink:

    Just for future reference, the x axis for coordinates is the left and right position of an image/object, the y axis is the up and down position, and the z axis--which in this case is named zLevel--is the in and out position. So a higher zLevel means the image gets drawn on top of other images with lower zLevels.
     

Share This Page