Note that if the colliders are of a wrong size, the collisions won’t work right. They determine how the limbs move in the game world. Colliders, on the other hand, are the physical definitions of the limbs. Source rects are simply definitions about the position and the dimensions of the limbs they mark where the limb is on the texture file (in pixels). And then iterate.īefore going into how we add joints, we should first adjust the source rects and the colliders of the limbs. However, it’s easier to define the limbs first. TIP: You can add limbs after creating joints and create joints before the limbs are final. For now, let’s just ignore how the character looks in the game view it won’t look right before we add the joints. This is because there aren’t any joints yet to join and keep apart the different limbs. At first, your character will look a terrible mess with all the limbs on top of each other. When you are done with adding some limbs, click the ‘Create’ button. It’s also possible but currently not advised to define the joints here. We just want to add some limbs that we can edit later on. You can also add multiple limbs by defining a 2D grid (the ‘X’ and ‘Y’ fields) and pressing the ‘Add Multiple’ button.ĭon’t worry too much about the definitions here. Use the ‘+’ and ‘-’ buttons to add or remove limbs. Once you have filled out the basic information, you can define some limbs. Select the content package you want to use for the character or create a new content package by providing a name for it and clicking the ‘Create New’ button. You also need to select or create a new content package for the character, which contains the custom content for the game. In practice, you’ll need a sprite sheet, where the sprites for all the limbs of your character are found. In Barotrauma, all characters are made of limbs that have a sprite. One thing you should have on hand at this point is a texture for the character. You can change the path here, but the default should be fine too. At this point, the file does not yet exist: it will be stored on disk when the character is created. The ‘Config File Output’ is the path to the character config file. The paths to the config file and the texture path are both relative to the Barotrauma project folder. The following view will ask for basic information about the character you are about to create. To create a new character, click the ‘Create New Character’ button found on the ‘Files’ panel. TIP: Use the number keys to on your keyboard to quickly switch between the different edit modes. In the following, you can find more detailed instructions for editing each of these files or aspects of the character. In the character editor, you can edit all the character files without having to worry about. For a character that can move, that would mean four different files: Walk, Run, SwimSlow, and SwimFast. Each animation type is defined in a separate file. The animation files contain things like forces, multipliers and other variables that define the forces applied on the ragdoll when it moves. The movement of the character is defined in the animation files. A ragdoll file also contains things like damage modifiers (armor or weak spots), lights, and attacks. A character config file also contains references to the ragdoll and animation files.Ī ragdoll file defines the physical dimensions of the character: How many limbs and joints does it have? At what coordinates are they found on the texture? How much does the character weigh? What are the relations of the limbs to each other and how they constitute the skeleton or the physical ‘ragdoll’ of the character. A character config file defines visual things like sounds and particle effects as well as functional things, like how the character acts, how much health it has, and whether or not it can walk. In Barotrauma, all characters have a character config file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |