Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Lucas' Simpsons Hit & Run Mod Launcher
  • Hacks
  • Mod Requirable Hacks

Override Shader Parameters

Available since Version 1.20.1.

This hack must be required by a mod to be enabled.

This hack allows mods to override shader parameter values globally or for specific shaders.

Requiring This Hack

To require this hack, add this line to your mod's Meta.ini:

RequiredHack=OverrideShaderParameters

Your mod must provide a configuration file when requiring this hack.

Configuring This Hack

To configure this hack, create a file named OverrideShaderParameters.xml and add the parameters necessary for your mod inside it.

<?xml version="1.0" encoding="utf-8"?>
<OverrideShaderParameters>
	<!--
	<Shader>
		Name: The name of the shader want to override.
			Optional. Not specifying a name will apply the overrides to every shader.
			This name can use * and ? wildcards. * matches any amount of characters, ? matches a specific amount.

		<Parameter>
			Name: The name of the parameter to override.

			(For Shader Colour Parameters):
				Value: A hex representation of a color.
				  (OR)
				Red: The red value. 0 to 255.
				Green: The green value. 0 to 255.
				Blue: The blue value. 0 to 255.
				Alpha: The alpha value.
					Optional. Defaults to 255.

			(For Shader Float Parameters):
				Value: A floating point number.

			(For Shader Integer Parameters):
				Value: An integer value, "false" for 0 or "true" for 1.

			(For Shader Texture Parameters):
				Value: The name of a texture.

			(For ALl Parameters):
				Value (or Red/Green/Blue/Alpha) are optional. Not specifying indicates to use the value from the P3D file(s).
	-->
	
	<!--
		<Shader> Element with no "Name" attribute
		This overrides the specified parameters for EVERY shader
	-->
	<Shader>
		<!-- No value specified so use whatever the shaders say instead of forcing it -->
		<Parameter Name="2SID" />
	</Shader>
	
	<Shader Name="shadername1">
		<!-- Force 2SID off regardless of what the shader specifies -->
		<Parameter Name="2SID" Value="false"/>
	</Shader>
	
	<Shader Name="shadername2">
		<!-- Force 2SID on regardless of what the shader specifies -->
		<Parameter Name="2SID" Value="true"/>
	</Shader>
	
	<Shader Name="famil_v*">
		<!-- Apply a red diffuse color to most of the shaders of the Family Sedan -->
		<Parameter Name="DIFF" Value="0xFFFF0000" />
	</Shader>
	
	<Shader Name="marge_v*">
		<!-- Apply a blue diffuse color to most of the shaders of the Canyonero -->
		<Parameter Name="DIFF" Red="0" Green="0" Blue="255" Alpha="255" />
	</Shader>
</OverrideShaderParameters>

Version History

Version 1.23.4

  • Added support for Vector parameters.
  • Added support for the ROTV, REFI, REFB and REFC parameters.

Version 1.20.2

Fixed an issue where 2SID was being disabled on certain shaders the game dynamically created causing certain things to appear invisible such as smoke from damaged vehicles and the coin sparkle.