A way to apply Advanced Options changes to all profiles
ryanm798 opened this issue ยท 4 comments
I use a separate profile on each character to use different mounts between them. I often make edits to the advanced options to add new functionalities to the keybinds (summon certain utility mounts, run command to eject passengers, etc), but I want these changes to apply to all my profiles.
I was thinking something like this:
When editing the script, it would only apply to the current profile initially like normal.
Then, if you press "Copy Keybinding [x] to All Profiles", it will copy the script for the current keybind selected in the dropdown (let's call this keybind number "x") on the current profile, iterate over all the profiles and overwrite the script for keybind x on each.
The "Copy All Keybindings to All Profiles" button does the same but for every keybind.
To keep the UI less cluttered, you could leave off the 2nd button and just have the "copy keybinding x" button, and the user will just have to click through each keybind and press the button if they want to copy all of them.
Thanks for that, that's a really good idea.
I'm not actually sure I can do it though, the Ace-3.0 profiles don't make it easy to alter anything but the current profile and if I put in a bug it could easily delete everyone's complete settings which makes me super paranoid.
Something like this might be the best I can hope for, which would still involve cut-and-paste into the 4 but at least would persist. I'm not really sure how it would work though either, if you turned it on would it be on for all profiles or is it per-profile?
I don't have much time for enhancements right now, I got back from vacation and I'm behind on actually playing the game. I'll continue to think about this and see if an idea occurs.
Can you explain how you want this to work? (Assuming the way it works now will continue to be the default.)
I think it's a fine idea, but how do you think it would be done?
TL;DR, I don't know what the "way" is either.
No worries, I understand. As far as editing non-active profiles, could something like this work?:
local currentProfile = LiteMount.db.profiles[LiteMount.db:GetCurrentProfile()]
if currentProfile then
local newKeybinding1 = currentProfile.keybinding1
local profiles = LiteMount.db:GetProfiles()
for _, profileName in ipairs(profiles) do
local profile = LiteMount.db.profiles[profileName]
if profile then
profile.keybinding1 = newKeybinding1
end
end
end
I just used ChatGPT for this, so apologies if it's nonsense.