Lighting, Animations, & Effects - derail-valley-modding/custom-car-loader GitHub Wiki
Certain cargo can automatically leak fluid when a car is damaged. To add such a funcionality, just add an empty GameObject to your car named LeakPositionsTanker, with any number of child objects for each leak's position. Fluid will exit the hole along the positive X axis of your object, so rotate it accordingly.
Example leak position

You can animate wheels in 2 ways: using a WheelRotationViaCode or a WheelRotationViaAnimation component (both have powered and unpowered versions, depending on your use case).
This is the easiest way. Assign the wheels to the component, their radius, and the rotation axis. You can rotate the parent transform for extra customization.

You can have multiple components of this type to support multiple radii (like the S282).
Using animation will play an animation as the wheels rotate. If powered, the animation will also be sped up during wheelslip.
To correctly setup the animation, it should do 1 full revolution per second, which should correspond to 30 frames in Unity. If your animation does not match this, Unity can correct it by setting the Speed parameter of the animation to NumberOfFrames/30. Here's an example of an animation with 50 frames:

You will notice the Multiplier parameter. DV will look for a parameter names SpeedMultiplier to scale the animation's speed. To add it, go to the Parameters tab of the animator, click the +, select float, and name your parameter with exactly the name specified.

The Start Time Offset parameter controls exactly that. This allows you to use the same animation setup for both sides of a locomotive's valve gear, and offsetting by either 0.25 or 0.75 will rotate the 2nd set by 90 degrees.
You can add particle systems to any car. For those systems to move properly, you should add the WorldMoverParticleSimulationSpaceProxy to them. Smaller systems should not need it.
If you want more functionality, your car will also need a simulation.
Add a child named [particles] to your car with a ParticlesPortReadersControllerProxy. The Particle Port Readers array allows you to control certain aspects of them. Here's an example of how to control the safety valve of a steam locomotive:

To control the colouring, you can use instead the Particle Color Port Readers.
Note
Particle Port Readers will control all particle systems in the object and its children.
Important
Earlier elements in the array can disable some gameobjects, which will prevent others from accessing children.
When you right click the root of your car's prefab, you can add a premade particle setup to your car. There's one for diesel and another one for steam locomotives.
If you do not want to make your own particles, you can use some of the base game's particle systems with the CopyVanillaParticleSystem component. Just pick the system you want from the dropdown.
You can use Allow Replacing to swap out the gameobject with this script with the actual instantiated gameobject with the particle system. This is needed for firebox particles, or to work around the disabled gameobjects issue outlined earlier.
You should NOT use it if you need multiple particle systems under the same parent, and you're referencing the gameobject with those systems' parents already (for example, the safety valve outlined above, which has 3 separate particle systems).
If you're using multiple systems of the same type in close proximity, Unity may have issues with their draw order, resulting in flickering. You can enable this to force a custom sorting fudge and push one system behind another. Please read the documentation for more information.