Spintires Modding Guide
Spintires is a pretty fun off-road simulation game. The tough terrains, the ticking timers, the fuel meter, all keep the game interesting and challenging at the same time. The community and the game itself have been active and alive for a very long time now and this proves how fun the game is. Even though the game is originally fun, it can get a little repetitive and boring at times. It can be taken to the next level by adding a few mods. Trucks, bikes, cars and maps can be added to the game through mods and these add more value and fun to the game. But a very common problem is to search for the right mods and add what you really want in the game. What if you could create your own mods? Well it’s not a dream anymore. This Spintires modding guide will walk you through the process in the simplest way. So, how to create Spintires mods and who exactly can create them? The answer is anyone can create them with the right skill, using the official Spintires editor application. Install the editor, create the needed files, customize, test it and publish it. It is as simple as that! Though the process is pretty simple, the actual designing might need a little effort but hey, at the end of the day you get what you want. If you think you require more help on the whole process, refer to the detailed Spintires modding guide and clear out all your doubts and questions. So, now that you have an overview of how to create Spintires mods, get to practicing on your skills right away!
Step one:
Download and install the Spintires Editor via Steam service.You can download Spintires Editor only if you already own the game.
First starting Spintires Editor you should see comething like this:
First thing we need to do is verify Spintires Editor. Follow the path: Settings>Paths.
In the poped window follow the algoritm (as you can see on the picture):
- Choose folder with installed game.
- Press the “Install Game Media” button – it will start to copy game files in Spintires Editor folder, which will allow Editore to use game textures. So if you want to use the Editor – don’t unistall the game. After that you will gain access to all game resourses and allowed to use it in your mod. After each update you’ll have to repeat this process, to allow Spintires Editor to use updated game files.
- Also it highly recommended to use NotePad++ for XML files editing. If you don’t have this programm, then click on the “Get Notepad++” button.
- After NotePad++ has installed, press “Install Notepad++ plugins”, to install special plugin for Spintires Editor, then follow the instruction on your screen. This plugins have many useful functions, including:
– open any gamefile more quckly (ALT-SHIFT-O)
– fast move to any XML node (ALT-SHIFT-D)
and much more.
Then, after you press “OK” and close the System Paths dialog, you’ll see big number of files in File View window. Now make sure that Steam is still active, it will affect to Spintires Editor.
Right-click on “_mods” in the File View window and pick “Create new mod” (as on the picture). It will create a new mod for Steam Workshop. Mod will be invisible for everyone exept you, untill you publish it.
If you create the mod correctly, you’ll see new subfolder, with name consisting of 8 to 16 alphanumeric lowercase letters. This name is your mod uniq Steam Workshop ID, which will indentify it.
Basic modding concepts:
Spintires is a number of files, placed within the directory, with mod ID name, which is within “_mods” special directory.
Each time you start Spintires Editor, folder of all mods that you have created, will be automatically moved to a directory called “_mods”. All you need to do before publishing is to fill out folder files. When you want to publish the mod, these files will be automatically converted in game-understandable format, renaimed and zipped, then upload to Steam Workshop. Thus no one except the author of the mod won’t be able to see the original files of the mod.
Step two:
Create truck “.X” mesh file
You don’t always will need to create new mesh file for new truck. For example, you may need to edit the textures of the existing truck, but in our example we will create a new truck from scratch.
Spintires uses the format “.x” for mesh file that is an old format DirectX.
Therefore, you will need a Converter for your models. We used 3Ds Max 2012 and recommend converter is the kW X-port.
Make sure you set your texture correctly.
Make sure that all exported objects pivots are default (X:100.0, Y:100.0, Z:100.0).
Make sure that the position of the model relative to the axes installed in the standard position. In 3D Max to set the standard value using the Hierarchy tab -> Reset Pivot.
Make sure the root object and the texture of the truck have the same rotation (X: 0.0, Y:0.0; Z:0.0) In 3D Max you can set with the help of such Utilities tab> Reset XForm modifier.
Truck should be aligned alnog “X” axis.
At least one object (or subobject) of the model must be physical. Physical objects are objects with collision model. Spintires automatically creates the collision model for all objects that have the ending “_cdt” in the title. Thus, these objects (or hitboxes) will not be visible in the game, that is, are transparent, but can have a physical body as such. At the same time, if the object has related subobject called “cdt” – it will use it’s geometry as its own collision model. Objects with the name of “cdt” is not available in the game as such.
After the installation of the truck mesh is complete, move “.X” file to “Media\_mods\[mod name]\meshes\trucks”
Step three:
Create truck XML mesh file
Each “.X” file in the Spintires has a pair .XML mesh file that describes the texture and specific properties of the polygonal model in the game.
Find your new “.X” file in the File View and double-click on it.
Technically, you can have many “.XML” file, tied to one “.X” file. But in most cases you should have one “.XML” with the same name “.X” file.
Open your new XML file in Spintires Editor. Just right click the model window and select “Open XML File” in the context menu.
Here’s Spintires Editor mesh file view. Pay attention to the “Scene View”, you can see the mesh structure of the model. You should carefully check her out before moving on. Each object (or a frame object), which you want to add to the physical body of a model must have at least one “cdt” subobject (as the collision model). The collision model is visualized as a thin wireframe models (look the picture). The type of collision model is specified in its name, in brackets. They can be in the form of Boxing, convex or mopp. The model in the form of a box have the best performance, while the mopp models, the slowest. So make sure that all models that can be represented as boxes are really bosex.
We highly recommend you to use NotePad++ for editing XML files. If you followed our advice and installed all the necessary plugins for NotePad++, then simply press the “Open XML File” and it will automatically open NotePad++.
Double click on the “CombineXMesh” – the line should turn into a button.
Click on the “CombineXMesh” button. Node editing dialog should pop up. Add the appropriate amount of materials. By “materials” we mean parts of the mesh that describe specific textures, blending and surface shading.
The dialog displays the available sub-nodes and the current sub-node. Double-click the item from the list to add or delete them.
After a sub-node with materials added, double-click it to add appropriate attributes.
Select attributes for materials. DiffuseMap, NormalMap and SpecularMap texture files. MeshParts describes the parts used polygonal models and is required except cases when the file in only one material.
Once you have added DiffuseMap and other attributes, move the cursor to the parameters of the attribute (between quotes). You should receive the dialog window of configure attributes.
Settings dialog window attributes contains many useful features for XML editing.
Select the texture file using the SpinTires Editor file browser.
Use the atributes editing dialog to add atributes in “MeshParts”. Click on the “Mesh Frame” button and select one or more mesh parts.
Use Spintires Editor to find out which mesh part should use which materials.
Here you can see mesh parts. Your “.X” file can content number of mesh. Each of them includes many materials. Mesh parts identified by meash, name and an index.
In the end your XML-mesh file should look like that:
Step four:
Create truck file.
Right-click on the folder that we created at the very beginning and select “New truck” in the context menu.
Choose a name for your new truck (we recommend to use the Latin alphabet and “_” instead of “Space”).
At the moment Spintires mod may contain multiple (or none) trucks, wheels or addons. In the future developers promise to add the ability to create game maps.
Once you have selected a name, a new XML file should be created in [name of mod]\classes\trucks.
Pick the file and press “Show in explorer” on the toolbar.
Open truck XML file through Windows Explorer. Spintires Editor automatically creates truck template file that you will need to configure.
First of all, select truck mesh file as attribute values for “Truck/PhysicsModel/Mesh”. Use Spintires tools to select the file, instead of “[truck mesh]” you should have something like “trucks/kamaz65115”.
Next, select the wheel type (some standard types of wheels are in the folder “Media/classes/wheels”) and replace “[rear wheel class]” and “[front wheel class]”. Please note that these files are XML classes, not meshes.
After that, make sure that “ParentFrame” attributes is directed to correct mesh files (subobjects).
When these manipulations are finished, you can open truck XML file in Spintires Editor. It should look something like this:
Next step is to adjust the parameters of the truck.
Step five:
Truck customizing.
In fact the process of creating a truck is to edit the text of truck XML file. Here you can see a few tools that should help you with this.
The Editor Spintires toolbar. Hover the mouse over the button to see the tooltip.
1. Wireframe mesh view.
2. Disable edit. Quite useful when you only want to view files and textures of the model, but don’t want to edit them.
3. Lighting mode: direct and ambient light model. Useful for verifying textures and occlusion volumes.
4. Fog on/off. Not used in truck mods creating.
5. On/off scene grid.
6. System statistics.
7. System timers.
8. Reload resourses (meshes and textures).
9. Open media-file.
10. Copy the object. Not used directly in truck mod creating.
11. Start/stop physic simulation. Helpful for test truck physics in Spintires Editor.
You can also use the Havok Visual Debugger to test your physics settings. To do so, open truck XML file in Spintires Editor and start the simulation (button 11 on the toolbar).
Spinttires Editor displays information about the collision objects for all the objects that can participate in a collision.
Then run Havok Visual Debugger (hkVisualDebugger.exe) and connect it to Spintires Editor (if this does not happen automatically, use the Network > Connect > localhost). After this you can use View > User Cameras > Spintires Camera to align Visual Debugger camera Spintires Editor camera.
Havok Visual Debugger view. You can hold the spacebar and move the mouse to rotate the object around its axis and check your physical settings.
Spintires Editor is essentially a truck viewer.
1, 2, 3, 4 (HeadLight, Igniting, ReverseSignals, StopSignals) – allow you to view and trigger sections from Truck/ModelAttachments and TruckAddon/ModelAttachments XML.
5 (IK) – view IK settings for TruckAddon/ControlledIK and TruckAddon/AutomaticIK.
6 (DamageSensation) – shows area and truck parts the game is tested against. Also use to test water overflows.
7 (Shafts) – truck drive shafts positions.
8 (OcclusionMap) – the texture placed under the truck to show light occlusion.
9 (OcclusionVolume) – an area of the truck that truck self-occludes.
10 (OcclusionVolume/FullOcclusion) – used instead of OcclusionVolume of the addon with “IsChassisFullOcclusion” attribute set to “true” is installed.
Spintires Editor working in pair with Notepad++ Spintires plugins:
First example: adjust of drive shafts.
- Open the truck XML file ti which you want to add drive shafts (usr ALT-SHIFT-O).
- Select “Open XML File” in context menu.
- Add “SocketPoints/SocketPoint” node in Notepad++ if there’s none, then place the cursor between commas of “Pos” attribute values and press “Pos” button.
Spintires Editor window should pop up and show the global position of selected drive shafts node.
Use 3D control to change position of drive shafts node or click the meash to snap to point of intersection. Press “OK” to save the coordinates in Notepad++, “Cancel” to cancel changes and “Reset” to retirn to the default settings.
Second exmaple: Adjust OcclusionMap
- Open truck XML-mesh file ti which you want to add drive shafts (usr ALT-SHIFT-O).
- Select “Open XML File” in context menu.
- Add “Truck/OcclusionMap” node in Notepad++ if there’s none, then place cursor between commas of “HalfSizeZ” attrubute values and press “Z” key.
Use 3D contorl to change width of OcclusionMap.
Used the same principle you can also edit directions.
You can also edit local directions and positions. To do so select the first subobject in Spintires Editor, and then click “Local Pos/Offset” or “Dir/Local Axis” in the dialog window of Notepad++ Spintires plugins.
Step six:
Truck testing in the game.
After testing your truck in Spintires Editor it’s highly recommended to test it in the game.
Run Spintires and make sure that Steam is still active.
Select “Proving ground” in the main menu to start launch the proving ground map.
Proving ground is a special map where you can spawn, reload and refill your trucks at any time. This game mode, also, allow you to spawn trucks and addons from unpublished Steam Wrokshop mods (in other cases you can use only publushed mods to which you subscribe).
You can use developers tools in the “Proving grounds”.
Press “Spawn” button to add new truck.
At the proving grounds you are free to spawn and switch between trucks.
There are some locations where you can teleport your truck. Thoroughly test your truck in different conditions and with different addon settings, before going on to the next step. You can use the Havok Visual Debugger connected to Spintires to test your physical settings.
Step seven:
Mod publishing.
Your truck or addon must have a proper name. Add a node like this:
Replace “kamaz65111” in a special file named “strings.xml” located in the root folder of your mod, with the name of your truck or addon and add this name in the “Value” attribute. Localization of mods is not yet realized, so it is highly recommended to use English in all names.
Once you have given a name to all your creations and tested them both in Spintires Editor and in the game, run Spintires Editor and right click on your mod in “File View” and click “Publish mod”.
Mod publishing dialog should pop up.
Enter a name and description for your mod. Select Visibility (default is set to “Private” which means that no one except you will be able to see your mod). Click the “Autogenerate” button to create a preview for your mod. You will then be able to configure the automatically created image, which is located at Media\_mods\[mod name]\preview.png. Advise to save so much from the automatically generated images as possible to make the icon more authentic fashion.
If this is the first time you add a new item to the Steam Workshop, you will have to agree to the terms of service, by means of clicking on the “workshop terms of service” link.
Optionally, add a change note and click “Publish”. The download window should appear.