Raised This Month: $ Target: $400
 0% 

Team Balancer 1.7b6 for CS 1.6 (Ptahhotep)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ymboc
New Member
Join Date: Mar 2004
Old 03-28-2004 , 17:46  
Reply With Quote #1

Quote:
Originally Posted by XAD
...and are therefore not allowed to switch again due to hlds limit.
Has anyone ever looked into a way to override this limit? (Or would doing so re-introduce the spectator exploit?)
__________________
Operator cs.whatthef*ck.ca
ymboc is offline
Pomme
Member
Join Date: Mar 2004
Location: Quebec, Canada
Old 03-28-2004 , 19:27  
Reply With Quote #2

Quote:
Originally Posted by XAD
What do you mean it "has been not switching people"???
I'm talking about the fact that very often PTB says it switch PlayerA with PlayerB but in fact only PlayerA effectively change team, PlayerB stays on the same team thus leading to unbalanced teams.

I think this is related to the fact that the plugin use the menuselect to make a player change his team, wich seems very unreliable.

The same thing happens when PTB says it transfer a player: very often the player does not get transfered he just spawn in the same team he was the last round.

I think EKS was on the good way by using the function cs_set_user_team wich seemed more reliable than menuselect (even if it didnt worked yet). Or the maybe you could borrow the logic from the plugin cs_team by Jonny got his gun.

