How to read mod description

Discussion in 'Plugins' started by stevo.zilik, Jan 28, 2013.

  1. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0
    Hi,

    in rFactor(1) we could read the .rfm files for each mod to find out the full mod name etc...

    how to do that in rFactor 2 ? I can see /Manifests/ folder with readable manifest, but nothing from the .plr file links to the .mft manifest file. And the /Installed/rFm/ only contains .mas files, that are unreadable.

    Thanks,
    Stevo

    EDIT: this is regarding the currently active mod when the game is running
     
    Last edited by a moderator: Jan 29, 2013
  2. MJP

    MJP Registered

    Joined:
    Oct 5, 2010
    Messages:
    988
    Likes Received:
    20
    The RFM files are inside those MAS files in /Installed/rFm/, just open and extract using the MAS2.exe in /Support/Tools/ folder.
     
  3. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0
    Not an option, remember I'm talking about accessing that information programatically from within the plugin.

    The mas2.exe tool is a graphical tool for users. So yes I'm aware that using the tool you can do that, however one would need to replicate what that tool does in code to read the .mas files.
     
  4. Abriel Nei

    Abriel Nei Registered

    Joined:
    Aug 7, 2012
    Messages:
    714
    Likes Received:
    37
    The mft files are also in each installed component folder (note that each version has its own mft). Maybe you could just search for all mft files in the Installed folder and parse those.
     
  5. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0

    How do I know which installed folder (which mod) to search?
     
  6. Abriel Nei

    Abriel Nei Registered

    Joined:
    Aug 7, 2012
    Messages:
    714
    Likes Received:
    37
    I don't know what you want to do. Search in all sub-folders.
     
  7. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0
    Find out the currently active Mod Full Name and Version.
     
  8. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0
    No one?

    ISI? How do you suggest to retrieve this information in rFactor2?
     
  9. fastorro

    fastorro Registered

    Joined:
    Oct 8, 2010
    Messages:
    79
    Likes Received:
    0
    I'm starting my hotlaps plugin in .net and i want extract mass content, are there command line for this "mas2.exe"? the first parameter is filename, ok, but something more for extract to temporaly folder?

    any progress stevo?
     
  10. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0
    Using a string analysis algorithm, I'm literally best guessing the manifest name based on the .rfm name from the .plr file (since they are usually similar), which sometimes works, sometimes doesn't... its a joke to be honest, but the best joke so far...
     
  11. fastorro

    fastorro Registered

    Joined:
    Oct 8, 2010
    Messages:
    79
    Likes Received:
    0
    i dont understand you... the manifest files haven't all info from .veh cars and .gdb for tracks...

    In rf1 i follow this steps:

    [first time by each session]
    1.- rf_plugin shows "plrfilename".
    2.- mycode find % open "plrfilename" & save section "game description"
    3.- mycode find % open ".rfm mod file" & save section"VehiclesDir" and "Mod Name"
    4.- mycode search all ".veh" files in vehicles mod subfolders
    5.- mycode get & save to db properties from each skin.


    [each 0,5s]
    1.- rf_plugin shows plrfilename (mod detected previously, "driver" & "vehicle description" and "lap details".
    2.- save to db driver with correct skin, with team, etc... not only "vehicle class" ... :)


    also i make some like to save track and track details.


    I need unzip *.veh & *.hdv from vehicles and *.gdb from tracks.

    is it possible?
     
  12. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    ... never mind!
     
  13. fastorro

    fastorro Registered

    Joined:
    Oct 8, 2010
    Messages:
    79
    Likes Received:
    0
    ¿?
     
  14. Frank Geyer

    Frank Geyer Registered

    Joined:
    Oct 5, 2010
    Messages:
    222
    Likes Received:
    3
    Sorry fast,

    I was describing a possible solution to the problem, but reading through the WHOLE thread it was something u guys came already up with. So I deleted the text of my post. Just one of those days ... ^^

    Cheers
    Frank
     
  15. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,602
    Likes Received:
    88
    Thanks fastorro, that was very helpful :)
     
  16. stevo.zilik

    stevo.zilik Registered

    Joined:
    Jan 27, 2013
    Messages:
    34
    Likes Received:
    0
    I don't know, did you figure it out? So far I mainly wanted the mod full name and version, which is in the manifest file. But the other files you are mentioning, I think they are likely to be compressed in one of the .mas files :/
     
  17. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    About reading MAS files, maybe you could check with Dave Noonan, the author of 3DSimED?
     

Share This Page