FANDOM


Hi! Welcome to my guide on how to make custom NPCs to use in your levels when the original ones seem a bit too out-of-style for your level type.

Making an NPC can get quite complicated and annoying, so this guide should help.

Most of the stuff on this guide is just explaining basics, so it looks longer than it is.

Destructable NPCs

CustomgibNPC

A custom gibbable NPC.

Sometimes, you need an NPC that behaves like a regular NPC, one with limbs that can shatter and break when forced. Triggers could be used to achieve an effect such as this, but really it wouldn't be accurate to what normally happens, so sadly completely custom NPCs cannot shatter like a regular NPC. The only way to achieve this is to add accessories or clothes to a normal NPC.

Steps for a destructable NPC

Firstly, choose the base NPC that you would like to customize. You should be in the Level Editor, which is available from the start menu.
Selectmenu

The option in the special items menu that you should select.

You can create a normal NPC by selecting the special item tool (by pressing 5), then selecting the dropdown characters menu and selecting non-player character.

There are quite a lot of normal NPCs to choose from in this option, so you shouldn't have too much trouble deciding. 

With this option selected, click somewhere to create an NPC. Switch back to the select tool by (pressing 1), and then select your newly created NPC. It should be Wheelchair Guy, standing straight. Once he is selected, look at the first slider on the menu, which should be labeled Character Type. For the sake of this tutorial, I want Segway Guy, so I will change this option (by holding and dragging) to number 2 instead of 1. You should now see Segway Guy where Wheelchair Guy was, although he does not have a helmet. NPCs in this tool do not have accessories as they do ingame.

Now, I want Segway Guy to have some black gloves, as he will be a destructable robber. So, I access the poly tool (by pressing 3).

The poly tool is very important when creating custom NPCs, as it is usually the only tool you would use to draw them. You can use the shape tool (by pressing 2), but it is usually a lot harder to draw with it.

Whatyoushouldget

What you should have at this stage.

Anyway, with this tool selected, you should see a ticked box labeled interactive. You need to untick this by clicking it, as when interactive, drawn objects may crush the NPC and make them bleed. Also, when unticked, the tool will not have a limit of 10 vertices, and will let you draw at any angle, unlike the limit applied when the tool is interactive.

Now, it is finally time to start drawing.

I want some black gloves, so I zoom in (by pressing +) on Segway Guy's hands and I start tracing them. Since both his
Gloves

My terrible glove.

hands are basically the same, I do not need to trace both, although I cannot see the second hand anyway, unless I use the select tool (by pressing 1) to select Segway Guy and use the arm 2 slider to move his arm. When using the poly tool, you can press CTRL to undo your previously drawn line. When complete, simply join the poly by clicking on the starting point of your polygon, which the tool should snap to. You can tell when to click with a poly because it will fill the gap with a solid inverted version of the background. Note that you do NOT always have to join a poly, and you leave it as a bunch of lines by holding SHIFT and clicking anywhere. However, I made it a complete polygon as his gloves are solid.
Foregroundboxfix

The tick-able foreground box of a grouped polygon.

You may need to select and move Segway Guy so you can see the gloves which will be behind him, so just move him with the select tool until you can see the drawing. The gloves are behind NPCs because to be in front of them, they must be grouped, with the foreground box ticked.

The poly tool isn't that smooth though, and with Segway Guy's small hands, your drawing will probably look bumpy. Don't worry though, the player won't see the polygon up close like you are. You can zoom out (by pressing '-') to see what it may look like, although pressing 't' to test the level (and pressing 't' again to stop testing) can also help and is an accurate measure of observing the player would see. You may need to place a fixed shape below the player so you don't fall while testing, so just press 2 and place one, but make sure the fixed box is ticked.

Colormenu

My color menu.


Now you should have one bumpy thing which is meant to be a glove. Sometimes, you need detail on shapes, but in this case with such a small object, you don't really need detail at all. So, with the select tool selected (by pressing 1), click the glove to start changing the color of it. You can change the color by pressing the box next to the 'color' label, which should open a color selector with some preset colors and other options, including an eyedropper.

