Server log entries
I'm writing a little script to make the pseudo-gamemode of co-op a little less tedious and more fun to play. To make the features I have in mind functional, I need a couple of things:
- Add a log entry for gameStart (using the word "game" assuming a "round" has several "games"). I need to know this for the 1DE, TBD and 1DM modes, at least.
- Add a log entry for gameEnd (same as above, but for the end). Parameters: winTeam (winning team color, 0 if tie).
If you feel the urge to add more parameters to it, consider the game duration (in seconds). Ideally, the events that would produce this log entry would be: timer ran out, /balanceTeams, ball lost, all opponents dead (in 1-life modes), base destruction, changeMap, /assignTeam on the last player alive of a team - basically anything that would cause the game to end.
- Team orientation. It's really, really important for me to know the orientation (left/right) of the teams. I can think of three places you could add this:
- In the suggested gameStart entry:
{"port":27276,"time":31337,"leftTeam":3,"rightTeam":4,"type":"gameStart"} (That says the game started, the left team is red and the right team is blue.)
- In the teamChange entry:
{"port":27276,"time":31337,"player":2,"team":4,"teamOrientation":0,"type":"teamChange"} (Player 2 changed to the blue team, left side.)
- Finally, the most elegant and space-efficient solution I think is including it in the mapChange entry:
{"port":27276,"time":31337,"map":"1de_coop_101","t ype":"mapChange","mode":"1de","leftTeam":3,"rightTeam":4} (Changed to 1de_coop_101, left team is red, right team is blue.)
- Not sure whether full/custom random is visible to the server, but if it is, could you add a random parameter to the "spawn" log entry? Maybe use a value of 1 for full random, 2 for custom, 0 for neither. Viz:
{"port":27276,"time":31337,"plane":"Loopy","player ":1,"perkRed":"Tracker","perkGreen":"Heavy Armor","team":5,"type":"spawn","perkBlue":"Turboch arger","skin":"No Skin" "random":2} (Full random)
That would be greatly appreciated, as I'd like to include that in my ranking algorithm.
- Option to disable "Press T to balance teams". Maybe through server_configurator.
That's it for now. In return for your prompt help, demo users will be incentivized to buy the game by having hindered stats, such as being limited to a low level in our level system, or being unable to buy tokens with their bounty points. Cheers!
Last edited by Juin; 09-02-2011 at 02:45 AM.
Reason: Increased specificity.
|