Creating A Simple Addon
Be aware not all mods will be made public on the mods page. To prevent disappointments, please first look at the Uploading_Mods page to see which mods won't be approved for public release.
This tutorial is meant to make clear what steps you've to take in order to add or create parts to a vehicle. Only the basic is explained; jbeam and texture tutorials are explained in other tutorials and wiki pages. With this tutorial the basic are explained for making a simple object in game or modifying (modding) a current vehicle.
An object in BeamNG consists basically out of two parts; the visual part and the parts which defines how the object behaves in game. The visual part consists out of the 3D model (also called flexbody) and its textures, the latter is the jbeam, which basically is the skeleton of the object. It has nodes which are connected by beams. The geometry of this structure combined with the properties of the beams makes how the object behaves. The materials are also important, those link the textures with the mesh.
First of all, try to work out what you want. Make simple drawings, look up some info and pictures of real-life counterparts. If you want to recreate a existing object or a imaginary object based on real life object, best is to have pictures of this object taken from directly the side, front and top, preferably with at least as possible perspective. Even for a imaginary object it is very important to have the proportion correct. There are also webpages on the internet dedicated to so called blueprints, those are ideal for recreating parts in a 3D drawing program.
If you've got all necessary information you think you need, a 3d model has to be made or found. In case you're using a mesh made by someone else, be VERY sure you're allowed to use it, and even better, you're allowed to release it. Mods using 3D models made by someone else than the uploader will be removed if it's unclear if the 3d model used is uploaded with permission of the creator of the 3D model. You're free to use any 3D program you like, but Blender one of the most used program in this community. It is freeware and can be downloaded via their website.
Now it is necessary to have a location to have all the modded files. BeamNG is designed in a way that it is possible to simply add new parts without having to adjust the official files.
You might already know the mod directory in the BeamNG documents folder (USERNAME\Documents\BeamNG.drive\mods). If you add a folder named 'vehicles' and in this folder you've to add a folder with the vehicle's name. So for example if you're adding or modding files for the Gavril Grand marshal, you'll need a folder structure like "USERNAME\Documents\BeamNG.drive\mods\vehicles\fullsize". The name of the vehicles folder isn't clear in some cases, you'll have to search in the folder "SteamApps\common\BeamNG.drive\content\vehicles" the vehicle of your choice. Also the original files can be found in these folders, this can be useful if a part is based on a official part or in case it has to be adjusted to a vehicle.
Now we'll take a look at a official 3D models in the game. Both examples of modding use the GM as bases, so we'll go to folders official location (SteamApps\common\BeamNG.drive\content\vehicles\fullsize\). Search for the fullsize.DAE, and copy this file to a free-to-chose location where you can store newly made parts and make backups. Do not put it in the mods folder! How to open and save a .dae look here.Also, the game is able to read multiple .dae's at once, if you want to add a part you can simply have a .dae with only this file in the proper mod location. Multiple dae's in one folder is possible as well. More info about this so called 'Multi-DAE' can be found here. For more information about modeling and texturing look here: Modeling_and_Texturing_Guide
In this .DAE you'll see the materials of most parts of the fullsize are called 'fullsize'. This corresponds to the materials.cs file in the fullsize folder; if you open this file you'll see the fullsize material is linked to some texture files. Sometimes if you copy a part in Blender the material is changed to fullsize.001 for example. If this part should use the original fullsize texture maps one has to alter this. If you want to add new materials to this mod, a new materials.cs file has to be made. Look in the official materials file how it should look like (more info here: Vehicle_Materials), and store this file inside a new uniquely named folder inside your mods folder like "...\BeamNG.drive\mods\vehicles\fullsize\materialsofMODNAME\materials.cs" so it won't interfere with the original materials file.
If you've got a nice model, you'll have to make a jbeam for it. When having a part based on a original one, most of the time it is easiest to copy the official jbeam and adjust it. To make things clear, there's the filename, the jbeam name, the jbeam 'screen' name, the slot name and the flexbody name. If you add a part, make sure that at least the first three names are different compared to the original one. If either the filename or jbeam name are still the same, it will sort of 'overwrite' the original part, making the original version unusable. The screen name is the name which appears in the part selector, it has to be clear which part it is. The flexbody name is obviously the name of the flexbody. When choosing names, make sure you use a unique names so it wouldn't interfere with official parts but also not with possible other mods! A more extensive explanation about jbeams can be found here: JBeam_Reference Thereby there are multiple wiki pages explaining the various sections of a jbeam. If you're making a part which needs a slot which doesn't exist or isn't available, one can use the so-called modslot. More info can be found in the Simple_Mod_Slot_Tutorial Wiki page.
Finishing, Packaging and Uploading
If you think you've finished it, the .dae and the corresponding jbeams are in the right folder, it should pop up in the parts selector (CTRL-W) in-game. If the game freezes, its telling you there's something wrong. Enter the console (the key differs, but usually is '`') and scroll up the red lines until you see the beginning of these red lines. Here it should be explained what's wrong. Fix it, press ctrl-R to try again.
If you want to release your mod, you'll have to put the files into a zip file. Folder hierarchy and naming is quite important; the zip file should have its unique name (be sure it won't interfere with other mods), inside this folder you need to have a 'vehicles' folder, inside this folder there has to be a folder named with the vehicles name and inside this folder there are the files. Example: "myfullsizemod.zip\vehicles\fullsize\files"
If you've successfully tested your mod you should be finished! You can go to BeamNG's resource page and 'Add resource'. After uploading, your mod will be tested if it functions properly and if it hasn't copyright issues before being released.
A more extensive guideline can be found at Uploading_Mods
To make sure that when you want to update your mod your files won't interfere with files of old versions of you mod, make sure the names of the .DAE files and the zip files stay the same over the different versions. Failing to do so might result in unstable and unwanted behavior; your mod might use files out of multiple version simultaneously. Although BeamNG's dev team puts in lots of effort to keep old mods usable on the latest versions, it might happen your mod gets outdated and won't function as intended. The JBeam_changelog page shows the main changes which were made during an update.
- GM spoiler (new part, makes use of the mod slot)
- GM new front bumper (adjust existing part)