How to disable plugins?

Discussion in 'Technical & Support' started by Thrindil, Apr 19, 2015.

  1. Thrindil

    Thrindil Registered

    Joined:
    Feb 7, 2014
    Messages:
    131
    Likes Received:
    5
    Is there a quick way to just disable all installed plugins?
    Thanks in advance,
    Thrindil.
     
  2. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    I guess...no. Therefore I`m using Generic Mod Enabler. Very quick install and uninstall of Plugins, just one click.
     
  3. Thrindil

    Thrindil Registered

    Joined:
    Feb 7, 2014
    Messages:
    131
    Likes Received:
    5
    What a shame, there's a disable button needed imo!
    Thanks for the tip by the way, gonna check it out for sure!
     
  4. kro388th

    kro388th Registered

    Joined:
    Jan 10, 2012
    Messages:
    708
    Likes Received:
    50
    The "G" key by default will enable/disable plugins from cockpit !
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    But it's up to the plugin to respond to that; the game keeps calling the various plugin functions regardless. I must admit I've never been sure where the line is between 'hardware plugins' you might want to switch off and plugins that might be considered persistent. I don't think I've made a plugin yet that switches itself off when the game says that input has been hit.
     
  6. Thrindil

    Thrindil Registered

    Joined:
    Feb 7, 2014
    Messages:
    131
    Likes Received:
    5
    "G" doesn't work for trackmap, what I'd like to enable/disable on the go.
     
  7. Thrindil

    Thrindil Registered

    Joined:
    Feb 7, 2014
    Messages:
    131
    Likes Received:
    5
    Tried installing it today, but I couldn't find the proper way to do it.
    Can you explain to me how you installed it and made it work with rFactor 2?
     
  8. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Have you installed the User Data in the same Folder as rF2?

    Pls post the complete Path of your rF2 Installation
     
    Last edited by a moderator: Apr 24, 2015
  9. Thrindil

    Thrindil Registered

    Joined:
    Feb 7, 2014
    Messages:
    131
    Likes Received:
    5
    My root folder is in program files (x86)/rfactor 2
    My Userdata and packages etc are in Documents/rFactor2
     
  10. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    As (i guess) very often posted from others, it`s better to install rFactor2 outside of program files (x86), because of expected problems related to the UAC. The use of GME is very difficult, if the user data folder isn`t in the same path as rf2, if Plugins are using the User Data Folder, too. Like e.g. the Spotter Plugin.

    What you need is, install GME in the rfactor root folder. Make 2 additional Folder: Plugins* and MODS.

    Copy your Plugins into the MODS Folder, but with the complete Folder Structure**, as they have, when they`re installed.

    * this Folder is used by e.g. the TrackMap Plugin

    ** Example for the rf2_Delta_Best Plugin, x64 Version

    Folders in program files (x86)\rfactor 2\MODS: rf2_Delta_Best_x64\Bin64\Plugins\ (here place in the DeltaBest_x64.dll)
     
    Last edited by a moderator: Apr 25, 2015
  11. Thrindil

    Thrindil Registered

    Joined:
    Feb 7, 2014
    Messages:
    131
    Likes Received:
    5
    Thanks a lot!
    Seems to work well, great tip! :D
     
  12. Golanv

    Golanv Registered

    Joined:
    Nov 7, 2012
    Messages:
    1,041
    Likes Received:
    9
    What are the "custom plugin #1, #2 #3 etc..." buttons for in the controller settings for?
     
  13. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    Plugins can define custom controls (by giving them a name, and a very basic configuration like whether it auto-repeats) which then show up in that list for the user to easily assign. The plugin can then ask the game whether that control has been pressed.

    This avoids a plugin having to check for a key/controller input itself, and makes it easier to configure.

    I was having an issue with the previous build duplicating those entries with multiple plugins trying to use the feature, I was told some changes have been made that might have fixed it but I haven't tested it yet.
     
  14. aothman

    aothman Registered

    Joined:
    Oct 2, 2014
    Messages:
    8
    Likes Received:
    2
    Hi Lazza, can you please elaborate on how to do this. I am trying to create a custom control but it is not working for me. I've implemented the InitCustomControl function, set the info.mUntranslatedName element but nothing shows up in the controls assignment list. I'm also not sure how you would set info.mUntranslatedName for each Custom Plugin #1 to Custom Plugin #12? Is there a container that has to be iterated through in order to set each Custom Plugin control? Here's what I have:

    bool ExampleInternalsPlugin::InitCustomControl(CustomControlInfoV01 &info)
    {
    sprintf(info.mUntranslatedName, "Reset");
    info.mRepeat = 0;

    return false;
    }

    I know the function executes because I can print info.mUntranslatedName to the screen after assignment. Any pointers would be greatly appreciated.

    Thanks.
     
  15. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    You need to return true in order for the game to actually use what you've set. You do this for each control you want, and then return false when you're done.

    The simplest way would be to use a static var in the function that you increment and use as an index to know which control to assign (and return true), and then return false when all your controls are done.

    Then you can check for your custom control via CheckHWControl, where the name is prepended by an underscore (so "_Reset" in your example).


    As for the 12 controls, you don't set which ones you use yourself. Multiple plugins can each define a single or multiple controls and they'll replace those entries, probably in an undefined order when you throw in several new plugins but otherwise the first plugin gets the top entry(ies). Up to the user to find the control they want to assign.
     
  16. aothman

    aothman Registered

    Joined:
    Oct 2, 2014
    Messages:
    8
    Likes Received:
    2
    Thanks Lazza, the static var was exactly what I needed. I wasn't sure how to set info.mUntranslatedName only once. I was actually comparing it with control names from CheckHWControl and setting it based on that but I found it wasn't entering the if statement that way:

    bool ExampleInternalsPlugin::InitCustomControl(CustomControlInfoV01 &info)
    {
    if (info.mUntranslatedName == "Custom Plugin #1")
    {
    sprintf(info.mUntranslatedName, "Reset");
    info.mRepeat = 0;

    return true;
    }

    return false;
    }

    So replacing with a static var worked perfectly, thanks again.
     

Share This Page