Note that my color selector has a few custom colors and so yours will look different. All you need to do to make the gloves black is drag the selecting circle down (by holding left-click) until you reach a color you like. When done, move the cursor off the selector and the color will be set. You can adjust the hue with the slider at the bottom, and you can sample colors of anything in the editor with the eyedropper (which you can use by clicking its icon and clicking something in the editor).
Groupitemsbox

The 'Group Items' box.

Now that you have a black glove, simply select it with the select tool (by pressing 1) and click the big pink Group Items box. Now you have a group of one item, a glove polygon. You will need to tick the foreground box once your polygon is grouped so the glove is in front of the character, as it would be in real life. Sadly, it will also be in front of the PLAYER, which may be unrealistic at times. 

Since we want the glove to move with Segway Guy's arm (as he is wearing it), the glove will need to be
Physicalglove

My glove (physical).

physical, and have a physical shape in its group. Right now, the glove will not move at all, as the group it is in does not contain ANY physical shapes, only one non-interactive polygon. To add a shape to the group so the glove WILL move, you can use the shape tool (by pressing 2). I like to create a small circle by selecting Circle Shape from the shape menu and scaling it down with 'S' (and SHIFT to scale faster) until it is the smallest possible, 5x5. Then, untick the fixed box as the glove will move, and also because groups do not support any fixed shapes in them (although you can fix groups themselves). Change the collision to 3 with the slider so Segway Guy's hand doesn't explode, and then change the density of the circle to 0.1, as a large density is rather unrealistic for just one glove. Besides, it will not need to be exactly weighed, as it is just a decoration and not something like a body part. Click to place your blue circle, and then select it with the select tool (by pressing 1).

Now you have your physical circle complete (and selected), hit CTRL + C to copy the circle, and then double-click your glove polygon (which should be grouped) to enter its group. Once in the glove's group, hit CTRL + V to paste your circle (but make sure the fixed box is not ticked on the circle or it will not paste) and the group is now physical. You will need to move the circle to the actual glove poly (while still inside the group) so it's not in the way. You may also need to change the circle's opacity to 0 so it doesn't look odd. Then, double-click a blank bit of your glove group to exit it, and you now have a physical glove! Remember to delete the original circle outside the group with BACKSPACE!

SegwayGuywithglove

Segway Guy with the glove (fallen over).

However, this is not the end of the process. To make the glove actually STAY on Segway Guy's hand, select the joint tool (by pressing 4), but before you do that, you must move Segway Guy's arm upward so the glove does not get joined to his torso (instead of his hand). You can do this by selecting Segway Guy with the selection tool (by pressing 1) and adjusting the arm 1 slider until his arm is fairly far away from the rest of his body, or you can double click Segway Guy and move his arms or other limbs more easily by selecting them and dragging. Double-click to exit Segway Guy's body if you used that method.
Segwayarmedit

The slider to edit Segway Guy's arm position.

Then, select and move the glove with the select tool still open, until the glove is on his hand, and if it doesn't fit, rotate it with 'x' and 'z'. Now, it's okay to select the joint tool, so select it (by pressing 4), and click on the glove which should be on the hand, to join the two objects. Since the glove should not move or rotate on his hand, you can use the select tool on the joint (by pressing 1) to tick the box labeled limit rotation. Then, use the sliders to set both values to '0'. 

Congratulations! You now have one glove on a robber. However, this was a pretty bad example of clothing, as it is not possible to put another one on his other hand because it is behind his body, which is treated as a single layer instead of all his legs and arms being separate layers.

You can download the XML for Segway Guy with gloves here.

Pastehere

Where to paste the XML.

Just open the Level Editor and click load level, then paste all the XML into the box shown below. To add other things to your physical NPC such as hats or shoes or whatever, you can just follow this procedure again, except tailor it to wherever you want to put the item. A helpful tip- to change the layer of an object, for example if you have two legs and one needs to be behind the other, just select it with the select tool and hold CTRL, and then use the arrow keys (up and down) to move that layer's position up and down. It's just like Photoshop.

