I'm by no means an expert on the subject(just figured all this stuff out...literally...yesterday). But, with a little lot of trial and error, I managed to find a quick and easy way to convert many ST vehicles/mods to MR. So I'm going to share that method with you here. And, this should go without saying, don't use this method to convert mods that you didn't make and post them to other sites, or to the workshop(OTHER THAN AS PRIVATE). You will likely piss somebody off if you do. And, depending on the individual, that could result in bad things for everyone. Like the original author pulling their mod(s) from the workshop. And/or refusing to release any more of their mods publically. We...obviously...don't want that to happen now do we? So be cool...mmm'k? Thanks!
Requirements:
1. Files to convert
I personally don't care who's they are or where you got them(that's your business...not mine). I know for a fact there are some folks that do care QUITE A BIT about such things. So...keep that in mind. If you feel like you should ask the original author for their permission first before converting one of their mods...then by all means do that. If you don't, then keep this shit to yourself please. Don't ask, don't tell. No harm, no foul. Keep it your business...and it ain't nobody else's business! Simple stuff!
O.k...all that having been said...if you have a Steam copy of ST installed you can use the files from the mods you subscribe to in the workshop. Once on your PC, they can typically be found here C:\Program Files (x86)\Steam\steamapps\workshop\content\263280(if not then you should be able to figure out where they would be instead). To decrypt the numbers used as the names of the folders found therein(and thereby locate which particular vehicle/mod you're wanting to convert) you need to go to the workshop and search for the page of the particular vehicle/mod. Once you find the page you're looking for, what I do(since I'm usually searching from within the app) is go to an open place on the page and right click > Copy Page URL. Then paste the URL in a text document for future reference. If you're searching the workshop through a web browser you can copy the URL from the address bar. In the URL is the key to decode the folder number for the vehicle/mod. It will look like this id=1994233785. That id number is the name of the folder with whatever mod you're looking for. If you download the vehicle/mod from another source the folder(s) will likely already be named accordingly.
2. SpintiresMod(latest version preferably)
There are other tools that can be used to convert meshes. But this is the one I use and recommend.
3. Spintires Mudrunner - Editor Beta
This is what makes the process so quick and so easy. The editor was built to do a lot of the work for you. You just need to know exactly how to use it for the purpose.
Process of conversion:
This is how I taught myself how to do it. And the method does have its limitations. Like I said...I'm no expert. But I have found a method that works. And it is relatively quick and easy. But to the best of my knowledge it won't work in all cases. Specifically, if there's a folder named "meshes" in the folder with the vehicle/mod files, then this method isn't going to work for you. Because the mesh files in that folder can't be converted with a mesh converter tool. Since they aren't consolidated into a single mesh file. It's 1 mesh split between 2 files. An .X file and an XML file. What we need is 1 mesh file for each mesh, and in neither .X or XML form. Which brings us to...
Step 1:
Open the folder containing the files for the vehicle/mod you want to convert. If there's a folder named "meshes", you are done with the process. No conversion for you(with this process at least). If not, continue to step 2.
EDIT(03/27/18): I've discovered the process for converting many mods with meshes in .X + XML form(in the folder named "meshes") is very similar to the method described below. In some instances it's almost exactly the same except for starting at Step 5. Since the editor will automatically create the _m and _t folders, and populate them with converted single file/"extensionless" mesh files and texture files. However, in many cases the mod files will need at least one stage of conversion prior to following the steps detailed below(or what you'll end up with is a non-functional mod). This is going to be a significant road block in many of those cases. Because unless you know how to manually convert said mods you will need a tool to do it for you. Good News: Such a tool exists. Bad News: It's literal "Unobtainium". Some older mods will even require 2 stages of conversion first. Good News: The tool used for the first stage of conversion is still available here. Bad News: It won't do you any good to use it if you can't complete the second stage of conversion afterwards(with the "Unobtainium" Mod Converter V2.0). So...if you get lucky you won't need to do any prior stages of conversion. If you don't get lucky...you're pretty much screwed. Oh...and I forgot one thing...Worst News: In some cases using all the conversion tools in the world will not yield a mod that is functional in MR.
Step 2:
Inside the folder containing the files for the vehicle/mod you want to convert, create 2 new folders. One named _m and one named _t.
Step 3:
Copy all of the mesh files inside the main folder to the new folder named _m. Then copy all of the texture files inside the main folder to the new folder named _t. Then delete all of the mesh and texture files from the main folder. Then, if there's a folder named _templates, you can delete that at this point too.
Step 4:
Open SpintiresMod and click Tools > Mesh Convert. Make sure the box next to Change FileVersion is checked. Make sure 20160902 is showing in the selection tab next to Change FileVersion. Then click the ... tab. Navigate to the folder containing the meshes to convert(the one you just named _m). One by one convert each mesh file(select then click Save). When all of the mesh files are converted, go back to the folder named _m and delete all of the .BAK files.
Step 5:
Open Spintires Mudrunner - Editor Beta. Under File View right click on the _mods folder. Select Create New Mod. Double left click on(or left click the + box next to) the _mods folder. There will be a folder with a random name(or maybe even a couple of them). Right click on that folder(or any of the _mods sub-folders). Then select Import Spintires-2016 Mod Content.... Click Yes when asked to proceed. Navigate to the folder containing the files for the vehicle/mod you want to convert and click OK. Click OK again when asked.
Step 6:
Right click on the folder you just imported your mod files to and select Publish Mod.... Then enter a Title. Click autogenerate to create a preview. Make sure the visibility is set to Private(unless you are converting your own mod and want others to have access to it). Then click Publish. Then wait until it's finished uploading your mod to the workshop.
Step 7:
Go to the MudRunner workshop and click on Your Files. Then click on the mod you just uploaded. Then click on the subscribe button. Then find the ID number for it(as described previously).
Step 8:
Go to C:\Program Files (x86)\Steam\steamapps\workshop\content\675010(or wherever your workshop content is). Find the folder with the ID number you're looking for. Open it and copy all the files and folders inside of the zipped folder. Then go to the folder with the original files for the mod you're converting and delete all the files and folders in it except the _m and _t folders. Then paste the files you copied from the workshop contents zipped folder.
EDIT: I thought I tried this and I couldn't make it work. But then I just tried it again and it did work. Apparently you can do it vice versa too. As in copy and paste the _m and _t folders to the zipped workshop contents folder. Or you can do it both ways. The problem I remember having was not being able to copy all of the texture files to the zipped workshop contents folder. In which case you can only do it the other way. The problem of not being able to copy certain files to the zipped workshop contents folder seems to randomly occur for me. Sometimes I can, sometimes I can't. So I just try to avoid it whenever possible.
Step 9:
You're done!!! For the most part. What you have now is a folder with converted mod files that can be manually installed into MR. They will be converted enough that the game will recognize them and the vehicle will be playable. If all went as planned. The mod will not work unless manually installed. Apparently not. You might also be able to finish installing it in the zipped workshop contents folder. Because...the workshop mod files are incomplete. They're missing, you guessed it, the mesh and texture files in the _m and _t folders. I'm not sure why that is. You tell me.
BUT...you're not really done either. There's actually quite a bit left to do. You need to go through the XML files and make some corrections if you want the vehicle to be fully compatible with, and to perform optimally within, MR. I'll go over those things here soon(will edit them into this post). And hopefully discuss other conversion options here as well.
EDIT(03/20/18): I'm having MAJOR issues trying to get the XML mods situation sorted out. Just about everything I try to do ends up breaking things. And I can't figure out how or why. As soon as I get it all figured I'll post an update.
Until then you can take a poke at it yourself if you want. I asked @Kingpinn if I could post the link to his mod conversion tutorial, which has a bunch of good info on the XML modding process. He said it was cool. So here's that: https://docs.google.com/document/d/1Yod1e_gdQzRloO5d1NAQZ2Q5JjHb_HzaIHq9qOWyj7k/edit?usp=sharing
Also take a look at the trucks template found here C:\Program Files (x86)\Steam\steamapps\common\Spintires MudRunner\Media.zip_templates(or wherever MR is installed). It's not a bad idea to take a look at some of the default trucks and wheels XMLs too. If you can't find those you have no business doing any of this...
UPDATE(4/18/18): I'm going to try to fill in some of the blanks as far as XML editing.
First, and most importantly, the wheels. I've found that, in nearly all cases after conversion with this method, the wheels XML(s) will need edited to work as intended.
For example:
<TruckWheel
Mesh="wheels/4jc2i3n"
HardpointOffsetZ="0.0" - LINES WITH "0" VALUES ARE GARBAGE DATA AND SHOULD ALWAYS BE DELETED!!!
Radius="0.52"
Width="0.33"
Friction_Numeric="2.2"
SubstanceFriction_Numeric="2"
TracksTexture="Offroad"
Mass="200"
>
<WheelFriction BodyFriction="1.5" SubstanceFriction="0.5" />
<WheelSoftness RadiusOffset="0.03" SoftForceScale="0.12" />
</TruckWheel>
Should be changed to:
<_templates Include="trucks" />
<TruckWheel
Mesh="wheels/4jc2i3n"
Radius="0.52"
Width="0.33"
Mass="200"
>
<WheelTracks _template="Offroad" /> - WHEEL TRACKS TEMPLATES ALSO WORK AS TRACKSTEXTURE!!!
<WheelFriction BodyFriction="2.2" SubstanceFriction="2.0" />
<WheelSoftness RadiusOffset="0.03" SoftForceScale="0.12" />
</TruckWheel>
IMPORTANT NOTE: For positioning, the values are shown as distances along the X, Y, and Z axis. In most cases as:
(X = Front +/Rear - ; Y = Up +/Down - ; Z = Left +/Right -) Center = 0
Though occasionally X, Y, and Z are out of order. And you have to figure out which is which through trial and error.
Now that you know that...next up would be the camera. It will be pretty messed up until you fix it.
Example:
<Camera CabinPos="(0.72; 2.35; 0)" Center="(0; 0; 0)" />
For a good starting point change that to:
<Camera RadiusMultiplier="0.5"> - I USE "0.5" AS DEFAULT
<Cockpit
_template="Default"
ControlsPos="( ; ; )"
ViewPos="( ; ; )"
WindshieldDiffuseTexture="texturename__d_a.dds"
>
<Rear
_template="Default"
/>
</Cockpit>
</Camera>
Then you can fill in, change, and/or add to, the values from there.
The WindshieldDiffuseTexture can be found in the vehicle mesh file listed here:
<PhysicsModel Mesh="trucks/4jc2ih4">
It will likely be labeled as:
MeshParts="Glass"
And what you're looking for is:
DiffuseMap="texturename__d_a.dds"
Hint: The windshield texture will probably need to be edited to increase the transparency for a more usable cockpit view. I use paint dot net for this. Open the file and, under Layers, select Layer Properties. Then lower the Opacity value and save it.
That same mesh file is where you'll find the SteeringWheelPos values too.
<SocketPoints>
<SocketPoint Name="SteeringWheel" Pos="(0.37; 1.75; 0.30)" />
</SocketPoints>
Which brings me to the next element. The driver.
Example:
<Driver Pos="(-0.11; 1.35; 0.35)" LegsOffset="(-0.18; 0.06; 0.12)" />
To that add the SteeringWheelPos like so:
<Driver Pos="(-0.11; 1.35; 0.35)" LegsOffset="(-0.18; 0.06; 0.12)" SteeringWheelPos="(0.37; 1.75; 0.30)" />
The vehicle lights can be pretty time comsuming. And don't really need edited to work. But they'll look better if you take the time to. Which is more than I want to explain in full. But basically you should at least add some _templates to all the Lights, Models, and Flares. As well as add some additional Flares, if desired. Such as the BlueStreak and BeaconStreak.
Examples:
Headlights(all lights turned on/off with headlight switch)
<HeadLight
_template="Default"
/>
<HeadLight>
<Model
_template="HeadLightRay"
Mesh="env/light_ray"
/>
<Flare
_template="HeadLight"
Reflections="true"
/>
<Flare
_template="BlueStreak" - ADDS A BLUE COLORED FLARE LINE EFFECT
/>
FOR CORNER MARKERS AND TURN SIGNALS:
<Light
_template="Beacon"
/>
<Flare
_template="MarkerBeacon"
Reflections="true"
/>
<Flare
_template="BeaconStreak" - ADDS A YELLOW COLORED FLARE LINE EFFECT
/>
FOR TAIL LIGHTS:
<Light
_template="IgnitionSignalRed"
/>
<Flare
_template="IgnitionSignalRed"
Reflections="true"
/>
</HeadLight>
Reverse lights(all lights turned on/off when the transmission is shifted into/out of reverse).
<ReverseSignals>
<Light
_template="ReverseSignal"
/>
<Flare
_template="ReverseSignal"
Reflections="true"
/>
<Flare
_template="BlueStreak"
/>
</ReverseSignals>
Stop lights(all lights turned on/off when the brakes are applied/released).
<StopSignals>
<Light
_template="StopSignal"
/>
<Flare
_template="StopSignal"
Reflections="true"
/>
</StopSignals>
Running lights(all lights turned on/off with the ignition switch, and/or with the engine running/stopped)
<Ignition>
<Light
_template="IgnitionSignalRed"
/>
<Flare
_template="IgnitionSignalRed"
Reflections="true"
/>
<Light
_template="IgnitionSignalWhite"
/>
<Flare
_template="IgnitionSignalWhite"
Reflections="true"
/>
<Flare
_template="BlueStreak"
/>
<Light
_template="Beacon"
/>
<Flare
_template="MarkerBeacon"
Reflections="true"
/>
<Flare
_template="BeaconStreak"
/>
</Ignition>
That's most of the important stuff you might want to edit XML-wise. And/or that isn't fully described in Kingpinn's tutorial(linked above and here).
Also check out my vid!!!
Youtube Video
Special thanks to Nix for providing the files I used to demonstrate the process. They were used strictly for demonstration purposes(and have since been deleted). So you don't need to worry about me doing anything else with them.