Fortress Forever

Go Back   Fortress Forever > Projects > Fortress Forever > Feature

Team switch prevention if it would cause the team to become uneven Issue Tools
issueid=441 06-22-2014 05:56 PM
Nade Whore
Team switch prevention if it would cause the team to become uneven

I don't think it's an unrealistic request that this be a native feature in Fortress Forever.

Currently, players can choose whatever team they want, regardless of how stacked they are. FF needs a feature that prevents someone from choosing a team that would cause the team to be stacked. I think I previously made a thread about an autobalance feature, but that is actually not necessary.

It would need to work for all 4 teams and would need the ability to disable it for skill maps and the like.

Examples:
Blue has 2 people.
Red has 1 person.

Someone joins the server and tries to choose Blue. It should prevent them from stacking it further.

Blue has 1 person.
Red has 1 person.
Yellow and Green have no people.

Someone who joins the server should have to choose Yellow and Green team before another can be added to Blue or Red.

Blue has 1 person.
Red has 1 person.

The person on Red team should be prevented from switching to Blue.
Issue Details
Issue Type Feature
Project Fortress Forever
Category General Game
Status Suggested
Priority 1 - Highest
Suggested Version 2.46
Implemented Version (none)
Votes for this feature 2
Votes against this feature 1
Assigned Users (none)
Tags (none)

06-23-2014 05:27 AM
I like to spam binds
 
Can this be specified in the lua?
Reply
06-23-2014 07:11 AM
internet user
 
i dont think lua has team player count but i may be wrong
Reply
07-14-2014 01:47 PM
worst ff player eu
 
This is a bit late, but that's mainly because I forgot about it and/or was working very hard on it.

Here's a little Lua script you should place in maps/globalscripts/ and use sv_globalluascript to run, which will disable joining a team that has 1 (can be changed) player count more than other teams. ( It takes into account the team the player was on before, so you can't join the other team to unbalance by 2 if playercounts are even. )
If a team has 0 players, the team is counted as not existing. ( For some reason, there is no GetPlayerLimit, only a SetPlayerLimit, meaning any global script that is based on player count only works fully for either 2, 3 or 4 teams. The only way of getting around this is classing 0 player teams as disabled. )
This means a team could be infinitely unbalanced so 20 players are on Red and none are on Blue, but only if no-one joins Blue.
Another thing to bear in mind is it doesn't shuffle / balance teams, it just blocks people from joining a team with higher player counts than the others, meaning if someone leaves the game it won't do anything, and it doesn't fix it if somehow a player joins the team without Lua knowing.

drive.google.com/file/d/0B6UpoRQG3AOzYmJCVUhHb2ZKY2c

Bear in mind that I don't fully know whether it will work or not, because I have no friends and so cannot test it out for myself.
( So, probably best to test with others before you stick it on your server. - Also, you'll need to put "USE_AUTOSWITCH = false" at the top of skill map lua's and stuff like it, or some people have to play double so others can play quad and conc. "ez quad, ez lyfe [100-200]" )
Reply
07-14-2014 02:50 PM
Nade Whore
 
Thanks, but Rookie already created a script for my first request and it seems to work well.
Reply
07-16-2014 12:00 PM
worst ff player eu
 
Oh, right.

As I said, I've been doing nothing for ages so I have no idea what's going on any more in FF, lol.
Reply
08-01-2014 06:48 PM
Nade Whore
 
Actually, scratch that. I re-read your script and it seems like what I might want. I'm going to test it today to see if it works.
Reply
08-07-2014 10:32 PM
 
tbh i think this feature shouldprobably be a server side mod/script wahtever.
Reply
08-08-2014 08:48 AM
#FF.Pickup Dictator
 
dumb feature. what if people want to stack SGs together?
Reply
08-08-2014 03:52 PM
Nade Whore
 
Quote:
It would need to work for all 4 teams and would need the ability to disable it for skill maps and the like.
Reply
Reply

All times are GMT. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.