A primitive hitbox generator for NSV13 ships.
- Export your chosen ship image from your chosen image editing software. Ensure that it's facing north.
- Open up the tool, and in the file selection dialogue, choose the file you want to edit.
- The editor window will pop open if you chose a valid image file (Currently .jpg or .png) that you have access to. You'll see the following:
- Now you've got the editor up, simply click with your mouse to place squares, which will represent the points of the hitbox. They'll be joined with lines so you can see how the hitbox will behave.
-
Place the points in a counter clockwise direction (as shown on the wheel to the top left) until you have a suitable bounding hitbox. Then click the button in the top left to get your outputted code.
-
We currently require that all shapes are convex. Concave shapes will break the hitboxes.
- Finally, copy paste the code it gives you onto your overmap object. This should look similar to:
/obj/structure/example name = "example" collision_positions = list(new /datum/vector2d(-13,71), new /datum/vector2d(-25,52), new /datum/vector2d(-24,-25), new /datum/vector2d(-11,-66), new /datum/vector2d(4,-69), new /datum/vector2d(15,-28), new /datum/vector2d(15,38), new /datum/vector2d(6,61))
This tool is still rather primitive, and does not scale images at all. Bear this in mind when using it. This hitbox generator is only intended for use with NSV13's "Qwer2d" physics system. This is not a generic hitbox tool.