Forum

> > CS2D > Scripts > matchmaking script
Forums overviewCS2D overview Scripts overviewLog in to reply

English matchmaking script

24 replies
Page
To the start Previous 1 2 Next To the start

moved matchmaking script

tontonEd
User Off Offline

Quote
Last month I have started a project with Error (pcs head admin) , which is basically a matchmaking script.
that's the copy/past of the text I wrote on pcs, I would add that a "mix" is simply a competitive match usually 5v5 with a defined number of rounds.
also the "sub system" is when someone leave the mix, he ask for a substitute, that's what sub mean.

the main goal of the script is about gaining time;
by continuing playing in public until the mix is ready, and then being rerouted to play the mix and also by letting the script make automatics and fair teams.

The script operation have to be easy with a graphic interface.
A player will be able propose a mix with differents parametters (map, number of rounds etc .. ) and others will be able to register for the differents mixs.
Once a mix got his required nomber of players, all the registered are rerouted and the mix can begin.
Teams are made on a new rank system certainly based (still not implemented) on domages/rounds/number of rounds played.
At the end of the mix the script save usefull data for ranks.

That's suppose an huge project, with data exchange from the differents pcs plateform (mix serv, public, cs2d.net) so, for the moment we are focused on having this script working only on the mix server.


What have been done so far :
-Create a mix
-Register for a mix
-List of Mixs
-Make teams based on ranks
-Graphic interface
-ChooseSide round (test needed)
-Knife round
-Switch teams (test needed)

What have to be done :
-the sub system
-create rank system
-ugrade menu - create mix - map

I am working alone for the moment on the project, so if you are interrested please I need your help.
I mainly need coders (meeting on ts is possible)
but also testers, and a server.

here is the project :
https://github.com/edwinmrtn/pcs_mixmatch/

old Re: matchmaking script

GeoB99
Moderator Off Offline

Quote
That sounds amazing! This script will be quite useful for competitive servers. I remember somewhere user Yates telling that he and user EngiN33R will work in this project although I dunno the recent status of it. Nevermind, good luck at this project and receiving some coders to help you.

P.S: Also, I can say safely that this thread should be on Scripts section instead of General so I shall move it.

old Re: matchmaking script

_Yank
User Off Offline

Quote
Why didn't you make it as a separate program (just like SAMP's serverlist) ? I think it would be more stable and comfortable that way.

old Re: matchmaking script

tontonEd
User Off Offline

Quote
@user _Yank: I'm not sure I did understand what do you mean with a separate program?

The machtmaking script have two big part :
- Create/Register mix for players
- Run the mix (Create Teams/knife round/choose side/side1/side2/save data)

I suppose you talk about having a separate program for the 1st part?

I haven't though about that, and there is few adventages, but too many inconveniant, that I can manage easly with the lua's game;
like the case where a baduser would use the tool to register in a mix and don't show up in game (while being anonymous since the tool coundnt use usgn accounds).

old Re: matchmaking script

_Yank
User Off Offline

Quote
@user tontonEd: The user would be forced to join the game because as soon as the mix started, CS2D would open and automatically connect to the server. But yeah, I guess the only problem is USGN login.

old Re: matchmaking script

GeoB99
Moderator Off Offline

Quote
You're planning to implement in the matchmaking script MM cooldowns like in CS:GO, for example if someone leaves the competitive match and doesn't re-join in the match back he will get a MM cooldown for X hours/days?

old Re: matchmaking script

tontonEd
User Off Offline

Quote
@user VADemon: fixed

@user GeoB99: yes, if a player leave (=0 for normal leave) a mix without waiting a substitute, he won't be able to register/create another mix for a period of time
edited 1×, last 01.11.15 10:33:46 am

old Re: matchmaking script

tontonEd
User Off Offline

Quote
done:
-added rank system
-menu create mix

todo:
-(menu) delete mix
-handle afk
-handle substitute
-add GUI

class Diagramm - 1/11/2015 :
IMG:https://raw.githubusercontent.com/edwinmrtn/pcs_mixmatch/master/docs/DC.PNG


https://github.com/edwinmrtn/pcs_mixmatch

EDIT :

Hi, I need a mathematic help about the rank part of my code.

(in my implementation) A player's rank is sum of all his result from the differents mix he played.
rank = rank + result (results can be positiv or negative number)

for each mix, each player's result is based on the number of rounds the player played and the total domage this player made and a constant which represent the domage/rounds the player have to make to consider having an acceptable round.

I need your help to calculate this result, so far, I use a coeficient to determine if the player have done a good mix :

