Merging Layouts
Overview
When creating a mod you may want it to be compatible with other mods. However, if your mod edits a level layout and the other mod edits the same layout only one version will be loaded ( the one with the highest priority mod as set in the Selected Mod Order in the Mod Launcher ) even if they edit different things inside that layout.
So what can you do?
We have added the functionality to merge layouts. It is limited to level layouts only and will not work for UI, skills, or any other types of layouts. All you have to do is save your layout in a folder named “merge” under the parent folder that holds the layout you want to merge with. You can have as many files in the merge folder as you want. Be aware that the files will be merged in to every layout in the parent folder.
Example
For example, let's say you want to merge a new merchant NPC in to the first town. All you would need to do is open up the first town layout, place the merchant where you want them, and then delete everything else in the town ( leaving only the merchant NPC ). Finally, save the layout in a "merge" folder under the first town's folder in your mod directory:
- <your mod>\media\LAYOUTS\ACT1_TOWN\1X1SINGLE_ROOM_A\MERGE\my_merchant.layout
There is one very important thing to remember about merging files: Merging files does not do any kind of conflict resolution - it simply adds the layout in to the parent layout. This means proper planning between layouts is required as objects from multiple layouts placed at the same location will overlap. This is why, in the previous example, you must delete the rest of the objects in the town layout or they will be merged in and everything in town will be duplicated.