Jump to content
PA-Sniv

IL2 server stats (unofficial)

Recommended Posts

"61-k turret 1124" is part of yesterday's new objects.csv file, did you update the file and run update.cmd?

 

:drinks:

Mike

Share this post


Link to post
Share on other sites
1 hour ago, SAS_Storebror said:

"61-k turret 1124" is part of yesterday's new objects.csv file, did you update the file and run update.cmd?

 

:drinks:

Mike

Yes. Updated today. The new file version wasn’t available when posting the issue. Works now.

Share this post


Link to post
Share on other sites

=FB=Vaal there is problem in web stats in situations when damaged airplane status in sortie log is ditched, and in aircraft status is Landed not on Airfield , that player who damaged him is not reworded with kill in web stats, but in in game chat and in game stats he is reworded with kill, like it should be.

 

This situation happends from what i could see when damaged airplane either lands with gear down on airfield that is not active airfiel/spawn, this i could see in my and tm8s case, and what i can not confirm but from what other players say maybe also it happends if damaged airplane lands but dont brake airplane/or lands with gear down on random area on his side.

 

 

EDIT: maybe % of damage have also something to do with this error in web stats recording kill on ditched airplanes

Edited by 77.CountZero

Share this post


Link to post
Share on other sites
13 hours ago, WWSitttingDuck said:

Can anyone tell me how we change the header logo to one of our squads pictures?  

Check the images in the /static/img folder.

 

And I think after changing, you need to run the collectstatic.cmd.

Edited by LLv34_Temuri
  • Like 1

Share this post


Link to post
Share on other sites

thank you.....

 

was right there in front of me and could not find it...

 

opps...there are 4 head_1 files there.....does it matter which one I edit, or do I have to edit all of them??

 

Edited by WWSitttingDuck

Share this post


Link to post
Share on other sites
19 hours ago, 77.CountZero said:

=FB=Vaal there is problem in web stats in situations when damaged airplane status in sortie log is ditched, and in aircraft status is Landed not on Airfield , that player who damaged him is not reworded with kill in web stats, but in in game chat and in game stats he is reworded with kill, like it should be.

 

This situation happends from what i could see when damaged airplane either lands with gear down on airfield that is not active airfiel/spawn, this i could see in my and tm8s case, and what i can not confirm but from what other players say maybe also it happends if damaged airplane lands but dont brake airplane/or lands with gear down on random area on his side.

 

 

EDIT: maybe % of damage have also something to do with this error in web stats recording kill on ditched airplanes

 

http://il2stat.aviaskins.com:8008/en/sortie/log/3811173/?tour=42

Another example. Nowhere near an airfield.

 

Share this post


Link to post
Share on other sites
18 minutes ago, =EXPEND=Tripwire said:

 

http://il2stat.aviaskins.com:8008/en/sortie/log/3811173/?tour=42

Another example. Nowhere near an airfield.

 

 

i can see a lot of examples of this now when i look for them ( from before 3.007 update also so its not game bug of new kill mehanics), never happend to me that airplane i damaged and let go didnt count in this way so i didnt noticed it before. What is important is from the point of view of player who ditched, did he lost wing or something from airplane, did he land with gear down, maybe if crash landing is hard and damage is 100% then its counting as crash, but if crash landing is soft then web stats dont count it as kill, like game does and like it should be counted as kill. I gues now that airplanes got stronger this will happend more often, as before you would lose wing most of time, now its engine so people more crash land, and untill vaal checks this out and see if its realy some bug in stats i expect more people to be efected by it, probably more on axis side as vvs airplanes are stil tuffer.

Edited by 77.CountZero

Share this post


Link to post
Share on other sites

I understood what you were talking about, but it would be easier for me if there were mission logs.

Share this post


Link to post
Share on other sites

Thanks for quick fix Vaal, i see in last web stats patch ditched airplanes are now consdered as shot down and attacker gets a kill.

Share this post


Link to post
Share on other sites

Anyone,

 

In a browser our stats page shows up as: http://xxx.xxx.xxx.xxx:8000/en/

