How to use the backfire textures in combination with CSMThere are 2 ways to approach it
- make it a selectable in the CSM mod's configurables
- make it dependent on the track selection in the mod's configurables
The first one is best used if you play a custom season with random weather, while the second one is best if you play a season with predetermined weather settings.
For the following explanation I'll refer to my 2015 mod. This is important to note, as depending on the author the structure of CSM mods can look different (i.e. different folder structure, different names/structure for .ini files, etc.).
Another important thing, in my mod I've disabled the rearlight brake in the gp4tweak.ini (Data\Tweaker), so if you're using my mod as base for yours you'll have to enable it (set to 1) for the backfire to work.
Method 1: selectable in the mod's configurablesFolder structureSet up the folders for the backfire textures within the Data\Cars\shared folder, and put in the respective textures.
Cars.iniEdit the Cars.ini in Data\Cars to add the newly created directories. Open it with notepad++ or another text editor.
At the bottom of the file you'll find the [Config] section, which determines of which directories the files are added to the cars.wad
The last line is of our interest. As it is now, all files in the _shared folder are added to the wad. We're adding another folder now, by adding
,_shared\%backfire% at the end of the line. The comma separates directories, the % indicates a variable. In this case we need it as global variable, means we don't declare it in the Cars.ini itself (like it's done with parts of the trackspecific car textures), but in the globalvars.ini. That way you can make it show up as option in the mod's configurables.
Globalvars.iniThe mod's configurables are handled by the globalvars.ini (located in \Carsets\F1 2015\Settings). We're now adding one for the backfire textures.
Under [Vars], first add the new backfire variable to the already existing ones. I added it under the Misc stuff. It doesn't matter where exactly you place it, as long as it is still part of the [Vars] section.
You can see that I gave it the value
no_backfire. As we've 2 folders within _shared for the backfires, we'll need the variable to have 2 values.
For that, we now add a new section called [backfire]. It's important that the content within the brackets is identical to the name of the variable.
Now what does each of these lines do?
Allowchange: makes it appear in the mod's configurables. Set it to 0, and it won't show up
Name: The name which will be displayed in the mod's configurables
NameIcon: The icon which shows next to the name
VarCount: The number of possible values the variable can have
Var1: The first value, here the name of the backfire folder
Var2: The second value, the name of the no_backfire folder
VarName1/2: The text that is displayed in the dropdown of the mod's configurables for the Backfire variable. If this isn't defined, it'll be identical to Var1/2
VarName1/2 Icon: The icon displayed in the dropdown
VarPreview1/2: The image shown in the right box of CSM when the respective variable is selected
ResultAfter you've done these things, your new menu should now look like this
You can see Backfire as first option. The order depends on the globalvars.ini, if you look in the previous screenshot you can see that I placed it before the trackname (Name: Grand Prix of...) variable. Icon and images are missing, simply because I didn't create any with the respective names.
What happens now is that you set the value of the backfire variable in the mod's configurables, e.g. you select
Backfire off, so the variable will be set to
no_backfire. When you click start, CSM starts to compile the wad etc. Going through the Cars.ini, first the lods and regular textures will be added. Arriving at Dir12 (see the second screenshot), it'll first add the files in the _shared folder, then the files in _shared\%backfire%. As the variable is set to no_backfire, it'll add the files of
_shared\no_backfire, the backfire folder will be ignored.
Method 2: dependent on track selectionFolder structureSet up the folders for the backfire textures within the Data\Cars\shared folder, and put in the respective textures.
Cars.iniEdit the Cars.ini in Data\Cars to add the newly created directories. Open it with notepad++ or another text editor.
At the bottom of the file you'll find the [Config] section, which determines of which directories the files are added to the cars.wad
The last line is of our interest. As it is now, all files in the _shared folder are added to the wad. We're adding another folder now, by adding ,_shared\(backfire%tracknum%) at the end of the line. The tracknum variable is declared in the globalvars.ini (Mod\Settings folder). Its value depends on the track you've selected in the mod's configurables
Grand Prix of ... (see the Modify line 210 in the globalvars, the lines below for the tracknum variable).
What happens now is that first the tracknum variable is resolved, and because of the parenthesis the whole expression within it will be treated as a new variable. For example, if you've selected
Grand Prix of ... Hungary - Hungaroring, the tracknum variable will receive the value
10. Inside the parenthesis it then reads
backfire10. The tracknum variable has 19 possible values, means there'll be 19 new variables (backfire1 - backfire19).
What we need to do now is to declare these new variables. We'll use local variables, means they're declared within the cars.ini. If you have a look at line 4, you'll see the start of the [Vars] (=Variables) section of the cars.ini. There are already a couple of entries, which are in use for the trackspecific liveries & car shapes. We'll add the new ones below them, which will then look like this
Our new variables have 2 possible values:
backfire and
no_backfire (equal to the names of the folder we've created). In 2015, the British (round 9) and US (round 16) Grand Prix were partially rainy. For those you don't want the backfires, so the respective variables are set to no_backfire.
Some mods
F1 1996 | F1 2002 | F1 2007 | F1 2011 | F1 2013 | F1 2015 | F1 2018
Edited 1 time(s). Last edit at 07/17/2016 10:14AM by kedy89.