Jump to content
PA-Sniv

IL2 server stats (unofficial)

Recommended Posts

Ok, next time i'll backup all logs folder before restart server and stats.

Also, would be very good if someday statistics for tank crew will be available in il2stats :blush:

And who is on server now (like 72AG-DED- Random server stats page) :crazy:

Share this post


Link to post
Share on other sites

It happend again

[2016.09.04 18:37:09] missionReport(2016-09-04_11-35-29)[0] - exists in the DB
[2016.09.04 18:37:09] missionReport(2016-09-04_14-35-38)[0] - processing new rep
ort
[2016.09.04 18:37:09] tik: 313380 - respawn before than aircraft initialization
[2016.09.04 18:37:09] tik: 313380 - respawn before than bot initialization
[2016.09.04 18:37:09] unexpected error
Traceback (most recent call last):
  File "F:\il2_stats\src\stats\management\commands\stats_whore.py", line 16, in
handle
    stats_whore.main()
  File "F:\il2_stats\src\stats\stats_whore.py", line 61, in main
    stats_whore(m_report_file=m_report_file)
  File "C:\Users\Миша\AppData\Local\Programs\Python\Python35-32\lib\contextlib.p
y", line 30, in inner
    return func(*args, **kwds)
  File "F:\il2_stats\src\stats\stats_whore.py", line 153, in stats_whore
    m_report.processing(files=m_report_files)
  File "F:\il2_stats\src\mission_report\report.py", line 108, in processing
    self.events_handlers[atype_id](**data)
  File "F:\il2_stats\src\mission_report\report.py", line 316, in event_game_obje
ct
    country_id=country_id, coal_id=coal_id, parent_id=parent_id)
  File "F:\il2_stats\src\mission_report\report.py", line 419, in __init__
    obj = mission.objects[self.log_name]
KeyError: 'cturretcamera'

 

 

Logs from last missions in attach

Новый текстовый документ.txt

2.zip

Share this post


Link to post
Share on other sites

Ok, run update.

What about tons of logs in txt folder, if i clean up them, and run stats, it will affect on stats at web-page?

Or leave it until hdd space enough?

Share this post


Link to post
Share on other sites

set 

mission_report_delete = true

in conf.ini

 

this should help

but can be removed manually

Share this post


Link to post
Share on other sites

Thank you very much, =FB=Vaal, for you great work for community and for new features, added in il2_stats :good:

I hope in future you add stats for tank drivers, on our server we have players who come only for tanks gameplay, they not shown in stats cause don't flight.

It same AType:10 as a airplane in logs, but no stats :huh:

Share this post


Link to post
Share on other sites

I still didn't understand how to made custom awards, as in readme, i add in src/custom/rewards.py function, add in admin panel, restart stats, no error messages, but award not appear on the player stats page.

Then i add custom award and restart stats it will affect for all players achievements in statistic or only for future missions? For example i made a test award for one ground kill in sortie, for easy testing, but it not shown on stats page.

Have no idea where my mistake :huh:

Share this post


Link to post
Share on other sites

 

 

only for future missions?
 

Find answear :biggrin:

 

 

no error messages,

No

 [2016.09.09 09:02:42] missionReport(2016-09-09_06-02-11)[0] - processing new report

[2016.09.09 09:02:43] unexpected error
Traceback (most recent call last):
  File "F:\il2_stats\src\stats\management\commands\stats_whore.py", line 16, in handle
    stats_whore.main()
  File "F:\il2_stats\src\stats\stats_whore.py", line 63, in main
    stats_whore(m_report_file=m_report_file)
  File "C:\Users\Миша\AppData\Local\Programs\Python\Python35-32\lib\contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "F:\il2_stats\src\stats\stats_whore.py", line 241, in stats_whore
    reward_sortie(sortie=new_sortie)
  File "F:\il2_stats\src\stats\rewards.py", line 38, in reward_sortie
    if get_reward_func(award.func)(sortie=sortie):
  File "F:\il2_stats\src\custom\rewards.py", line 19, in test
    light = player_sortie.killboard_pve.get('tank_light', 0)
NameError: name 'player_sortie' is not defined
 
test award was:
def test(player_sortie):
    light = player_sortie.killboard_pve.get('tank_light', 0)
    medium = player_sortie.killboard_pve.get('tank_medium', 0)
    heavy = player_sortie.killboard_pve.get('tank_heavy', 0)
    total = light + medium + heavy
    return total >= 1

where my mistake?ndj73qu.png

Share this post


Link to post
Share on other sites

Ok, awards for mission is work. Finally i learn it :biggrin:

But that about error for awards in sortie? 

Can i add two similiar awards, for example: for 5 and for 10 tanks in mission? One award for 5 ground kills and another for 10? Or it give two award for 5? :wacko:

Share this post


Link to post
Share on other sites

def test(player_sortie):

should be

def test(sortie):

 

> Can i add two similiar awards, for example: for 5 and for 10 tanks in mission?

yes

 

> Or it give two award for 5?

no

during the tour the player may have only one unique award

Share this post


Link to post
Share on other sites

Menacing Ferrets Custom Awards Viewer

 

 

 

See it on stats page here

 

and here's the rewards.py

	#Sortie Awards
	# 5 air kills in one sortie ACE IN A SORTIE
def fighter_hero(sortie):
    return sortie.ak_total >= 5

	# 10 ground kills in one sortie GROUND POUNDER
def ground_pounder(sortie):
    return sortie.gk_total >= 10
	
	
	
	# 2 air kills and 5 ground kills in one sortie MULTI-ROLE TIER 1
