Modding Discussion weapon position

Discussion in 'Starbound Modding' started by amirmiked12, Apr 27, 2017.

  1. amirmiked12

    amirmiked12 Parsec Taste Tester

    all starbound items are straight in there png.
    but i have a weapon that is not straight like this test.png

    what should i tweak in my activeitem file?
    and i have to add i dont wanna rotate the png
    i wanna make it rotate using codes but dont know the code exactly.
    and what is "weaponOffset" : [0.4, 1.75],
    i mean the left is x and right is y
    i just dont what offset means here its confusing .
    offset of where?hand or ground or where?
    tnx for helping
     
    Last edited: Apr 27, 2017
  2. MetaFace

    MetaFace Guest

    you don't need to use code to rotate the weapon, in the activeitem file (which is your weapon), you will see "weaponRotation", just modify that until it looks good.

    EDIT:

    *as a note, json doesn't count as coding (according to programmers around the world), it is instead just a table of values*
     
    Cyel likes this.
  3. amirmiked12

    amirmiked12 Parsec Taste Tester

    there's no rotation line in my activeitem file
    what should i do?
     
  4. MetaFace

    MetaFace Guest

    You can just add one, literally you can just add it.

    Code:
    "stances" : {
          "idle" : {
            "allowRotate" : false,
            "armRotation" : 0,
           -- "weaponRotation" : 45, --just add it in
            "weaponOffset" : [-0.125, 5.5]
          },
          "windup" : {
            "armRotation" : 0,
            "weaponRotation" : 45,
            "twoHanded" : true,
            "allowRotate" : false,
            "weaponOffset" : [-0.125, 5.5]
          },
          "fire" : {
            "twoHanded" : true,
            "allowRotate" : false,
            "armRotation" : -35,
            "weaponRotation" : -75,
            "weaponOffset" : [-0.125, 5.5]
          }
        }
     
  5. amirmiked12

    amirmiked12 Parsec Taste Tester

    but these lines are in the animation file.
    can i add it to activeitem?
     
  6. MetaFace

    MetaFace Guest

    Yes those were directly from my weapon file.
     
  7. amirmiked12

    amirmiked12 Parsec Taste Tester

    ok thank you then
     

Share This Page