[Tutorial] - How to add and use backfire into GP4?

Posted by Excalibur 
Tools/ materials needed:
- Zmodeler and GP4Builder
- Backfires_GP4 files (.z3d files for F1 and for DTM + Textures)= Download Link

Step 1: Merge the backfire object with your F1 scene and move it until the backfire square is just behind the exhaust object.




Step 2: Once your backfire object is set correctly regarding the exhaust, hide all your objects, excepted the backfire object and the rear_light_on object. Select the 2 objects and click on Create/ Objects/ Uniteselect and click left on one of the 2 objects. Then, rename the new object as: rear_light_on




Step 3: Export your car into .gp4 format and open it into GP4Builder. On the Menu bar, click on Action / Sort car objects and save your car.



It is done! Your car is ready to use the backfire feature....





Now, into the Backfire textures folder, you will find 2 subfolders: "With backfire" and "Without backfire"
What does it mean?:

- With backfire means that you can use the backfire feature using this texture. In game, when you brake, rear_light brake and backfire will be enabled.

How the rear_light_on object work into the game? The rear_light_on object will be visible when you brake or always visible in wet conditions. What is important to know is that, in order to be visible, the alpha layer of the backfire texture must be white to be seen. All black alpha parts will not show the object in game.

"with backfire", alpha layer texture:



- Without backfire means that backfire feature will be disabled in game. In game, when you brake, rear_light brake will work but not the backfire.

"Without backfire", alpha layer texture:



In game:

"Without backfire" texture - dry conditions when you brake:


"Without backfire" texture - wet conditions, when you brake:




"With backfire" texture - dry conditions, when you brake:


"With backfire" texture - wet conditions, whatever you brake or not:


As you can see, the rear_light_on object is always enabled in wet conditions, so rear_light brake and backfire are always visible, too... you can't change this as it is coded into the source code of the game.

Maybe there is a way, for CSM mods, to use the "with backfire texture" for dry conditions and "without backfire" texture in wet conditions...

Anyway, I hope that you will like this feature and that this little tutorial will help you to add the backfire feature into your future works. It brings a little touch of realism into the game...

____________________________________________________________________________________________________________________________________________





Edited 5 time(s). Last edit at 06/29/2016 04:46PM by Excalibur.
Muchas gracias!



My Grand Prix 4 Files

I'm a total dick. How many people can say that?
Tks a lot Excalibur!!
Added to the GP4FAQ.


[www.mediafire.com] Some say you should click it, you know you want to. :-) [www.gp4central.com] <----GP4 Central
Thank you, Mal ;-)

I will edit this tutorial as soon as I have more informations to make the 2 different textures working for CSM mods for dry and wet conditions...

____________________________________________________________________________________________________________________________________________

Excalibur schrieb:
-------------------------------------------------------
> Thank you, Mal ;-)
>
> I will edit this tutorial as soon as I have more
> informations to make the 2 different textures
> working for CSM mods for dry and wet conditions...


I'll try to make a post regarding that the upcoming weekend, hopefully so that it's somewhat easy to understand.




Some mods
F1 1996 | F1 2002 | F1 2007 | F1 2011 | F1 2013 | F1 2015 | F1 2018
Thank you, Kedy ;-)

____________________________________________________________________________________________________________________________________________

The DTM MOD was configurated for having both options of cars ( with and without backfires ) . Anyone who wants to work on the CSM configuration can have a look at the MOD .
@Ricardo: So, does it mean that you managed to configure your DTM mod to use the 2 backfires version for dry and wet conditions? If yes, it would be a great news! :-)

____________________________________________________________________________________________________________________________________________

How to use the backfire textures in combination with CSM

There 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 configurables

Folder structure
Set up the folders for the backfire textures within the Data\Cars\shared folder, and put in the respective textures.




Cars.ini
Edit 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.ini
The 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


Result
After 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 selection

Folder structure
Set up the folders for the backfire textures within the Data\Cars\shared folder, and put in the respective textures.




Cars.ini
Edit 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.
Excalibur Wrote:
-------------------------------------------------------
> @Ricardo: So, does it mean that you managed to
> configure your DTM mod to use the 2 backfires
> version for dry and wet conditions? If yes, it
> would be a great news! :-)


