Creating Gun Jsons

Making gun jsons are an integral part of creating a weapon. Jsons are what controls the hand positions when holding the gun and a broken json can cause many errors. Usually, every frame in an animation needs a json.

Luckily, we have a tool for creating jsons: https://modworkshop.net/mod/31323. This is a program where you load up your image/images and drag the hand for each to its desired position. Once that's done you press, "Generate Json" and a is generated at the same directory as the sprite.

Now, if you want to make a json the old-fashioned way (Why?!) or your sprite is too large to fit in the editor you will have to manually create a json for each frame.

Here is an example of a one-handed json:

"name": "PrimaryHand",
"position": {
   "x": 0.0001,
   "y":0.0001,
   "z": 0.0
},

here, x, and y value have to be replaced with wherever you want the hand, each pixel is 0.0625. Check out Pixel Measurement Conversions for some conversions. two-handed json example:

Last updated