Author Topic: Tremstats Slux's Mod  (Read 18429 times)

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« on: September 12, 2007, 05:18:12 pm »
this topic is about an old version of tremstats, it probably won't work with any recent game.qvm's. it's here for archival purposes -kev


Hello guys!

I have created a patch for Tremstats-0.6!  :P

The most important feature consist in the use of the player Qkey as "unique" ID for tjw clients... this fix the multi-nick problem as you can see here:


The statistics are more rigorous because the player now is identified by his TJW ID!

All the alias are show:


The changelog:
Code: [Select]
* Added unnamed name as parameter (for Lakitu7's patch)
* Added Qkey support (fixed the multi-nicks probem for the same TJW client)
* Added possibility to show all nicks used by a TJW client in the player page
* Extended the Database structure
* Adapted the search engine to multi-nicks

The patch:
http://www.capponcino.it/alessio/files/sviluppo/tremstats_mod/tremstats.slux.patch

As an alternative you can get the tremstats already patched by myself!
http://www.capponcino.it/alessio/files/sviluppo/tremstats_mod/Tremstats_slux-mod.tar.gz
 :D
« Last Edit: January 24, 2010, 06:29:26 am by kevlarman »

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Tremstats Slux's Mod
« Reply #1 on: September 12, 2007, 05:42:04 pm »
This belongs in the Mods section but I like the fact that all the names are then combined into one person.
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #2 on: September 12, 2007, 05:50:15 pm »
Quote from: "CreatureofHell"
This belongs in the Mods section but I like the fact that all the names are then combined into one person.
Thanks!

naturally only clients with the tjw have this feature... the others have the same handling seen in the 0.6 version  :)

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Tremstats Slux's Mod
« Reply #3 on: September 13, 2007, 06:47:09 am »
Questions:

1) Is it as simple as adding the new row to the users table for this to work?
2) What will happen with existing nicks in the database?  Will it merge them properly, say, if I login with one name and /name to the aliases I'd used in the past?

If I'm reading it right, and I add the row to the table, then since it's blank it'll treat someone as if they're a new player since they had no GUID stored before and now have one
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #4 on: September 13, 2007, 09:17:17 am »
Quote from: "Rocinante"

1) Is it as simple as adding the new row to the users table for this to work?

as you can see, i use a `nicks` table that store all alias used by tjw clients... In this way the `players` table is normalized!

Obviously, to use this patch/mod you must re-make the database (using the scripts into sql/) and reparse all your logs, putting these into `parser/archived_logs` :)

Quote
2) What will happen with existing nicks in the database?  Will it merge them properly, say, if I login with one name and /name to the aliases I'd used in the past?

this mod is not compatible with the old database...
so, when a client connect for the first time, it will be added and the actual nick become the `master`. All the future nick change are added into the `nicks` table and these are related with the player through the qkey! :roll:
Quote

If I'm reading it right, and I add the row to the table, then since it's blank it'll treat someone as if they're a new player since they had no GUID stored before and now have one
:eek: what does it mean?

Rocinante

  • Posts: 642
  • Turrets: +252/-668
    • My Homepage
Tremstats Slux's Mod
« Reply #5 on: September 19, 2007, 08:15:53 pm »
Quote from: "slux_ITA"
Quote from: "Rocinante"

If I'm reading it right, and I add the row to the table, then since it's blank it'll treat someone as if they're a new player since they had no GUID stored before and now have one
:eek: what does it mean?


Nothing bad for the patch - I was just muttering aloud as I read through it :>  Basically that there's no simple way to "upgrade" from 0.6 to 0.6+patch, but like you said one must instead wipe the database and start over.

