CSP config tutorial part 2
Part 1 is here.
Now, I´ll show you how to get these mesh or material names for the config ini.
Best and imo the easiest way is using the Objects Inspector (OI) ingame.
Start a track and go with the mouse to the right side. Start there, the OI (Objects Inspector)
and you get this:
As explained there, hold <Alt> key and click to select an object:
Clicking on the road for example, you get the mesh name: "trk.015" and the material name: "road" besides a lot more information behind that 4 tabs (Details, textures, vars, Extras).
But for now just the default one "Details" is Ok.
You can click on the most stuff there, and you get the information copied to clipboard. By clicking on the material name "road" this will get a red background and get copied:
By <Alt><Tab> you get out of the game without stopping it. That way you can edit the config and see most changes simultaneously in the game.
As you can see, this material name is already in the ini in line 46: "Road__track= ?road?, ?ROAD?, ?PIT?," and that variable $Road__track is part of $PUDDLES__track, $SOAKING_track and some more later on.
Be aware, these names are case-sensitive.
So "road" is not the same as "Road" or "ROAD", that's the reason why I put there the same names in different versions in the variables. "?grass?, ?Gras?, ?GRAS?," just to show you one.
To make your first practical exercise, scroll down the ini to line 219 "; brightness, darkness, brighter, darker" and the small code block:
INI:
[SHADER_REPLACEMENT_...]
ACTIVE = 1
DESCRIPTION= road, tarmac
MATERIALS = $Road__track
PROP_... = ksAmbient, 0.35
PROP_... = ksDiffuse, 0.25
This code change the shader settings for the "MATERIALS" defined by "$Road__track", "ksAmbient" and "ksDiffuse".
By changing the numbers, you can change how bright these materials are shown and if your game is still running, you can see the changes instantly by saving the ini.
These are 2 extreme settings that show the change in brightness for the road textures.
This technique makes it easy to adjust different materials so that they fit better together. Even testing with different PP filters to see what you change is a breeze.
Changing the street brightness usually also implies adapting the lines, the edges of the street and sometimes also the grass areas. This can be seen in the ini supplied by me. If further materials need to be adjusted, you simply have to copy one of these code blocks and give it the new material name and the corresponding settings. These changes can be seen in the game immediately after saving the ini.
Be aware, make a backup of every ini you wanna work on. If you break something, you have always the original settings as backup.
Test it out and enjoy what you learned...
To be continued...