Raised This Month: $32 Target: $400
 8% 

[PAID REQUEST][TF2] "Group Class Limit" plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MadameMimsy
Junior Member
Join Date: Sep 2022
Old 09-08-2022 , 02:07   [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #1

Hi all, great forum!

I'm wanting to create a TF2 community and one of my biggest concerns is around class balancing for the betterment of game play, and fostering player skill by encouraging players to try other classes. I've researched various plugins here already (class limiter, ban players from classes, temp blocking players from classes based off skill, etc) but haven't found any that match my desired use case.

Here is the idea:

Assign any number of classes to a "Class group", then have a limit for how many players are allowed in that group. For example, put Spy, Sniper, and Scout into a "Class group", then enforce a limit of "5" for that group. The result is that you can have 5 Snipers, but 0 Spy and 0 Scout. Or 2 Scout, 2 Spy, and 1 Sniper, and no more players allowed to join that "Class Group" until #players in that group < 5.

The desire is to combo the above idea with existing class limit plugins, the ultimate goal being something like "Class Group limit" of 5 and individual class limits within that group, e.g. "3". Using the above example again, the class distributions could be...

3-1-1
3-2-0
2-2-1

..but NOT 4-0-1 and NOT 5-0-0 ("Class group is 5 but class limit is 3", so 4+ of any single class is not possible).

Does this "Class Group Limit" plugin exist somewhere already or is it even a possibility?

Thank you.

Last edited by MadameMimsy; 09-14-2022 at 18:25.
MadameMimsy is offline
MadameMimsy
Junior Member
Join Date: Sep 2022
Old 09-14-2022 , 18:25   Re: [TF2] "Group Class Limit" plugin?
Reply With Quote #2

Okay, let's try this again

I have updated the thread to [Request] and [PAID] status.

25 USD to whoever finds me the solution!
MadameMimsy is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-16-2022 , 07:26   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #3

I don't know have you already got that plugin for your needs.

But, I try to do similiar plugin, depends do I have free time.
And I don't take money of these, I just make for fun.

When you see and get plugin example of mine, and it satisfy you, you can donate that 6$ to AlliedModders (You get donor access) if you like.
https://www.sourcemod.net/donate.php
__________________
Do not Private Message @me

Last edited by Bacardi; 09-16-2022 at 07:27.
Bacardi is offline
MadameMimsy
Junior Member
Join Date: Sep 2022
Old 09-16-2022 , 17:20   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #4

Quote:
Originally Posted by Bacardi View Post
I don't know have you already got that plugin for your needs.

But, I try to do similiar plugin, depends do I have free time.
And I don't take money of these, I just make for fun.

When you see and get plugin example of mine, and it satisfy you, you can donate that 6$ to AlliedModders (You get donor access) if you like.
https://www.sourcemod.net/donate.php
Yes sir! Thank you!
MadameMimsy is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-17-2022 , 18:21   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #5

Code:
"classgroups"
{
	"cg_example_A"
	{
		"class_red"
		{
			"total"		"5"
			"sniper"	"3"
			"spy"		"-1"
			"scout"		"-1"
		}
		"class_blue"
		{
			"total"		"5"
			"sniper"	"3"
			"spy"		"-1"
			"scout"		"-1"
		}
	}
}
- This plugin restrict only human players, not bots.
- Plugin rule player "joinclass" command, will it allow command to pass or blocking it.
- Whenever plugin block player joinclass command, it bring up choose-class panel
Also kill player, set player class to unknow. (I made this part simple and try avoid in game glitches)
- joinclass auto, joinclass random would not work anymore when this plugin loaded.


In configure file
Code:
addons\sourcemod\configs\tf2_classgroup_cfg.txt
...you can make many different class-groups.
Inside class-group, you set team and list all class types what you want control.
- Only one of class groups can be use at time.

On top of this post, you see configure, in both teams:
- group have max. players 5 ("total"), when this limit is reached, class types included in group are restricted.
- class type "sniper" is limited max. players 3

Plugin count now only human players.
- If you want include bots in player count, add in team section: "include_bots_in_player_count" "true"
- again, plugin not restrict class types from bots!

There is file example.tf2_classgroup_cfg.txt were you see more class group examples

Plugin server command (not cvar):
Code:
sm_tf2_setclassgroup // print current class group name
sm_tf2_setclassgroup cg_example_A // set class group name, set this command line in server.cfg for example


Click image for larger version

Name:	classgrouptf2.jpg
Views:	63
Size:	95.5 KB
ID:	196935

anyway, test it. How this work.
Attached Files
File Type: zip tf_classgroup_restrict_test.zip (10.2 KB, 24 views)
__________________
Do not Private Message @me
Bacardi is offline
MadameMimsy
Junior Member
Join Date: Sep 2022
Old 09-18-2022 , 19:00   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #6

Quote:
Originally Posted by Bacardi View Post
Code:
"classgroups"
{
	"cg_example_A"
	{
		"class_red"
		{
			"total"		"5"
			"sniper"	"3"
			"spy"		"-1"
			"scout"		"-1"
		}
		"class_blue"
		{
			"total"		"5"
			"sniper"	"3"
			"spy"		"-1"
			"scout"		"-1"
		}
	}
}
- This plugin restrict only human players, not bots.
- Plugin rule player "joinclass" command, will it allow command to pass or blocking it.
- Whenever plugin block player joinclass command, it bring up choose-class panel
Also kill player, set player class to unknow. (I made this part simple and try avoid in game glitches)
- joinclass auto, joinclass random would not work anymore when this plugin loaded.


In configure file
Code:
addons\sourcemod\configs\tf2_classgroup_cfg.txt
...you can make many different class-groups.
Inside class-group, you set team and list all class types what you want control.
- Only one of class groups can be use at time.

On top of this post, you see configure, in both teams:
- group have max. players 5 ("total"), when this limit is reached, class types included in group are restricted.
- class type "sniper" is limited max. players 3

Plugin count now only human players.
- If you want include bots in player count, add in team section: "include_bots_in_player_count" "true"
- again, plugin not restrict class types from bots!

There is file example.tf2_classgroup_cfg.txt were you see more class group examples

Plugin server command (not cvar):
Code:
sm_tf2_setclassgroup // print current class group name
sm_tf2_setclassgroup cg_example_A // set class group name, set this command line in server.cfg for example


Attachment 196935

anyway, test it. How this work.

Wow, that was quick! I'm away from home so I won't be able to test it for a couple days but I've donated to AlliedModders via Paypal at your request! I sent this message:

"Donation by MadameMimsy on behalf of the veteran member Bacardi. Please grant Bacardi whatever benefits the donation instead of me."

I will update the thread when I get the chance to test the plugin. Thank you so much!
MadameMimsy is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-18-2022 , 21:09   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #7

...just try plugin first. I don't know ould it work like should
__________________
Do not Private Message @me
Bacardi is offline
MadameMimsy
Junior Member
Join Date: Sep 2022
Old 09-22-2022 , 00:34   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #8

Quote:
Originally Posted by Bacardi View Post
...just try plugin first. I don't know ould it work like should
Oh I already donated in your name when I said I did

I tested the plugin today and it works fantastically; very impressive work! I will list what I've tested and then one additional functionality I'd appreciate if it were added.

Here's the starting config I used:

"classgroups"
{
"Assassins"
{
"class_red"
{
"total" "0"
"sniper" "0"
"spy" "0"
"scout" "1"
}
"class_blue"
{
"total" "1"
"sniper" "0"
"spy" "1"
"scout" "1"
}
}

- Red team was unable to select sniper, spy, and scout --> GOOD RESULT!
- Blue team was only able to select scout or spy, and sniper was restricted --> GOOD RESULT!
- Blue team could only have maximum 1 scout OR spy on the team --> GOOD RESULT!
- Was able to update and switch between the defined classgroups live using the SM commands as you provided --> GOOD RESULT!

- Class and classgroup limits can be violated when users switch between teams. --> SEE BELOW EXPLANATION

Example: Blue team Spy switched to Red team; neither the class or group limit restricted this action. HOWEVER, when the user clicked on any class at the selection screen (even spy), the limits then took effect and the user was kicked off spy. I'm not sure if this was your intended design but I like the behaviour as it guarantees compatibility between other class related plugins --> GOOD RESULT!


Additional request:
- Is there a way to have multiple 'classgroups' in effect at the same time? So "cg_example_A", "cg_example_B", "cg_example_C" all in effect simultaneously?

I already appreciate the work you've done so I don't want to pressure you in any way, but I will donate additional money in your name for any additional work you do! If you decide to add the additional feature, please take your time in developing it; I don't want to rush you either. I can wait if you don't feel like doing anything right away.
MadameMimsy is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-22-2022 , 09:52   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #9

Quote:
#5
Here is version, what check player class when change team.
- I have not test much.
Attached Files
File Type: sp Get Plugin or Get Source (tf2_classgroup_restrict.sp - 36 views - 6.9 KB)
__________________
Do not Private Message @me
Bacardi is offline
MadameMimsy
Junior Member
Join Date: Sep 2022
Old 09-25-2022 , 01:58   Re: [PAID REQUEST][TF2] "Group Class Limit" plugin?
Reply With Quote #10

Quote:
Originally Posted by Bacardi View Post
Here is version, what check player class when change team.
- I have not test much.
Hello again kind sir!

I tested the newest version and the new functionality works as expected. I re-ran all of the previous test scenarios and then also these two:

- Blue Scout attempts to join Red while Red has a "0" total set --> the player is kicked off Scout and brought to the class selection screen --> Result GOOD
- Red Scout attempts to join Blue while Blue has a "0" defined for Scout class --> the player is kicked off Scout and brought to the class selection screen --> Result GOOD

I've also donated another 10 USD in your name and asked for you to receive all the benefits again

So far I'm very happy with the plugin, thank you! As I mentioned before, if it's possible to have multiple "classgroups" active/in effect simultaneously, that'd make me ecstatic and will donate even more in your name (or directly to you if you like). Also like I mentioned before, don't feel pressured to continue if you don't want to. I'm already very happy as is (...but would die from happiness if the last piece of functionality was built!)

Last edited by MadameMimsy; 09-25-2022 at 02:00.
MadameMimsy is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode