Track name from plugin?

cosimo

Registered
Hi,

I'm trying to save files in the same place where rF2 saves the settings/setups/realroad rubber etc...
However, the track name bit seems to be wrong sometimes:

http://isiforums.net/f/showthread.p...-for-rFactor-2?p=359706&viewfull=1#post359706

In particular, ScoringInfoV01.mTrackName sometimes is not what rF2 is using to save its files.

When trying to load/save a best lap, I need to know the name of the track and the class of the vehicle.
I'm getting the vehicle class by looking at VehicleScoringInfoV01.mVehicleClass and that works fine.
I'm getting the track name by looking at ScoringInfoV01.mTrackName and that seems to not work correctly in some cases.
In most cases it's fine, but f.ex. in VEC or other leagues that make their own event rfmods, the track name is not the same as rF2 is using.

For example, in the VEC Le Mans event, the track name is "Lemans" and there (UserData\player\Settings\Lemans\) rF2 saves all files, realroad, setups, etc...
When my code tries to save the best lap file, using ScoringInfoV01.mTrackName it doesn't get "Lemans" as expected but it gets back "Race 8 - 24 hours of Le Mans" and thus the load/save procedure fails because there's no such folder.

I'm hoping some plugin developer or ISI folks can help here, cause I can't find the information I need in the plugin data structures...

Where can I get the real track name?
 
Gdb is near AIW and perhaps one with high c++ level can use the noel hibbard tool to extract

I have developed a hotlaps system and make that manually. I will pay atention to thread mate, sorry if cant be more useful
 
The Track has several names in the GDB. EventName, TrackName, GrandPrixName and VenueName. The plugin API reports TrackName. There is another value in the GDB called SettingsFolder. That is what you want. But accessing the GDB from a plugin isn't a simple task. You would need to locate the track folder and then one by one extract the mas files (using the modmgr command line options) until you find one with a GDB that matches the TrackName. I'm not at a computer right now to check this but you may be able to get the SettingsFolder with the SetEnvironment function. I will look tomorrow when I get to the office.
 
Hi,

Using the topic ...
It is to get the team name via plugin?

I have:
char mDriverName[32]; // driver name
char mVehicleName[64]; // vehicle name
char mVehicleClass[32]; // vehicle class

Some for TeamName?

Another doubt, has a parameter that even being in the race session, take the qualy times?

Thanks
 
Hi,

Using the topic ...
It is to get the team name via plugin?

I have:
char mDriverName[32]; // driver name
char mVehicleName[64]; // vehicle name
char mVehicleClass[32]; // vehicle class

Some for TeamName?

Another doubt, has a parameter that even being in the race session, take the qualy times?

Thanks

Here is an snippet from a VEH file:
Code:
Number=31
Team="Scuderia GTItalia"
PitGroup="Group24"
Driver="Luca Bonatti"
Description="#31 Scuderia GTItalia"
Engine="4.4l V6"
Manufacturer="Porsche"
FullTeamName="Scuderia GTItalia"

mVehicleName = Description

So if you put the team name in the Description then you can get the team name in the plugin. But no, there is no way to get any of those other VEH values in the plugin API. Which sucks if you ask me. You will also notice in my sample VEH that I have the car number in the desc. We do that in our league so we can access the car numbers from our plugins. Again... a crap workaround.

I'm not really sure what your second question is about qualy times. If you are asking if qualy times are available in the race session then the answer is no. If your plugin is running during the qualy session then you could just store the final times on your own and then they would still be available when you get into the race session.
 
The Track has several names in the GDB. EventName, TrackName, GrandPrixName and VenueName. The plugin API reports TrackName. There is another value in the GDB called SettingsFolder. That is what you want. But accessing the GDB from a plugin isn't a simple task. You would need to locate the track folder and then one by one extract the mas files (using the modmgr command line options) until you find one with a GDB that matches the TrackName. I'm not at a computer right now to check this but you may be able to get the SettingsFolder with the SetEnvironment function. I will look tomorrow when I get to the office.

I just took a look at SetEnvironment and it doesn't expose the track setup folder. So the only way to find the setup folder is to dig through the mas files which is a big pain.
 
Thanks Noel.

I will contact ISI to see if it's possible to get this info in the next revision of the plugin interface.
 
I'm not really sure what your second question is about qualy times. If you are asking if qualy times are available in the race session then the answer is no. If your plugin is running during the qualy session then you could just store the final times on your own and then they would still be available when you get into the race session.

Exactly. I was wondering if any parameter that would have me back this information, or would have to store the time in the plugin during the Qualy.

Thanks
 
I tested the TV Plugin by Gerald Jacobson and he picks the team that is in .VEH Team="Scuderia GTItalia" correctly. Does he use some extra artifice?
 
I think that for the time being I will use a separate directory structure just for the best lap files.
 
I tested the TV Plugin by Gerald Jacobson and he picks the team that is in .VEH Team="Scuderia GTItalia" correctly. Does he use some extra artifice?
Hi, here the extract of the Wiki

By default, the team name is the "pitGroup" provided to the plugin by rF2 (same as team name unless pit is shared)
If you want to override it, you can use the driver mapping ini file (defined in the GrTVPlugin.ini).

The section name is the rF2 driver name (account name)

[Gerald JACOBSON]
team=Amphi
 
Got an answer from ISI. Currently getting the "pure" track/folder name is not possible.
The problem is acknowledged and it could be exposed in future builds.
 
Back
Top