Closed billw1 closed 1 year ago
I'm sure its a limitation because the script couldn't know what settings need to be reverted. Although, if you're familiar with mastercomfig's setup, there's a file called game_overrides.cfg which should be used to reset settings when changing classes; however, its not working here. I'm guessing that game_overrides is execed and then loadouts.config.X gets execed.. overriding it.
Using game_overrides.cfg
should work, it gets exec
'd before every class CFG. Reset the loadout.cfg.X
aliases there. That will effectively create a "defeault value", which you can then override in selected class CFGs.
oops, didn't mean to close
Okay thanks. It may be a good idea to direct users to do something like this in their class switch file (game_overrides.cfg) Most people should be using mastercomfig anyway
//default settings
bind mouse1 +attack
bind mouse2 +attack2
bind "MWHEELDOWN" "slot1"
bind "MWHEELUP" "slot2"
bind "MOUSE3" "slot3"
bind "mouse4" "+use_action_slot_item"
bind "mouse5" "+voicerecord"
sensitivity 1.2
viewmodel_fov 72
m_filter 0
cl_crosshair_scale 50
//reset loadout settings on class switch
alias loadouts.cfg.A
alias loadouts.cfg.B
alias loadouts.cfg.C
alias loadouts.cfg.D
without the second block there, the top block will not override commands saved in the loadout.cfg.X aliases. For example if scout.cfg loadouts.cfg.B binds mouse2 to something, it will be applied to every class - at least with my setup (mastercomfig)
Thanks for the input. What seems obvious to me, because I know the internals of the script, might not be so clear to others. I've added a note about resetting the aliases to README (see cd0d9d4). Would you say it's enough or should I be more explicit?
without the second block there, the top block will not override commands saved in the loadout.cfg.X aliases
All the script does in regards to this is calling loadout.cfg.X
when changing to loadout X, what those aliases do is entirely up to you, so this is the expected behavior.
Actually this seems like a good thing to mention in README.
I don't know. to me it seems counter intutive that the same aliases are applied to every class. Why would I ever want my settings from "loadout B" to apply to both soldier and scout. I thought this reset setting would already be in place as part of loadouts.class which we are instructed to put in every class.cfg
Problem is that loadouts.class
needs to call loadout.cfg.X
to apply the settings when changing classes, otherwise you would need to change loadout for that to happen. Resetting them here would break this. I could add something like loadouts.cfg.reset
but that is nothing users can't easily do themselves.
Also technically someone might want to have the same loadout cfg for all classes.
is there a limit on aliases? why not loadouts.cfg.scout.B?
I feel like that would add unnecessary complexity, since same effect is achieved by setting the shared aliases in each class cfg (and that's basically what the script would do to support these new aliases).
What do you think about updated README?
I think you should specify that the aliases need to be reset, not just the settings that were changed
I think most people would assume that the loadout aliases are class specific, since you show them to be this way in the example. If someone follows the example exactly, they will have this medic config on every class.
I think you should specify that the aliases need to be reset, not just the settings that were changed
3acc167
I think most people would assume that the loadout aliases are class specific, since you show them to be this way in the example. If someone follows the example exactly, they will have this medic config on every class.
Most people would probably use them in class specific way (which makes the example relevant), but I don't want to add 36 new loadout.cfg.CLASS.X
aliases for reasons mentioned earlier. Instead I'm trying to explain how they can set it up using the shared aliases. Hopefully the new README will help them do just that.
I have set up the loadout specific settings like the medic example provided but it applies to every class. Is this a bug or limitation? Do I need to "undo" the settings in every other class loadout?