I said this needed to be urgently fixed (btw I'm not sure if thats english, forgive me ) because in some situation (amx_ptb deadonly off) this can be extremely frustrating for players to loose their gun without a reason (cuz they arent really switched)

I don't think this is related to the HLDS limit you are talking about because it even happens with players that are on the same team for a long time.

Oh and PTB has always worked great for me on 1.5, it only does so since Steam.
Pomme is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 03-29-2004 , 00:58  
Reply With Quote #3

I did find an alternate (and better) way of changing models on players in CS a while back. Basically you can think of it as CS:s internal way of selecting/allowing models for a player: with this way I can only set the four different T models on a T player (it can't set any other models, it goes by an index and if I set a CT index on a T player and vice versa, only a standard T/CT model will appear). CT can have their four models + VIP model.
I just didn't see a reason to implement it yet, but maybe it should just be part of cs_set_user_team, which could take an additional parameter: what model to set player to. I guess this could end up as a couple of enums to use: CS_MODEL_1337, CS_MODEL_URBAN, etc.
Johnny got his gun is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 03-29-2004 , 02:07  
Reply With Quote #4

Quote:
Originally Posted by Pomme
I'm talking about the fact that very often PTB says it switch PlayerA with PlayerB but in fact only PlayerA effectively change team, PlayerB stays on the same team thus leading to unbalanced teams.
OK, so it is "sometimes" that it fails and not "is not working"...

Quote:
Originally Posted by Pomme
The same thing happens when PTB says it transfer a player: very often the player does not get transfered he just spawn in the same team he was the last round.
OK this doesn't make sense as either the logic should work or the player should be stucked in the choose model menu (but of course who knows how Valve code or changes the code)???
Are you sure you have set hlds team parameters to zero (see the ptb.cfg file). You must validate the parameters in the server consol!
Also are you running a 32 maxplayer server??

Quote:
Originally Posted by Pomme
Oh and PTB has always worked great for me on 1.5, it only does so since Steam.
This is true for a lot of plugins and mods as it was stable for a very long time. Nowdays valve changes their code, events, and limitations at every update wich result in less stable plugins as we can test the "shit out of it" and then valve changes hlds or cs code as soon as the plugins is released.

You must remember that most plugins are cheating as we do "hook" on event-chains which are not documented and can change at any time (which they are). Therefore not everything is "fixable" without a lot of extra code which will be even more sensitive to valve's changes. Sometimes, good enough is good enough... or even the "only" working solution long term even if occassional error occurs (not talking about run time errors but functional errors)...

As I posted earlier, the switch logic should test JGHG's logic instead, but remember that the switch team function was a big problem on AMXmod's forum and there were no other solutions published that worked better. If it would be published the switch code would also be changed accordingly (I use this solution but only because there were no better ones without having to use extra AMXmod modules).

/X
XAD is offline
RuSh
Junior Member
Join Date: Feb 2004
Location: Sweden
Old 03-29-2004 , 11:01  
Reply With Quote #5

@Pomme This happens when amx_ptb maxsize is different from your maxplayers settings, remember to add the slots from amx_reservation to amx_ptb maxsize or this strange behavior will occur.

exampel of strange behavior:
amx_reservation 2
maxplayers 18
amx_ptb maxsize 8
RuSh is offline
Pomme
Member
Join Date: Mar 2004
Location: Quebec, Canada
Old 03-29-2004 , 11:35  
Reply With Quote #6

Here is the setting I use in my ptb.cfg:
Code:
mp_autoteambalance 	0
mp_limitteams 		0

// team selection control
amx_ptb limitjoin    on 	// set limits on team joining
amx_ptb limitafter   0		// number of rounds after which teams limiting begins
amx_ptb limitmin     3		// number of minimum players on map for team limiting
amx_ptb maxsize      13		// maximum team size per team
amx_ptb maxdiff      3		// maximum team size difference
amx_ptb autorounds   3		// number of first rounds into match, which allow autojoin only
amx_ptb wtjauto      5		// wtj tries needed to become autojoined
amx_ptb wtjkick      10		// wtj tries needed to become kicked
amx_ptb kick         on		// kick for wtj counts
amx_ptb savewtj      off	// save wtjs to wtj.log

// team balancing actions
amx_ptb switch       on		// switch/transfer players
amx_ptb switchafter  0		// number of rounds after which switching begins
amx_ptb switchmin    3		// number of minimum players on map for switching
amx_ptb switchfreq   1		// relative next possible switch round
amx_ptb playerfreq   5		// relative next possible switch round for player
amx_ptb forceswitch  6		// number of tries after which PTB switches alive, if neccessary
amx_ptb deadonly     on		// switch dead only

// messages
amx_ptb tellwtj      off	// tell about wtj tries
amx_ptb announce     on		// announce team status at beginning of round
amx_ptb sayok        off	// announce team status, if teams are alright
amx_ptb typesay      off	// use HUD messages

// team strength limits
amx_ptb maxstreak    2		// max. allowed team win streak
amx_ptb maxscore     2		// max. allowed team score difference
amx_ptb minrating    1.5	// minimum critical team rating
amx_ptb maxrating    2.0	// maximum critical team rating
amx_ptb superrating  3.0	// super critical team rating
amx_ptb maxincidents 50		// maximum kills + deaths before the score is divided by PTB_SCALEDOWN
amx_ptb scaledown    2		// divisor for kills and deaths, when PTB_MAXINCIDENTS is reached
My server is a 25 slots (sv_maxvisibleplayers 24 using simpleslots.amx by cgcoutanis on the old amx forums so one slot is hidden and always free).

Currently amx_ptb deadonly is On because of the said bug but I'd like to turn it Off when this problem gets fixed.

And to answer XAD yes the chooseteam sometimes stays open on the player but naturally he will choose the same team if he is on the winning team lol

I confirm that mp_autoteambalance and mp_limitteams are set at zero in my server.cfg and I checked that ingame and its ok too.
Pomme is offline
RuSh
Junior Member
Join Date: Feb 2004
Location: Sweden
Old 03-29-2004 , 12:54  
Reply With Quote #7

@Pomme well as i posted earlier your settings is wrong and thats why you have the strange behavior. Please adjust your settings and the problem is gone.
RuSh is offline
XAD
Senior Member
Join Date: Mar 2004
Location: Sweden
Old 03-29-2004 , 13:13  
Reply With Quote #8

Quote:
Originally Posted by Pomme
My server is a 25 slots (sv_maxvisibleplayers 24 using simpleslots.amx by cgcoutanis on the old amx forums so one slot is hidden and always free).
...
And to answer XAD yes the chooseteam sometimes stays open on the player but naturally he will choose the same team if he is on the winning team lol
OK this is a good start (for debugging ).

Next time the chooseteam menu stays open can you try manually choose the "other" team and write down the error message or report if it works. Also I need to know:
- the number of players in each team (especially the targeted team) at the time before the switch or transfer
- if this is a switch or a transfer
- if the player is using VGUI or old menu-style

There is something I would test to change in the code and it's one of the if statements in "doSwitch()" function:
Code:
// don't switch, if both teams are full
if (teamCounts...
Change the "&&" in the if statement to "||" to make sure no team is bigger than your specified "maxsize". The "maxsize" must then be equal or less to the maximum spawnpoints you have for each team.

Unfortenately I can't debug this myself as I don't have such a "big" test server, so I will need your help to do this test.

TIA
/X
XAD is offline
knocker
Senior Member
Join Date: Mar 2004
Old 03-29-2004 , 15:17  
Reply With Quote #9

well, the ptb version from xad runs on my servers since it was published on amx and it NEVER FAILED to switch. unlike the new version from eks which only said that some players have switched the versions from xad always switched people when it said it would do so. thats why i first compiled his WORKING version for me.

i use these settings in my ptb.cfg for two of my 12 players servers:
Quote:
// team selection control
amx_ptb limitjoin on // set limits on team joining
amx_ptb limitafter 0 // number of rounds after which teams limiting begins
amx_ptb limitmin 3 // number of minimum players on map for team limiting
amx_ptb maxsize 7 // maximum team size per team
amx_ptb maxdiff 2 // maximum team size difference
amx_ptb autorounds 0 // number of first rounds into match, which allow autojoin only
amx_ptb wtjauto 3 // wtj tries needed to become autojoined
amx_ptb wtjkick 5 // wtj tries needed to become kicked
amx_ptb kick on // kick for wtj counts
amx_ptb savewtj on // save wtjs to wtj.log

// team balancing actions
amx_ptb switch on // switch/transfer players
amx_ptb switchafter 0 // number of rounds after which switching begins
amx_ptb switchmin 3 // number of minimum players on map for switching
amx_ptb switchfreq 2 // relative next possible switch round
amx_ptb playerfreq 5 // relative next possible switch round for player
amx_ptb forceswitch 3 // number of tries after which PTB switches alive, if neccessary
amx_ptb deadonly on // switch dead only

// messages
amx_ptb tellwtj on // tell about wtj tries
amx_ptb announce off // announce team status at beginning of round
amx_ptb sayok off // announce team status, if teams are alright
amx_ptb typesay off // use HUD messages

// team strength limits
amx_ptb maxstreak 2 // max. allowed team win streak
amx_ptb maxscore 2 // max. allowed team score difference
amx_ptb minrating 1.5 // minimum critical team rating
amx_ptb maxrating 2.0 // maximum critical team rating
amx_ptb superrating 3.0 // super critical team rating
amx_ptb maxincidents 50 // maximum kills + deaths before the score is divided by PTB_SCALEDOWN
amx_ptb scaledown 2 // divisor for kills and deaths, when PTB_MAXINCIDENTS is reached
i hope i could help you ...
knocker is offline
Send a message via ICQ to knocker
Nalled
Junior Member
Join Date: Mar 2004
Old 03-29-2004 , 20:14  
Reply With Quote #10

Quote:
Originally Posted by RuSh
@Pomme This happens when amx_ptb maxsize is different from your maxplayers settings, remember to add the slots from amx_reservation to amx_ptb maxsize or this strange behavior will occur.

exampel of strange behavior:
amx_reservation 2
maxplayers 18
amx_ptb maxsize 8
I did it like you said, and like you said the problem was gone *weeeee*

But now I have a different one "Both Teams Are Full, can't switch" when the server is full.
Nalled is offline
Reply


Thread Tools
Display Modes

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 20:21.


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