Hey there! Are you a map maker for Jagged Alliance 3? Then you’re in luck! This guide will show you how to use map prefabs to make your map creation process easier. So let’s dive in and learn all about it!
Introduction
As there is no official way to be created and used, the Map Modding mod provides a way not only to create prefabs, but also to place them as objects on your custom maps.
Requirements
Another mod that is not mandatory but highly recommended to have is the Common LIb.
To edit maps the game has to be started in debug mode.
Prefab map
Saving a map containing prefabs would trigger a step where each prefab source is exported to an output folder in a binary format. As the prefab data could be very large, this data is not stored in the game memory, but loaded from these exported locations when the prefab is being placed.
In order to have a map for creating prefabs, the Map Modding mod introduces the Map mod item. It is a standalone map not dependent on any sector or campaign. You don’t need to include this map in mod containing your campaign, so you can have a local, not published mod just for the purpose of holding these prefab maps. Or you could include it in the campaign mod to serve as reference how to.
To create a prefab map click of the “Create New Mod item” button and choose “Map”:
The map mod item properties are actually the same as those of the map data. First name your map in such way so that you recognize it easily along other maps. This name will be used to create a subfolder for the map in the mod’s Maps folder when the map is saved from the map editor. If you change the name of the map after creating it, you will have to manually fix the map folder name where the map files are located – the mods cannot manage these file operations. In this example the map will be named “PrefabMap”. Also the preset group is named “Prefabs” for clarity:
Save the mod. If everything is you won’t see any error messages. Open the map list by F5. If the map is there:
If there are errors or the map doesn’t appear in the list, try restarting the game.
Select your prefab map from the map list (F5) and conform it’s loading. After a few moments the loading screen will close and the camera will present an empty map. The game will not be automatically put in map editing mod, like the sector maps do. You are free to enter and exit the map editing via the F3 key. So enter map edit mode by pressing F3:
Prefab marker
Place the Prefab Marker attached to the mouse cursor on the ground. Open it’s properties from its RMB menu:
When the properties are open, an additional marker would appear initially to help change the size of the prefab area by dragging it. You need to fill an unique prefab name, to choose if the terrain has to be captured or not, to specify the invalid terrain for masking, and eventually to set the prefab tags and type for filtering. In order to have custom tags and types for selection, you need to define such via the respective mod items “Prefab Tag” and “Prefab Type”. Please keep in mind that the majority of the prefab related properties are of no use for manual placement as they are meant for the random map generator only. Many of the props have a help text on rollover.
Now create your sophisticated structure from objects and terrain inside the prefab area. The capture size can be changed at any time from the properties, so there is not need to respect it. The prefabs can contain anything placed on a map. But avoid to place grid markers or other dynamic objects that depend on their location. In case that the prefab contains terrain modification, it needs to be masked by an invalid terrain. The mask need a transition distance so that the prefab effect ois gradually applied from the surrounding map on placement.
In order to make possible the placement of the prefab on other maps it has to be “exported”. The export process is linked to saving the map. Just hit Ctrl-S to trigger the save and if no errors are reported, some prefab files should appear in the AppData folder of the game under Maps:
Prefab brush
The prefab brush is a tool similar to the place objects tool – it provides a list of choices and a way to filter it. Once selected, a prefab is placed on the mouse cursor to be positioned on the map. You can rotate it by holding the Ctrl key and moving the mouse left or right, or by pressing + or – keys. The Shift and the Alt are rotation speed modifiers. The middle mouse button makes aligned rotation on 90% which is useful for rooms and other structured map objects. The first mouse button confirms the location while the right button or the ESC key cancels it and closes the brush.
Once placed the prefab is “unpacked” and it’s no longer considered as a single object. If you want to keep the objects collected together, you need to place them in a collection inside the prefab and then to specify in the prefab properties “Important Collections” as true. Otherwise any collections are wiped from the prefab objects on export.
Disclaimer
And that wraps up our share on Jagged Alliance 3: Map Prefabs. If you have any additional insights or tips to contribute, don’t hesitate to drop a comment below. For a more in-depth read, you can refer to the original article here by injto4ka, who deserves all the credit. Happy gaming!