Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
image-20240429-110515.png

Minimaps are made out of tile images with each image being a screenshot which represents a tile of the world from a bird's-eye view.

The whole process of making very detailed and accurate minimaps can be challenging. There is a lot of external adjustments you need to do with the raw generated images.

Minimaps are generally divided into:

  • exteriors (water, roads, terrain, forest)

  • interiors (buildings, caves).

Below you can find out how to work with both.


Minimap for exteriors

89cdc935-9b99-4372-8b1a-c45410b3e592.png

In high level, the original flow was the followingHere’s how a minimap for exteriors would have been created usually:

  1. Take screenshots with specific rendering settings of the world map in editor the Editor, with everything streamed in for the given chunk area and spit split out various layers of data (colour, normals, water mask, roads mask, buildings mask, etc.).

  2. Take these images and merge into big images of the entire world for each layer.

  3. Pass them through Photoshop saved actions batch that processes all layers and merges them into single final image, adding clouds.

  4. Split the final image into original chunks (size).

  5. Remove the chunks that were not used by game (the actual terrain is way bigger than the UI map that can be observed in the game).

  6. Generate lower LOD for each chunk (downscale).

  7. Save in the final destination in the W3 content folder.

So if you are someone who is familiar with using photoshopPhotoshop, you could do some post editions what edits as you see fit. If you are not, that’s also not a problem, we will only talk about the most necessary steps to provide add something visible on the minimaps and skip adding the fancy stuff for now.

You can find all the minimaps already generated for vanilla maps located in …\depot\gameplay\gui_new\minimaps\

Each folder is named after a world. In each folder you’ll see all the tile images that are used up for making a two dimensional grid using an X and Y coordinate.

Each image follows a naming convention as follows: <tile_name_prefix><X_coordinate>x<Y_coordinate>.<image_format>

(e.g. tile12x13.jpg

info

).

5ec49967-2812-4bb2-9564-c21336718e2a.pngImage Added

Search the code

If you want to learn more about the code side of

how exactly

where these tiles are

fetched

taken from, you can check the actionscripts stored in the depot.

5ec49967-2812-4bb2-9564-c21336718e2a.pngImage Removed

Navigate to \depot\gameplay\gui_new\actionscript\red\game\witcher3\hud\modules\minimap2\ and open the actionscript file called HubMapContainer.as.In it there

There’s is a function called GetTileFilename at line 236. Here you can see how tiles are accessed.

Code Block
return "img://minimaps/" + HudModuleMinimap2.m_worldName + "/tile" + tileX + "x" + tileY + "." + HudModuleMinimap2.m_tileExteriorTextureExtension;

Looking at the m_tileExteriorTextureExtension variable at the end can help us to see what is the format that the script accepts, so by searching for it’s definition we can see that it’s located in gui_new\actionscript\red\game\witcher3\hud\modules\HudModuleMinimap2.as at line 65.

6bf1595a-83d9-4c34-9c4c-2546c251e75e.pngImage Added

Minimap for interiors

93e6b6e8-4d8f-46d6-ac0b-787f00dd9100.pngImage Added

In the original making of interiors there was a separate level with all the buildings spawned in a grid and each building had a navmesh inside where each navmesh was covering a single floor in various sizes (depending on the building/interior). After that, a camera was capturing screenshots of these navemeshes for each floor.

So the Editor generates those navmesh-mask screenshots to represent the interiors maps of the buildings.

In the game once the player gets inside of a building, the minimap detects that the context changes from exterior maps to interior and the navmesh-mask would be soon visible dedicated to that building/cave.

minimaps.gifImage Added

As for caves, these were generated in world, similar to buildings, but the navmesh was taken directly from the world.

5198d87b-b175-418b-9f35-70967ed146f3.pngImage Added

The runtime difference: buildings were rotating the minimap for their interior based on their transform (as we could have the same buildings copied around)
where on the other hand, caves having the minimap as it was generated, aligned to world axes.


Creating exterior minimaps

