Jump to content

IL-2 Stats Mod Bundle: Disco + Tanks + Enhancements + Global Aircraft Stats


Recommended Posts

Posted
59 minutes ago, =FEW=Revolves said:

 

Sorry for the late reply, I was gone on vacation - I've been meaning to add in an option to disable all the tank stuff as a config option, it's just been rather low priority.

 

To do it on your end: In src/mod_rating_by_type/ you will find a bunch of html files. Open up base.html with a text editor.

 

Line 87 of the html should be:

 

```

                    <a href="{% url 'stats:tankmans' %}?tour={{ request.tour.id }}">{% trans 'Tankman Rankings' %}</a>

```

 

Completely remove that line and restart the server (restart waitress.cmd). This will remove the tank rankings navigation option at the top.

 

-----

 

There will probably be some references to tanks there and there, but that should be the bulk of it.


 

 

 

Thank you for your reply, Revolves!

Yes, your description did work. Unfortunately just in the sub menu. I just need to find a way to get of the other tank related entries ... ;)

  • Upvote 1
=FEW=Revolves
Posted
3 minutes ago, =FI=Genosse said:

 

Thank you for your reply, Revolves!

Yes, your description did work. Unfortunately just in the sub menu. I just need to find a way to get of the other tank related entries ... ;)

For the front page you can look at main.html in the same folder, I think only there are two parts doesn't automatically filter itself out

 

Line 233:

 

                <div class="full_rating">
                    <a href="{% url 'stats:tankmans' %}?tour={{ request.tour.id }}">
                        <span>
                            {% trans 'Overall Tankman Rankings' %}
                        </span>
                    </a>
                </div>

 

Line 424:

 

<div class="top_pilots">
                    <div class="title">{% trans 'Top Tankmen' %}</div>
                    <div class="top_pilots_columns">
                        {% for player in previous_tour_toptank %}
                            <a class="pilot" href="{{ player.get_tankman_url }}">
                                <div class="num">{{ forloop.counter }}</div>
                                <div class="nickname">{{ player.nickname }}</div>
                            </a>
                        {% endfor %}
                    </div>
                </div>

 

You can remove those two references and the front page should be free of tank references.

 

Most of the other tank fields should automatically filter themselves out if the website sees there are no tank players, what other ones do you see? If it's on the main page, searching the main.html for "tank" should get you to the sections which include tank stats.

Posted

As far as I can see I found all the tank related entries. Thanks for your help, Revolves! Much appreciated. :good:

  • Upvote 1
  • 1 month later...
=gRiJ=ToReRo
Posted (edited)

 

Hello, I am having this error in tank missions on my campaign server, Grij Arena, can you tell me what I am doing wrong specifically, the error is giving me in tank missions, in airplane 500 server error

 

 

Edited by =gRiJ=ToReRo
=FEW=Revolves
Posted (edited)
3 hours ago, =gRiJ=ToReRo said:

image.thumb.png.f8cfebde7c06aef6b98fd9aeae0640e5.png

Hello, I am having this error in tank missions on my campaign server, Grij Arena, can you tell me what I am doing wrong specifically, the error is giving me in tank missions, in airplane

 

image.thumb.png.20ef78a4f6f7909e61c8d1922b48c7c2.png

Hey! Can you check your logs for an error message? A 500 server error can mean a lot of different things are wrong.

 

The error should be recorded be in django.log inside your stats folder which you can open using notepad, and look something like this (you might need to scroll a bit or search for ERROR in the file):

 

 

2022-10-31 16:30:14,974 ERROR Internal Server Error: /en/
Traceback (most recent call last):
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\core\handlers\exception.py", line 41, in inner
    response = get_response(request)
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\core\handlers\base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\core\handlers\base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\Revolves\AppData\Local\Programs\Python\Python35-32\lib\contextlib.py", line 30, in inner
    return func(*args, **kwds)
  File "C:\Users\Revolves\il2_stats\src\mod_rating_by_type\views.py", line 495, in main
    return main_itaf(request)
  File "C:\Users\Revolves\il2_stats\src\mod_rating_by_type\views.py", line 615, in main_itaf
    top_mission_streak = __top_mission_current_streak(request.tour)
  File "C:\Users\Revolves\il2_stats\src\mod_rating_by_type\views.py", line 707, in __top_mission_current_streak
    relive=0
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\query.py", line 787, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\query.py", line 805, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1250, in add_q
    clause, _ = self._add_q(q_object, self.used_aliases)
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1276, in _add_q
    allow_joins=allow_joins, split_subq=split_subq,
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1154, in build_filter
    lookups, parts, reffed_expression = self.solve_lookup_type(arg)
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1034, in solve_lookup_type
    _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta())
  File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1352, in names_to_path
    "Choices are: %s" % (name, ", ".join(available)))
