Initial setup

Post bug reports and ask for game support here.

Moderator: Shannon V. OKeets

palad1n
Posts: 20
Joined: Thu Jan 19, 2012 7:30 am
Location: Australia

RE: Initial setup

Post by palad1n »

After looking at the mods folder and downloading the KiF mod, I come to realise that the new aircraft will probably not appear with a correct bmp image as each bmp image (in the pages bmps and associated text files) relates to the existing aircraft sequential numbers in the csv file. So, more work is required in that space. I have discovered that one cannot simply reference a previous number, as in a 981 Ju 87D Stuka is a single entity and a 982 Ju 87D Stuka, if changed to 981, does not work at all. At least the default solution by MWiF is to use the "flipped side" aircraft profile. I would be interested to hear why this singular approach was adopted in lieu of a one bmp image fits all instances of the same aircraft (type, model, etc) This would have saved some memory and somewhat future proofed MWiF. Notwithstanding, I'll be working to add to the unit bmp files so the AiF and PATiF aircraft units have the appropriate bmp image. I do hope (trust) that MWiF can accept pages 23+. For further details go to the mods thread. On a positive note, the naval side is OK as TRSs, AMPHs and SUBs have a generic "face up" bmp profile. I am also changing the whole air CSV file to have every instance of a particular aircraft type (model, etc) to be exactly the same. Further, and perhaps Shannon can answer this one, the 5th column (or col E if loaded as a spreadsheet) appears to be completely superfluous - only a few are populated with +name+name (for example). I have deleted all contents of this column and there appears to be no issues; could I assume that it had a potential purpose originally but was overtaken by future developments (similarly for same column for naval csv) - while on naval csv file, is there a purpose for columns 15 and 16 (spreadsheet columns O & P) repeating the same value (CV aircraft capacity)? As I said, further developments will be posted in the mods thread.
Shannon V. OKeets
Posts: 22136
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Initial setup

Post by Shannon V. OKeets »

ORIGINAL: palad1n

After looking at the mods folder and downloading the KiF mod, I come to realise that the new aircraft will probably not appear with a correct bmp image as each bmp image (in the pages bmps and associated text files) relates to the existing aircraft sequential numbers in the csv file. So, more work is required in that space. I have discovered that one cannot simply reference a previous number, as in a 981 Ju 87D Stuka is a single entity and a 982 Ju 87D Stuka, if changed to 981, does not work at all. At least the default solution by MWiF is to use the "flipped side" aircraft profile. I would be interested to hear why this singular approach was adopted in lieu of a one bmp image fits all instances of the same aircraft (type, model, etc) This would have saved some memory and somewhat future proofed MWiF. Notwithstanding, I'll be working to add to the unit bmp files so the AiF and PATiF aircraft units have the appropriate bmp image. I do hope (trust) that MWiF can accept pages 23+. For further details go to the mods thread. On a positive note, the naval side is OK as TRSs, AMPHs and SUBs have a generic "face up" bmp profile. I am also changing the whole air CSV file to have every instance of a particular aircraft type (model, etc) to be exactly the same. Further, and perhaps Shannon can answer this one, the 5th column (or col E if loaded as a spreadsheet) appears to be completely superfluous - only a few are populated with +name+name (for example). I have deleted all contents of this column and there appears to be no issues; could I assume that it had a potential purpose originally but was overtaken by future developments (similarly for same column for naval csv) - while on naval csv file, is there a purpose for columns 15 and 16 (spreadsheet columns O & P) repeating the same value (CV aircraft capacity)? As I said, further developments will be posted in the mods thread.
When I get a chance, I'll run through your questions and answer them. I have to leave home at the moment and there are some other items on my to-do list for this afternoon.

As a first warning: I ran into problems with storing bitmaps (a Windows imposed limitation) and had to do a lot of tricky coding to cram everything into available bitmap memory. So you won't be able to add bitmaps just willy-nilly. I'll look into it more closely later.
Steve

Perfection is an elusive goal.
Shannon V. OKeets
Posts: 22136
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Initial setup

Post by Shannon V. OKeets »

ORIGINAL: palad1n

