wrxxy
Registered
Tygernoot;435071]Alrighty, I have largely rewritten the plugin, all looking good. I didn't try it out yet, I likely need to debug it a bit (knowing myself)
- The "/setmass" commands are sent every session switch
- The welcome text is sent every session if the "SendWelcomeTextEverySession" is set to true in the JSON file
- All welcome text messages and "/setmass" commands are sent with a 3 second delay after the driver joining the server (or session switch) to avoid that ISI bug
- This is what the JSON file looks like now (one file per user/server/profile):
- The JSON file is reloaded every session switch, so if you make updates to the file, those changes will be loaded automatically the next session. If you would like this to happen more often, I can reload the file every minute or so instead.Code:{ "DriverMassOptions": { "DriverX": 15, "DriverY": 25, "DriverZ": 10 }, "WelcomeText": [ "Line1", "Line2", "Etc" ], "SendWelcomeTextEverySession": true }
Once at the start of a session is enough as it may cause problems otherwise.....
- I didn't add the different weights per session yet as per wrxxy's request. I will do that in the next iteration. I just need to think how best to represent this in the JSON file, without it getting too confusing to set up. Probably best to have one "default" weight, used for all sessions, which can then be overridden by specifying a different weight for a particular session. Something like this:
Code:{ "DriverMassOptions_Default": { // used for all sessions except when overridden "DriverX": 15, "DriverY": 25, "DriverZ": 10 }, "DriverMassOptions_Qualifying": { // overrides default settings for qualifying "DriverX": 30, "DriverY": 5 }, "WelcomeText": [ "Line1", "Line2", "Etc" ], "SendWelcomeTextEverySession": true }
Is there a way to clear all weights in a particular session??
Regards