No Arnaud , 2 backfires version only for dry conditions , for wet condition the only option is to use the cars without backfire . I'm sorry for not having been clear .
However , to be honest I didn't work on the MOD since the last version released and sent to you some time ago . Maybe there is a hope working with the alpha channels but didn't try yet .



Edited 1 time(s). Last edit at 07/02/2016 02:40PM by rracunis.
Thanks a lot for this new feature guys and thanks a lot for working on how to implement it in Csm mods,i only have a question anything we can do if for example I set the backfire on and starts to rain while in race?will the backfire always be on then as soon as the rear light goes on when the track gets wet?if yes anything we can do then please?thanks again to all of you ☺

Greetings
Alessio


CoM3 oN McL4R3n.....:)
@Alessio: Unfortunately, we are limited by the source code of the game. So, in wet conditions, from the moment that the rear_light_on is enabled, the backfire is also visible, and it will be always visible in wet conditions, as for the rear_light brake.

I have tried several solution but this is the best one I have found to make the backfire working...

In CSM mods, you can select into the mod's configurable menu to enable or disable the backfire but if disabled, it will be disabled for dry and wet conditions.

Another possibility is to enable or disable the backfire for a specific track ( useful for predetermined weather conditions)

I sincerly thank you, Ricardo, for the CSM Tutorial about this feature... I am sure it will be helpfull for CSM modders ;-) (Y)

So, Alessio, for CSM mods, the best solution would be to predetermine the weather conditions for each track and to enable backfire texture for the track with dry conditions and to use the backfire texture (without backfire) for the tracks with wet conditions, as described
into the tutorial by Ricardo.

For non CSM mods, you can't install the 2 backfire textures into your wad, so you have to choose the backfire you want to use from the subfolders "with backfire" or "without backfire" (only for the last version of McLaren, Sauber and Williams for the moment)...

____________________________________________________________________________________________________________________________________________





Edited 1 time(s). Last edit at 07/03/2016 06:35PM by Excalibur.
Excalibur schrieb:
-------------------------------------------------------
> I sincerly thank you, Ricardo, for the CSM
> Tutorial about this feature... I am sure it will
> be helpfull for CSM modders ;-) (Y)


Tobi, and you're welcome ;-)

Probably won't manage the track dependent tutorial today, next week then.




Some mods
F1 1996 | F1 2002 | F1 2007 | F1 2011 | F1 2013 | F1 2015 | F1 2018
Arnaud , I'm not sure if the Kedy's name is Ricardo . If this is his name ... nothing else to say . However , if this is not , the great tutorial above was done by Kedy89 , not by myself ( Rracunis ( Ricardo) ) (Y)



Edited 3 time(s). Last edit at 07/03/2016 07:30PM by rracunis.
LOL I am really sorry, Tobi! .... Thank you! ;)(Y)

@Ricardo: This tutorial just arrived after our MP conversations... I was reading them almost at the same time.... I must be a bit tired ;) Thanks anyway to you for your help and infos ;-)

And thanks to both for your involvement into this feature! (Y)

____________________________________________________________________________________________________________________________________________

Thanks for replying,yeah this source code it's a problem if someone were able to modify it would have been great for gp4 but hey ho everything has got a limit in life,thanks for thinking and investing time in this new feature though all of you...
Now that italy is out...allez les blues

Greetings
Alessio


CoM3 oN McL4R3n.....:)



Edited 3 time(s). Last edit at 07/03/2016 10:01PM by Alessio88.
Added the part for the track-selection dependent backfire usage.




Some mods
F1 1996 | F1 2002 | F1 2007 | F1 2011 | F1 2013 | F1 2015 | F1 2018
Danke!



My Grand Prix 4 Files

I'm a total dick. How many people can say that?
I am glad that after several years of the first experiment with backfires other people have continued to make progress!

Mods & Tracks for GP4 - [www.mediafire.com]


Keeping alive the GP4
Sorry, only registered users may post in this forum.

Click here to login

Maintainer: mortal, stephan | Design: stephan, Lo2k | Moderatoren: mortal, TomMK, Noog, stephan | Downloads: Lo2k | Supported by: Atlassian Experts Berlin | Forum Rules | Policy