Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
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
In high level, the original flow was the followingHere’s how a minimap for exteriors would have been created usually:
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.).
Take these images and merge into big images of the entire world for each layer.
Pass them through Photoshop saved actions batch that processes all layers and merges them into single final image, adding clouds.
Split the final image into original chunks (size).
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).
Generate lower LOD for each chunk (downscale).
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).
Image AddedSearch the code
If you want to learn more about the code side of
how exactlywhere these tiles are
fetchedtaken from, you can check the actionscripts stored in the depot.
Image RemovedNavigate 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.
Minimap for interiors
Image AddedIn 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.
Image AddedAs for caves, these were generated in world, similar to buildings, but the navmesh was taken directly from the world.
Image AddedThe 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.
Image AddedNow 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.
Image AddedBelow 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.
Image AddedNote |
---|
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:
Image AddedIn 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:
Image AddedImage AddedIn 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.
Image AddedFinally, 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:
Image AddedClick 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:
Image AddedAfter 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:
Image AddedHere’s what you can find in the tile0x 0 folder:
Image AddedIf 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:
Image AddedImage AddedNow 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.
Image AddedIn 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.
Image AddedNow 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.
Image AddedNext, create a DLC definition file in \depot\dlc\<your_dlc_name>\ and give it a name.
Image AddedImage AddedOpen 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
Image AddedNow let’s add some mounters. First add a CR4WorldDLCMounter (use the Class selector search bar at the bottom) to the mounters array:
Image AddedAnd add the reference to the custom world in the worlds array:
Image AddedImage AddedIn 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.
Image AddedImage AddedAll your checked out scripts will be located in your Workspace, and these are all separated into the Workspace group.
Image AddedExpand 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.
Image AddedAfter you’re done editing the enum, make sure that you save the file ( 💾 ) and press the Reload scripts button.
Image 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:
Image AddedNote |
---|
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:
Image AddedHere 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:
Image AddedEnter 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:
Image AddedNow 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.
Image Added
Info |
---|
Not sure which parameters to use? You can test out parameters defined in other DLC definitions - like that ones located in:
|
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.
Image AddedFor the scaleformDirectoryPath give the path to the minimaps folder that’s located in our newly made dlc structure:
Image AddedNow go ahead and close the DLC definition editor and make sure you click on “YES” and save it after closing!
Image AddedNow 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.
Image AddedTable of contents:
Table of Contents | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|