[GUIDE] Converting ST Vehicles/Mods To MR With Vid!!!

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.

last edited by MudHappy

The editor keeps saying I'm missing the template files?? Any help would be greatly appreciated!!!

@MudHappy : Thanks man ! really appreciate it bro 🙂

@mudhappy said in [GUIDE] Converting ST Vehicles/Mods to MR With Vid!!!:

you can't change tires by changing the Type= line in the truck XML. You have to do it the reverse way. By leaving the Type= line as it is and renaming the appropriate mesh and texture files.

This is really strange that you are experiencing this, because I've had no issue changing the wheels on all trucks i've edited using notepad++. Is the issue the line isn't editable or whenever you change it, the game doesn't show the changes/truck not spawnable?

@Kingpinn
I assure you it is possible, you just have to pay attention to the class XML files you currently have for your wheels. This was own of the first tweaks I ever did to a mod truck that wasn't mine, and what started me down the long messy bumpy road that is modding for MR...

@Kingpinn It was a major brainfart. Correctly stated "you can't plug the name of the wheel mesh mentioned in the WheelsSets WheelType lines into the Wheels Type= line and have that work". DOH! Like @Mexican_420 says, you need to use the name of the classes\wheels XML there. And I knew that. I've done it dozens of times in the past. And the information was staring me directly in the face as I was doing it the bassackwards way. But for some reason it wasn't registering though. Anyway it's always good to know how to do things different ways. If it ever needs to be done differently...for whatever reason.

last edited by MudHappy

So I'm on step seven. I put a name and published the mod. Its 0.000 MB on the workshop and there's no name. Am I missing something? Thanks

@a-slice-of-pizza I get that result quite a bit. It typically means the mod can't be converted with this method. Or that some other type of conversion needs to take place beforehand. I can guarantee it will happen if the preview hasn't been autogenerated, and you try to publish the mod without one. I was wrong about that. You can actually skip that step and the preview will still be autogenerated when published. IF a preview is able to be autogenerated at all. No guarantee on that.

What mod are you trying to convert? Maybe I can get it to work. Or figure out why it won't.

last edited by MudHappy

@a-slice-of-pizza Hmm...that's odd. I'd already converted that one and it worked for me. Then I just tried it again a few times. I tried exactly as described above and it worked. As described above, except without deleting the _templates folder, and it worked. As described above, except without converting the mesh files, and it worked...but the mod doesn't work in the game with the unconverted mesh files(it does work if I swap out the mesh files with converted ones though).

So...I'm at a total loss as to why it's not working for you. 🤷🏻♂

@a-slice-of-pizza The method in which I use in the tutorial I wrote (linked in the first post) doesn't use the workshop or editior, maybe try that way of converting the mod and see if it makes any difference?

Oh also it wont let me aoutogenerate the preview. It says "Add truck, addon, or terrain to auto-generate preview for the mod!" when I click Autogenerate. Didnt I just to that?

last edited by A Slice Of Pizza

@A-Slice-Of-Pizza I can't figure out why that would be happening with this particular mod. I can't seem to make it not work, no matter what I try. I just tried publishing it without autogenerating the preview, and without a name/title, and it still worked. The preview got autogenerated anyway when it was published. I even tried converting a version of the mod downloaded from another non-workshop site. And that one worked too.

I'm pretty much out of ideas at this point. I dunno what's going on with it. I'm thinking it's probably just some small thing you're overlooking. And you'll probably figure that out eventually.

BTW is this the first mod you've tried to convert using this method? Has it ever worked for you?

last edited by MudHappy

Ive tried converting Skull's Ford F150 and Vengeful Maniac's Ford tow truck. They didnt work. Its ok, thanks for your help. I will figure it out sometime.

just a quick thank you for taking all the time to put this together!!! it is a very in depth explanation to a oft asked question. Also your disclaimer as to the 'acquiring permission' is spot on. i personally like to think that if everyone asked before just taking, there would be a much more receptive attitude towards file sharing. Again thank you MudHappy! ___Rufus

