-
Notifications
You must be signed in to change notification settings - Fork 5
Creating new regions
This article will demonstrate how to create a mod expanding the world of Phantom Brigade. It'll cover the recommended workflow for creating the 3D landscape, configuring the landscape in the SDK, extending the province database to place your landscape in the world and setting up a mod utilizing the AssetBundle system to sideload your assets. Make sure to read the Creating asset mods article before proceeding.

Before we get to setting up the mod, we need to learn the parts that regions (provinces) in PB are built from. Let's start with the visual assets and go over the data (configs) later. As covered in Creating asset mods, the assets will be located in the Assets/User/ folder. The highest level asset is a Prefab with a special component called OverworldLandscapeRoot:

The OverworldLandscapeRoot component provides a number of references to the landscape system. They include the main terrain mesh (3D model of the playable area), the skirt mesh (3D model of the background area extending to horizon), textures (albedo, normal, splat map) and some optional values. With the data from this component, the landscape system can display the terrain to players at runtime.
Let's take a closer look at the two 3D models:

Finally, let's take a look at the textures. The main textures used by majority of landscapes are:

- Main texture (usually named
tex_color_out):- Usually an 8-bit RBGA PNG with 2048x2024px resolution
- Unity import settings:
Defaulttype,sRGBon - RGB stores albedo color
- A stores the water mask
- Splat texture (usually named
tex_splat_out):- Usually an 8-bit RBG PNG with 1024x1024px resolution
- Unity import settings:
Defaulttype,sRGBoff - R stores mask of flat areas
- G stores mask of slopes
- B stores mask of smooth areas like snow
- Optional normal texture (usually named
tex_detail_normal):- Usually an 8-bit RBG PNG with 2048x2048px resolution
- Unity import settings:
Normal maptype - RGB stores a tangent normal map
Now that we know what assets we need (meshes and textures), we can look into ways to make them using external software like Gaea 2. Once we're done with the assets, we'll return to the SDK to continue setting up the landscape.
...
...

...
...
This wiki is a work in progress. Please make sure to check the built-in tutorials within the SDK or the modding articles on the game wiki to supplement this page. If you get stuck or experience a bug, please don't hesitate to ask questions in the #phantom-modding channel of the official Discord server. We can't wait to see what you create!