Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added "Pressets" feature! #228

Open
wants to merge 10 commits into
base: dev
Choose a base branch
from
Open

Added "Pressets" feature! #228

wants to merge 10 commits into from

Conversation

kratos1812
Copy link

New players can now load pressets so they dont waste time finding new skins. This can be usefull when you are running this plugin on FFA/SURF/RETAKE servers where the players flow is big(a lot of new players). I personally hate to connect to a new server and have to configure all my weapons al over again. With this feature it would make players' life a lot easier.

Everything is done from the plugin's main menu. No nood to acces the config at all. You can preview the skin from the each presset before applying it.

Now players can load already made inventories for all weapons so they dont waste time finding the best skins.
I will need this in one of my releases soon and I though it was nice to share it.
@yesBad
Copy link

yesBad commented Sep 21, 2021

You most probably wanted to type "presets" and not "pressets" I suggest fixing that atleast :D

@yesBad
Copy link

yesBad commented Sep 22, 2021

Thanks, seems good to me. Atleast I'll be using this 👍

@Shaneajm
Copy link
Contributor

Shaneajm commented Oct 3, 2021

Hey! I'm currently running into an issue where Windows hosts do not load the weapons_presets.cfg config correctly. I have manually edited the file as it's easier than creating them in game. However when I transfer the file I get a 'File is used by another process'. When I stop the server and upload it, it works fine but then when I connect the plugin says there's no presets. Plugin works as expected on Linux. Presets made in-game also disappear after a map change.

Note: I recompiled the plugin changing the write permission from r+ to r and it seems to load the configs fine now. Sounds like a Windows write permissions issue.

@kratos1812
Copy link
Author

Note: I recompiled the plugin changing the write permission from r+ to r and it seems to load the configs fine now. Sounds like a Windows write permissions issue.

Hi, thanks for your help, really usefull. Didn't chaning the permission string from r+ to r broke the "Save Preset" feature as it needs to write to that file?

@Shaneajm
Copy link
Contributor

Shaneajm commented Oct 3, 2021

Hi, thanks for your help, really usefull. Didn't chaning the permission string from r+ to r broke the "Save Preset" feature as it needs to write to that file?

It does break it, however for my use case I found it easier to just set the presets using the config file instead of the menu. It works for me but I know for other users/plugin functionality it isn't the best fix if you want to use the menus.

@kratos1812
Copy link
Author

@Shaneajm I will look into it the following days. For Linux it works good enough.
By the way, mind if you share your presets?

@crashzk
Copy link
Contributor

crashzk commented Oct 5, 2021

Doubt, in this case it would save the skin options chosen by the players, would that be it?

If so, wouldn't it just be using MySQL to sync with all servers?

@kratos1812
Copy link
Author

Doubt, in this case it would save the skin options chosen by the players, would that be it?

If so, wouldn't it just be using MySQL to sync with all servers?

no

@crashzk
Copy link
Contributor

crashzk commented Oct 5, 2021

Would there be any print, video showing how it works? Even your server's IP? I was curious about the functionality.

@kratos1812
Copy link
Author

Would there be any print, video showing how it works? Even your server's IP? I was curious about the functionality.

I will post today on youtube a video showing it how it works.

Now, random skins will be shown as "Random" instead of not showing at all, default skins(with value 0 in config) won't show at all since we don't care about them in a preset.
@kratos1812
Copy link
Author

kratos1812 commented Oct 5, 2021

@crashzk https://youtu.be/jhnpYrm0pFQ - here is a preview
And about @Shaneajm's issue: I didn't have the time these days to even turn on my computer, since most of the server oprerators use Linux and not Windows, and as you said it was easier for you to manage your presets, I won't prioritise this in the next 1-2 weeks, I apologize for this.

@crashzk
Copy link
Contributor

crashzk commented Oct 5, 2021

Now yes, it would be skin collection, right?

Player creates your collection after just going and selecting it, would that be it?

If you're going to enjoy it, something really well appreciated, I've even thought about using it as a web interface, the user enters the site and creates their own collection, or the server owner creates skin collections and leaves it as an option to choose. Or even the player himself chooses his skins manually, all through the site.

@kratos1812
Copy link
Author

kratos1812 commented Oct 5, 2021

Player creates your collection after just going and selecting it, would that be it?

You can restrict the ability to create a preset to admin only https://github.com/kgns/weapons/pull/228/files#diff-e2120f99c80c8f2365fc445adae1095a2b856b64a4242924991a155912faad82R96. When you save/create a preset, your inventory/selections are saved in a new preset, thats basically it.

I've even thought about using it as a web interface

nobody would use that web interface, this is meant for quick skin selection that allows you to get some nice skins without wasting time in menus

@kratos1812
Copy link
Author

@Shaneajm fixed your issue.

@crashzk
Copy link
Contributor

crashzk commented Nov 24, 2021

@kratos1812 could you fix the conflicts you have with the master branch?

@kgns would it be possible to merge this change into the plugin?

Some players came asking for it, kind of having a skin kit already made and they just chose it and that's it, professional players' skin kit and such.

@kgns kgns changed the base branch from master to dev January 21, 2022 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants