Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: IL2 Campaign Validation Sript v0.2  (Read 7266 times)

0 Members and 1 Guest are viewing this topic.

andqui

  • Modder
  • member
  • Offline Offline
  • Posts: 110
IL2 Campaign Validation Sript v0.2
« on: March 15, 2015, 08:29:23 AM »

With the latest release of CUP providing a new platform for making campaigns, I'm releasing the first version of a campaign validator that I've been working on. This will scan the mission files in a campaign, as well as files in the IL2 installation of choice, and make sure that the aircraft, skins, weapon loadouts, objects, vehicles, ships, etc are all present and that nothing is missing.

A version with an executable and maybe a user interface is coming, but I'm releasing the script version early for any campaign maker who wants a head start in adapting their old campaigns up to the new standard. Download the script below, edit the first three lines to point to the campaign, STD, and skin folders. You also need to have Python 3.4.3 installed until I release a compiled version. Run it through the command line, "python main.py". You can use it for any modded installtion (CUP, HSFX, DBW, more) as long as you point it to the right STD folder.

WARNING: In CUP WAW, and possible other installs, the air.ini has some bad characters that cause the script to crash on some PC's. To be safe, open up your air.ini, go down to the Japanese A6M section, and delete the "@" character in the middle of the whitespace next to some of the entries, as well as some of the whitespace around it.

http://www.mediafire.com/download/8sog1rcs99smk92/Main.py

Here's a sample output of Poltava's Abbeville Boys campaign for 4.12, with CUP #WAW:

Code: [Select]
Reading mission abbeville-01.mis
Aircraft used: FW_190A5, SPITFIRE9C, TYPHOON1B
Chiefs used: Ger_Staff
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-02.mis
Aircraft used: A_20C, BF_109G6, FW_190A5, SPITFIRE9C, TYPHOON1B
Chiefs used: BikeBMW
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-03.mis
Aircraft used: FW_190A5, P_51A
Chiefs used: Germany_CargoFuelTrain, GermanyCarsColumnH
###Chief GermanyCarsColumnH not found!
Stationaries used: VW82t, OpelBlitz6700A_fuel, Siren, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-04.mis
Aircraft used: BF_109G6, B_24J100, FW_190A5, SPITFIRE5BLF, SPITFIRE925LBS, SPITFIRE9M63
Chiefs used: Germany_CargoTrain, GermanyCarsColumnH
###Chief GermanyCarsColumnH not found!
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-05.mis
Aircraft used: B_17F, FW_190A5, P_47D10
Chiefs used: BMW_MGr
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, JU_88A4, Flak18_37mm

Reading mission abbeville-05b.mis
Aircraft used: B_17F, FW_190A5, P_38J
Chiefs used: BMW_MGr
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, JU_88A4, Flak18_37mm

Reading mission abbeville-06.mis
Aircraft used: FW_190A5, TYPHOON1B
Chiefs used: Germany_CargoFuelTrain, OpelBlitz6700A_fuel
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-06b.mis
Aircraft used: FW_190A5, SPITFIRE9C
Chiefs used: Germany_CargoFuelTrain, OpelBlitz6700A_fuel
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-07.mis
Aircraft used: A_20C, FW_190A5, SPITFIRE9C
Chiefs used:
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Motorcycle, Flak18_37mm

Reading mission abbeville-08.mis
Aircraft used: BF_109G6, B_25C25, Do217_K2, FW_190A5, SPITFIRE9C
Chiefs used: Ger_Staff_HT
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, DO_217_K2, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-09.mis
Aircraft used: B_17F, FW_190A5, P_47D10
Chiefs used: BMW_MGr
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, DO_217_K2, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-09b.mis
Aircraft used: B_17F, FW_190A5, P_47D10
Chiefs used: BMW_MGr
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, DO_217_K2, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-10.mis
Aircraft used: B_17F, FW_190A5, SPITFIRE9C
Chiefs used:
Stationaries used: GenericSpawnPointPlane, VW82t, OpelBlitz6700A_fuel, DO_217_K2, OpelBlitz36S, Grossdeutscher_Rundfunk, FW_190A5, JU_52_3MG4E, OpelKadett, Flak18_37mm