the xxx are real numbers.

 

We have set it up with our provider to point http://stats.jg1.org  to this page but in the browser it changes to http://xxx.xxx.xxx.xxx:8000/en/

 

The provider said: " To actually have stats.jg1.org as a domain of that page, you need to set up the configuration on apache/nginx to accept calls for stats.jg1.com instead so that we can point our DNS server there and it will behave like a website running on stats.jg1.com instead of the IP. "

 

Where do I do this? Beyond my knowledge

 

Any help would be greatly appreciated!

Share this post


Link to post
Share on other sites

Attention, what you're doing there is risky.

Not particularly in itself, but the fact that you're hosting a server connected to the internet without knowing what you're doing is risky.

And it's even more risky to do so when you have a provider in your back who doesn't seem to have the full picture either.

 

Now to answer your question... What your provider suggests is to reverse proxy the calls for your subdomain to a different IP than the one you're using on your "main" domain account.

To do so, you'd typically have nginx running on your "main" IP and use server block files to reverse proxy the subdomain to a different IP address running e.g. the apache server to host the page there (or in this case: The IL-2 stats "waitress").

There's a quite good description here, written for Ubuntu 14.04 but the procedure is the same for other systems: https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts

 

Now the question remains why your provider doesn't offer you the simple way of adding an "A" type DNS entry to point the subdomain to your new IP directly?

 

And let me add that all of this is just very, very remotely connected to IL-2 Stats and probably doesn't belong here at all.

 

:drinks:

Mike

Share this post


Link to post
Share on other sites

Hi, could name  of the pilot (in blue) can be linked  (just click on the name)  to his pilot statistics ? 

This is from my sortie log.

 

image.thumb.png.ab2403f246a62283087f04b836796b30.png

 

Edited by 307_Tomcat

Share this post


Link to post
Share on other sites
10 hours ago, SAS_Storebror said:

Attention, what you're doing there is risky.

Not particularly in itself, but the fact that you're hosting a server connected to the internet without knowing what you're doing is risky.

And it's even more risky to do so when you have a provider in your back who doesn't seem to have the full picture either.

 

Now to answer your question... What your provider suggests is to reverse proxy the calls for your subdomain to a different IP than the one you're using on your "main" domain account.

To do so, you'd typically have nginx running on your "main" IP and use server block files to reverse proxy the subdomain to a different IP address running e.g. the apache server to host the page there (or in this case: The IL-2 stats "waitress").

There's a quite good description here, written for Ubuntu 14.04 but the procedure is the same for other systems: https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts

 

Now the question remains why your provider doesn't offer you the simple way of adding an "A" type DNS entry to point the subdomain to your new IP directly?

 

And let me add that all of this is just very, very remotely connected to IL-2 Stats and probably doesn't belong here at all.

 

:drinks:

Mike

Mike,

 

Thanks for your time. I completely agree with all you said.

The main reason I posted was to get feedback exactly as you gave it, for that I'm very appreciative!

 

I will be going back to the provider later to day!

 

Again thanks!!

Share this post


Link to post
Share on other sites
Posted (edited)

Vaal, is there any way I can edit the html of my stats page to include this:

 

I have a rotating banner, but as it is now, Edge seems to be the only browser that updates the page.  I can not get Chrome to not use the cache, and have to hit F5 to refresh the page.

 

<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-store" />
<meta http-equiv="expires" content="-1" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
HE-CONTROL” content=”NO-CACHE”>
Edited by WWSitttingDuck

Share this post


Link to post
Share on other sites

The key to success is to add a "virtual" parameter to the image URL.

I'm not a Python expert, but in php you would do it like this:

Say your banner image is called "banner.jpg" and your server's base URL is stored in "baseUrl" and the corresponding filesystem folder in "baseDir" parameter, then you'd output...

$baseUrl."banner.jpg?".filemtime($baseDir."banner.jpg")

...in order to let every browser reload the banner image every time you rotate it.

If you have a limited set of banner images on rotation, you might not want to make browsers reload the same image over and over again when it comes back into rotation, in which kind you'd add the banner's CRC value instead of it's creation time:

