NS2stats.com is looking for coders, lua and web.
Hi,
I am one of the 4 developers of ns2stats and only one who is still coding/keeping it working.
We are looking for programmers for lua and website. Both lua/web source code are available on github and can be found from link below. We do not have high requirements, so if you are eager to learn and develop please contact me with private message or post here.
More info can be found here:
http://forums.unknownworlds.com/discussion/129495/ns2stats-statistics-for-natural-selection-2/p1
I am one of the 4 developers of ns2stats and only one who is still coding/keeping it working.
We are looking for programmers for lua and website. Both lua/web source code are available on github and can be found from link below. We do not have high requirements, so if you are eager to learn and develop please contact me with private message or post here.
More info can be found here:
http://forums.unknownworlds.com/discussion/129495/ns2stats-statistics-for-natural-selection-2/p1
Comments
Concept:
Store stats in a table created by the plug-in instead using all these ns2classes. By that way we only need to override scoreboard function to read from table.Also player who reconnect while a round is going on keep their store
Table Score = {playerid,name,team,com,score,kills,deaths,assists,p.dmg,s.dmg,hits, misses,playedTime,connected}
Connected is a boolean value to detect which players should be shown by the in-game scoreboard.
Hooks, we need:
PlayerConnected:
If score [NS2id] = nill set default
Start PlayedTime Timer, set connected true
PlayerDisconnected:
Stop PlayedTime Timer, add stopped Time to PlayedTime
JointTeam:
Set Teamid to chosen team
LogedInCC:
Set com to true
LogedOutCC:
Set com to false
Deamagedealt:
If damage >0 determ damage type and add it + increase hits otherwise increase misses
AddedKill:
Increase kills
AddedResources:
Increase Ress
Addedscore:
Increase score
AddedDeath:
Increase deaths
UpgradeCompleted:
Sent Ugradename and time to ns2stats
BuildingComplete:
Sent Building Name and time to ns2stats
(Playermoved: )
Send new pros to NS2stats, maybe use Addscore for that.
GameStart:
Reset score table
Start Gametime Time
GameEnd:
Stop Gametime Timer
Sent Gametime to Ns2Stats
Upload Table Score to NS2Stats
Think:
( Is called by shine with every server tick )
If x (can be set by config) sec has passed:
Add x time to all players playedTime
Upload Table score to NS2Stats
X can be used to handle server traffic
More about Shine Hooks
Extra methods needed:
OverrideScoreboard
UploadScore
Currently im working on setting up all the needed hooks, I’ll need help at uploadScore
Tell me if I missed something
Nice,
We have list of all actions and parameters which are needed for upload to ns2stats.org here: https://docs.google.com/document/d/17xgLYNS9OAx5O12Bmf6ovw5oAw6WEwLN6SByO0xRkgc/edit?usp=sharing
(contains some finnish, gonna translate those in a bit.)
Player data is stored during game start and in middle of game(if player connects) and at end of game. List contains lots of stuff like kills,deaths, assists, weapon stats etc.
Example complete log file which is uploaded to ns2stats.org can be found: https://raw.github.com/Synomi66/ns2stats_web_source/master/protected/data/round-logs/completed/example-log-file.txt (5mb)
Log file is formed by json encode lines for each action. By action i mean line in log file. So when parsing it back each line is json decoded to array.
Due lua httpRequest limits log file needs to be send multiple times during a game (if has not changed, or other options). So data being sent can't be larger than ~3mb.
Every log piece which is sent, contains following post parameters
(source: https://github.com/Synomi66/ns2stats/blob/master/output/lua/RBPSsend.lua):
local params =
{
key = RBPSadvancedConfig.key,
roundlog = RBPSlog,
part_number = RBPSlogPartNumber,
last_part = RBPSgameFinished,
map = Shared.GetMapName(),
}
If RBPSgameFinished is 1 then log is parsed, otherwise it still waits for more data. Part number is raising number from 1. We can look into this more when you have gotten some data logging done.
Great progress!
Need to add those minimap images to dev site too at some point to test the map. Thou map origin stats needs to be copied from live database or that 'map stats upload' function added to your version too.