Reading mission abbeville-11.mis
Aircraft used: BF_109G6, B_17F, FW_190A5, P_47D10
Chiefs used: VW82t
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!

Reading mission abbeville-11b.mis
Aircraft used: BF_109G6, B_17F, FW_190A5, P_38J, P_47D10
Chiefs used: VW82t
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!

Reading mission abbeville-12.mis
Aircraft used: BF_109G6, B_17F, FW_190A5, P_47D10
Chiefs used: BMW_MGr
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!
###Static object House$AirdromeMaskingnetBig not found!

Reading mission abbeville-13.mis
Aircraft used: B_25C25, Do217_K1, FW_190A5
Chiefs used: OpelBlitz6700A
###Chief OpelBlitz6700A not found!
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!

Reading mission abbeville-13b.mis
Aircraft used: B_25C25, Do217_K1, FW_190A5, SPITFIRE9C
Chiefs used: OpelBlitz6700A
###Chief OpelBlitz6700A not found!
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!

Reading mission abbeville-14.mis
Aircraft used: BF_109G6, B_17F, FW_190A5, P_47D10
Chiefs used:
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!
###Static object House$AirdromeMaskingnetBig not found!

Reading mission abbeville-15.mis
Aircraft used: BF_109G6, B_25C25, FW_190A5, SPITFIRE9C
Chiefs used: 2-OpelBlitz6700A, S80
###Chief 2-OpelBlitz6700A not found!
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!
###Static object House$AirdromeMaskingnetBig not found!

Reading mission abbeville-16.mis
Aircraft used: BF_109G6, BF_110G2, B_17F, FW_190A5, P_47D10
Chiefs used: Ger_Staff, OpelBlitz6700A
###Chief OpelBlitz6700A not found!
Stationaries used: GenericSpawnPointPlane
###Stationary vehicles.artillery.Artillery$Flak38_Vierling not found!
###Static object House$AirdromeMaskingnetBig not found!
Logged

SAS~Poltava

  • Avid FMB user
  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 3160
  • Keep calm and carry on
    • Check out my modded campaigns
Re: IL2 Campaign Validation Sript v0.1
« Reply #1 on: March 15, 2015, 09:47:19 AM »

Great idea - THANKS! As an avid FMB-er this will of course speed up things enormously! :)
Logged
My aim: to build campaigns for Mods! You can find them here: http://mission4today.com/index.php?name=Downloads3&file=search&sa=740

marcost

  • Modder
  • member
  • Offline Offline
  • Posts: 869
  • Keep calm and run away
Re: IL2 Campaign Validation Sript v0.1
« Reply #2 on: March 15, 2015, 09:58:25 AM »

Fantastic, thanks! Been racking my brains trying to create this myself!
Logged

andqui

  • Modder
  • member
  • Offline Offline
  • Posts: 110
Re: IL2 Campaign Validation Sript v0.1
« Reply #3 on: March 15, 2015, 10:15:17 AM »

Great idea - THANKS! As an avid FMB-er this will of course speed up things enormously! :)

I'm glad. Go and pester the CUP makers to add anything that's missing. I'm sure the community will have to figure out something to do about the CUP changes, pretty much every modded campaign I've tried has had some issues with missing or renamed aircraft or objects.
Logged

marcost

  • Modder
  • member
  • Offline Offline
  • Posts: 869
  • Keep calm and run away
Re: IL2 Campaign Validation Sript v0.1
« Reply #4 on: March 15, 2015, 11:03:28 AM »

thanks, it works great except I had to disable the skin checking part. I get this error:

    files = os.listdir(path)
NotADirectoryError: [WinError 267] The directory name is invalid: 'G:\\IL2_HSFX_6.17_Copy\\PaintSchemes\\Skins\\Thumbs.db'

Here is my path entry:

##Path to Il2 paintschemes/skins folder
skinPath = "G:\\IL2_HSFX_6.17_Copy\\PaintSchemes\\Skins"

There is no 'Thumbs.db' folder or file in my Skins directory

