Loading .tga masks in custom campaign

Order of Battle is a series of operational WW2 games starting with the Pacific War and then on to Europe!

Moderators: The Artistocrats, Order of Battle Moderators

Post Reply
LxSomeone
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Tue Feb 08, 2022 3:17 am

Loading .tga masks in custom campaign

Post by LxSomeone »

Hello everyone,
I'm playing around with the Campaign Editor and in addition to my own map i would also like to add my own .tga masks, like in the official campaigns. However i can't get my custom campaign to correctly load them, they do work however, because if I just overwrite the files from an existing campaign they do show correctly in game.
So for example if I go into "7Blitzkrieg" in the official game files and replace the map.png aswell as the mask0_0.tga (for the grey color) and the mask0_1.tga (green) i do get the desired result when I load the Blitzkrieg campaign ingame:
Image
(Country names etc are obviously wrong since i didn't adjust them.)
But it correctly shows my map (bigger version of europe with the additional border in germany) and the grey and green regions within germany.
In my custom campaign however the .tga masks (the colored regions) don't properly load, it just shows my map.png.

Also something else I noticed:
If I create a new campaign via editor and then edit the folder name of that campaign in

Code: Select all

Documents/My Games/Order of Battle/Campaigns
to the name of an official campaign it does load those "official" .tga files. So for example I have the "MyCustomCampaign" under the My Documents path and change it to "8Panzerkrieg" (which is the folder name for that campaign in the actual game files) it then loads the .tga masks from that official campaign without the .tga files being in the custom campaigns folder.
So it seems the game is always looking for these .tga files in the official campaigns folder, even for custom campaigns. I thought maybe there is some config where i could point the game towards the correct path to my .tga files but I couldnt find anything and I'm afraid that is somewhere deep inside the games source code.

So does anyone know how I could make this work? Is it even possible at all?
StuccoFresco
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 645
Joined: Sun Feb 10, 2019 11:10 am

Re: Loading .tga masks in custom campaign

Post by StuccoFresco »

I so much need this.
GabeKnight
Lieutenant-General - Karl-Gerat 040
Lieutenant-General - Karl-Gerat 040
Posts: 3710
Joined: Mon Nov 27, 2017 10:24 pm

Re: Loading .tga masks in custom campaign

Post by GabeKnight »

LxSomeone wrote: Tue Feb 08, 2022 3:55 am So does anyone know how I could make this work? Is it even possible at all?
If you rename your campaign to an "official" one, then yes, the required files are being loaded from the internal asset files.

But you can make those mask files work nonetheless. I'm not sure about the specifics you have to select in your program for graphic editing, but it has been done succesfully in the excellent "Spanish Civil War Mod & Campaign" by "LNDavoust".

Some discussions about this in his thread: https://www.slitherine.com/forum/viewto ... 74#p829255:

Quoting LNDavoust: "It seems that the mask tga files, the overlays pictures that the game uses to create the effect of territorial distribution over the map in the campaign screen, only work inside mods and not from the vanilla version of the game."
LxSomeone
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Tue Feb 08, 2022 3:17 am

Re: Loading .tga masks in custom campaign

Post by LxSomeone »

Quoting LNDavoust: "It seems that the mask tga files, the overlays pictures that the game uses to create the effect of territorial distribution over the map in the campaign screen, only work inside mods and not from the vanilla version of the game."
I see, I suspected something like that would be the case, the vanilla game just seems to lack that functionality.
Anyway, that helps me, thank you for your reply!

Edit:
Just for future reference in case someone stumbles upon the same problem:
As mentioned above if you want to use .tga masks in your custom campaign the easiest solution, it seems, is to just create an "entire" new mod, which I personally wanted to avoid since I thought it would be too complicated for my little project, but fortunately its very simple, all I did was to create a new folder in "My Documents/My Games/Order of Battle/Mods" in that folder a "mod.txt" (which is required), which i copied from the mod template (viewtopic.php?f=374&t=64188) and in addition to the text file a new folder "Campaigns" and in that folder then my actual custom campaign. That is as barebone as it gets (even more so than the template) but it still is technically a new mod and therefore the custom made .tga masks do correctly load ingame.
Maybe this is helpful for someone :)
Post Reply

Return to “Order of Battle Series”