.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Common Questions
Common Questions Are you seeking help ? Get it here !

Reply
 
Thread Tools
Podbots and stats
Old
  (#1)
Spiffyguy01
Member
 
Status: Offline
Posts: 30
Join Date: Feb 2006
Default Podbots and stats - 07-02-2008

After a brief down time I am trying to set my server up again. So far everything seems to working good except for some stats reporting of the bots. The problem I am having is it does not look like weapon stats are being displayed at the end of a round or when a player leaves. but only for the bots.

In the logs I can see the bots attacking and getting hit, displays all the numbers there, damage, damage and armor left, that sort of thing. But just not the weaponstats that is run when a player leaves or at the end of the round. it does display for a player though.

I have AMXX and in my cfg I have csstats_rank 1 amd csstats_rankbots 1. and mp_logging set to 3. any other suggestions to try? I am trying to configure psychostats to show the bots.

Thanks
  
Reply With Quote
Re: Podbots and stats
Old
  (#2)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Podbots and stats - 08-02-2008

You should have these settings:
csstats_rank 0
csstats_rankbots 1

in amxx.cfg (and nowhere else). csstats_rank must be 0, because the bots don't have their authid nor IP, so the only way they can be correctly handled in stats is ranking by names.
  
Reply With Quote
Re: Podbots and stats
Old
  (#3)
Spiffyguy01
Member
 
Status: Offline
Posts: 30
Join Date: Feb 2006
Default Re: Podbots and stats - 08-02-2008

I changed my csstats_rank from 1 to 0. csstats_rankbots is set to 1. I am still not seeing trigger weaponstats in the logs. I triggers for players when they leave but all the bots are then kicked by console. I am using the bot quota. it is set to 7. Possible they are getting kicked before the weapon stats can trigger?
  
Reply With Quote
Re: Podbots and stats
Old
  (#4)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Podbots and stats - 08-02-2008

The settings I told You are necessary to trigger stats by AMX X CSTRIKE module (to see the most disuptive, attackers, victims etc). This what You are talking about has nothing to logs. I don't know what You are talking about when You are saying You are using bot quota. Podbot mm doesn't have such setting. It has the setting similary sounding, but not exactly like You wrote.
  
Reply With Quote
Re: Podbots and stats
Old
  (#5)
Spiffyguy01
Member
 
Status: Offline
Posts: 30
Join Date: Feb 2006
Default Re: Podbots and stats - 08-02-2008

my amx config has
// Default value: 1
csstats_rank 0
// Default value: 0
csstats_rankbots 1
so this should rank bots
my mp_loglevel is 3 for the most detailed logs.

when a player exits or the round changes this triggers a weaponstats output in the log. Looks like this:
L 02/08/2008 - 13:25:11: "Admin_death<1><STEAM_xxxxxx><TERRORIST>" triggered "weaponstats" (weapon "scout") (shots "1") (hits "0") (kills "0") (headshots "0") (tks "0") (damage "0") (deaths "1")
L 02/08/2008 - 13:25:11: "Admin_death<1><STEAM_xxxxx><TERRORIST>" triggered "weaponstats2" (weapon "scout") (head "0") (chest "0") (stomach "0") (leftarm "0") (rightarm "0") (leftleg "0") (rightleg "0")
L 02/08/2008 - 13:25:11: "Admin_death<1><STEAM_xxxxxx><TERRORIST>" triggered "weaponstats" (weapon "grenade") (shots "3") (hits "3") (kills "0") (headshots "0") (tks "0") (damage "169") (deaths "0")

This is hit information used in psychostats to calculate the accuracy, head shots and such. This data is not being outputed for the bots. it just says:
L 02/08/2008 - 13:25:11: Kick: "U're Dead<2><UNKNOWN><>" was kicked by "Console"
L 02/08/2008 - 13:25:11: "U're Dead<2><BOT><TERRORIST>" disconnected

so I am not sure why the csstats module is not recording this data since the stats are done by the nick and not ID. The only thing I could think of is the kick by console is booting the bot before the stats can be outputted? My reference to the bot quota is the pb command pb_bot_quota_match 7. that is what I meant by bot quota.

This missing data skews the acc and headshot % stats for the bots, making them all 100% it seems. I figured I would check here to see if you guys knew anything before moving to the devs for the other modules involved.

edit: i seem to recall in the past there was a stats_logging_bots plugin for amx. I can not seem to find any information on that though. Might be the answer.
  
Reply With Quote
Re: Podbots and stats
Old
  (#6)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: Podbots and stats - 09-02-2008

AMX X has the plugin called stats_logging. In its source code You can find this function:
Code:
public client_disconnect(id)
{
    if (!g_inGame[id])
        return
        
    g_inGame[id] = 0
    
    if (is_user_bot(id))
    {
        return
    }

    remove_task(id)
    
    new szTeam[16], szName[32], szAuthid[32], iStats[8], iHits[8], szWeapon[24]
    new iUserid = get_user_userid(id)
    new _max = xmod_get_maxweapons()
    
    get_user_team(id, szTeam, 15)
    get_user_name(id, szName, 31)
    get_user_authid(id, szAuthid, 31)

    for (new i = 1 ; i < _max ; ++i)
    {
        if (get_user_wstats(id, i, iStats, iHits))
        {
            xmod_get_wpnname(i, szWeapon, 23)
            
            log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats^" (weapon ^"%s^") (shots ^"%d^") (hits ^"%d^") (kills ^"%d^") (headshots ^"%d^") (tks ^"%d^") (damage ^"%d^") (deaths ^"%d^")", 
                        szName, iUserid, szAuthid, szTeam, szWeapon, iStats[4], iStats[5], iStats[0], iStats[2], iStats[3], iStats[6], iStats[1])
            log_message("^"%s<%d><%s><%s>^" triggered ^"weaponstats2^" (weapon ^"%s^") (head ^"%d^") (chest ^"%d^") (stomach ^"%d^") (leftarm ^"%d^") (rightarm ^"%d^") (leftleg ^"%d^") (rightleg ^"%d^")", 
                        szName, iUserid, szAuthid, szTeam, szWeapon, iHits[1], iHits[2], iHits[3], iHits[4], iHits[5], iHits[6], iHits[7])
        }
    }
    
    new iTime = get_user_time(id, 1)
    
    log_message("^"%s<%d><%s><%s>^" triggered ^"time^" (time ^"%d:%02d^")", szName, iUserid, szAuthid, szTeam, (iTime / 60), (iTime % 60))
    log_message("^"%s<%d><%s><%s>^" triggered ^"latency^" (ping ^"%d^")", szName, iUserid, szAuthid, szTeam, (g_pingSum[id] / (g_pingCount[id] ? g_pingCount[id] : 1)))
}
As You can see it doesn't send any log messages for a bot (it just does return).
Try to do it so - comment out that part concerning to bots in this plugin this way:
Code:
/*
    if (is_user_bot(id))
    {
        return
    }
*/
then compile the plugin. How? The stats_logging.sma file needs to be in amxmodx\scripting folder. After editing the plugin find the file called compile.exe in the same folder and hit the "enter" key on it. Your compiled file should be in amxmodx\scripting\compiled folder. Then check the dat of it if the file You found there is really that one You compiled and copy and paste it from that folder to amxmodx\plugins folder. In my opinion it should work, but I didn't test it. Normally the people don't need to collect stats for bots, that's why it's not used there. The only thing I'm not sure is - what does the function get_user_authid return for the bots? It may return the same value for all bots.
  
Reply With Quote
Re: Podbots and stats
Old
  (#7)
sperry201
Member
 
Status: Offline
Posts: 13
Join Date: Apr 2008
Location: Norwich, NY
Default Re: Podbots and stats - 22-04-2008

Thanks just what I was looking for!
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com