Special Aircraft Service

Please login or register.

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

Author Topic: Ask for Way to export a List of Carrier-Based Aircraft frm BAT/IL-2  (Read 458 times)

0 Members and 2 Guests are viewing this topic.

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1378

[Update on 5 Sep 2023:  Resolved here:  https://www.sas1946.com/main/index.php/topic,71120.msg777302.html#msg777302 ]
[Updated my own code to extract the information from classes in IL-2, including inherited classes.]

Requesting a way to export a List of Carrier-Based Aircraft from BAT/IL-2

Greetings, as I continue to develop my new generation of UQMG (https://www.sas1946.com/main/index.php/topic,71120.0.html), I am now working on an adaptation of the Aircraft Database that I started to create back in my abandoned 2013 version.  Here is the problem:

* Today, I extract most “Type” Java parameters from the Java Classes with an old school BATCH script that parses through the classes.  It is rudimentary, but works for what I am doing.  It is not perfect.  As I looked through countless aircraft classes, I noticed there is no single way to determine if an aircraft has an arrestor hook.  There are parameters associated with the moving function, some other properties (like velocity, position), but they can often be completely absent from the aircraft class, relying on its parent class, say F4U parent class.  So all derivative classes may be missing the clear property because of inheritance.

My question is, outside of going plane by plane, which is a whole lot of work, is there an export function like the one on FMB+ to export whole lists of objects to a text file, only it does for carrier-based aircraft only?  If not, could someone create a mod for that?

A Potential Solution:
* Please note the second page in QMB+, and see that there is a switch to select only carrier-based aircraft.  I imagine that is possible because once IL-2 is loaded, all aircraft have their full properties (including inherited properties), meaning if the plane is an extension of a base class of aircraft that is a carrier-based aircraft, that is how the actual plane object is also carrier-based.

* Would it be possible to generate a simple text file from that list?
 
I did several searches in the Forum to avoid asking a repeat question, and did not find anything related, so I thank you for your time and consideration… oh Java gods…  Please see below what I am referring to above...




Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2795

If i remember correctly stock version QMB since Pacific fighters has a function that automatically select carrier planes when choosing the coral sea map
Logged

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1378

I could not remember when it was introduced, however what I would like is to be able to export that menu  list with all carrier-based planes to a text file with the name of the airplanes.
Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)

Frankiek

  • SAS Team
  • member
  • Offline Offline
  • Posts: 2795

it was introduced with PF 3.0 but is not available in the latest versions I think it worked only up to 4.09
Logged

SAS~Storebror

  • Editor
  • member
  • Offline Offline
  • Posts: 23865
  • Taking a timeout
    • STFU

Would need a Java Modder to export the "_clsMapArrestorPlane" list generated in AirportCarrier class.
Internally, the list is generated by checking whether the plane flight model has "CArrestorHook" set to "1" in the Controls section, i.e. whether or not the plane contains an arrestor hook.

]cheers[
Mike
Logged
Don't split your mentality without thinking twice.

Kopfdorfer

  • member
  • Offline Offline
  • Posts: 2156
  • Potez 63.11 France's most significant AC in 1940

I am only a dummy with no computer knowledge , but wouldn't it make sense for the
Aircraft Type qualifications in UberDemons GUI ( Plane List ) to match the Aircraft Type
game qualifications that FMs use to identify aircraft types ?
It would seem ( from my position of acute ignorance ) that if that were so , it would be
relatively straight forward to add some kind of suffix ( in computer language , of course )
that identifies a Carrier-Based aircraft following the FM Type code - most obvious thought is to
add "CB" at the end of the id in the Plane List.

Don't know whether there is any practicality in this observation , but that is where my
luddite brain goes with this.

Kopfdorfer
Logged

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1378

Would need a Java Modder to export the "_clsMapArrestorPlane" list generated in AirportCarrier class.
Internally, the list is generated by checking whether the plane flight model has "CArrestorHook" set to "1" in the Controls section, i.e. whether or not the plane contains an arrestor hook.

]cheers[
Mike

Mike, that sounds right.  I would do it on my own, but Java is somewhere back in my mind when I was modding planes... forgot a lot since years ago.  But to my defense, it took a lot of Scotch to make me forget...  and that is OK.  If anyone is up to the task I would be ever so grateful.  I know I ask a lot in this forum and hopefully I can give something back with my apps.
Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1378

I am only a dummy with no computer knowledge , but wouldn't it make sense for the
Aircraft Type qualifications in UberDemons GUI ( Plane List ) to match the Aircraft Type
game qualifications that FMs use to identify aircraft types ?
It would seem ( from my position of acute ignorance ) that if that were so , it would be
relatively straight forward to add some kind of suffix ( in computer language , of course )
that identifies a Carrier-Based aircraft following the FM Type code - most obvious thought is to
add "CB" at the end of the id in the Plane List.

Don't know whether there is any practicality in this observation , but that is where my
luddite brain goes with this.

Kopfdorfer

No, you are not too far off.  I did some decompiling and compiling of DiffFM back in the day, but I'd like to not have my DB be so complex.  The content of the FM files are fairly detailed, and my program does not interact with the IL-2 engine except for generating missions.  My DB uses the Java header classes (and only because I am parsing information from the clear text code files) to have a semi-ok DB with basic features, like Bomber, Fighter, TNB Fighter, BNZ Fighter, etc.

What becomes a challenge is that there are, say, primary class declarations which have the basic properties of a plane.  Say, an A6M basic Zero class.  Well, that is not really an aircraft that can be picked in IL-2, it just represents the basic constructing blocks of a Zero.  The actual plane objects are based on that primitive class.  Unless declared to the opposite, the new plane class will inherit all the basic properties of the A6M, and may add additional properties of its own... say, maybe this type is not a carrier plane... and does not have a hook, or maybe the weapon configuration is different...  the problem is that when I look at that class, it will not tell me it is  (or it is not) a carrier plane because that may have been a property of the basic A6M class... and in a search it would yield a wrong result.  I did some extension looking into child classes, but it is quite challenging to write a program in a different language trying to analyze the logic of another programming language just using clear text.  Well, I am not that talented... I said it.

When I wrote the original UQMG back in oh... 2000 or so at the release of the original IL-2 Sturmovik Flight Sim, well, I did not have the benefit of a modded interface and the ability to look into the Java classes.  I had to do a lot of "manual labor" to get the right information, and lots of transcribing... a very long process when you are a team of one.  Since we have a wealth of knowledge of the inner workings of IL-2 now, I'd like to take advantage of that.
Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1378
Re: Requesting a way to export a List of Carrier-Based Aircraft from BAT/IL-2
« Reply #8 on: September 03, 2023, 10:44:22 AM »

I am trying something combining my data extraction batch scripts and some coding in UQTC.  It has promising results but I identified a flaw in UQTC that is making me rethink how the inherited properties are handled.  If I can swing this I'll cancel this request.

I basically created a way to have "made-up" properties which are not defined in the Type classes in IL-2.  Some of them are based on brute programming (going through thousands of objects looking for key words) and some are "manually" created.  For example, TypeJazzPlayer and TypeJazzy (which are classes in IL-2) only define Japanese Aircraft that either have default or loadout-based oblique cannons, and TypeSchrageMusik is only used once to define a Japanese plane that carries oblique rockets (but using the property yields zero results, I am still keeping because it is easier to program it that way, and in the future, maybe that would be used properly within the IL-2 engine).  This is confusing and does not produce the intended results, since one would expect primarily German Night Fighters.

Basically I manually created a new Type to allow the Bf-110G-4 and H-4, the Me-410B and the He-219 UHU to show in my Air DB when you pick it.

So back to the carrier planes... I was able to do some progress in identifying the "arrestorHook" property, but I am missing the bulk of the US Carrier planes.  All of that has to do with the property being defined in the parent class, say the F4U, which is not really an airplane in IL-2 but rather the definition of a family of planes.

So I am back in the drawing board and will let you know... if you care of course  :) otherwise, don't read this!

