CSP config tutorial part 1
I knew the moment I asked the question about interest in a CSP tutorial that it wasn't the best idea I'd had in months. 🙃 😄
But well, that's my own fault. I guess I'll have to face the music now. 😎
Ok, first of all I want to say that my English is not the best, I know. So please bear with me if I don't always express everything exactly as a native English speaker would. 😁
In addition, I am not really practiced in writing tutorials. I'm afraid it's going to be a lot of text, but that's the nature of it. CSP configs can get very complex. If it gets too out of hand, please let me know, and I won't clutter up the thread any further.
So, enough of that. If you think the whole thing is stupid, just ignore this tutorial and skip it. 😁
I'll just post it here in a loose series, afterwards, the whole thing can be cleaned up, corrected and, if necessary, expanded and published in an extra thread, similar to what
@gutbomb did with his reviews. We will see if there will be any interest at all.
I have chosen Hilltop by derDumeklemmer as the track for practicing or starting the tutorial. An old mod that can be found on RD and as far as I know has no config yet.
Download it here:
https://www.racedepartment.com/downloads/hilltop-club-circuit.5312/
It's very small (18mb), so shouldn't cause any space problems for anyone interested. The track has visibly aged badly and has some interesting little pitfalls.
This is what the track looks like at the beginning:
Afterwards with a config it will get working grass, water and rain fx, some basic lights etc.:
I don´t want to make it to complicated and keep it as easy as possible for beginners.
This is a very basic, but imo very effective basic config for a lot of other tracks as a starting point. So use this as template if you like. It´s at least for myself very robust starting point and hit's a lot of basic needing settings.
Whoever want to follow, we went now deep to the rabbit hole. 😉
Ok, lets beginning taking a look in there:
Code:
; configuration file for Hilltop
[ABOUT]
AUTHOR = Sliderman
VERSION = 1.0
DATE_RELEASE = 2021 jun 26
LIGHTS_COUNT =
NOTES = ;LICENSE: https://creativecommons.org/licenses/by-nc-sa/4.0/ (not allowed locking it up behind a paywall, like PayPal or Patreon . . .)
[INCLUDE]
INCLUDE=common/conditions.ini, common/grass_fx.ini, common/materials_track.ini
[LIGHTING]
LIT_MULT=1.0
SPECULAR_MULT=1.0
CAR_LIGHTS_LIT_MULT=1.0
TRACK_AMBIENT_GROUND_MULT=1.0
[BASIC]
SUPPORTS_WIND = 1
[WIND]
DYNAMIC_FLAGS= AUTO
IGNORE = GRASSROW?, SANDLINES, treeline
[DISTANT_GLOW]
THRESHOLD=25
SHARED_THRESHOLD=25
This is part of the header of my configs.
Some basic information and settings. Which track is that config written for, author name, version, date etc.
Part of my configs are always a Creative Commons license 4.0: all code being reused from that config template should be as free as mine.
The [LIGHTING] part is just a reset to defaults, wind is enabled and some materials that have caused probs are set to been ignored, and the [DISTANT_GLOW] part is just adding some light glow, as most parts of this world are nowadays unfortunately light polluted. 🤨
The next part is very important and at the end just a definition of some reusable variables: the [DEFAULTS] part.
Btw. I split the config in different parts or blocks. You can afterwards use the parts, blocks you need or want very easily.
Taking a closer look to the [DEFAULTS] part, shows you variables to be used again and again.
Define once and use it where needed.
For example, "Grass__track" defines the materials or meshes using grass fx later on. "Horizon__track" the horizon ones, and so on. Should be self-explanatory.
I always use semantic variables, at least for myself...
To shorten it a bit, I now jump to the next part, the rain fx one. As 1ROAD... as a mesh name is a default Kunos style, it will be predefined in "Road__track" variable. As you can see, "?" is used as a placeholder for longer names.
?ROAD? get all 1ROAD.... meshes, ?GRAS? all 1GRASS... meshes and so on. This system is imo very rock solid proofed and should work on most tracks. I had about half a year a rotten GPU and couldn't start the game itself, but could still work on configs.
The same principle is used for generating grass and water fx. Later on lights too, but this should be explained in the next tutorial part. I´m tired writing so much text and imo you too, reading this all.
To be continued....
Edit: been just warned that
@__EASY__ has updated Hilltop before. As I'm ignoring most of his encrypted stuff, I wasn't aware of that, sorry for any inconveniences. Be careful not overwriting your old stuff.
Thx
@pitsch83 for that warning.