Thank you @Kingpinn and @MudHappy for your help 👍 Unfortunately my modding knowledge doesn't go beyond xml coding so if the meshes don't convert these ways I hit a dead end, which means I've only been successful 4 out of 20 times 😵

I've come across a couple of problems which I'd like to ask advice for here if that's ok? The first is an issue I've had is with the Land Rover Discovery '98. It appears the weight transfer is reversed so when you accelerate the front end compresses and when you brake the rear end compresses. Can this be solved with xml editing or is it a problem with the mesh or part of? I never used this vehicle in oldtires so maybe it's an error on the part of the modder and has always been there.

Second is an issue with the steering wheel which I've noticed on some other people's conversions as well. When I turn the steering wheel the engine revs up! The vehicles I have this problem with already have a turning steering wheel, I've located the commands under constraints and if I delete that whole constraint then the issue is solved, but the steering wheel no longer turns. Is there a way to remove the issue but keep the turning wheel? I don't actually know how to create a turning steering wheel where there isn't one so I've still got a lot to learn I think!!

@malcolm_tucker said in [GUIDE] Converting ST Vehicles/Mods To MR With Vid!!!:

I've come across a couple of problems which I'd like to ask advice for here if that's ok? The first is an issue I've had is with the Land Rover Discovery '98. It appears the weight transfer is reversed so when you accelerate the front end compresses and when you brake the rear end compresses. Can this be solved with xml editing or is it a problem with the mesh or part of? I never used this vehicle in oldtires so maybe it's an error on the part of the modder and has always been there.

that sounds like a bone/skinning setup is messed up, you wouldn't be able to change that without editing the mesh. it may be possible that it's fixable through XML if the body/cabin is set up as it's own <body> tag with a constraint, but that would be a very unlikely setup. maybe post the XML here and i can tell you if it is or not, would look similar to this

			<Body
				CenterOfMassOffset="(0; -0.4; 0)"
				ImpactType="Truck"
				Mass="1200"
				ModelFrame="BoneCabin"
			>
				<Constraint
					Cone="25"
					PlaneAxisLocal="(0; 0; 1.0)"
					PlaneMin="-25"
					PlaneMax="25"
					TwistAxisLocal="(0; 1.0; 0)"
					Type="Ragdoll"
				>
					<PlaneMotor Damping="20000" Spring="500000" Type="Spring" />
					<ConeMotor Damping="15000" Spring="500000" Type="Spring" />
				</Constraint>

what you would do here is invert either the PlaneAxis or the TwistAxis to achieve the motion in the other direction

Second is an issue with the steering wheel which I've noticed on some other people's conversions as well. When I turn the steering wheel the engine revs up! The vehicles I have this problem with already have a turning steering wheel, I've located the commands under constraints and if I delete that whole constraint then the issue is solved, but the steering wheel no longer turns. Is there a way to remove the issue but keep the turning wheel? I don't actually know how to create a turning steering wheel where there isn't one so I've still got a lot to learn I think!!

that was a workaround for old spintires, which didn't natively support moving steering wheels (it often had the tag TriggerEngineSound="false" which was an additional tag for Spintires Plus (the mod) to tell the game to not rev the engine)

what you need to do there is delete the ControlledConstraints

<ControlledConstraints>
	<Constraint Id="yyy" IsLinkedSteering="true" Name="zzz" TriggerEngineSound="false" />
</ControlledConstraints>

and just add <SteeringWheel Frame="xxx" /> inside the <TruckData> tag (while xxx is the name of the steering wheel frame)

if you can't figure out how to find out the name on your own, i can give you an example how to find it

last edited by hydrowasul

trying to wrap my head around this totally unfamiliar process . before ST/MR i didn't even know what a .xml was.__it is a challenge for someone with no computer knowledge.
__ SUB-QUESTION= where else would this info and process be used? is it exclusive to MR? gaming in general? or are there projects that have nothing to do with gaming, where i would find this type setup/programming?
hope this is not a foolish question.. Rufus

last edited by rufus

Looks like your connection to Focus Home Interactive - Official Forums was lost, please wait while we try to reconnect.