The goal of this tutorial mod is to add a new banner that we can choose when starting a new game and have it displayed properly both in the menu and in-game on banner posts and buildings.
General mod structure is NOT explained here. Please refer to the Mod structure article for details.
- Navigate to the Data\Textures\Icons\Banners folder and create a new folder in there called TutorialModdingBanner
- Place Icon_TutorialModdingBanner.dds texture into the folder you just created
Now let’s handle the in-game side so the banner is displayed on buildings.
- Navigate to the Data\Models\Decorations\Textures folder and create a new folder called TutorialModdingBanner
- Copy three textures into the newly created folder
Now let’s navigate to the Data\Base folder
- There, open the Banners.wdt file in a text editor (the default Windows Notepad or Notepad++ will do nicely)
- Here, we need to link the new textures by creating a new entry in the table
For more information on how tables work and best editing practices, check the Editing database tables article.
If all of the above steps were done without an error, go into the game and find your new banner ready to be selected.
The above handles adding a banner into the game, if you already have all the textures. Let’s have a look at some details when creating custom textures. Patron uses the .dds format for textures. To export these from for example Photoshop, you need the DDS plugin from nVidia.
As could be seen in the first part of the article, we’ll need 3 textures: diffuse, normal and special used on the in-game model, and one for displaying it in the banner selection menu.
- The Diffuse map, if the texture contains the alpha channel, must be exported as DXT5 interpolated alpha, but otherwise we can export it as DXT1 No Alpha
- The Normal map uses the alpha channel for Ambient Occlusion (optional).
- The Special map has to be RGB, where R is Metalness, G is Roughness and B is the Emissive mask (linked to the diffuse texture)
Here’s another tidbit to assist when exporting using the nVidia plugin:
- Dropdown export options
- HINT: Check the 3D preview of the texture before exporting
Dropdown export options:
If you’ve followed the first part of the tutorial, simply open the new textures we added into the folders, copy our new images over the existing content and export the .dds textures.
Job well done Patron!