GP4 Perf Gen - Easily convert spreadsheets to Performance files. [v1.3]

Posted by AUS_Doug 
Hi all,
This is a little program I wrote to make something a bit easier on me and now, with a few modifications, I've made it flexible enough that, hopefully, more people can find a use for it.
If you've got spreadsheets - one with team information, another with driver information - chances are this can work for you. (See the 'Notes' section for the rules that need following)
The flexibility in the program means that there is a little bit of setup time, but this is only a once off.
Simply export your spreadsheets to CSV files, edit the Settings.ini to fit your files and run.
Some advanced usage is possible via a .bat file/Command Prompt, good for if you want to generate multiple unique-Performance files from multiple CSVs at once.



Program name: Performance File Generator
Author: AUS_Doug
Version: 1.3
Date: 24th Decmeber 2016
Build Time (Version): ~ 1 Hours
Build Time (Total): ~ 4.75 Hours

Download: Github - GP4.Perf.Gen.1.3.zip

What it does:
---------------------------
- Taking two Comma Separated Value (CSV) files and, optionally, a target file name, to generate
a GPxPatch Performance file for use with Grand Prix 4.

Requirements:
-----------------------------
- .NET Framework 4.5.2

Basic Usage:
-----------------------------
1) Modify the Settings.ini, so that:
1.a) The 'Team CSV' and 'Driver CSV' fields point to the correct files.
1.a.i) Provide preferred name for Performance file
1.b) Fill out the 'Have Driver X' fields, depending on what your 'Driver CSV' contains.
1.c) Edit the fields in the 'Team' section, so that they point to the correct fields in your 'Team CSV'
1.d) Edit the fields in the 'Driver' section, so that the point to the correct fields in your 'Driver CSV'
1.e) Edit the fields in the 'TextureNames' section, such that they match your Tread and Rim textures

2) Have 'Settings.ini', 'GP4 Perf Gen.exe' and 'CsvReader.dll' in the same folder.
3) Double-click 'GP4 Perf Gen.exe'

Advanced Usage:
-----------------------------
Follow Steps 1 & 2 from above, though you can choose to provide your Settings.ini by using the full path.
'GP4 Perf Gen.exe' will accept, as a command-line argument, a custom-named Settings.ini.
See 'AdvancedRun.bat' for example.
You could, for example, provide a different Settings.ini (containing different Team & Driver CSV names and a unique Performance Pile name) for multiple races at once:
"GP4 Perf Gen.exe" Settings-Melbourne.ini
"GP4 Perf Gen.exe" Settings-Bahrain.ini
"GP4 Perf Gen.exe" Settings-Sepang.ini
............
"GP4 Perf Gen.exe" Settings-AbuDhabi.ini


ChangeLog:
-----------------------------
24th December, 2016 - 1.3 Release.
- Added Gear count, Tread texture & Rim texture functionality
- The Team.csv file must feature columns for these values.

23rd November 2016 - 1.2 Release.
- More code documentation.
- License information.

18th November 2016 - 1.1 Release.
- Added flexibiliy for column names, using Settings.ini
- For basic use, runs without using Command Prompt or a .bat file.
- Can accept a custom 'Settings.ini' name as a Command Line argument, for advanced usage.
- Added error checking, namely for Index errors and missing files.


15th November 2016 - 1.0 Release.

Notes:
-----------------------------
While much more flexible than 1.0, there are still some rules that must be observed. (Check the included CSVs, which contain all the required and all the optional data)
- Teams and Drivers must be in separate CSV files.
- Both CSVs need a first row with Column headings.
- Teams need: Team Name, Engine supplier, Race BHP, Qualifying BHP, Reliability, Gear counts, Tread names and Rim names.
- The Team CSV must be NO LONGER than 12 Rows; 1 Row of Column Headings, and up to 11 teams.
- Drivers need: Name, Base Race Grip, Race Grip Variance, Base Qualifying Grip, Qualy Grip Variance
- Driver numbers, nationalities and 3-Letter codes are optional.
- GPxPatch requires that, if you have a 3-Letter code, you must have a Nationality.
If you provide a 3-Letter code, without a nationality GP4 Perf Gen will provide a default 'UN' Nationality.
- If you lose the Settings.ini file, a new one will be generated at next use with default values.

Special thanks to Mike Stall of Microsoft for his absolutely awesome CSV Reader.

Disclaimer: Usual bollocks about 'I tested this, and I/my PC didn't die/catch fire; neither should you/your PC but it's not my fault if it does happen'.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator



Edited 2 time(s). Last edit at 12/24/2016 03:20AM by AUS_Doug.
Yep I use a spreadsheet to create my mod perf files.

I take the speedtrap data from each qualifying session, use that to calculate a BHP value for each team, then take each driver's best laptime from qualifying, offset the power value to derive their grip/ability value.

Not that I'm obsessed or anything.

=====================================================