In other words, I'll install this sometime when I feel like it, not quickly when I have a moment  :D
}MG{Mercenaries Guild
"On my ship, the Rocinante, wheeling through the galaxies, headed for the heart of Cygnus, headlong into mystery." -- Rush, "Cygnus X-1"

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #6 on: September 19, 2007, 08:43:41 pm »
btw, the best way to pass from 0.6 to 0.6+patch is a simple --reparse  :D

I see how the `says` table have a lot of duplicanted rows for the same player...  :-? maybe soon i release some fixs  :P

Oblivion

  • Posts: 410
  • Turrets: +27/-22
    • Gamez-Host.com
Tremstats Slux's Mod
« Reply #7 on: September 20, 2007, 07:41:27 pm »
I like what you did, but why cant you just make it show 1 name that they recently used, instead of searching the player it shows all of there names in the database.
You also mind telling me what I do with this patch?  Where do I place it.
World Wide Server Host

CreatureofHell

  • Posts: 2422
  • Turrets: +430/-126
    • Tremtopia
Tremstats Slux's Mod
« Reply #8 on: September 20, 2007, 08:11:33 pm »
Why would you want to only show one name? It wouldn't have much of a point then.
{NoS}StalKer
Quote
<Timbo> posting on the trem forums rarely results in anything good

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #9 on: September 20, 2007, 08:19:04 pm »
Quote from: "Oblivion"
I like what you did, but why cant you just make it show 1 name that they recently used, instead of searching the player it shows all of there names in the database.

mmh.. if i save only the recently used name instead of all, when i search a player maybe i don't find it because you have inserted an alias of the original player.

Example: i enter for the first time on a server and my current name is "alessio"; in this case, "alessio" is my master name related with my Qkey.

next time, i login with my real nick ("slux"), and the sistem save this alias...
Now we have people that know me as "alessio", and others know me as "slux"! so, if a player search "alessio" or "slux" he find the same player!:D

Quote from: "Oblivion"
You also mind telling me what I do with this patch?  Where do I place it.

it's very simple:

0) get tremstats.slux.patch
1) get tremstats-0.6
2) Extrat: tar xfvz Tremstats-0.6.0.tar.gz
3) cd Tremstats-NightlyBuild-Rev-58/
4) cat /where/you/have/tremstats.slux.patch | patch -p1

and the output must like this:
Code: [Select]
slux@skynet[~/temp]
~> cd Tremstats-NightlyBuild-Rev-58/
slux@skynet[~/temp/Tremstats-NightlyBuild-Rev-58]
~> cat ../tremstats.slux.patch | patch -p1
patching file ChangeLog
patching file parser/config.py
patching file parser/internals/log_parse.py
patching file parser/tremstats.py
patching file sql/structure.sql
patching file web/player_details.php
patching file web/search_player.php
patching file web/skins/default/default/skin.css
patching file web/templates/default/__footer__.tpl.php
patching file web/templates/default/player_details.tpl.php
patching file web/templates/default/search_player.tpl.php

 :wink:

Oblivion

  • Posts: 410
  • Turrets: +27/-22
    • Gamez-Host.com
Tremstats Slux's Mod
« Reply #10 on: September 21, 2007, 04:02:54 am »
Hell you lost me at 3 and 4.
World Wide Server Host

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #11 on: September 21, 2007, 09:38:03 am »
Quote from: "Oblivion"
Hell you lost me at 3 and 4.
mm in the point 3 just enter into the tremstats-0.6 (the original by dasprid) directory.

the 4th point just apply the patch!

» as an alternative you can get the tremstats already patched by myself!!!
»» http://www.capponcino.it/alessio/files/sviluppo/tremstats_mod/Tremstats_slux-mod.tar.gz

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats Slux's Mod
« Reply #12 on: September 23, 2007, 02:26:44 am »
Good work slux. I still came to the point, that a C-version of Tremstats wouldn't really speed things up, so I canceled development of version 0.9. If you would want to proceed with development on it, you could make a speed boost by making one big update query from all those single once, which are created in the parse loop.

If you continue, I would hand you write access to the Tremstats SVN server.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #13 on: September 23, 2007, 09:31:08 am »
oh thanks! :D

Speaking about the speed boost, i think that: make a parser with python is the beast way; c/c++ are more efficient when you do mathematical computations, but a parser like Tremstats have a big throughput. It is the disk I/O (reading line per line)... :roll:

btw, i'm happy to help you and soon i *release* the second version that resolve two important points:
Code: [Select]
   1st) `says` table is not normalized.. too duplicates
    2nd) some tremulous logs have a says like this:
            5:02 say: [A] ^1[^3XD^1]^7F^1ar^3ka^7s^1^7: ^2non ricordo^7
            5:04 sayteam: [H] ^w[^sXD^w] Lex ^RI^wT^QA^7: ^5spaccaminchia^7
          See the tags [A] and [H]. in this case the `says` table is empty =/


ps: dasprid the code is perfectly structured!  :wink:

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats Slux's Mod
« Reply #14 on: September 23, 2007, 10:44:16 pm »
Quote from: "slux_ITA"
ps: dasprid the code is perfectly structured!  :wink:


Thank you, I always keep a good eye on my code structure.

So, are you interested in SVN access?
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

slux_ITA

  • Posts: 38
  • Turrets: +0/-0
    • http://www.capponcino.it/alessio
Tremstats Slux's Mod
« Reply #15 on: September 23, 2007, 11:00:37 pm »
Quote from: "DASPRiD"
So, are you interested in SVN access?

 :eek: zomg! Yes indeedy!!  :D

btw, my first commit will be my patch? the svn is aligned with the lase release (the 0.6)?  :)