Fortress Forever

Go Back   Fortress Forever > Community > General Discussion

Closed Thread
 
Thread Tools Display Modes
Old 12-08-2008, 05:49 AM   #1
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
Auto Team Balance - Help!

I'm working on a SourceMod plugin that will auto balance the teams and need some suggestions and help with maps with team limits (ex: Hunted).

----------------------------------------------

As of now this is how it's going to work (for maps WITHOUT team limits):

- When Player Connects -
-- If team 'a' has more players than team 'b', team 'b' will get the new player.
-- If teams are even (or more than 2 teams), the losing team will get the player (see formulas below).

- When Player Disconnects -
-- If teams are uneven by more than 1, the most recent player to have connected that is on the greater team will be switched.

----------------------------------------------

As of now this is how it's going to work (for maps WITH team limits, ex: hunted):

- When Player Connects/Disconnects -
-- Really not sure about this yet. Will need a formula to account the teams limit (formula will be called on each team like the one below does). This formula should give the number of players 'x' team should have.

HUNTEDS TEAM LIMIT:
Hunted = 1
Assassins = 7
Bodyguards = 0 (Unlimited)

So the formula will want to make sure there is a player on each team, and the teams with the limits have the fewest players according to the teams limit number.

Example what the formula might output:
Hunted = 1
Assassins = 3
Bodyguards = 10

----------------------------------------------

Formula to check which team needs the most help:
Note: FP = Fortress Points:
Note2: The FP and K/D is teams total:

Total = RoundFloat(((FP - (FP * 0.4 * 2)) + (Kills * 12) - (Deaths * 3)) / 5)

This formula will be called for each team:
Blue = RoundFloat(((FP - (FP * 0.4 * 2)) + (Kills * 12) - (Deaths * 3)) / 5)
Red = RoundFloat(((FP - (FP * 0.4 * 2)) + (Kills * 12) - (Deaths * 3)) / 5)
Yellow = RoundFloat(((FP - (FP * 0.4 * 2)) + (Kills * 12) - (Deaths * 3)) / 5)
Green = RoundFloat(((FP - (FP * 0.4 * 2)) + (Kills * 12) - (Deaths * 3)) / 5)

Example:
Blue = 500
Red = 400
Yellow = 300
Green = 200

-Green gets the player.
hlstriker is offline  


Old 12-08-2008, 08:18 AM   #2
Too.Stoned
German fag since 80´s
 
Too.Stoned's Avatar
 
Join Date: Dec 2007
Location: localhost
Class/Position: Annoying u with O Scout
Gametype: ctf
Affiliations: zE Palace ; ´mE
Posts Rated Helpful 0 Times
Send a message via MSN to Too.Stoned
Yeah, i see it everyday when we play 11 vs 5 a.e.

But in the past i saw a Server with an autobalance-plugin, theres one out...
Too.Stoned is offline  


Old 12-08-2008, 02:08 PM   #3
KubeDawg
Nade Whore
Server Owner
Beta Tester
 
KubeDawg's Avatar
 
Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier
Gametype: CTF/TDM
Affiliations: blunt. Moto
Posts Rated Helpful 128 Times
Quote:
Originally Posted by Too.Stoned
Yeah, i see it everyday when we play 11 vs 5 a.e.

But in the past i saw a Server with an autobalance-plugin, theres one out...
that he also created. This new one will be a lot better. And basically what he means by this: -- If teams are even (or more than 2 teams), the losing team will get the player (see formulas below).

Is an option for admins to choose the formula in which people are put on teams. You can either set it so the player can choose sides if 2 or more teams are even, and in need of a player, or have the fortress points decide; the player going to the team with the lowest fortress points.

As far as what a player sees visually when he/she is being transferred, a message would display saying they have an X amount of time to switch, or on next death, whichever comes first.
__________________
Moto's Funhouse | Dallas, TX - 74.91.114.247:27015

ff_plunder - Complete
KubeDawg is offline  