Intel NUC 8i3, 8GB RAM, MS Sidewinder Wheel
F1Virtual has one that I've used several times to good effect. It still relies on typing a few things, but creates performance files based on laptimes and differences: [www.4shared.com]

I'll add yours as a download if thats ok Doug?

_________________________________________________

For a list of EVERY download for GP4, look here: [docs.google.com]
Updated the program to be much more flexible, hopefully others can get some use out of it.
Updated description.



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
Thanks Doug!



My Grand Prix 4 Files

I'm a total dick. How many people can say that?
Finally got around to adding functionality for Gear counts & Tyre Tread/Rim textures, all in accordance with GPxPatch 4.44
At the moment, it is required that your Teams.csv file has columns for Gear, Tread and Rim. I'll make this optional in a future update but, for now, just fill those columns with zeros and delete the sections from the generated Perf file if you don't use them.
Sample CSVs are included again, and here is an example Perf file generated by the program

** Grand Prix 4 Performance File - Generated by GP4PerfGen v1.3 **
[File]
Version=213
[Team #00]
Name=Mercedes,Mercedes
Performance=930,975,1300
First Driver=6,Nico Rosberg,16230,170,17000,200,DE,ROS
Second Driver=27,Nico Hulkenberg,16150,170,16920,250,DE,HUL
[Team #01]
Name=Ferrari,Ferrari
Performance=915,990,1300
First Driver=5,Sebastian Vettel,16240,160,17000,200,DE,VET
Second Driver=44,Lewis Hamilton,16240,160,17000,200,GB,HAM
[Team #02]
Name=Coca Cola,Ferrari
Performance=915,985,1450
First Driver=7,Juan Pablo Montoya,16100,100,16950,200,CO,MOY
Second Driver=9,Scott Dixon,16100,100,16800,250,NZ,DIX
[Team #03]
Name=McLaren,Honda
Performance=930,970,1300
First Driver=2,Mark Webber,16155,140,16880,250,AU,WEB
Second Driver=22,Jenson Button,16155,140,16880,250,GB,BUT
[Team #04]
Name=Sauber,Mercedes
Performance=925,970,1200
First Driver=23,Nick Heidfeld,16090,175,16790,300,DE,HEI
Second Driver=21,Bruno Senna,16100,105,16800,150,BR,SEN
[Team #05]
Name=Williams,Honda
Performance=930,970,1300
First Driver=7,Kimi Raikkonen,16180,140,16920,250,FI,RAI
Second Driver=74,Robert Kubica,16150,140,16850,150,PL,KUB
[Team #06]
Name=Red Bull,Renault
Performance=940,955,1175
First Driver=14,Fernando Alonso,16300,150,16990,210,ES,ALO
Second Driver=3,Daniel Ricciardo,16250,150,16990,210,AU,RIC
[Team #07]
Name=Renault,Renault
Performance=940,965,1175
First Driver=20,Kevin Magnussen,16150,140,16875,150,DK,MAG
Second Driver=25,Jean-Eric Vergne,16200,120,16960,120,FR,VER
[Team #08]
Name=Jaguar,Ford
Performance=925,970,1250
First Driver=47,Stoffel Vandoorne,16200,125,16900,150,BE,VAN
Second Driver=8,Romain Grosjean,16180,110,16900,150,FR,GRO
[Team #09]
Name=USGP,Ford
Performance=925,970,1250
First Driver=98,Nelson Piquet Jr,16100,95,16800,150,BR,PIQ
Second Driver=53,Alexander Rossi,16090,125,16850,120,US,ARO
[Team #10]
Name=Cadbury,Ferrari
Performance=917,1000,1525
First Driver=27,Simona de Silvestro,16100,100,16820,150,SU,SIL
Second Driver=33,Max Verstappen,16200,150,16990,210,NL,MVE

[Gears]
Team #00=7
Team #01=7
Team #02=7
Team #03=7
Team #04=7
Team #05=7
Team #06=7
Team #07=7
Team #08=7
Team #09=7
Team #10=7

[TyreTextureNames]
Name #00=ultrasoft
Name #01=superosft
Name #02=soft
Name #03=medium
Name #04=hard
Name #05=advanti
Name #06=apptech
Name #07=bbs
Name #08=enkei
Name #08=motegi
Name #09=oz1
Name #10=oz2
Name #11=rays

[TreadTextures]
Team #00=2
Team #01=3
Team #02=3
Team #03=3
Team #04=2
Team #05=2
Team #06=2
Team #07=3
Team #08=3
Team #09=3
Team #10=2

[WheelTextures]
Team #00=5
Team #01=8
Team #02=11
Team #03=8
Team #04=11
Team #05=7
Team #06=11
Team #07=12
Team #08=9
Team #09=6
Team #10=7



F1 Graphics Swapper --- Lensdump - Renders and Screenshots --- GP4 Performance Generator
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