Fully custom NPCs

Bikernpc

The final biker.

This is tricky option. If you want to create COMPLETELY custom NPCs, you must create all the limbs by hand, as well as the physics for them, and the joints with limits. It takes a while, so only do this if you want to make a detailed level.

First, plan the NPC that you would like to create. For this tutorial, I will create a custom biker NPC.

Custom NPC steps

In the Level Editor, the first thing to do is create a big blue rectangle below the player so it doesn't fall out of the level. Do this by selecting the shape tool with 2 and simply placing one below by clicking where you would like it.

Now, I will spawn a helpful reference NPC by selecting the special item tool with 5, and opening the 'characters' dropdown menu by clicking it, and then selecting the non-player character option.

Then, click to spawn the default Wheelchair Guy NPC. I will then use the select tool (with 1) to click the new NPC, and change the character type with the slider to 6, as Moped Man will be my reference NPC.

I will tick the reverse box as I want my custom NPC to be facing me.

Whatyoushouldhave2

What you should get.

Now we have a reference NPC and a platform, we can begin. There are ten different moving NPC parts, the head, the two lower leg segments, the two upper leg segments, the torso, the two upper arm segments, and the two lower arm segments. There can be extra parts if you add moving hats or ties or hair, but those are the normal parts. Note there are two pairs of leg and arm segments as humans have two limbs on both sides of their body, as they do in Happy Wheels.

How to draw limbs

I will start by drawing the head. Select the poly tool (by pressing 3) and untick the interactive box on the menu as it will have a
Bikerhead

My biker's head.

separate collision shape, and draw the head by tracing the base NPC, although since it is a biker, I will make it bald and more muscular. You can make a solid polygonal shape by clicking to draw your shape's vertices and then clicking back on the starting point of your drawing, which the tool should snap to. You will know what the polygon will look like because the tool will fill your vertices with a solid black before you click. To make a non-solid shape (an outline), you can either join it and set the center color to be nothing and the outline color to be a solid, or make an incomplete shape by simply holding SHIFT and clicking. 
Colorbox

The color box to select when wishing to modify a polygon's color value.

You will also need to draw the neck, as both the head and the neck are usually one group. You can change the color of complete polygons by selecting one with the select tool (by pressing 1) and clicking the colored box, which will open a color menu. A helpful tip- while a polygon is selected with the selection tool, holding CTRL and pressing an arrow key (up or down) will change the layer of the polygon, like in Photoshop. The head will need to be fairly detailed as it is the main part that is seen the most, although 3 different shades is usually enough. Try to match the default art style of NPCs for extra realism. You will need to move your base NPC out of the way with the select tool to see your art, which is always behind NPCs unless grouped with the foreground box ticked.

You should be able to draw a head on your own, so once it is done, select it and move it away from the base NPC to keep things organised.

Congratulations! You drew your character's head!
Bikertorso

My biker's torso.

Now, onto the torso. The torso should be the normal body, minus both arms and legs, and the neck and head. You can see an example to the right. There is usually a shadow where the arms and legs should be. You can use the same method you used for the head on the torso.

Now that the torso is complete, you need to draw the arm and leg segments. You do not need to draw two of each, because you can simply copy them for both arms and legs with CTRL + C.

Lightdarklimbs

An example of what the limbs should look like.

There should be two segments for the arm, one for the top bit, which is the part above the elbow, and one for the bit below the elbow, so the arm can move like a real one. There is an example to the right.

The same goes for the leg, except the different parts should be at the knee. Once again, selecting your base character should give you a hint of what they should look like, as well as moving their limbs up and down from the NPC menu (which you can access from the select tool).

Bikerparts

All the parts of my biker.