django.core.exceptions.FieldError: Cannot resolve keyword 'type' into field. Choices are: accuracy, aircraft_status, ak_assist, ak_total, ammo, bailout, bot_status, captured, ce, cls, coal_pref, crashed, date_first_sortie, date_last_combat, date_last_sortie, dead, disco, ditched, fak_total, fgk_total, flight_time, gk_total, gkhr, gkl, gks, id, in_flight, khr, killboard_pve, killboard_pvp, kl, ks, landed, mission, mission_id, player, player_id, profile, profile_id, ratio, relive, respawn, score, score_heavy, score_light, score_medium, shotdown, sorties_cls, sorties_coal, sorties_total, status, takeoff, tour, tour_id, wl, wounded
2022-10-31 16:41:00,860 ERROR Internal Server Error: /en/

 

 

Edited by =FEW=Revolves
  • Thanks 1
=gRiJ=ToReRo
Posted (edited)
Thank you very much for your quick response, I skipped a step in the src by adding the module section, it was corrected

erreo.png

Edited by =gRiJ=ToReRo
  • Upvote 1
  • 10 months later...
=gRiJ=ToReRo
Posted

That's the output of my IL-2 Stats reporter since the latest 5.506 update. Any idea what to do?

2025.02.04 17:08:09] Lock 82820880 acquired on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock
[2025.02.04 17:08:09] IL2 stats 1.2.81, Python 3.5.2, Django 1.11.29
[2025.02.04 17:08:09] missionReport(2025-02-04_15-00-51)[0] - processing new report
[2025.02.04 17:08:09] tik: 69350 - respawn before than bot initialization
[2025.02.04 17:08:11] missionReport(2025-02-04_15-00-51)[0] - processing finished
[2025.02.04 17:08:11] waiting new report...
[2025.02.11 17:04:48] Lock 75153168 acquired on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock
[2025.02.11 17:04:48] IL2 stats 1.2.81, Python 3.5.2, Django 1.11.29
[2025.02.11 17:04:48] unexpected error
Traceback (most recent call last):
  File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\management\commands\stats_whore.py", line 16, in handle
    stats_whore.main()
  File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\stats_whore.py", line 72, in main
    online_timestamp = update_online(m_report_files=m_report_files, online_timestamp=online_timestamp)
  File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\online.py", line 47, in update_online
    _countries[country] = COALITION_ALIAS[coalition]
KeyError: 9
[2025.02.11 17:04:48] Lock 75153168 released on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock
[2025.02.11 17:05:37] Lock 76922640 acquired on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock
[2025.02.11 17:05:37] IL2 stats 1.2.81, Python 3.5.2, Django 1.11.29
[2025.02.11 17:05:37] unexpected error
Traceback (most recent call last):
  File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\management\commands\stats_whore.py", line 16, in handle
    stats_whore.main()
  File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\stats_whore.py", line 72, in main
    online_timestamp = update_online(m_report_files=m_report_files, online_timestamp=online_timestamp)
  File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\online.py", line 47, in update_online
    _countries[country] = COALITION_ALIAS[coalition]
KeyError: 9

super-truite
Posted

same problem. For some reasons there are new "coalitions" and this leads to error because they are not defined in this file :

"\il2_stats\src\mission_report\constants.py"
As a workaround you can define the missing coalitions by just adding new fields in the line 52.
Like this :

 

COALITION_ALIAS = {
    0: Coalition.neutral,
    1: Coalition.coal_1,
    2: Coalition.coal_2,
    3: Coalition.coal_1,
    4: Coalition.coal_2,
    5: "Unknown5",
    6: "Unknown6",
    7: "Unknown7",
    8: "Unknown8",
    9: "Unknown9",
}

then update and restart stats 

  • 6 months later...
Posted

Is this mod working with the new planes and stats?

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