Custom minimaps

From Dragon Age Toolset Wiki
Revision as of 16:10, 19 September 2010 by FollowTheGourd (Talk | contribs)

Jump to: navigation, search

It's possible to use a handcrafted minimap texture instead of the one posted by the level editor, which can be quite large and non-stylized. Sometimes you may not even have the LVL file to export a minimap with, necessitating this procedure. Take for instance the arena2 level available in the toolset. There is no accompanying LVL file released by BioWare and this level has no associated minimap.

Let's presume you wanted to use this arena2 level for one of your areas (although there are some culling issues by the doors). The files you'll need to create can go under addins\[UID]\core\override\arena2\minimap or elsewhere as appropriate, but will do for working with the toolset. These files would be arena2_mmap_ph.dds and arena2_mmi.gff, or <level name>_mmap_ph.dds and <level name>_mmi.gff. Perhaps the easiest way to start creating your own minimap image is create a test area with the desired area layout, turn on real lighting or whatever other settings, and then use print screen to capture and save the image as a BMP. After you save your first screen shot, add two waypoints: one to the bottom left of your area and one to the top right. These two waypoint coordinates will be used constrain your minimap area. Record the waypoints' position coordinates as we'll need them for the arena2_mmi.gff file later. Take another screen shot with these two waypoints visible, as we'll use them as a reference when cropping the image. Also, keep the area at its default orientation when you open it so the screen shot will match up in game. TODO: determine whether Area Map North affects this at all. Obviously this method is also less useful the larger the area and smaller your display, but the maps don't need to be that large to be good enough.

Using the waypoints as a measuring guide, crop the first screen shot from the bottom left waypoint to the top right waypoint and then save the file. Now open it up in a proper image editing program such as Photoshop and rescale the image so it can fit in a power-of-two sized texture. E.g., if your cropped image is 1280x1024, then you may want to use a 1024x1024 texture and shrink the image to 1024x819, as the next power-of-two sized texture is 2048x2048 which would be somewhat wasteful. Now within the power-of-two texture, align your actual minimap texture to the top left corner. Now would be a good time to record another value you'll need for arena2_mmi.gff: basically how much of the texture is used. If your actual minimap is 1024x819 in a 1024x1024 texture, then you'll want 1024/1024=1 and 819/1024=0.799805 for ENV_MINIMAP_TEXTURE_MAP_COORDS, which we'll get to below. Now you can export the file as a DDS texture, which may require a plugin.

So now we have addins\[UID]\core\override\arena2\minimap\arena2_mmap_ph.dds finished, and now we need to edit the GFF for it. We'll use a preexisting file to edit in the toolset. Open the following file in the toolset C:\Program Files\Dragon Age\packages\core\env\brc505d\brc505d.rim and extract brc505d_mmi.gff. Now rename this file addins\[UID]\core\override\arena2\minimap\arena2_mmi.gff and open it up in the toolset for editing.

Edit ENV_MINIMAP_TEXTURE_MAP_COORDS to 1,0.799805,1 as calculated for the example minimap above, with the third coordinate always 1. Edit ENV_MINIMAP_LOWER_LEFT_POINT to the coordinates of your lower left waypoint, but with the z-value being -500. Edit ENV_MINIMAP_UPPER_RIGHT_POINT to the coordinates of your upper right waypoint, but with the z-value being 500.

You can seemingly round off the decimal for the lower left and upper right coordinates, as the map and minimap don't seem to require that much precision, and the toolset isn't that precise either when creating the GFF in the first place.