def multi_role(sortie):
    return sortie.ak_total >= 2 and sortie.gk_total >= 5	
	
	# 5 air kills and 10 ground kills in one sortie MULTI-ROLE TIER 2
def multi_roleA(sortie):
    return sortie.ak_total >= 5 and sortie.gk_total >= 10		

	# Mission Awards
	
	# 10 air kills in one mission MISSION HERO
def mission_hero(player_mission):
    return player_mission.ak_total >= 10
	
	# 20 ground kills in one mission ATTACKER
def attacker(player_mission):
    return player_mission.gk_total >= 20

	
	
	# 5 air kills and 10 ground kills in one mission LEGION OF THE FERRET TIER 1
def legion(player_mission):
    return player_mission.ak_total >= 5 and player_mission.gk_total >= 10		

	# 10 air kills and 20 ground kills in one mission LEGION OF THE FERRET TIER 2
def legionA(player_mission):
    return player_mission.ak_total >= 10 and player_mission.gk_total >= 20	
	
	# Tour Awards
	
	# 5 air kills in a tour ACE
def ace(player):
    if player.ak_total >= 5:
        return True
		
	# 20 air kills in a tour ORDER OF THE FERRET
def example_2(player):
    if player.ak_total >= 20:
        return True

		
		
# 10 air kills and 100 ground kills EXPERT PILOT TIER 1
def example_5(player):
    return player.ak_total >= 10 and player.gk_total >= 100
		
# 20 air kills and 200 ground kills EXPERT PILOT TIER 2
def example_3(player):
    return player.ak_total >= 20 and player.gk_total >= 200

Thanks again for such a wonderful resource....

 

 

Question: What is the syntax for an award where a pilot lands on airfield 25 times in a tour?

Share this post


Link to post
Share on other sites

Нужны логи миссии на которой происходит ошибка и дамп базы данных статистики на момент ошибки.

Share this post


Link to post
Share on other sites

Hi Faal, we have version 1.1.1.beta and wanted to update to version 1.2.1.

 

We update to 1.1.2.beta and after that to 1.2.1. . All works without an error, but on the next day we saw the the Python script didnt undertand the Mission file (i dont have the exact error message).

A firend roll back to 1.1.1.beta which works again without a problem.

Can we update after a new release from 1.1.1.beta direct to 1.2.2 ?

Share this post


Link to post
Share on other sites

 

Can i do it with pg admin or only by a command line?

 

любым удобным способом

 

 

 

Can we update after a new release from 1.1.1.beta direct to 1.2.2 ?

 

Yes,  important to update all the files that have changed or been added since version 1.1.1.beta

Share this post


Link to post
Share on other sites

We love to run missions with human tankers on our Friday Night online events. Is there any chance you might implement stats for tanks?

Edited by [DBS]El_Marta
  • Upvote 1

Share this post


Link to post
Share on other sites

The chances are very small. A good implementation (comparable to pilots) requires a lot of time.

Share this post


Link to post
Share on other sites

Hello =FB=Vaal

I have tried to update 1.2.2 to 1.2.3:

Stopped all process and close IL2.

Copy and paste all files and folders of the IL2_Stats1.2.3.zip on the existing and functional IL2_stats(1.2.2)

Adjusted the src\conf.ini to be as before

Run the updater.cmd

Got an error that cannot find the proper version of Django.

Python version is 3.5.2

PostgreSQL version is 9.5.4-2

Am I doing something wrong?

 

Love you application, by the way. :)

Edited by II./JG1_Kadin

Share this post


Link to post
Share on other sites

Hi, I see in the stats web page that my missions' time is 3 hours ahead from my time zone.  Is there a specific file or application that time zone can be adjusted?

Share this post


Link to post
Share on other sites

Hi Vaal,

 

i am getting an error during installation, any idea how to fix it?

 

Missing modules are actually installed. 

 

Thank you in advance!!!

 

 

post-15402-0-99155500-1479136481_thumb.jpg

Share this post


Link to post
Share on other sites

You have installed the modules in the system python. But the statistics using a virtual environment, so as not to clutter up the global python.

 

Send me a archive file with this directory.

c:\python\python35-32\lib\site-packages\PIL

 

As a workaround, change install.cmd

cd ../
python -m venv --clear .venv
".venv/Scripts/python.exe" -m pip install -r requirements.txt
pause
cd src
"../.venv/Scripts/python.exe" manage.py collectstatic --noinput --verbosity 0
pause
"../.venv/Scripts/python.exe" manage.py migrate --noinput --verbosity 0
pause
"../.venv/Scripts/python.exe" manage.py import_csv_data --verbosity 0
pause
"../.venv/Scripts/python.exe" manage.py createsuperuser --verbosity 0
pause

Share this post


Link to post
Share on other sites

Here is the zipped folder 

 

c:\python\python35-32\lib\site-packages\PIL

 

when i use the workaround i get to this error

post-15402-0-94364700-1479139047_thumb.jpg

PIL.zip

Share this post


Link to post
Share on other sites

Unfortunately I can not help, because I have no idea which is why there can be such a problem.

I can only offer remove the installed python, and re-install the 64 bit version.

https://www.python.org/ftp/python/3.5.2/python-3.5.2-amd64.exe

After start the installation with the default install.cmd

 

If this does not work, I can try to solve the problem if I have remote access to the server.

Share this post


Link to post
Share on other sites

Ok, i have reinstalled Python as you suggested and now i get this.

 

post-15402-0-96219300-1479156065_thumb.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...