hi,
what exactly is the settings library for? and how would we go about using it?
thanks a bunch
Settings library questions
Currently it is not fully functional. We still need to implement the menus for users to select/change their values. I will update the wiki pages in a few, but the basic jist is as follows.
The settings library is designed to allow user specific settings for plugins. The way this works is twofold.
When a player joins the server, they can use the commands setup in the core_settings.ini's USER_SETTINGS section to bring up the user settings menu. Any plugin that is currently loaded that contains a settings.player.PlayerSettings instance will have a sub-menu within the user settings menu. All settings for the chosen plugin are then listed (with "sections" having their own sub-menus, as well, within the plugin's sub-menu) in their own menu. The user can then change their value for a specific setting (this is the part that is currently not implemented).
To allow users to automatically use the exact same settings on any server that uses a specific plugin, the settings package also checks for the client variables that correspond to the settings registered for the plugin. This is actually done prior to checking the local database when called by the script itself. For instance, once GunGame is finally written, it will include many user settings. If a player frequents many different servers that use Source.Python's GunGame plugin, it would be worth it for them to use client variables so that they don't have to setup their settings on each and every server individually.
To create client variables, you just need to use the "setinfo" command in any config file on your client that gets executed prior to or when joining a server.
The database itself is only saved on server_spawn (map change). Saving too often would eventually cause lag issues that should be avoided.
I do have a few plugins that utilize this functionality, but they still need some work before I upload them. I even have one plugin that is just an advert showing players what the say/client commands are to change their user settings on the server. That plugin even has its own user settings
You can already utilize the client variables with this implementation. Only the menus to set/change local settings need added, which is why that portion of this does not currently work.
The settings library is designed to allow user specific settings for plugins. The way this works is twofold.
When a player joins the server, they can use the commands setup in the core_settings.ini's USER_SETTINGS section to bring up the user settings menu. Any plugin that is currently loaded that contains a settings.player.PlayerSettings instance will have a sub-menu within the user settings menu. All settings for the chosen plugin are then listed (with "sections" having their own sub-menus, as well, within the plugin's sub-menu) in their own menu. The user can then change their value for a specific setting (this is the part that is currently not implemented).
To allow users to automatically use the exact same settings on any server that uses a specific plugin, the settings package also checks for the client variables that correspond to the settings registered for the plugin. This is actually done prior to checking the local database when called by the script itself. For instance, once GunGame is finally written, it will include many user settings. If a player frequents many different servers that use Source.Python's GunGame plugin, it would be worth it for them to use client variables so that they don't have to setup their settings on each and every server individually.
To create client variables, you just need to use the "setinfo" command in any config file on your client that gets executed prior to or when joining a server.
The database itself is only saved on server_spawn (map change). Saving too often would eventually cause lag issues that should be avoided.
I do have a few plugins that utilize this functionality, but they still need some work before I upload them. I even have one plugin that is just an advert showing players what the say/client commands are to change their user settings on the server. That plugin even has its own user settings

You can already utilize the client variables with this implementation. Only the menus to set/change local settings need added, which is why that portion of this does not currently work.
Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 166 guests