Experts, what is a mask.tga file?

Moderators: Order of Battle Moderators, The Artistocrats

Post Reply
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Experts, what is a mask.tga file?

Post by Deja Bru »

You campaign and mod experts - yes, you know who you are - can you explain to me what a mask.tga file is used for? The funny thing is, I never paid any attention to them in DLC campaign folders; overlooked them entirely. Reason was, perhaps, that they were so high-tech that only the gods of OOB would know how they are created and what they do.

Then, just today, I noticed that you demi-gods of OOB also have these files in your campaign folders. They must be within the grasp and ken of mortal man, then! Please share some of your knowledge with this lowly apprentice as to why and how you would use these files (scroll down, the top is official DLC and the bottom is custom):
Capture999.jpg
Capture999.jpg (673.35 KiB) Viewed 4864 times
- Bru
GabeKnight
Lieutenant-General - Karl-Gerat 040
Lieutenant-General - Karl-Gerat 040
Posts: 3700
Joined: Mon Nov 27, 2017 10:24 pm

Re: Experts, what is a mask.tga file?

Post by GabeKnight »

(I'm no expert, just the first one to answer :wink: )

The files seem generated at the same time (auto-generated) and it looks like there's a direct correlation with the amount of scenarios/branches in the campaign. Maybe some marker files for the campaign factions/cores, pins, decorations and such created by the campaign editor? But sorry, I actually don't know.
terminator
Field Marshal - Elefant
Field Marshal - Elefant
Posts: 5847
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: Experts, what is a mask.tga file?

Post by terminator »

TGA is a Graphic file format.
Mask is a term of graphics.
It has something to do with the Campaign map picture.
Ex Desert Rats Campaign :
DesertRats.JPG
DesertRats.JPG (26.23 KiB) Viewed 4842 times
If you resize the mask in the same size as the map, you will obtain this (look below) :
map.jpg
map.jpg (854.9 KiB) Viewed 4842 times
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Re: Experts, what is a mask.tga file?

Post by Deja Bru »

My mother always told me (not really, but she should have), "Son, if you want to know about something, you gotta ask the experts. Even if they don't know, they'll point you in the right direction!" :)

So, thank you experts. You gave some valuable clues and did indeed point me in the right direction. I don't know the nuts and bolts, of course, but I do know now that those files are indeed components of the campaign map.

Here's what I ruled out. The mask.tga files have nothing to do with the scenery or the labels on the map. Here, I superimposed my favorite ridiculously-sized (and cannot be resized) jumbo buoy, and I changed a certain country's name to be more suitable to me:
Screenshot 1.jpg
Screenshot 1.jpg (380.61 KiB) Viewed 4832 times
None of the date and time stamps on the mask.tga files changed. The campaign.cmz file and the english.txt file changed, however, and that shows the information about the buoy and the improved nation name are stored in those files:
Capture1004.jpg
Capture1004.jpg (142.59 KiB) Viewed 4832 times
Continued . . .
- Bru
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Re: Experts, what is a mask.tga file?

Post by Deja Bru »

So what are the mask.tga files for, then? terminator reminded me that .tga is a fancy image format. When I would call a mask.tga file up in a simple photo editor, all I got was a blank white box.

That's because most of the image is transparent and the visible part of it is white. The photo editor's background is white, hence blank white box.

What I needed was an advanced photo editor that detects transparency and shows it properly as a checkerboard so that it can be "seen." Now, in this editor, you can dimly see the northern coast of Africa in these two images:
Capture1003.jpg
Capture1003.jpg (206.35 KiB) Viewed 4826 times
Capture1002.jpg
Capture1002.jpg (199.18 KiB) Viewed 4826 times
So: Image. Mask. Oh.

These could be files which are superimposed over the map image to act as "platforms" for map text, perhaps, but also for the layout data of Location, Core, Flag, and Arrow. I bet the campaign.cmz file interacts with each mask.tga file according to what is entered in the editor. The mask.tga files themselves don't change with editing because they are static components of the map image.
Last edited by Deja Bru on Sat Jun 09, 2018 8:15 pm, edited 1 time in total.
- Bru
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Re: Experts, what is a mask.tga file?

Post by Deja Bru »

My mother also always told me (not really, but she should have) "Boy, sometimes just when you think you know it all, you find out that you don't know nuttin' at all!" :)

The problem is, when you create a new campaign, edit map text, and add doodads, none of that creates any mask.tga files when the campaign is saved. That shoots a hole in my theory.

We got the mask and image concepts down but why they are here, how they are created, and what they actually do is back up in the air. Any more ideas?

And when you modders "borrow" one of these maps from "someplace," are you just copying all the mask.tga files that you find to go along with it?
- Bru
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Re: Experts, what is a mask.tga file?

Post by Deja Bru »

Here's one last thought. As a test, I deleted all mask.tga files from this custom campaign:
Capture1005.jpg
Capture1005.jpg (180.32 KiB) Viewed 4820 times
Then I continued to edit it, adding a dragon who is helping himself to a bit of tea and a surprise German invasion of the U.S. territory of "Brunesia." The editor accepted the changes and the campaign started fine:
Screenshot 2.jpg
Screenshot 2.jpg (390.11 KiB) Viewed 4820 times
Screenshot 3.jpg
Screenshot 3.jpg (407.63 KiB) Viewed 4820 times
So, the word that is now coming to mind about mask.tga files is "vestigial."
- Bru
Shards
Slitherine
Slitherine
Posts: 3990
Joined: Tue Aug 25, 2015 10:05 am

Re: Experts, what is a mask.tga file?

Post by Shards »

My guess is that it's the territory that gets shaded as the campaign progresses to show who owns what territory?
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Re: Experts, what is a mask.tga file?

Post by Deja Bru »

That's a very good guess, Shards! But, why would it not be part of custom campaign designing? Is it something that only the developers know how to include and use for that purpose? I wonder how we could test that . . .

EDIT: Yes, that has to be it. Now I recall how the shaded areas move across the campaign map from scenario to scenario depending upon the fortunes of war:
Screenshot 1.jpg
Screenshot 1.jpg (359.81 KiB) Viewed 4794 times
- Bru
Deja Bru
Administrative Corporal - SdKfz 232 8Rad
Administrative Corporal - SdKfz 232 8Rad
Posts: 158
Joined: Sat Apr 14, 2018 2:53 pm
Location: Long Island

Re: Experts, what is a mask.tga file?

Post by Deja Bru »

So the first screen shot is from U.S. Pacific, one of the main mask.tga files; you can see the outline of the Pacific Rim:
Capture1006.jpg
Capture1006.jpg (205.07 KiB) Viewed 4794 times
Now compare these two images. That looks like the Japanese advance from Manchuria into China:
Capture1007.jpg
Capture1007.jpg (192.6 KiB) Viewed 4794 times
Capture1008.jpg
Capture1008.jpg (194.01 KiB) Viewed 4794 times
I loaded U.S. Pacific into the campaign editor and could find no way to see or change these territorial "masks." So now I am no longer thinking of mask.tga files as "vestigial" but more as "trade secrets" known only to the gods of OOB.

Unless one of you demi-god modders can tell me that you consciously use these files in your campaigns. And how you do it. :wink:
- Bru
Post Reply

Return to “Order of Battle : World War II - Scenario Design”