Now, you should have a head and a neck, two leg segments, and two arm segments and a torso. This is usually all you need for a custom NPC. Now, to join all the parts together and make them physical, group them. Group the head and neck with the pink Group items box, which you can see when selecting the parts with the select tool (by pressing 1), then group the upper arm segment, the lower arm segment, the upper leg segment and the lower leg segment, and the torso. You will need to group them because they need a physical shape to make them move, but that can only happen in a group. Also, all different polygons need to move in the same place at the same time.

Now, to make the parts physical, select the shape tool (by pressing 2) and select Circle Shape to start. For all NPCs, the head's collision model is a circle. 

Fixedbox

The 'fixed' box, that should be unticked.

Untick the fixed box, and make sure the density is 1, which is what it should be for all NPCs. Now, click to create your circle, and then select it with the select tool (by pressing 1) and press CTRL + C to copy it.

Double-click the head and neck group to enter it, and hit CTRL + V to paste the head's physical circle in the group. Select it with the selection tool and adjust the size and position of it until it basically covers the head, but not the neck. Change the circle's opacity to 0. Double-click a blank space in the group to exit it. You have now made a physical head!
Bikerdebug

Debug draw of the biker.

To make the other physical limbs, create a rectangle with the shape tool, and rotate it by holding the 'x' and 'z' keys until it fits the torso. Change the size of it from the menu until it nicely covers other limbs. If you aren't sure what it should be like, go to the Editor menu and tick debug draw, then press 't' to test your level and check your base NPC, which should have rectangles and circles on its limbs. Press 't' again to stop testing. Once you have got it to the right size, use CTRL + C to copy, enter the group (by double-clicking it), use CTRL + V to paste it, although it won't paste if it has the fixed box ticked, and change its opacity to be 0 with the slider. Remember to delete the original physical shape outside the group with BACKSPACE!

Copy the 2 arm segments and 2 leg segments, then enter their group and change the color values of them
Limbslabeledbiker

All biker limbs- labeled

to be darker, as these parts should be in the back of the group instead of the front. Removing shadows by selecting them with the select tool (by pressing 1) and hitting BACKSPACE can help, as detail is not really needed. Remember that layers can be moved (with CTRL and an up or down arrow), so you can use this to put the invisible collision shape to the bottom of the group so it doesn't get in the way. Remember to set the rectangle's collision type to 4 before you move it, as the arms and legs should not collide.
Spazzinglimbs

The biker's limbs spazzing out with collision type 1.

You should be able to repeat the same process for all the other limbs, except set the rectangles of the legs and arms to collision 4 so they don't collide with eachother or spaz out. Experiment to see what works.

Whatyouget3

The biker with joints. Complicated.

Time to make the shapes actually move and behave physically! Move the 2 light arm segments together and use the joint tool to join them at the elbow. Do the same for the dark arm segments, and also the light and dark leg segments.

Npcjointlimits

The joint limits of a base NPC.

You should have 4 joints in total, joining different segments together. However, you will need to tick the 'limit rotation' box for the arm and leg joints, as they will look odd going fully around. You will need to experiment with what looks natural using your base NPC's joint limits as a guide depending on what direction the custom NPC is facing. You can see these limits by selecting your base NPC with the select tool (by pressing 1). You should use joints to test the physics on some angles.

Once you are happy, join the dark and light upper arm segments to the torso by clicking (use CTRL and up and down arrow keys to make sure the polygons are on the correct layer), and do the same with the upper leg segments. Luckily, the two arm joints have the same limit because they are just on the other side of the body, as well as the two leg joints.

Then, join the head to the torso as well, but make sure the limits are 20 and -20. All the joints should have a limit. Remember, legs bend BACKWARD, so their lower-angle limit should be 0, and arms bend FORWARD, so their upper-angle limit should be 0.
Usedsettings

The joint settings used for the biker.

Congratulations! You have completed your custom NPC! It looks quite confusing in the editor because of all the joints, but don't worry, it should be fine in your level!

You can download the XML for the custom biker NPC here.

Just open the editor and select load level and paste the XML.

I hope this guide helped!

NPC Gallery

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.