Old 12-08-2008, 02:38 PM   #4
mervaka
A Very Sound Guy!
Fortress Forever Staff
 
mervaka's Avatar
 
Join Date: May 2005
Location: UK
Posts Rated Helpful 15 Times
you know fortress points already account for kills?
mervaka is offline  


Old 12-08-2008, 04:10 PM   #5
KubeDawg
Nade Whore
Server Owner
Beta Tester
 
KubeDawg's Avatar
 
Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier
Gametype: CTF/TDM
Affiliations: blunt. Moto
Posts Rated Helpful 128 Times
Yep, and they also account for caps and other things as well.
__________________
Moto's Funhouse | Dallas, TX - 74.91.114.247:27015

ff_plunder - Complete

Last edited by KubeDawg; 12-08-2008 at 04:17 PM.
KubeDawg is offline  


Old 12-08-2008, 04:26 PM   #6
PartialSchism
Keep On Keepin' On
 
PartialSchism's Avatar
 
Join Date: Feb 2008
Location: Mississippi
Class/Position: Offense
Gametype: Fun
Affiliations: I'm bad at FF, and my customs suck
Posts Rated Helpful 0 Times
Send a message via AIM to PartialSchism
Quote:
Originally Posted by Too.Stoned
Yeah, i see it everyday when we play 11 vs 5 [AE]
This right here. When I'm in I try to keep it even. I would rather not kick them, but from now on when I say "Even the goddamn teams" if they don't get even I guess I'll just have to regulate on some poor bastards on the stacked team. Then maybe next-time they will even the teams on their own.

Good work so far hlstriker. Not much for formula myself so just check and see if E = mc² works.
PartialSchism is offline  


Old 12-08-2008, 09:03 PM   #7
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
I just installed a plugin to switch people around. Someone unevens teams, I sent them back. Though its buggy if I send them to spec. The player model goes invisible and there's a floating gun
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline  


Old 10-05-2009, 12:10 PM   #8
gibz
Title title title title
 
gibz's Avatar
 
Join Date: Jun 2009
Location: VA
Class/Position: Medic O, Soldier D
Gametype: CTF, Water Battle
Affiliations: :e0: and n-t
Posts Rated Helpful 0 Times
Dear god this plugin needs to be in FF.
__________________
gibz is offline  


Old 10-05-2009, 09:11 PM   #9
Gwarsbane
Slayer of humans
D&A Member
 
Gwarsbane's Avatar
 
Join Date: Sep 2007
Location: Mostly on earth though in some alt dimensions
Class/Position: I'm an Offensive Defensive person
Gametype: Fortress Forever
Affiliations: I'm a merc, only thing that talks is money
Posts Rated Helpful 3 Times
Yes this is something that is very badly needed. There are many times I have seen teams of 11 vs 5 or stuff like that.



I would also suggest having it so that it removes the team selection options when teams are even or even just off by one. This would stop people from switching teams just for the heck of it or to cause problems, because if the person is last person in, and Team A has one more person then Team B and he switches from B to A, then the auto thing kicks in and switches him back, then he switches back... you could have a never ending loop which would not just be annoying to players but could crash the server.

If you are on a team with less people I would also suggest that the switching options are removed.

If someone is in spec mode, and teams are even then they should be able to choose one of the teams or just hit auto select. If the teams are off by 1 then they should only be able to auto select or choose the team with the lesser number.
Gwarsbane is offline  


Old 10-06-2009, 10:45 AM   #10
Scuzzy
D&A Member
Retired FF Staff
 
Scuzzy's Avatar
 
Join Date: Mar 2007
Location: Server: 206.217.134.170:27016
Posts Rated Helpful 2 Times
Just make hunted type maps a percentage cvar, allow the server mods to choose the ratio of defenders to snipers. Other then that the other SourceMod plugins should give you the good guidelines:

