Track name from plugin?

Discussion in 'Plugins' started by cosimo, May 25, 2015.

  1. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    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.

    Where can I get the real track name?
     
  2. DuRiN

    DuRiN Registered

    Joined:
    Oct 12, 2010
    Messages:
    44
    Likes Received:
    14
    From gdb file cosimo
     
  3. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    Gdb file? Where is that file?
    Is that file accessible from a plugin?
     
  4. DuRiN

    DuRiN Registered

    Joined:
    Oct 12, 2010
    Messages:
    44
    Likes Received:
    14
    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
     
  5. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    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.
     
  6. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    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
     
  7. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    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.
     
  8. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    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.
     
  9. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    Thanks Noel.

    I will contact ISI to see if it's possible to get this info in the next revision of the plugin interface.
     
  10. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    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
     
  11. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    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?
     
  12. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    The TV plugin has a config file for mapping a car number and team name to mVehicleName.
     
  13. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    I think that for the time being I will use a separate directory structure just for the best lap files.
     
  14. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    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
     
  15. Jeferson Richart

    Jeferson Richart Registered

    Joined:
    Oct 23, 2013
    Messages:
    174
    Likes Received:
    34
    PitGroup works to Team Name...

    Thanks :)
     
  16. cosimo

    cosimo Registered

    Joined:
    Apr 14, 2013
    Messages:
    827
    Likes Received:
    99
    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.
     

Share This Page