1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ranking and weapons unlock problem

Discussion in 'BF2Statistics discussion' started by mrc527, Dec 1, 2006.

  1. mrc527

    mrc527 New Member

    Hi all,

    i'm using this software to make a little community of bf2:sf players. I use bf2statistics to collect data from the server to the mysql db. then i have a website in php, to retrive data from the db and to show stats. That works great, all, but...i have some problems: Frist of all the weapons unlock: I cannot understand how to set unlocks to a player. I try to explain better: I know that unlocks are under the db "unlocks" orderd by the player's ID. than there is the kit ID (11,22,33....) and the status (s/n). well..i know that to have the 88 unlock i must have unlocked first the 22 package and so on..(i readed it in the setunlocks.aspx). But...if i set (to try it and to find how weapon is the number "22") the status of the weapon 22 of my id to "s" i cannot have any unlock. I tryed before and with all "s" that worked but now, after an "all 'n' restore" nothing works.

    I tryed to reset all my database, but even with a clean db there is any news. How can i use this unlocks?

    Ah, i had worked on the "avaiableunlocks" and "usedunlocks" too, but...nothing!


    And now the second problem: in the game i cannot see the player rank: all people (even that have more than 1000 score) have the same "private" sign. I dont use any redirect of the bfhq server in the clients, but..i think it has to work without it, not?


    thanks all and...sorry for my bad english, but...i'm italian;)

    Bye!
     
  2. lumo

    lumo New Member

    afaik the status of weapons is Y/N - am i wrong??
    further you can only test it wis ONLINE accounts.
    for ranks... you need to enable a check in asp settings

    greets
     
  3. mrc527

    mrc527 New Member

    Hi,
    i think that the status is s/n, i dont know why, but look at the file getunlocksinfo.aspx or setunlock.aspx: there i can see the S/N settings.

    Here is my ASP/_config.php, i think it's all ok...

    $db_expected_ver = '1.4.2';
    $db_host = 'localhost';
    $db_name = 'BF2';
    $db_user = '****';
    $db_pass = '****';
    $admin_user = '****';
    $admin_pass = '****';
    $admin_hosts = array('127.0.0.1','192.168.2.0/24','10.0.1.0/24');
    $admin_log = 'logs/_admin_event.log';
    $admin_backup_path = '_backups/';
    $admin_backup_ext = '.bak';
    $admin_page_size = 75;
    $admin_ignore_ai = 1;
    $stats_ext = '.txt';
    $stats_logs = 'logs/';
    $stats_logs_store = 'logs/_elaborati/';
    $stats_move_logs = 1;
    $stats_min_game_time = 60;
    $stats_min_player_game_time = 60;
    $stats_players_min = 1;
    $stats_players_max = 250;
    $stats_rank_check = 1;
    $stats_rank_tenure = 7;
    $stats_awds_complete = 0;
    $stats_lan_override = '85.18.201.173';
    $stats_local_pids = array('127.0.0.1');
    $debug_lvl = 1;
    $debug_log = 'logs/_stats_errors.log';
    $game_hosts = array('127.0.0.1','192.168.2.0/24','10.0.1.0/24');
    $game_custom_mapid = 700;
    $game_unlocks = 0;
    $game_unlocks_bonus = 2;
    $game_unlocks_bonus_min = 1;
    $game_awds_ignore_time = 0;
    $game_default_pid = 29000000;

    It's all right?

    Ah, i'm using only online accounts, but without any mod on the clients (NO BFHQ)

    Thanks!
     
  4. lumo

    lumo New Member

    yeah seems right - thought you probably have rank check off...
     
  5. mrc527

    mrc527 New Member

    And where can i turn it on?
    :D
     
  6. lumo

    lumo New Member

    seems you already have it turned on ;)

    $stats_rank_check = 1;
     
  7. mrc527

    mrc527 New Member

    cann not be a problem of the python script in BF2?

    my config is:

    # ------------------------------------------------------------------------------
    # BF2Statistics 1.4 - Config File
    # ------------------------------------------------------------------------------
    # Conventions:
    # 0 -> Disable
    # 1 -> Enable
    # ------------------------------------------------------------------------------

    # ------------------------------------------------------------------------------
    # Debug Logging
    # ------------------------------------------------------------------------------
    debug_enable = 1
    debug_log_path = 'python/bf2/logs' # Relative from BF2 base folder
    debug_fraglog_enable = 0 # Detailed 'Fragalyzer' Logs

    # ------------------------------------------------------------------------------
    # Backend Web Server
    # ------------------------------------------------------------------------------
    http_backend_addr = '127.0.0.1'
    http_backend_port = 80
    http_backend_asp = '/ASP/bf2statistics.php'

    # ------------------------------------------------------------------------------
    # Snapshot Manager
    # ------------------------------------------------------------------------------
    snapshot_prefix = 'BF2' # Prefix Snapshots with this tag

    # ------------------------------------------------------------------------------
    # Medals Processing
    # ------------------------------------------------------------------------------
    medals_custom_data = '' # Suffix for your custom medals file(s)

    # ------------------------------------------------------------------------------
    # Player Manager
    # ------------------------------------------------------------------------------
    pm_backend_pid_manager = 0
    pm_local_pid_txt_file = 'python/bf2/pid.txt' # Relative from BF2 base folder
    pm_ai_player_addr = '127.0.0.1' # Not recommended to change


    # ------------------------------------------------------------------------------
    # Clan Manager
    # ------------------------------------------------------------------------------
    enableClanManager = 0 # Use the Clan Manager to control Access to your server!
    serverMode = 0
    # Mode 1: Clan ONLY (Must be on Clan List to Join Server)
    # Mode 2: Priority Proving Grounds (Clan Members AND those players that meet
    # the minimum requirements.Clan Members get priority)
    # Mode 3: Proving Grounds (Clan Members AND those players that meet the
    # minimum requirements)
    # Mode 4: Experts ONLY (Only players that meet the minimum requirements)
    # Mode 0: Public (Free-for-All. No Restrictions!)

    # Clan Manager Criteria
    criteria_data = (
    ('clantag', ''), # Clan Tag (Matches First Part of Player Name, used for Whitelist)
    ('score', 0), # Minimum Global Score
    ('rank', 0), # Minimum Global Rank
    ('time', 0), # Minimum Global Time Played
    ('kdratio', 0), # Minimum Global Kill/Death Ratio
    ('country', ''), # Registered Country of Origin Code (Seperate multiple by comma ',')
    ('banned', 10), # Maximum banned count! PermBan is ALWAY BlackListed
    )

    # ------------------------------------------------------------------------------
    # Backup Central Community Web Server (OPTIONAL)
    # ------------------------------------------------------------------------------
    http_central_enable = 0 # Use settings above (0, 1, 2)
    http_central_addr = 'cbd.xxx.aaa' #Address Central STATS Server
    http_central_port = 80
    http_central_asp = '/ASP/bf2statistics.php'

    # Note: this cabalility is for linking stats data to a centrally maintained STATS #
    # server. This could be useful for those who are running a LAN or Tournament #
    # (with local STATS), but wish to have this data credited to their normal STATS #
    # DB. There are three (3) options for the central DB update: #
    # 0: Disabled - 'nuff said! #
    # 1: Sync - This simply copies the SNAPSHOT as-is to the central DB #
    # 2: Minimal - Record everything, except Rank & Award data (typically use #
    # for LANs or Tournaments where local db starts blank) #

    # ------------------------------------------------------------------------------
    # END CONFIGURATION
    # ------------------------------------------------------------------------------
     
  8. mrc527

    mrc527 New Member

    in the BF2 script log i have many of these:

    Added player 242, D. King (29000064) to medal/rank checking
    Getting Stats...
    Retrieving player STATS via HTTP/1.1 miniclient
    ERROR: Received STATS data is NOT VALID, length 194
    Retrieving player AWARDS via HTTP/1.1 miniclient
    Received AWARDS data is VALID, lenght 66
    Processing AWARDS response for player 242, size 0.
    Unlock module: onPlayerConnect
    Player Manager module initialized
    Retrieving Profile ID (K. Lee) via PID file
    Creating new record for player profileId 29000062
    Will retrieve medals from GSI...
    roundMedals: {}

    And

    Readded player 228 to medal/rank checking
    Player id=28 found in sessionPlayerMedalMap
    Resetting unkept round-only medals...
    roundMedals: {}

    for every BOT and one of this for every real player:

    Added player 0, miklgold68 (85109248) to medal/rank checking
    Getting Stats...
    Requesting player STATS
    Requesting player AWARDS
    Unlock module: onPlayerConnect
    Requesting unlocks: Success
    Added player 0 to unlock checking
    Awards response received: ()
    Player medals: {}
    Stats response received for player 0, size 0.
    Key ktm-4 not found in stats response
    Key ktm-5 not found in stats response
    Key ktm-6 not found in stats response
    Key dfcp not found in stats response
    Key ktm-0 not found in stats response
    Key ktm-1 not found in stats response
    Key ktm-2 not found in stats response
    Key ktm-3 not found in stats response
    Key rpar not found in stats response
    Key vtm-4 not found in stats response
    Key bksk not found in stats response
    Key vtm-1 not found in stats response
    Key vtm-0 not found in stats response
    Key vtm-3 not found in stats response
    Key scor not found in stats response
    Key wdsk not found in stats response
    Key wkl-9 not found in stats response
    Key heal not found in stats response
    Key wkl-5 not found in stats response
    Key dsab not found in stats response
    Key wkl-11 not found in stats response
    Key cdsc not found in stats response
    Key tsql not found in stats response
    Key tsqm not found in stats response
    Key wins not found in stats response
    Key vkl-1 not found in stats response
    Key vkl-0 not found in stats response
    Key vkl-3 not found in stats response
    Key twsc not found in stats response
    Key time not found in stats response
    Key kill not found in stats response
    Key rsup not found in stats response
    Key tcdr not found in stats response
    Key rank not found in stats response
    Unlocks received for player 0 (miklgold68): ()
    Kit unlocks: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    Reset orderiterator to 33 based on highest pid kept
    Player id=0 found in sessionPlayerMedalMap
    Resetting unkept round-only medals...
    roundMedals: {}

    This is a problem?
     
  9. mrc527

    mrc527 New Member

    So....only my server has this problem?

    Noone knows any solution?
     
  10. mrc527

    mrc527 New Member

    Ah, even if i select "all unlocked" in weapons unlock mode, my server still not viewing any unlock...and all people are "privates".

    If I try to view "/Asp/getunlocksinfo.aspx?pid=44916843" (44916843 is my correct PID) i see
    "
    O H pid nick asof D 44916843 All_Unlocks 1165755748 H enlisted officer D 0 0 H id state D 11 s D 22 s D 33 s D 44 s D 55 s D 66 s D 77 s D 88 s D 99 s D 111 s D 222 s D 333 s D 444 s D 555 s $ 131 $
    "
    I think that's correct, because i see 11->s 22->s and so on...so all weapons are unlocked.

    My next try is:
    /asp/getplayerinfo.aspx?pid=44916843&transpose=1&info=rank,ktm-,dfcp,rpar,vtm-,bksk,scor,wdsk,wkl-,heal,dsab,cdsc,tsql,tsqm,wins,vkl-,twsc,time,kill,rsup,tcdr,vac-
    where the "info" string is from the python log and this is my result (i think is right too):

    "O H D asof 1165755993 H D pid 44916843 nick Mrc527 rank 3 ktm-0 285 ktm-1 2589 ktm-2 12 ktm-3 753 ktm-4 5228 ktm-5 16350 ktm-6 328 dfcp 60 atm-0 0 atm-1 0 atm-2 0 atm-3 1915 atm-4 14202 atm-5 4035 atm-6 4671 atm-7 5059 atm-8 617 atm-9 0 atm-10 0 atm-11 0 rpar 0 vtm-0 678 vtm-1 0 vtm-2 0 vtm-3 0 vtm-4 2402 vtm-5 0 vtm-6 0 scor 2052 wdsk 8 wkl-0 89 wkl-1 0 wkl-2 43 wkl-3 474 wkl-4 2 wkl-5 6 wkl-6 5 wkl-7 0 wkl-8 0 wkl-9 1 wkl-10 0 wkl-11 1 wkl-12 179 wkl-13 0 heal 0 abr-0 0 abr-1 0 abr-2 0 abr-3 33 abr-4 135 abr-5 42 abr-6 295 abr-7 68 abr-8 23 abr-9 0 abr-10 0 abr-11 0 dsab 0 cdsc 396 tsql 4012 tsqm 0 loss 9 awn-0 0 awn-1 0 awn-2 0 awn-3 1 awn-4 14 awn-5 3 awn-6 3 awn-7 0 awn-8 1 awn-9 0 awn-10 0 awn-11 0 wins 22 vkl-0 54 vkl-1 0 vkl-2 0 vkl-3 0 vkl-4 59 vkl-5 0 vkl-6 0 twsc 239 bksk 113 time 30499 kill 998 rsup 1 tcdr 9648 vac-0 0 vac-1 0 vac-2 0 vac-3 0 vac-4 0 vac-5 0 vac-6 0 $ 688 $"

    What's the problem? I have 1.41 patch, i dunno if it's important, but i locked some ports to permit all people to play, without cdkey check.

    Thanks, bye!
     
  11. DarkWanderer

    DarkWanderer New Member

    2mrc527: The same problem, maybe there're some troubles with software? I use:
    BF2Ded server 1.4 (LAN only, while fixing that...)
    Denwer 2.0
    MySQL 5.0.2
    bf2statistics 1.4.2
    Maybe, there's a problem with DENWER's ASPX handling?
    I propose someone who doesn't have such a problem to try such thing (/Asp/getunlocksinfo.aspx/....) and then post results... Would anyone do it, please?

    Request: ht tp://10.11.69.237/ASP/getplayerinfo.aspx?pid=29000126&transpose=1&info=rank,ktm-,dfcp,rpar,vtm-,bksk,mtm-,atm-,wdsk,wkl-,abr-,heal,dsab,cdsc,tsql,tsqm,scor,awn-,wins,vkl-,twsc,time,kill,rsup,tcdr,vac-

    Answer: O H D asof 1167422240 H D pid 29000126 nick DooM rank 1 ktm-0 314 ktm-1 756 ktm-2 363 ktm-3 493 ktm-4 3493 ktm-5 590 ktm-6 249 dfcp 5 atm-0 6439 atm-1 0 atm-2 0 atm-3 0 atm-4 0 atm-5 0 atm-6 0 atm-7 0 atm-8 0 atm-9 0 atm-10 0 atm-11 0 rpar 0 vtm-0 1109 vtm-1 773 vtm-2 109 vtm-3 1072 vtm-4 213 vtm-5 0 vtm-6 83 scor 367 wdsk 3 wkl-0 15 wkl-1 2 wkl-2 9 wkl-3 9 wkl-4 3 wkl-5 4 wkl-6 0 wkl-7 2 wkl-8 3 wkl-9 7 wkl-10 0 wkl-11 2 wkl-12 3 wkl-13 0 heal 1 abr-0 76 abr-1 0 abr-2 0 abr-3 0 abr-4 0 abr-5 0 abr-6 0 abr-7 0 abr-8 0 abr-9 0 abr-10 0 abr-11 0 dsab 0 cdsc 0 tsql 5952 tsqm 216 loss 0 awn-0 7 awn-1 0 awn-2 0 awn-3 0 awn-4 0 awn-5 0 awn-6 0 awn-7 0 awn-8 0 awn-9 0 awn-10 0 awn-11 0 wins 7 vkl-0 50 vkl-1 9 vkl-2 1 vkl-3 35 vkl-4 1 vkl-5 0 vkl-6 3 twsc 45 bksk 10 time 6439 kill 161 rsup 0 tcdr 8 mtm-0 0 mtm-1 0 mtm-2 1371 mtm-3 2181 mtm-4 2887 mtm-5 0 mtm-6 0 mtm-100 0 mtm-101 0 mtm-102 0 mtm-103 0 mtm-104 0 mtm-105 0 mtm-601 0 mtm-300 0 mtm-301 0 mtm-302 0 mtm-303 0 mtm-304 0 mtm-305 0 mtm-306 0 mtm-307 0 mtm-10 0 mtm-11 0 mtm-110 0 mtm-200 0 mtm-201 0 mtm-202 0 vac-0 0 vac-1 0 vac-2 0 vac-3 0 vac-4 0 vac-5 0 vac-6 0 $ 872 $

    Mesage in log:
    URI: /ASP/getplayerid.aspx?nick=DooM
    Received PID data is INVALID, length 37
    Response: "O H pid D 29000126 $ 14 $" (w/out qoutes)

    ping bf2web.gamespy.com on server gives correct results... The same IP stands in BF2StatisticsConfig.py
     
  12. DarkWanderer

    DarkWanderer New Member

    Fixed. Just erased the damn Denwer and installed normal Apache+PHP.
    The trouble was that Denwer was adding CR sybmol somewhere in the response, so stats parser considered it to be invalid.
     
  13. mrc527

    mrc527 New Member

    Hi,
    I partially solved my problem: now i can set unlocks and see it on the server. It was a problem with the gamespy domain redirection. But i still not having any rank sign in the game: All people still as "privates".

    Any idea?
     
  14. shx03597

    shx03597 New Member

    Rank sign in Game - You mean BFHQ? Check Your Serversettings for using Global Ranks and Unlocks
     
  15. mrc527

    mrc527 New Member

    Hi, not, i does not mean BFHQ, I mean the small icon left of the name in the game.
    It's the same in the list of people connected to the server, i see all peole bots it's right, but all humans too, as privates, when in stats they are majors or oher.

    It's strange, may be the server cannot read from this stats script the rank?

    Bye!
     
  16. shx03597

    shx03597 New Member

    Well, I experience this too once in a while. Reduced it to the way I launch the Server (e.g. Serversettings). When Internet is tagged on and/or ranked then I mostly do not see any ranks ingame from human players, bots still do. Try or check these settings. Maybe its your problem as well.

    Cheers!
    shx03597
     
  17. sphinx

    sphinx New Member

    Hi, All!
    I have the same problem, but my web is Apache(1.3.33)+PHP(4.3.10) on Linux box. Game server on an another Linux box, bf2web... redirected to web server with DNS hook. On web server installed 1.4.2 bf2statistics. All ranks, awards and other i'm see in web statistics, but not in game. In game log:

    [blockquote]
    Retrieving player STATS via HTTP/1.1 miniclient
    ERROR: Received STATS data is NOT VALID, length 902
    Requesting player AWARDS
    Retrieving player AWARDS via HTTP/1.1 miniclient
    ERROR: Received AWARDS data is NOT VALID, length 356
    Retrieving Profile ID (wiZaRd) via HTTP/1.1 miniclient
    URI: /ASP/getplayerid.aspx?nick=wiZaRd
    Received PID data is INVALID, length 37
    Retrieving Profile ID (wiZaRd) via PID file
    Creating new record for player profileId 29000171
    [/blockquote]

    Anybody can help me?
    P.S. Sorry for dirty english, it's no my native language.
     
  18. mrc527

    mrc527 New Member

    So, the solution may be put my server as non ranked?

    I will try, but i dunno if it can work....it's really strange.

    BTW i see the same problem that other people reports: Invelid STATS and AWARDS in server log, it's that a problem?

    Thanks, bye!
     
  19. sphinx

    sphinx New Member

    I find problem solution(with invalid STATS, AWARDS), but not test it at that time, so later at that night. I'm add to PlayerManager.py some debugging code:

    after:
    Code:
    print "Received PID data is INVALID, length %d" % int(len(data))
    
    add:
    Code:
    print "INVALID PID data is [%s]" % data
    
    ,and have in game log:

    [blockquote]
    INVALID PID data is [19
    O
    H pid
    D 29000145
    $ 14 $
    0

    ]
    [/blockquote]
    - strange value '19' before expected 'O', and same in medals.py
    That have a easy solution:
    after:
    Code:
    data = http_get( http_backend_addr, http_backend_port, asp_playerid )
    
    add:
    Code:
    Opos = string.find(data,'O')
    data = data[Opos:]
    
    , and same in medals.py
     
  20. shx03597

    shx03597 New Member

    So far I dont remember having any logs stating illegal Stats or Awards. But I´ll do a check.