If I change the path to

skinPath = "G:\\IL2_HSFX_6.17_Copy\\PaintSchemes"

then the script runs but of course it reports all skins as not found

Any idea?

Regards,

Martin

Logged

andqui

  • Modder
  • member
  • Offline Offline
  • Posts: 110
Re: IL2 Campaign Validation Sript v0.1
« Reply #5 on: March 15, 2015, 12:56:54 PM »

thanks, it works great except I had to disable the skin checking part. I get this error:

    files = os.listdir(path)
NotADirectoryError: [WinError 267] The directory name is invalid: 'G:\\IL2_HSFX_6.17_Copy\\PaintSchemes\\Skins\\Thumbs.db'

Here is my path entry:

##Path to Il2 paintschemes/skins folder
skinPath = "G:\\IL2_HSFX_6.17_Copy\\PaintSchemes\\Skins"

There is no 'Thumbs.db' folder or file in my Skins directory

If I change the path to

skinPath = "G:\\IL2_HSFX_6.17_Copy\\PaintSchemes"

then the script runs but of course it reports all skins as not found

Any idea?

Regards,

Martin



Oops, I just need to make a separate folder check. I'll post a fixed version this evening.
Logged

andqui

  • Modder
  • member
  • Offline Offline
  • Posts: 110
Re: IL2 Campaign Validation Sript v0.2
« Reply #6 on: March 15, 2015, 05:01:54 PM »

thanks, it works great except I had to disable the skin checking part. I get this error:

    files = os.listdir(path)
NotADirectoryError: [WinError 267] The directory name is invalid: 'G:\\IL2_HSFX_6.17_Copy\\PaintSchemes\\Skins\\Thumbs.db'

Here is my path entry:

##Path to Il2 paintschemes/skins folder
skinPath = "G:\\IL2_HSFX_6.17_Copy\\PaintSchemes\\Skins"

There is no 'Thumbs.db' folder or file in my Skins directory

If I change the path to

skinPath = "G:\\IL2_HSFX_6.17_Copy\\PaintSchemes"

then the script runs but of course it reports all skins as not found

Any idea?

Regards,

Martin



Updated version available at the link up top, try that instead. Should fix the skin issue.
Logged

SAS~Monty27

  • SAS Team
  • member
  • Offline Offline
  • Posts: 3825
  • Focus on the solution, not the problem.
    • Broadarrow Artwork
Re: IL2 Campaign Validation Sript v0.2
« Reply #7 on: March 15, 2015, 10:36:18 PM »

Thanks andqui, this is a very useful tool for retro-checking.  ;D
Logged

marcost

  • Modder
  • member
  • Offline Offline
  • Posts: 869
  • Keep calm and run away
Re: IL2 Campaign Validation Sript v0.2
« Reply #8 on: March 16, 2015, 04:07:50 AM »

Thanks Andqui, it works fine now!

One suggestion - could it be made to report on multiple campaign files i.e. search in subfolders for campaign.ini and run the script on each campaign file. I'm thinking of one large report which could be run on the whole il2/missions/campaign folder. It could put the campaign name at the head of each set of mission analyses.

I've also edited your code to provide an 'exception only' report i.e. only show the missing stuff as I have a lot of campaigns to check!

Thanks again for this very promising development

Regards,

Martin
Logged

jeanba

  • Modder
  • member
  • Offline Offline
  • Posts: 869
Re: IL2 Campaign Validation Sript v0.2
« Reply #9 on: March 16, 2015, 07:44:50 AM »

That's a very good idea

Thank you
Logged

Moezilla

  • Supporter
  • member
  • Offline Offline
  • Posts: 355
Re: IL2 Campaign Validation Sript v0.2
« Reply #10 on: March 16, 2015, 03:02:34 PM »

Thanks for sharing your script andqui.

Very handy.
Logged

asheshouse

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2606
Re: IL2 Campaign Validation Sript v0.2
« Reply #11 on: March 19, 2015, 02:31:22 AM »

Great utility. Thanks.
Logged
Pages: [1] 2 3   Go Up
 

Page created in 0.018 seconds with 25 queries.