Tactical weapons and AIX

Discussion in 'BF2Statistics discussion' started by wbshrk, Apr 22, 2009.

  1. wbshrk

    wbshrk New Member

    Ok here is my dilemma, I am trying to get the tactical badge to work in AIX, but can not get any tactical deploy point. I have checked the constants.py which list several items as tactical weapons, but when I look at the log file they do not show up as a Tactical deploy i.e.

    log file:
    STATS onPlayerChangeWeapon jkkmnn newWeapon=hgr_incendiary triggering --> player.stats.weapons[newWeaponType].exit(player)
    STATS ObjectStat: jkkmnn Enter type=19 --- enterAt:264.355016 score:0

    "hgr_incendiary" : WEAPON_TYPE_TACTICAL,

    What can I do?
  2. Leon_tbk

    Leon_tbk Member

    What do you mean Tactical badges because? !search
  3. wbshrk

    wbshrk New Member

    the Tactical Support Weaponry Badge IAR: Deploy 10 tactical weapons. Badge number 1260602. I have time in tactical weapons, but no tactical deploys are reporting. I am not sure if this is AIX or the stats scripts causeing the problem.

    http://ubar.bf2s.com/badges-sf.php for badge information.
  4. Leon_tbk

    Leon_tbk Member

    On these orders, I no longer thought. !tooth
    Are you the Order "Zip Line" "Grappling Hook" counted?
  5. wbshrk

    wbshrk New Member

    Yes I am getting Zipline and Grappling hook Deploys and I get those bagdges, but I only get tactical time no deploys or kills.
  6. Leon_tbk

    Leon_tbk Member

    If you look at the database directly with phpmyadmin (or whatever) and run the following query:
    SELECT *
    FROM `weapons`
    WHERE `tacticaltime`> 0
    LIMIT 0, 30

    because you get what Displayed? !search

    Do you need to change a file for "Zip Line" "Grappling Hook"?
  7. wbshrk

    wbshrk New Member

    I get one record with a tactical time of 929. I did not have to change anything to get the zipline or grappling hook to work.
  8. Leon_tbk

    Leon_tbk Member

    But this is strange?

    The Zipline (and more) is only counted by a server with Special Forse.

    Look in the /ASP/bf2statistics.php

    Here, from line ~ 750 the following:

    * Process' Weapons'
    ErrorLog ( "Weapon Data Processing (". $ Data [ "$ x PID_ "].")", 3);
    If ($ data [ 'v']! = 'Xpack')
    $ Data [ "te6_ $ x"] = 0;
    $ Data [ "te7_ $ x"] = 0;
    $ Data [ "te8_ $ x"] = 0;
    $ Data [ "be8_ $ x"] = 0;
    $ Data [ "be9_ $ x"] = 0;
    $ Data [ "de6_ $ x"] = 0;
    $ Data [ "de7_ $ x"] = 0;
    $ Data [ "de8_ $ x"] = 0;

    Change to:

    / / If ($ data [ 'v']! = 'Xpack')
    / / (
    / / $ Data [ "te6_ $ x"] = 0;
    / / $ Data [ "te7_ $ x"] = 0;
    / / $ Data [ "te8_ $ x"] = 0;
    / / $ Data [ "be8_ $ x"] = 0;
    / / $ Data [ "be9_ $ x"] = 0;
    / / $ Data [ "de6_ $ x"] = 0;
    / / $ Data [ "de7_ $ x"] = 0;
    / / $ Data [ "de8_ $ x"] = 0;
    / /)

    Then play a round and look again into the database.
  9. wbshrk

    wbshrk New Member

    Sorry I forgot that I had already modified this part of the bf2statistics.php. Where it seems not to collect the stats is on the sever itself. The log file posted first is what the server dedug is saying, but when the snapshot file is created there is only tatical time no tatical deploys or kills.
  10. Thinner

    Thinner New Member

    Hi wbshrk,

    tactical deploys are collected if the DeployTactical server-event ist triggered. But this happens only on a few weapons as we have noticed. This has nothing to do with the weapon-type in constants.py. Perhaps it depends on the weapon-files or it's hardcoded in the server executable (this is my current guess).

    To verify we have to check a large number of tactical weapons in different mods to see if there is any relation.

    Simultaneously I will try to verify if it's hardcoded.

    BTW: I don't think you can kill somebody with a tactical weapon (flashbang, teargas, smoke grenade), but I don't know for sure.

  11. Thinner

    Thinner New Member

    After doing some research I can tell you that the DeployTactical server event is only triggered if the weapon-template-name contains "molotovcocktail", "flashbang" or "teargas". This is hardcoded in the server-executable. One solution could be to ask the mod-devs to rename there tactical weapons.

    But this solution is no solution.

    But there seems to be another way. The bulletsFired property is available for tactical weapons too.

    So we could change snapshot.py from
    ("de6", playerStat.weapons[WEAPON_TYPE_TACTICAL].deployed),
    ("de6", playerStat.weapons[WEAPON_TYPE_TACTICAL].bulletsFired),

    Then every usage of a weapon of type WEAPON_TYPE_TACTICAL declared in constants.py will increase tactical deploys.

  12. wbshrk

    wbshrk New Member

    Ok I will try this and see if it helps. thanks for the info.

Share This Page