For inquiring minds, these are the Type Classes I created to yield better DB search results:
Code: [Select]
53=[TypeUQNetSpawn]=Playable Online (Net Spawn)
54=[TypeUQNoseArt]=Displays Nose Art (Only with USA Units)
55=[TypeUQArrestorHook]=Has Arrestor Hook (Both Carrier and Non-Carrier Types)
56=[TypeUQMGermanOblique]=Oblique Cannon, Germany Schrage Musik
57=[TypeUQMObliqueRocket]=Oblique Rockets

I am hoping that I can solve this on my own because if I do... well it will work for all modules (DOF, TGA, WAW, JTW).  I believe that the planes that hook into airships also falls within this category; nothing is perfect but hey... mejor que nada.
Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)

UberDemon

  • UberDemon/danzigzag
  • Modder
  • member
  • Offline Offline
  • Posts: 1378
Re: Ask for Way to export a List of Carrier-Based Aircraft frm BAT/IL-2
« Reply #9 on: September 04, 2023, 10:56:32 PM »

[Update on 5 Sep 2023:  Resolved here:  https://www.sas1946.com/main/index.php/topic,71120.msg777302.html#msg777302 ]
[Updated my own code to extract the information from classes in IL-2, including inherited classes.]
Logged
Best Regards, UberDemon/danzigzag, Get UQMG at SAS BAT Mission area.  www.uberdemon.net no longer exists.  (** Alienware Aurora R7 / i7-8700 3.20GHz / 16GB RAM / Win 10 x64 / NVIDIA GeForce GTX 1080 **)
Pages: [1]   Go Up
 

Page created in 0.049 seconds with 27 queries.