Topic: [MOD] Warsow Pickup mod - auto team shuffle by stats

* Introduction

This is server side mod for pickup games. This mod can choose even teams according to player's stats (kill, death, damage, etc.).
Of course this mod cannot choose *perfect* even teams, but can choose teams by accountable way (by stats).

This mod have also posibility to create stats web site.

Have fun smile

-- Guwashi

* ScreenShot
http://d3.jpn.org/warsow/tmp/pickup_mod.jpg

* Setup (for server admins)

- Currently, this mod supports only win32 and linux i386.

- Download mod from this site.
  http://d3.jpn.org/warsow/warsow_pickup_20070721.zip

- If you have installed old version, delete .pk3 and .db files.

- Copy "modules_031_pickup_*.pk3" to server's basewsw folder.
  Note: Client don't need to install any files.

- Add these lines to your server's config.

// required for server-side mod
set sv_pure "0"
// whether enabled auto rejoin after match end. deault: 1
set g_teams_autorejoin "1"
// how to choose teams. default: 1
// 1: sort players by kill/death,
// 2: sort players by damage_given/damage_received
// 3: sort players by score/match
set g_teams_shuffleby "1"
// stats DB filename
set g_db_filename "stats.db"
// how to identify players. default: 1
// 1: auth by nickname
// 2: auth by nickname + (first 16 bit of IP)
set g_db_playerauth "1"

* Flow of pickup games (for players).

- pick players up on IRC.
- if pickup is done, connect to server.
- join teams.
- if all players joined teams, then do 'callvote shuffle'.
  teams will automatically be chosen by stats.
- ready up.
- match start.
- match end. all player's stats will save to server's db.
- teams will automatically be chosen to play next match.
  (this can customize by g_teams_autorejoin)
- ready up.
- match start.
  :

That's all smile

* Note