Find a dead player in the following order:
If he is an admin, skip him
If he has been switched before, skip him
If he has a buddy and is on the same team, skip him
If he has a buddy and is not on the same team, switch him
If has buildings built, skip him
If he is just a regular dead player, switch him
Find a living player in the following order:
If he is an admin, skip him.
If he has been switched before, skip him
If he has buildings built, skip him
If he has a buddy and is on the same team, skip him
If he has a buddy and is not on the same team, switch him
If he is just a regular live player, switch him
If the plugin still cannot find a player to switch, it will get a random non admin player, and switch him after the delay.
__________________
"Player Quality, not Quantity, is what we strive for." - The LLama Wrangler
"A clan is defined by the nature of it's enemies. - The Llama Wrangler
Scuzzy is offline  


Old 10-06-2009, 05:45 PM   #11
Hawk Eye
Who the fuck is this guy?
D&A Member
Beta Tester
 
Hawk Eye's Avatar
 
Join Date: Mar 2007
Class/Position: O Preferred
Gametype: AvD
Affiliations: [AE] Asseaters
Posts Rated Helpful 2 Times
That step-by-step idea might work, but there's a big stumbling block. How does the script / plugin decide who is friends of whom?

Would it look for clan tags, or perhaps having an additional function where players can input who their preferred teammates are?

The main issue I have with not switching players with friends, however, is stacked teams. In games with a large skill factor, you don't need an 11v5 scenario for one team to dominate. Hell, in a pub environment it's possible for that 5 to be winning. The plugin/script would need to take into consideration Fortress Points as well to counter this...


Also: being able to read a few lines from the map's LUA file could be worth looking into. i.e. there is more than just the hunted oddball to throw calculations off- there are the odd 4 teams maps as well, etc.

</mindvomit>
Hawk Eye is offline  


Old 10-06-2009, 10:32 PM   #12
Scuzzy
D&A Member
Retired FF Staff
 
Scuzzy's Avatar
 
Join Date: Mar 2007
Location: Server: 206.217.134.170:27016
Posts Rated Helpful 2 Times
It's an existing plugin, you can set who your buddies are.
__________________
"Player Quality, not Quantity, is what we strive for." - The LLama Wrangler
"A clan is defined by the nature of it's enemies. - The Llama Wrangler
Scuzzy is offline  


Old 10-07-2009, 01:58 AM   #13
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
Just so everyone knows, this was a plugin I was working on last year that I finished. Somebodys server (:e0: maybe?) was running the plugin for testing before I released it and during that time my harddrive crashed before I got a chance to release it. So, the source is lost and I think whatever server had it is down now (which means the plugin is probably gone for good).

I'm also not going to remake it. This thread can probably be closed unless people are having other discussions.
hlstriker is offline  


Old 10-07-2009, 02:06 AM   #14
Hawk Eye
Who the fuck is this guy?
D&A Member
Beta Tester
 
Hawk Eye's Avatar
 
Join Date: Mar 2007
Class/Position: O Preferred
Gametype: AvD
Affiliations: [AE] Asseaters
Posts Rated Helpful 2 Times
Oh hey. 'sup post dates.
Hawk Eye is offline  


Old 10-07-2009, 05:06 AM   #15
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
Yeah I had it on the e0 server but I lost all the plugins when I stop paying for it
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline  


Old 10-07-2009, 05:14 AM   #16
[AE] 82694
Retired FF Staff
 
[AE] 82694's Avatar
 
Join Date: Mar 2007
Posts Rated Helpful 0 Times
Quote:
Originally Posted by hlstriker View Post
Just so everyone knows, this was a plugin I was working on last year that I finished. Somebodys server (:e0: maybe?) was running the plugin for testing before I released it and during that time my harddrive crashed before I got a chance to release it. So, the source is lost and I think whatever server had it is down now (which means the plugin is probably gone for good).

I'm also not going to remake it. This thread can probably be closed unless people are having other discussions.
You can lock things now hlstriker. But since it was your thread and you requested it.
__________________
I Love GenghisTron . I miss you sooooo Much. LOL.
[AE] 82694 is offline  


Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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. The time now is 01:20 PM.


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