$baseUrl."banner.jpg?".hash_file("crc32b", $baseDir."banner.jpg")

 

As I said, I'm not a Python expert so this technique would now need to be translated to Python.

 

:drinks:

Mike

Share this post


Link to post
Share on other sites

You can edit the file src\stats\templates\base.html

But in general it is strange. Do your statistics also cached?

Share this post


Link to post
Share on other sites

Completely disabling the caching mechanism isn't such a good idea since it would affect all static images in the same way.

That's why you should rather make the banner image appear "new" as I've mentioned before, and that's also why many browsers simply ignore requests to completely turn off caching and rather rely on whether they think they've seen that supposedly static content before.

 

:drinks:

Mike

Share this post


Link to post
Share on other sites
Posted (edited)

vaal...saw the base.html, but have no clue how to edit that, so will leave it alone.

well mike...you know more then me.....

I am doing this the only way I knew how...with a dos command...

 

:begin

delete banner 1

copy jpg1 banner 1

pause 360

delete banner 1

copy jpg2 banner 1

etc ect ect

 

 

 

Edited by WWSitttingDuck

Share this post


Link to post
Share on other sites

Exchanging the file is just fine @WWSitttingDuck, what I'm trying to say is that it's a bad idea to disable caching from HTML headers.

Problem is that currently the header image is loaded statically from css.

Instead, it would need to be loaded dynamically from scripts at runtime, in order to add that special "creation time" or "hash" parameter to the URL which would then cause browsers to specifically reload that file once it's been replaced by your dos/batch commands.

 

But that'd require changes to the code and I'm not sure how keen Val is to do this, just in order to make the header imager rotateable.

 

Just keep in mind that the poor man's "solution" of setting the cache interval for all your site's content to "0" is really a bad hack which won't give you the desired results, but instead will cause undesired side effects.

 

:drinks:

Mike

Share this post


Link to post
Share on other sites

Can I specify a reward based on if a pilot is in a fighter vs a bomber?  

In other words, if I am giving a figher an award for getting 5 ground kills, I do not want to give a bomber the same award.

 

I went thru the models.py, and could not find anything that stuck out.

 

But am curious, what are these? (figher air kills would be a guess)

fak_total = models.IntegerField(default=0)
fgk_total = models.IntegerField(default=0)
 

Edited by WWSitttingDuck

Share this post


Link to post
Share on other sites
Цитата

But am curious, what are these? (figher air kills would be a guess)

fak_total = models.IntegerField(default=0)
fgk_total = models.IntegerField(default=0)

no, it's friendly fire

 

Цитата

In other words, if I am giving a figher an award for getting 5 ground kills, I do not want to give a bomber the same award.

 

If we are talking about the reward for the sortie , you can try this:

sortie.aircraft.cls == 'aircraft_light'

 

 

  • Like 1

Share this post


Link to post
Share on other sites

When will a player "loose" an award?

 

I put this in:

 

# current streak 10ak in tour
def st_10(player):
    return player.streak_current >= 10

 

And got the correct award, then killed myself, expecting to loose the reward, but it is still there.

 

If I looked at it correctly, the only class for streak or streak_current is player.

Edited by WWSitttingDuck

Share this post


Link to post
Share on other sites

Other than inspecting the element on the stats web page, is there a better way of finding the profile_id #'s ?

 

And, is there any way to control the order awards appear on the awards page?  I finally figured out how to give the squads officers lapels, and would like them to appear at the beginning of the awards

Share this post


Link to post
Share on other sites
Цитата

Other than inspecting the element on the stats web page, is there a better way of finding the profile_id #'s ?

 

I do not understand where you are trying to find id. For what?

 

Цитата

And, is there any way to control the order awards appear on the awards page?  I finally figured out how to give the squads officers lapels, and would like them to appear at the beginning of the awards

 

Awards are sorted by date of issue. There is no ready way to change the sorting. You can try to edit the pilot_awards function yourself.

Share this post


Link to post
Share on other sites

if I use the developer tools on my Il2 Stats page,  I get this information.   Squad CO is pilot 2.

 