This mod using SQLite (http://www.sqlite.org/) version 3.3.17.

* ChangeLog

- 2007/07/21 alpha 3
  Ported from 0.3 SDK to 0.31 SDK.
- 2007/06/11 alpha 2
  Changed scheme of player authorization from IP to nickname.
- 2007/06/09 alpha 1
  First public release.

* Author

Guwashi
IRC (Japanese): irc.friend.td.nu:6669 #warsow
IRC (English): irc.quakenet.org:6669 #warsow

EDIT1: added screenshot
EDIT2: released alpha2 (20070611)
EDIT2: released alpha3 (20070721)

Last edited by Guwashi (2007-07-20 21:10)

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Guwashi wrote:

This mod have also posibility to create stats web site (WIP).

Here is a very preliminary stats site using php.
http://d3.jpn.org/warsow/pickupstats.php
please don't expect much. I just created this page with half a hour. tongue

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

most isp's use dynamic ip addresses for their clients, which will more or less make this mod useless from a pickup perspective.. sry hmm
personally i think nicknames would be better since you can change your nickname easy. or have the players auto-register, like.. first time you play a pickup you'd get a passwd/uid you then have to put that in some cvar in your cfg(maybe even auto put it in there with stuffcmd?) to be recognized in the future, or maybe all three combined ? smile

Also i must warn you that having the stats public might backfire.. this happened when i was running servers for #tdmpickup.se, put up a nice voodoostats page and everything was fine, peons were positive for the most part... then certain peons started playing for stats which meant less teamplay and other odd behavior and eventually i had to shut the stat page down... never expect peons to be nice peons. be warned! smile

Last edited by imhotep (2007-06-09 12:06)

Whenever you set out to do something, something else must be done first.

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Very impressive work Guwashi smile

5

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

guwashi! I'm awaiting an svn commit? : D

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

imhotep:
thx for suggestions.

- player identification
i think ip is not so suitable for identification of players. but well... this is first step smile.
identification with nickname have fake nick issues...
identification with uid/passwd is good idea, but point is how to implement it on server-side mod (which means i could not modify client-side code at all). it's not so easy for me to implement it.
any good idea to identify players?

- stats
yeah i know there is ppl who are playing for stats (not teamplay). and i don't like those ppl tongue. main purpose of this mod is to choose even teams on pickup games, so i don't have much motivation to create web stats site and ingame stats command like "rank" or smt. (it's not my business tongue).

Last edited by Guwashi (2007-06-09 14:14)

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

nip wrote:

guwashi! I'm awaiting an svn commit? : D

this mod is using SQLite which have public domain license (http://www.sqlite.org/copyright.html).
i dunno whether it's legal or not to include public domain code to GPL code... anyone knows?

8

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Guwashi wrote:

identification with uid/passwd is good idea, but point is how to implement it on server-side mod (which means i could not modify client-side code at all). it's not so easy for me to implement it.
any good idea to identify players?

You could try it to do like Inumeg does for his server, by setting some server-readable cvar which contains a username or UUID and probably  a password. The problematic thing in doing this is that everyone hosting a server could read that var and fake as another player he got the information from ...

hangy.de!

<@metalmilitia> the code looks failproof smile
<@metalmilitia> but it's untested

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Guwashi wrote:
nip wrote:

guwashi! I'm awaiting an svn commit? : D

this mod is using SQLite which have public domain license (http://www.sqlite.org/copyright.html).
i dunno whether it's legal or not to include public domain code to GPL code... anyone knows?

public domain means giving up all copyrights to the software and anyone can alter and use whatever license they want so i guess it'd be ok.

Whenever you set out to do something, something else must be done first.

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

now, my friend Cyph3R is hosting CA server with this mod.
if you want to look how this mod works, plz join this server. Note: its japanese server, it might 300 ping from EU tongue.
http://d3.jpn.org/gyaase/?game=warsow&a … an%20Arena

11

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

there is something strange thought in the statistics:

name                  kill    death    teamfrag    suicide    damage_given    damage_received      score      match
TEC:bluespear      35       18        0                 0               107                      2072                      35        10
RuLAN | pana+S    28     24       1               0              2092                    2082                    27     11

How can TEC:bluespear have 35 kills and only have given 107 damage?
While Rulan has 28 kills with a given damage of 2092.

~ I love w?w ~
Error 407 - No creative sig found

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

yep, i knew it. maybe it's bug, needs to test more. tongue

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

why? one guy is doing a lot of damage and another just coming in and kill (so he is doing 2 maybe 20 or 60 dmg only)

Last edited by Discordi@ (2007-06-09 17:41)

3RR0R

14

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Well that means he has done 3 damage with each frag?
:S Sorry but i dont think so.

If he had given 1000 damage that would be reasonable

Last edited by killay (2007-06-09 17:50)

~ I love w?w ~
Error 407 - No creative sig found

15

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Guwashi wrote:

any good idea to identify players?

if u make the irc bot communicate with servers , cant u use the quakenet auth ?

D:!

16

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Guwashi wrote:

any good idea to identify players?

What you can do is use some sort of cookie. When you go on the server you automaticly download an authentication file which will be recalled if you reconnect on the server. Like so if someone renames himself it will still log all frags/deaths.

Last edited by killay (2007-06-09 19:16)

~ I love w?w ~
Error 407 - No creative sig found

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

imhotep wrote:
Guwashi wrote:
nip wrote:

guwashi! I'm awaiting an svn commit? : D

this mod is using SQLite which have public domain license (http://www.sqlite.org/copyright.html).
i dunno whether it's legal or not to include public domain code to GPL code... anyone knows?

public domain means giving up all copyrights to the software and anyone can alter and use whatever license they want so i guess it'd be ok.

This is a correct interpertation.

this space for rent

18

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

killay wrote:

How can TEC:bluespear have 35 kills and only have given 107 damage?
While Rulan has 28 kills with a given damage of 2092.

hhahaha big_smile he's probably fucking fragstealer! xD // really nice idea for mod smile again Japan rulez! big_smile

My online T-Shirts shop - 7level.pl
Fully working english version comming soon

19

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Japan is teh pwn imo.
Hiro Nakamura ftw ;D

and Guwashi ftw too!:D

Last edited by SNP (2007-06-10 11:37)

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

I've released version alpha2 (20070611).
I changed authorization scheme from IP-based to nickname-based.
http://d3.jpn.org/warsow/warsow_pickup_20070611.zip
If you installed old version, please delete .pk3 and .db files.

I also added experimental identification scheme by nickname + (first 16 bit of IP). (g_db_playerauth 2)

For example, if nickname is "Guwashi" and IP is "111.222.135.246", player identification is done by "Guwashi@111.222" (this means nickname + first 16bit of IP). This will work on class B ISP, but well, there is some ppl who is using class A ISP...  so it might not work for those ppl...

21

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Can't you do it with some sort of cookie? and check the name from the config file in warsow?

~ I love w?w ~
Error 407 - No creative sig found

22

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

killay wrote:

Can't you do it with some sort of cookie? and check the name from the config file in warsow?

Erm... We're talking about warsow - not about a browser smile

sleep is a poor substitute for coffee

23

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

KoFFiE wrote:
killay wrote:

Can't you do it with some sort of cookie? and check the name from the config file in warsow?

Erm... We're talking about warsow - not about a browser smile

I know, But if you for example register on the site, receive a cookie, recall it from the server.... that might work no?

~ I love w?w ~
Error 407 - No creative sig found

24

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

Guwashi wrote:

This will work on class B ISP, but well, there is some ppl who is using class A ISP...  so it might not work for those ppl...

I thought classes in IP distribution where  canceled since CIDR.
I've noticed that even the first 8bits are not standard anymore (in my ISP at least).

We certainly need some kind of player identification system for warsow.
0.4 with wswTV, 0.5 with wswID ? big_smile

An amazing job Guwashi nonetheless. big_smile

Does the pickup server have this mod enabled? Would be great to test it on our pickups ;D

Last edited by SNP (2007-06-12 11:15)

Re: [MOD] Warsow Pickup mod - auto team shuffle by stats

SNP wrote:

I thought classes in IP distribution where  canceled since CIDR.
I've noticed that even the first 8bits are not standard anymore (in my ISP at least).

What a freaking internet! tongue. hmm, my knowledge about internet is really out of date yikes. I'm a bit old man in this world...

btw, my last ad-hoc idea is identification by nickname + location.
There are free database which can lookup location (country, region, city, etc.) from IP (e.g. GeoIP by maxmind http://www.maxmind.com/app/ip-location). By using this database, identification is done like this:

"Guwashi@Tokyo,JP"

How about this one? ofc, the accuracy of lookup is not 100%. And maybe nick faker sometimes have same location as target player.

To implement reliable identification system is big issue. If we include it to basewsw, we need to consider more from various view (though I dunno basewsw needs to include auth system tongue).