Community Forum

Change textures via designConfiguration

Forum Overview >> Farming Simulator 19

CategoryFarming Simulator 19
Created30.10.2019 23:05


Christian Wick (iamchriswick) 30.10.2019 23:05
Hi. Is there a way to change textures on a mod via the designConfiguration option in the mod xml file? I want the option to have different graphics on a vehicle.

Bilbo Beutlin (BBeutlin) 31.10.2019 00:06
No - unluckily not. All the textures are loaded at game start. Re-loading certain textures is only possible by a custom script.

So far you can only add shapes with the textures and switch them by XML in/visible.

Dave Chuckry (CaptainD430) 24.11.2019 16:54
put in multiple objects with the different graphics and do an object change config

Bd Bdbssb (bdbssb) 25.11.2019 01:31
Yes, unless I’m misunderstanding the question, this can be done. I’ll copy some lines in when I get to my pc. An example is done in one of the in game trucks or trailers in the rim color lines, just can’t remember off hand which one, but I’ll share an xml line ASAP. There is a bit of a limitation. You would be limited to have it per color in the option. It can be done in the base color, design color, and rim color.

Bd Bdbssb (bdbssb) 25.11.2019 02:58
<rimColorConfigurations useDefaultColors="true" price="100" >
<rimColorConfiguration name="CHROME" color="STOLL_WHITE2" material="2" />
</rimColorConfigurations>
That would give you a chrome wheels color tab selection. White has to be used for chrome to look chrome. You can use whatever color it will just be a tinted chrome. The name="CHROME" simply gives you a name CHROME when the first color tab is clicked. The color="STOLL_WHITE2" is pulling a complete white color form the brandColor.xml. Then material="2" is pulling the chrome material from the vehicleShader.xml. Then all other colors would be the default material of the rims. If you want an additional color or material option you would just simply add another line below the first.

<designMaterialConfigurations price="50" useDefaultColors="true">
<designMaterialConfiguration name="CASE WHITE" color="CASEIH_BEIGE1" material="13" />
<material name="magnumInterior_mat" shaderParameter="colorMat1"/>
</designMaterialConfigurations>
That example would give you a color tab that would make everything in design material configuration a white leather. Every other color selection after the first one would be a default color grid of the material set up in the i3d or the base materials in the xml. If you want an additional color or material option you would just simply add another line below the first.

<baseMaterialConfigurations price="100" useDefaultColors="true">
<baseMaterialConfiguration name="CASE RED" color="CASEIH_RED1" material="16" />
<material name="magnum_mat" shaderParameter="colorMat0"/>
<material name="magnumInterior_mat" shaderParameter="colorMat0"/>
<material name="magnumInterior_mat" shaderParameter="colorMat2"/>
</baseMaterialConfigurations>
In this example the first color tab will make anything in your base material configuration a case red shiny silver material. Every other color selection after the first one would be a default color grid of the material set up in the i3d or the base materials in the xml. If you want an additional color or material option you would just simply add another line below the first.

Now understand, the model has to be setup to use colorMat0-colorMat7 in the vehicle shader. Not sure if you are familiar with this or not.
Hope this makes sense. Each material selection can be added in separately for an individual color selection. Now if you want a specific material in either the base or design config to always be a certain material then you would add the material number in the material name like this.

<baseMaterialConfigurations price="100" useDefaultColors="true">
<baseMaterialConfiguration name="CASE RED" color="CASEIH_RED1" material="16" />
<material name="magnum_mat" shaderParameter="colorMat0"/>
<material name="magnumInterior_mat" material="13" shaderParameter="colorMat0"/>
<material name="magnumInterior_mat" material="13" shaderParameter="colorMat2"/>
</baseMaterialConfigurations>

That would keep the magnumInterior_mat in colorMat0 and colorMat2 a leather all the time.

Here is a link to a video that explains the UDIM and color shader a bit. I have found many new things since doing the video, however it is a start explaining how the colorMat has to be set up in the UV's of the model. I have a list of the materials I had available at the time in a link below the video.
https://youtu.be/f0_w5kW3cXw

Hope this helps, maybe I didn't understand the question correctly?

Bilbo Beutlin (BBeutlin) 25.11.2019 13:26
That's even more complicated than creating different shapes and switching them in/visible by XML.

And as I've understand the TO, he searches for a possibility to swap/exchange textures in a running game.

Bd Bdbssb (bdbssb) 26.11.2019 22:02
It's only complicated if you have to start from scratch with no example.
Maybe I misunderstood the question. No you can't change textures mid game but you can simply go to the store and customize the vehicle.
Those are just store options.


Note: Log in to post. Create a new account here.