bakkesmodorg / BakkesModSDK

The current BakkesModSDK (Unofficial SDK for Rocket League)
http://bakkesmod.com
223 stars 49 forks source link

Feature Request: option for python script to also copy the custom setting file(s) #12

Closed JonasDeipenbrock closed 3 years ago

JonasDeipenbrock commented 4 years ago

Would be a small time saver for all the people working with git, especially when working with multiple setting tabs.

CinderBlocc commented 3 years ago

Since it isn't guaranteed that someone will have a custom .set file in their project/solution directories, I don't think we'll add something like this to the python patch script. You have a couple options though:

  1. Edit the .set files directly in the /plugins/settings/ folder
  2. Have your plugin code generate the settings file using the new std::filesystem::path methods that come with GameWrapper (requires C++17)
    std::ofstream YourFile(gameWrapper->GetBakkesModPath() / "plugins" / "settings" / "YourFile.set");

    Since you're using git, option 2 might work better. For example, in my RotationTrainer plugin, I generate the settings file when the plugin loads. OnLoad: https://github.com/CinderBlocc/RotationTrainer/blob/main/RotationTrainer/Plugin/RotationTrainer.cpp#L51 Generator: https://github.com/CinderBlocc/RotationTrainer/blob/main/RotationTrainer/Plugin/SettingsFileGenerator.cpp