After looking at the mods folder and downloading the KiF mod, I come to realise that the new aircraft will probably not appear with a correct bmp image as each bmp image (in the pages bmps and associated text files) relates to the existing aircraft sequential numbers in the csv file. So, more work is required in that space. I have discovered that one cannot simply reference a previous number, as in a 981 Ju 87D Stuka is a single entity and a 982 Ju 87D Stuka, if changed to 981, does not work at all. At least the default solution by MWiF is to use the "flipped side" aircraft profile. I would be interested to hear why this singular approach was adopted in lieu of a one bmp image fits all instances of the same aircraft (type, model, etc) This would have saved some memory and somewhat future proofed MWiF. Notwithstanding, I'll be working to add to the unit bmp files so the AiF and PATiF aircraft units have the appropriate bmp image. I do hope (trust) that MWiF can accept pages 23+. For further details go to the mods thread. On a positive note, the naval side is OK as TRSs, AMPHs and SUBs have a generic "face up" bmp profile. I am also changing the whole air CSV file to have every instance of a particular aircraft type (model, etc) to be exactly the same. Further, and perhaps Shannon can answer this one, the 5th column (or col E if loaded as a spreadsheet) appears to be completely superfluous - only a few are populated with +name+name (for example). I have deleted all contents of this column and there appears to be no issues; could I assume that it had a potential purpose originally but was overtaken by future developments (similarly for same column for naval csv) - while on naval csv file, is there a purpose for columns 15 and 16 (spreadsheet columns O & P) repeating the same value (CV aircraft capacity)? As I said, further developments will be posted in the mods thread.
The abbreviated name field (column 5) for the Air Units is used for long names so the names do not run into/over the numeric factors. If the abbreviated name field is blank, then the program assumes there isn't going to be a problem. When the unit has an abbreviated name, then the name is split into two lines (top and bottom) and the vertical centering changes from 1 line to 2 lines. The placement of air unit names depends on the unit type and its nationality. The use of periods and commas in the names were different historically (e.g., German versus Italian). I know next to nothing about this and relied completely on Patrice Forno to tell me how these should be handled. The program parses the names based on the punctuation. If I were creating new units, I would look for an existing one of the same unit type and nationality, and mimic how the name for the existing one was encoded.

The naval units (carriers) probably have duplicate entries for Air Class and Air Capacity (columns 15 and 16). These files were originally generated from the CWIF binary data files. CWIF read in binary files that depended on Delphi Object definitions. I converted all the data to ASCII so they could be read using database/spreadsheet/text editor software. To do that, I wrote some code to generate the ASCII files after the CWIF code had read in the binary data. Later I modified to MWIF read in the ASCII data (and never used the CWIF data files again). At that time CWIF had the two data fields - it took me several months before I could convince myself that the data fields were identical. But notice that I still said 'probably' in the first sentence of this paragraph.[;)]
Steve

Perfection is an elusive goal.
Shannon V. OKeets
Posts: 22136
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Initial setup

Post by Shannon V. OKeets »

About the air unit bitmaps. You should be able to add 21 more air unit bitmaps to the last page. Be sure to make the unit numbers so they append to the last air unit number. The last existing air unit number is 1345, so start with 1346. The next 'used' unit is for the land units and starts at 2001. So there is a lot of room as far as the numbering goes.

But for the bitmaps, I can only offer the 21 unused slots at the end of the 22nd page of bitmaps.

The program is hard coded for 22 pages. It would be easy enough to modify the code to accept/expect more, but the bitmap memory issue would probably be fatal. When the program runs out of bitmap memory, very strange things happen.

If you look at the coastal hex bitmaps, you'll notice that they are compacted as hexagons, instead of rectangles. Originally I had them as individual rectangles but ran out of bitmap memory to store them that way. By compacting them I was able to reduce the number of pixels stored in memory. Similarly, I originally read in all the unit bitmaps separately, but the program choked on that. By paginating them, 100 to a page, I was able to reduce the required bitmap memory. I don't really understand the internals of how Microsoft handles/limits bitmap memory. I just played around with it until I found a solution that ran without memory problems. As an aside, sometimes the operating system would generate a message saying that bitmap memory had been exceeded. Other times the program would just die in strange and mysterious ways.
Steve

Perfection is an elusive goal.
Shannon V. OKeets
Posts: 22136
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Initial setup

Post by Shannon V. OKeets »

I just thought - you will probably have to add more text to the historical description files too. The program expects to find a writeup for every unit in one of those 3 text files. The air units have their own historical description text file. It shouldn't be too hard to figure out the format, given that there are over 1000 examples in the file.
Steve

Perfection is an elusive goal.
User avatar
rkr1958
Posts: 27669
Joined: Thu May 21, 2009 10:23 am

RE: Initial setup

Post by rkr1958 »

ORIGINAL: palad1n
Let me explain to all those people that do not have a certain level of intelligence.
I think you might be confusing intelligence (or stupidity) with ignorance. I consider myself relatively intelligent; but I'm definitely ignorant when it comes to the advance mechanics of MWiF (WiF). I'm learning; but this game has a steep learning curve!
Ronnie
palad1n
Posts: 20
Joined: Thu Jan 19, 2012 7:30 am
Location: Australia

RE: Initial setup

Post by palad1n »

Thank you Shannon. Looks like adding another 358 aircraft may give players the other AiF and PATiF planes, but sans the pretty pictures. Oh well, this will be a players option. For me, the default profile image is OK. The planes will still fly, fight, drop bombs, etc.
As an aside, why use BMPs? JPGs (or even PNGs) would still fill the bill and take much less memory - mayhap even avoid the windows BMP problem altogether (just guessing here).
That and/or reusing image files for multiple planes would also reduce the memory requirements. Within each main plane class (say the B25) there is essentially one image across a number of models (A, B & C), expanded one can easily see the slight differences, but the image itself is more glitter than functional, thus one image for a range of planes is probably acceptable (although there are the purists). Even the naval units could probably benefit from multiple use of images. Of course, it is rather far to late for a change like this.

Again, thank you Shannon for your time.
Post Reply

Return to “Tech Support”