V6 plugin & rF2

Discussion in 'Plugins' started by telesimkke@gmail.com, Sep 22, 2014.

  1. telesimkke@gmail.com

    telesimkke@gmail.com Registered

    Joined:
    Sep 20, 2014
    Messages:
    6
    Likes Received:
    0
    Hi,

    I'm having trouble with examplePlugin and rF2.
    So far:
    -I've done everything written in instructions, without success
    -I've compiled C++ V6 examplePlugin project (changing to InternalsPluginV06 and updating GetPluginVersion() to 6), no success

    I'm running on 64x machine with Win8

    Is there something I'm missing?
    BR Jaka

    P.S. I had no problem with rF1
     
  2. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    What is the problem you encounter? Compilation problem? Plugin not taken into accpunt? Did you named your dll with _x64.dll for the 64bit version? Where did you copied your dll, in bin64/plugins?
     
  3. telesimkke@gmail.com

    telesimkke@gmail.com Registered

    Joined:
    Sep 20, 2014
    Messages:
    6
    Likes Received:
    0
    I tried what you suggested and it is still not working.
     
  4. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    Ok but you still do not describe your problem.
     
  5. telesimkke@gmail.com

    telesimkke@gmail.com Registered

    Joined:
    Sep 20, 2014
    Messages:
    6
    Likes Received:
    0
    First I copied the plugin from Release directory to Plugins directory, started the game and the files were not generated. Then I compiled the example (with V6 adjustments) copied it to all plugins directories (32 & 64(_x64) & regular directory) started the game and still no result.
    I also tested V3 plugin with rF1 and it works fine.
     
  6. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    did you enter the car and wait the plugin icon vanish, or you have just launch rf2 ?
     
  7. telesimkke@gmail.com

    telesimkke@gmail.com Registered

    Joined:
    Sep 20, 2014
    Messages:
    6
    Likes Received:
    0
  8. telesimkke@gmail.com

    telesimkke@gmail.com Registered

    Joined:
    Sep 20, 2014
    Messages:
    6
    Likes Received:
    0
    I managed to get plugin working. The issue was I did not compile with 64bit compiler. Thanks to Gerald for help!

    Here is a summary what needs to be done to get plugin working in 64bit:
    -download Visual Studio 2013 Express
    -set to 64bit compiler http://msdn.microsoft.com/en-us/library/9yb4317s.aspx
    -open project InternalsPlugin (IDE will do some changes->just keep saying Yes)
    -in Example.hpp change line 26 to: class ExampleInternalsPlugin : public InternalsPluginV06
    -in Example.cpp change line 33 to: int __cdecl GetPluginVersion() { return( 6 ); }
    -in Example.cpp change line 225 to: fprintf( fo, "HWND=%p\n", info.mHWND );
    -set Solution Configuration to Release
    -click Project->InternalsPlugin properties; go to Configuration Properties->Linker->General and change Output File to $(OutDir)/InternalsPlugin.dll and click OK
    -press F7 to bind the dll
    -dll is in \rF2 Example Plugin #6\Win32\x64\Release, rename the dll to InternalsPlugin_x64.dll
    -copy dll to rFactor\Bin64\Plugins

    BR Jaka
     
    Last edited by a moderator: Oct 1, 2014
  9. B1K3R

    B1K3R Registered

    Joined:
    Apr 6, 2012
    Messages:
    1,605
    Likes Received:
    88
    Did you update these as otherwise you will not get any data......

    /Example.hpp
    // SCORING OUTPUT
    bool WantsScoringUpdates() { return true; }
    void UpdateScoring( const ScoringInfoV01 &info );


    // GAME OUTPUT
    long WantsTelemetryUpdates() { return 0; } // only want "player" info right now
    void UpdateTelemetry( const TelemInfoV01 &info );



    //InternalsPlugin.hpp
    // SCORING OUTPUT
    virtual bool WantsScoringUpdates() { return( true ); } // whether we want scoring updates
    virtual void UpdateScoring( const ScoringInfoV01 &info ) {} // update plugin with scoring info (approximately five times per second)


    // GAME OUTPUT
    virtual long WantsTelemetryUpdates() { return( 0 ); } // whether we want telemetry updates (0=no 1=player-only 2=all vehicles)
    virtual void UpdateTelemetry( const TelemInfoV01 &info ) {} // update plugin with telemetry info
     
  10. Gerald Jacobson

    Gerald Jacobson Registered

    Joined:
    Jan 26, 2013
    Messages:
    827
    Likes Received:
    18
    No, it is like an orange electric plug
    Appear in top left of the screen as soon as you enter the car. If you don't have ut, it means no third party plugin have been loaded. Check your plugin location.
     
  11. aothman

    aothman Registered

    Joined:
    Oct 2, 2014
    Messages:
    8
    Likes Received:
    2
    I had the same problem, I thought it wasn't working but it actually was. I was just looking for the files in the wrong location. I came across post #4 by 64r which solved my problem: http://isiforums.net/f/showthread.php/18399-Example-Plugin-Rfactor

    In case the link dies; look in C:\Users\your_username\AppData\Local\VirtualStore\ Program Files (x86)\rFactor2

    I don't know if it's the same issue with Windows 8 but worth a look.
     
  12. 64r

    64r Registered

    Joined:
    Jan 16, 2012
    Messages:
    191
    Likes Received:
    35
    I just had the same issue with the latest build and it was a permissions issue. Even though I am an Administrator of the machine, I could not get the example plugin to write the file data. When I ran the Launcher as Administrator the plugin worked and created the example files. I then when to C:\Program Files (x86) and changed the permissions on the rFactor2 folder so that the "Users" permission were all set to "Full Access". After changing the folder permissions I can run rFactor2 normally and the example plugin works as expected.

    One issue that was causing me confusion, I already have the DeltaBest and other plugins working without problem, so I thought the issue was with the example plugin. Actually the issue is that the other plugins do not attempt to write files, so they will work normally, it is only the example plugin that writes to a file so the permissions need to allow for that. Hope this helps.
     

Share This Page