Before we start: since the minimap creates images based on the current state of the world, make sure you load every layer that is important to be seen on the map.

79b8d19b-ef1e-428d-958f-e840c40f3a96.pngImage Added

Now if we have a custom world created, populated with all of the content and ready for us to generate minimap for, we can use the tool called Minimap Generator.

You can find it in the main toolbar’s Tools menu.

2024-07-03_13-22.pngImage Added

Below you can see how the tool looks.

The first thing that we need is to set the output directory path, where the tool will generate the tile images to.

6a84664b-1cc5-44d3-9fbc-154516d61a29.pngImage Added
Note

We advise against using \…\depot\gameplay\gui_new\minimaps\ as your output folder as you may have to do some edits before we can use the tiles. The generation will create its own directory structure for the images based on various filters that you set, placing them in folders where the Editor won’t be able to find them.

Next, you can choose how do you want to select the required tiles for the map. But now let’s just use all of them:

2024-07-03_13-29.pngImage Added

In the image options, you can select the file name prefix that all of the images will be saved as followed by the coordinates. Also you need to set the Base Image size. If you’re not sure about what value to use for the Base Image size, you can take a look in the Terrain Edit Tools what LOD config has been used to generate the world:

2024-07-03_13-27.pngImage Added2024-07-03_13-28.pngImage Added

In the Exteriors tab, set the following options. If you want to edit the tiles later on with Photoshop then you can choose the For Photoshop option to create a more useable directory layout for it. Otherwise choose Default.

2024-07-03_13-30.pngImage Added

Finally, we can select the masks where we tell the generator what are the different layers that we want to generate tiles for. The tiles after that will be generated in different folders where each folder is dedicated for a mask we choose here.

So let’s select the components we want to present on our minimap:

2024-07-03_13-31.pngImage Added

Click on the Generate exteriors button to begin the minimap generation and wait for it to finish, this may take some time depending on the number of tiles you have selected:

2024-07-03_13-32.pngImage Added

After it has finished generating, in the output folder you can see the following structure based on the Directories layout that you have specified earlier. If you chose the “Photoshop” option, then every tile will have a dedicated folder for each mask:

83831924-caed-4e02-a5a3-9ef36a090a16.pngImage Added

Here’s what you can find in the tile0x 0 folder:

65a67903-97ca-4253-81e9-ef5e2a9ae84b.pngImage Added

If you went with the “Default” option, then each mask will have a dedicated folder generated, and inside all of the tiles in a two dimensional naming convention:

2ab8d8f6-07d6-433d-9357-92ad2f958438.pngImage Added684c424e-bfb0-4f71-91fa-0ced20bc0cb9.pngImage Added

Now create new DLC data for the project. In the Asset Browser locate the …\depot\dlc\ folder and create a new directory with a name representing your project.

2024-07-03_13-36.pngImage Added

In this directory create the same folder structure as the one in \depot\gameplay\…\minimaps\ (your dlc > data > gameplay > gui_new > minimaps).

In the minimaps folder create a sub-folder only dedicated for our custom world. Name it the same as the directory name.

2024-07-03_13-37.pngImage Added

Now in the file explorer, you need to copy and paste all the generated minimap tiles from the Full folder into the dlc\<your_dlc_name>\data\gameplay\gui_new\minimaps\<your_world_name>\ folder.

93de9b84-5065-4ad2-a6c9-ef2cb654a12a.pngImage Added

Next, create a DLC definition file in \depot\dlc\<your_dlc_name>\ and give it a name.

2024-07-03_13-43.pngImage Added2024-07-03_13-44.pngImage Added

Open the new file. You need to set some properties so that the Editor can treat it as a valid DLC.

First let’s give an id value for the DLC. It can be anything but we tend to use this format <dlc_name>_000_000

2024-07-03_13-45.pngImage Added

Now let’s add some mounters. First add a CR4WorldDLCMounter (use the Class selector search bar at the bottom) to the mounters array:

2024-07-03_13-46.pngImage Added