for exemple for a 5v5:
number of rounds = 10
total domage = 1000 (1 kill /round)
constant = 100

coefficient = total domage / constant / number of rounds = 1

if the player makes more domage coefficient > 1, I use a formula to calculate the result of the mix (return result >0) and if he makes less domage coefficient < 1 I use an other formula (). (return result <0)

IF 1 >= dmg / moyKill / rounds THEN
(-1) * (moyKill * rounds - dmg) / moyKill / moyKill)
ELSE
dmg / moyKill /rounds
END

so the curve have two different function (one for positive, one for negativ) and should look like something like this : grants Curve 1 - asymmetric
and I don't want to have an asymmetric curve


I would like to not use a coefficient and have only 1 formula to calcul the result, the curve should look like this : grants Curve 2 - symmetric

IMG:https://img15.hostingpics.net/pics/768895Sanstitre.png
edited 4×, last 04.11.15 10:09:45 pm

old Re: matchmaking script

tontonEd
User Off Offline

Quote
prob solved;
no hyperbolic function was needed here.
f(x)=x √
1
2
3
4
5
6
7
local moyKill = 100
local dmg = 80
local rounds = 1
local totalmoyKill = moyKill*rounds

x=(dmg-totalmoyKill)
print(math.floor(x/10))

-----------------------------------------------------------------------
added luadoc :

http://edwinmrtn.github.io/pcs_mixmatch/index.html

> my friend @user xNir: joined the project

added interface :

IMG:https://img11.hostingpics.net/pics/908692asmars00001.jpg
edited 3×, last 12.11.15 08:10:33 am

old Re: matchmaking script

Mami Tomoe
User Off Offline

Quote
@user Starkkz: how will a license help? if someone steals the script and claim at as his what will the license help? im just wondering

about the link: is it free? is it good?

old Re: matchmaking script

Starkkz
Moderator Off Offline

Quote
Of course the license is free, and if someone tries to steal it he will get into legal problems.

old Re: matchmaking script

Yates
Reviewer Off Offline

Quote
@user Starkkz: That license says I can do whatever I want basically. Licensing code is actually pretty hard, also anyone can recreate the functionality that the code brings without any problem. There is pretty much no use, as you never know if someone stole or recreated your script. And if someone stole it, then it was obviously put online by you for the reason to share it, thus doesn't count as stealing.

old Re: matchmaking script

tontonEd
User Off Offline

Quote
thx for the interrest guys,

@user mrc: yes, the script is and will stay public, we are finishing the first part of the project right now (which is having this script working without external data exchange for now .cf the project explaination in first post).

we have 1 functionnality left (the registration cooldowns for people who leave the mix with no reason) and working on most of the gui.

@user Starkkz: thanks for the advice, I will make it,

the rank system consist of building fair teams automatically everytime a mix start.
each player have 5 ranks, a rank for 1v1 - one for 2v2 etc ..
when a player play a 2v2, it's his 2v2 rank which will be used to build the team and refreshed after the mix.

all players rank are recalculated and save in the end of the mix.(normal case)

But as, the calcul of rank is based on the number of round played and the total domage made during these rounds.
This means, if someone leave a mix his rank will be calculated and saved at the moment, he leaves the mix.

if there is a collective action (bomb exploided/hostage saved etc ) all the team have a little bonus which is count in the rank calcul.

my rank calcul function :
1
2
3
4
moyKill = 100
local totalmoyKill = moyKill *player:getRoundsPlayed()
local x=(player:getTotalDomage()-totalmoyKill)
return math.floor(x/10)

-- where player:getRoundsPlayed() return the number of mix rounds this player played.
-- where player:getTotalDomage() return the total domage this player made.

note : moyKill is the constant which determind, the domage that a player have to make/round to keep his rank constant. (+0)
>>if everyround the player make more than 100 dmg, his rank will be : rank = rank + mixscore (where mixscore is positiv)
>>if everyround the player make less than 100 dmg, his rank will be
rank = rank + mixscore (where mixscore is negativ)

this have been already implemented and for now I'm pretty
satisfied.
on the contrary of the basic cs2d rank system, the rank of the player will varies only on his performance and not depending to someone else.
someone who play more than others will not be advantaged.

@user Starkkz: if you got some suggestions I will be happy to hear them

old Re: matchmaking script

Starkkz
Moderator Off Offline

Quote
@user Yates: The point is to at least have already one license, you don't want anyone to license it before you do. It doesn't matter if it's MIT or not, it could be CC or anything else. I always prefer MIT anyways.

@user tontonEd: your git link was broken, I fixed it.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview