Jump to content

[MOD] Awards/Medals for IL-2 stats


Recommended Posts

Posted (edited)

I noticed that not many servers have awards so here is medals and functions i edited for rewards in IL-2 stats system by Vaal and Isay, if you wont to use them.

 

Link with changed files and medal pictures (pictures are extracted from game, renamed, cut and converted in png, exept West Wall Medal i added as supstitute for Kuban Shield or Eastern Front Medal for example if server is west front orianted, pictures of Hakenkreuz Axis medals are used from Mitthrawnuruodo mod (also converted to png, cut and renamed to work on stats)). This version is for airplane servers :

https://www.mediafire.com/file/grdgjzyrbqrfslc/rewardsv1.2.zip/file

 

version 2 of mod is for server that use stats for pilot and tank players, this version is sme as v1 but with edits to as most medals posible to show up for both type of players:

https://www.mediafire.com/file/o4q617xu1p8jrf3/rewardsv2.zip/file

 

You can just copy and paste thouse files in your Il-2 stats src folder

Picture of how it looks:

Spoiler

AXIS example:

Axisexample.thumb.jpg.df46d9a3ea3b8ecd6f9c2d5011835451.jpg

VVS example:

Alliedsexample.thumb.jpg.dcfdbb23d007bd07ac48072800fe62c4.jpg


File rewards.py (in your stats custom folder) contains functions neccesary for activation of each medal, in original you have 4 test examples here is added 52.
Folder medals contain pictures of medals (159) , you can place that folder any where you wont (i have it in main folder for stats)

Hakenkreuz medal pictures used from this mod by Mitthrawnuruodo:

Spoiler

 

 

 

aditional small changes:
-in pilot_awards.html file, i removed hight restriction for medals pictures. Also name of medal moved to be displayed below it, insted abow like original.

-in models.py file, in "Class Player" and "Class PlayerMission" in "def update_coal_pref(self):" i change ratio from 60/40 to 99/1 (lines 565,567 and 691,693). So for example your getting Axis medals if you achive conditions neccesary only doing it in axis airplanes in duration of tour or mission.


Instructions how to add medals are in your servers IL-2 stats main folder in AWARDS.en.html file. From that file:

Spoiler

 

IL2 stats Awards system

 

The system has three types of awards:
    -rewards for achieving some results during one tour, (player)
    -rewards for achieving some results during one mission, (player_mission)
    -rewards for achieving some results during one sortie, (sortie)

 

The award is added and changed in three steps:

    -Step 1 - the conditions for award:
     Each award requires the function that specifies the conditions of receiving the award.
     These functions must be in src/custom/rewards.py file. Examples of functions are in the file.

   

    -Step 2 - Information about the award in the database statistics
     If in the database does not entry about specific award, award function will not be used.
     To add or change the awards need to go to the admin panel statistics. Now there is a new section - "awards". Editing form contains more fields:
     Function name - is the name of your function in rewards.py file. If a function with the specified name is not be found - the statistics script will stop working.
     Title - The name of the award in several languages.
     Type - is the type of award. What are the types exists described above.
     Description - description of awards, or conditions.
     Image - the image itself award. 
                
    -Step 3 - Restart statistics
     Once it was created or altered function of award, as well changes to the database - you need to restart the script of statistics.

 

 

So after you download files and pictures you will still have to add each medal manualy in your server admin panel, i placed picture name, description/conditions abow each reward function in rewards.py to make it easyer. 

 

I was not able to make awarding work for Allied side medals depending on if airplane used is vvs, raf or usaf, so player get that country medals only (it worked only for sortie type functions, not for player or player_mission). If i figure out how to make that work for example in same way coal_pref works or maybe use fav_airplane, i will post update. But if your west front orianted server you can use Allied funtions and just insted russian medal pictures for medals use usaf or raf ones.

 

You can adjust conditions in reward.py to what fits your server, this is like a starter pack, and some numbers are maybe to low or to high for your type of server.

 

Post  here if you notice any problems

Edited by CountZero
added new version 1.2 and version 2 for tankers
  • Like 4
  • Thanks 3
  • Upvote 3
  • 1 year later...
Posted

@CountZero

Greetings!

I was curious where you managed to get such amazing png's of medals.

I must say that I'm guilty and I don't have the game, and I found this post via google images while doing some medal research. I'm an avid medal collector, self proclaimed medal historian, and I love to use high quality png's such as the ones you have in my medal artwork in photoshop.

 

If you could please respond, I'd be more than gracious as these images are brilliant! Thank you so much!

Posted

Hi

 

I extracted them from game files with unGTP-IL2.exe, devs made thouse medals for in game player career they are not made by me.

I think i just had to convert them to png from dds.

I think you would have to ask devs if you plan to use them for anything els then free stuff for game.

  • 4 months later...
JV44HeinzBar
Posted (edited)
On 1/27/2020 at 6:05 PM, CountZero said:

You can just copy and paste thouse files in your Il-2 stats src folder

Hey Countzero,

Where exactly is this folder located? I can't seem to find it. BTW, the link you provided doesn't show what the medal is for "Fighter Hero", at least not for me...it's blank.

 

Thanks for the effort.

 

HB

 

Edited by JV44HeinzBar
Posted (edited)
14 hours ago, JV44HeinzBar said:

Hey Countzero,

Where exactly is this folder located? I can't seem to find it. BTW, the link you provided doesn't show what the medal is for "Fighter Hero", at least not for me...it's blank.

 

Thanks for the effort.

 

HB

 

Fighter Hero and other 3 or 4 like that are default test/example scripts for awards that come with original stats system, so i didnt change them or add pictures for them, i think they have pictures for them somwhere in original files but like for any awards server admin need to add them manualy.

I expected server hosts will just remove them after they add their own medals, or atleast add some pictures for them if the keep them with this medals.

 

You need to download IL2 web stats - statistics system for a dedicated server that Vaal and Isay made, and after you extract thouse files , src folder is there in il2_stats folder. ( if your not hosting and using IL-2 wed stats, you dont need this awards, server host just need them and he needs to add them to show for players)

 

Edited by CountZero
JV44HeinzBar
Posted

Thanks Count. I completely misunderstood. I was thinking that I needed to download the medals show they would show up.

 

Thanks for the reply.

 

HB

 

Posted (edited)

I noticed errors on 4 medals that were counting only when player destroyed human operated tanks only, so i fix that in version 1.2 to count ai tanks together with human ones, if you have version 1.1 only change is in report.py for this medals no aditional changes are needed in admin panel:

 

Iron Cross 1st Class, 
German Cross in Gold, 
Honor Goble 
Luftwaffe Honor Roll Clasp

Order of Alexander Nevsky (late)
Order of Lenin (late)
Order of the Red Star
Order of the Patriotic War 1st Class (late)
Order of the Patriotic War 2nd Class (late)

 

 

I also added 2nd version for servers with tank and pilot players, ( https://www.mediafire.com/file/o4q617xu1p8jrf3/rewardsv2.zip/file )

reason is because medals with type (player) dont show up for tankmnas, so here i changed some of them to (vlife) to work for both tankman and pilots. It has fix from 1.2 and tankman_award.html.

 

Changes are in report.py file , If you have version 1.1 youll aditionaly have to change type of medal in your admin panel from tour to vlife for this medals:

Knight's Cross of the Iron Cross (small changed in description)
Knight's Cross of the Iron Cross with Oak Leaves
Knight's Cross of the Iron Cross with Oak Leaves and Swords
Knight's Cross of the Iron Cross with Oak Leaves, Swords and Diamonds
Knight's Cross of the Iron Cross with Golden Oak Leaves, Swords and Diamonds
Wound Badge in Black
Wound Badge in Silver
Wound Badge in Gold

Order of Suvorov 3rd Class (late) (small changed condition and its description)
Order of the Red Banner (late)
Order of the Red Banner (2nd awarding, late)
Order of the Red Banner (3rd awarding, late)
Hero of the Soviet Union (late)
Yellow Wound Stripe
Red Wound Stripe    
Medal for Courage (early)

 

Edited by CountZero
  • 2 years later...
Posted
On 8/23/2021 at 6:43 PM, CountZero said:

I also added 2nd version for servers with tank and pilot players, ( https://www.mediafire.com/file/o4q617xu1p8jrf3/rewardsv2.zip/file )

reason is because medals with type (player) dont show up for tankmnas, so here i changed some of them to (vlife) to work for both tankman and pilots. It has fix from 1.2 and tankman_award.html.

Hi @CountZero!
I just installed your 2nd version with latest version of Vaal and Isay stat.

And after replacing models.py I've got this:

 

bug.jpg.adbbf800c3fd3bab44c86bd79af656c5.jpg

 

Any idea what's went wrong?

 

Spoiler

C:\IL2_STAT\il2_stats_1.2.75\il2_stats\src>"../.venv/Scripts/python.exe" manage.
py stats_whore
SystemCheckError: System check identified some issues:

ERRORS:
<class 'stats.admin.AwardAdmin'>: (admin.E033) The value of 'ordering[0]' refers
 to 'order', which is not an attribute of 'stats.Award'.
<class 'stats.admin.AwardAdmin'>: (admin.E108) The value of 'list_display[3]' re
fers to 'order', which is not a callable, an attribute of 'AwardAdmin', or an at
tribute or method on 'stats.Award'.
<class 'stats.admin.ScoreAdmin'>: (admin.E108) The value of 'list_display[4]' re
fers to 'ai_value', which is not a callable, an attribute of 'ScoreAdmin', or an
 attribute or method on 'stats.Score'.

C:\IL2_STAT\il2_stats_1.2.75\il2_stats\src>pause


 

  • 2 weeks later...
Posted
On 10/17/2023 at 2:26 AM, Lofte said:

And after replacing models.py I've got this:

Change only coalitions parameter in original models.py like this:

On 1/28/2020 at 4:05 AM, CountZero said:

-in models.py file, in "Class Player" and "Class PlayerMission" in "def update_coal_pref(self):" i change ratio from 60/40 to 99/1 (lines 565,567 and 691,693). So for example your getting Axis medals if you achive conditions neccesary only doing it in axis airplanes in duration of tour or mission.

Only rewards.py and templates needit to awards mode, file models.py in rewardsv2.zip is not actual for latest il2stats versions.

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