And add the reference to the custom world in the worlds array:

2024-07-03_13-47.pngImage Added36ec2d42-991b-4601-8af7-9c7ec82b062b.pngImage Added

In CR4WorldDescriptionDLC properties for the file we need to go on the route of defining a custom enum and definition for our world file.

Head over to the main Editor window, and open Tools > Script Studio.

In the Script Studio expand the Depot group on the left. Locate the areaTypes.ws script file in \Depot\game\.

Make sure to select the areaTypes file, right click on it and select Check Out.

2024-07-03_13-50.pngImage Added2024-07-03_13-52.pngImage Added

All your checked out scripts will be located in your Workspace, and these are all separated into the Workspace group.

2024-07-03_13-53.pngImage Added

Expand the workspace group. Again locate the areaTypes.ws file and open it.

At the top, add a new ENUM value to the enum EAreaName that will be used for your world. This way we can reference it in many tools like the DLC definition editor.

2024-07-03_13-55.pngImage Added

After you’re done editing the enum, make sure that you save the file ( 💾 ) and press the Reload scripts button.

1d8747d7-f35a-407d-8c69-9d19396c1e82.pngImage Added


Now go back to our DLC Definition editor and set the worldEnumAreaName with our newly defined enum from the script.

Also there, set the worldName and worldMapPath:

2024-07-03_13-59.pngImage Added
Note

Make sure the name of the world matches the values you enter here. Also make sure that the folder name of the world inside dlc\<dlc_name>\data\gameplay\gui_new\minimaps\ also matches.

Now create the main strings which will represent and name our world inside the game.

To do this, open the Localized Strings Editor in the main window’s Tools toolbar menu:

2024-07-03_14-01.pngImage Added

Here create two strings for the name and description for our world. Press the plus sign on the top left to add a new row to the list:

6f95e654-6295-41c4-8c5e-c3601c22c2e0.pngImage Added

Enter these values (mariska is the name we are using, yours can of course be different):

  • Key: map_location_mariska

  • Category: Maps

  • Value: My custom world map

Create another row and put in the following values:

  • Key: map_description_mariska

  • Category: Maps

  • Value: My custom world description

Save your work. You can close the Localised Strings Editor

Now use the keys of the newly saved strings in our DLC definition’s worldMapLocationNameStringKey and worldMapLocationDescriptionStringKey fields:

2024-07-03_14-07.pngImage Added

Now set the following parameters according the configurations and dimensions that your world is defined. In this example the worldMinimapTileCount is 256, since in my Full output folder I have 256 tile images generated.

37d21ca2-615c-4b9a-ac48-7d198a44af94.pngImage Added

Info

Not sure which parameters to use? You can test out parameters defined in other DLC definitions - like that ones located in:

  • dlc\bob\activation_bob.reddlc

Another mounter that you need to add is a Scaleform content definition. This is where you add the reference to our dlc minimap which the Editor can use while using our custom world.

2024-07-03_14-11.pngImage Added

For the scaleformDirectoryPath give the path to the minimaps folder that’s located in our newly made dlc structure:

2024-07-03_14-11_1.pngImage Added

Now go ahead and close the DLC definition editor and make sure you click on “YES” and save it after closing!

2024-07-03_14-15.pngImage Added

Now the minimap should be visible once you start playing inside the custom world.

Info

You may have to restart the Editor to make the changes apply.

Once you have your world loaded, press the joystick button to Play on current layers only, to test outthe minimap in gameplay.

Now that you can see the minimap, you can go back to your DLC definition file, and fine tune the parameters if you notice mistakes in placement, zoom, coordinates, size and so on.

74f2207c-ccf3-4c6b-8c88-78091aaf50b5.pngImage Added

Table of contents:

Table of Contents
minLevel1
maxLevel6
include
outlinefalse
indent
styledisc
excludeMinimaps are made out of tile images with each image being a screenshot which represents a tile of the world from a bird's-eye view.
typelist
class
printabletrue