As I write UQMG I note much of the time I write my code has to deal with the IL-2 files, as expected. Recently as I started creating scripts to port BAT 4.3 into UQMG, I ran into new issues dealing with the modded version of the initialization files. It is impossible to write code that predicts every error/variation in formatting so my request is that the initialization files have some standard format so that 3rd party developers such as myself can write predictable code.
To deal with some of the issues, I write code to remove common mistakes in the air.ini file, for example:
'Remove unwanted strings from Air.ini
Public Sub LoadBadWordsAirIni()
Array.Resize(strBadWords, 10)
'strBadWords() = ""
strBadWords(0) = "[AIR]"
strBadWords(1) = "NOINFO"
strBadWords(2) = "NOQUICK"
strBadWords(3) = "DESERT"
strBadWords(4) = "SUMMER"
strBadWords(5) = "WINTER"
strBadWords(6) = ChrW(&HFC) ' "ü" or U+00FC, or Alt+0252
strBadWords(7) = "�"
strBadWords(8) = "SUMME"
strBadWords(9) = "NOINF"
End Sub
Entries 8 and 9 are because I encountered them in TGA for BAT 4.3. obviously mistyped... but it would be better if I (or other coders) did not have to update code to handle these types of errors in the entry.
I request that entries in the initialization files stick to a repeatable format for every entry (this is really a request to the modders out there)... to include actual valid country codes (some are not), and perhaps using the intended country code... if nothing else it may be advisable to stick to default r01 and g01, although it would not take that much work to assign the correct country default regiment to the intended plane.
Examples of standard/correct entries (from TGA):
Curtiss_Jenny air.Jenny 1 NOINFO usa01 SUMMER
Junkers_K53 air.Junkers_K53 2 NOINFO g01 SUMMER
Some weird entries:
Breguet_Bizerte air.Bizerte 1 NOINFO f01 SUMMER
Bristol_F2b air.Bristol_F2b 1 r01 SUMMER
Ca-309 air.Ca_309 2 it01 SUMMER
FokkerFXX air.Fokker_FXX 1 NOINFO f01 SUMME
HP45_Heracles air.HERACLES 1 NOINF gb01 SUMMER
* Why does a French Breguet uses default Finland regiment?
* I know I contradict, but why would a Bristol have USSR as default?
* it01 is not a valid regiment/country...
* Mistyping SUMMER as SUMME makes the angels cry...
* Mistyping NOINFO as NOINF kills baby kitty cats...
Some entries do not include NOINFO tag... but since none of the mods have encyclopedia entries, it would make sense to include NOINFO in all entries
Anyhoo, I can certainly help with that, but it gets harder as the number of planes are in the thousands these days.
Is that a reasonable request?
(I apologize in advance... daylight time savings just happened, which means we lost one hour and we are all tired and bitchy... sorry...)