lapel1.thumb.jpg.7ce934735119efa675c7ea57406d538a.jpg

 

then in rewards.py, i define this

#CO
def co(sortie):
    return sortie.profile_id == 2

 

and CO ends up with this in their awards; label2.jpg.22ceb6abc2b1ae1a31b4aa64fb61ce7a.jpg

 

 

Would like to issue other awards to squad members for merit achievement other than what they do in game.  Just wanted to know if their ID showed up in another place that was easier to find.

Share this post


Link to post
Share on other sites

You can find this ID in the address bar of the browser when the player profile is open. Or in the admin panel.

Share this post


Link to post
Share on other sites

Hi,

 

I was doing the update from 1.2.28 to 1.2.29

I replaced all the files and completed the new conf.ini with my previous settings.

 

Then I ran update.cmd but it stops at

"../.venv/Scripts/python.exe" manage.py migrate --noinput --verbosity 1

 

I set verbosity 1 to see if there are some problems but nothing is going on, I don't have anything from this command (and it doesn't end).

Share this post


Link to post
Share on other sites
"../.venv/Scripts/python.exe" manage.py migrate

replace the line with this one. This should give more information.

This is the command to update the database schema.
The scheme has not changed in this version. So maybe statistics can't connect to the database.

Share this post


Link to post
Share on other sites

My postGresql service didn't start after my last reboot...

I'm ashamed, thank you very much for your quick response Vaal.

 

Sorry again :)

Share this post


Link to post
Share on other sites

Vaal,  can parenthesis be used to show priority of sequence in the rewards.py?

 

for an award for flying Axis in a bomber with 20gk and 2ak, i start out with this:

 

def g_b_s2ak_20gk(sortie):
    return sortie.coalition == 2 and sortie.aircraft.cls == 'aircraft_medium'  or sortie.aircraft.cls == 'aircraft_heavy' and sortie.gk_total >= 20 and sortie.ak_total>= 2

 

but to make sure that is interpreted as I want, I edit it to this.

 

def g_b_s2ak_20gk(sortie):
    return sortie.coalition == 2 and (sortie.aircraft.cls == 'aircraft_medium'  or sortie.aircraft.cls == 'aircraft_heavy') and sortie.gk_total >= 20 and sortie.ak_total>= 2

 

It is not kicking out with an error, but am not sure if that means it is working.

Share this post


Link to post
Share on other sites

lol...thanks...

 

I think for me trying to do it the way you explained  would be more difficult. but very interesting way of doing things for sure...

 

so are you saying this [(sortie.aircraft.cls == 'aircraft_medium' ] is prefereed over this:(sortie.aircraft.cls == 'aircraft_medium')

Share this post


Link to post
Share on other sites
Цитата

so are you saying this [(sortie.aircraft.cls == 'aircraft_medium' ] is prefereed over this:(sortie.aircraft.cls == 'aircraft_medium')

 

I did not quite understand this example

 

If we talk about

def g_b_s2ak_20gk(sortie):
    return sortie.coalition == 2 and sortie.aircraft.cls == 'aircraft_medium'  or sortie.aircraft.cls == 'aircraft_heavy' and sortie.gk_total >= 20 and sortie.ak_total>= 2
def g_b_s2ak_20gk(sortie):
    return sortie.coalition == 2 and (sortie.aircraft.cls == 'aircraft_medium'  or sortie.aircraft.cls == 'aircraft_heavy') and sortie.gk_total >= 20 and sortie.ak_total>= 2

 

This code looks identical. But adding parentheses makes it clearer. And will allow to avoid in the future some logical errors in the case of expanding conditions.

Share this post


Link to post
Share on other sites

i ust noticed that since 1.2.29 shooting down bomber is reworded 2xpoints (200) then shooting down fighter (100), before this update it was always same amount for shoot down airplane no mather of type.

to me it is mutch easyer to shoot down bombers when you know how they cant tuch you unlike fighters, why reword is double i dont understand, also when bunty on bombers is that high its just making them even bigger targets now.

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...