How to Properly Make Patches for PlanetBuildingTables.mbin

How to make a compatibility patch for two mods editing PLANETBUILDINGTABLE.exml
"By theFisher86"

Many mods use the open "slot" for "None" in the PlanetBuildingTable to spawn their custom models. This is a great way to do except it's not expandable using PlanetBuildingTable as there are limited "slots."

By utilizing the method described below you can make two mods compatible with each other without too much effort.

Step One
It'd probably be best to start with the vanilla PlanetBuildingTable file.

Add a Reference to a CustomModel that we'll be building to the slots you want to spawn ALL of the objects in. Basically what we're doing here is instead of spawning your object directly into the PlanetBuildingTable.

We're going to spawn a spawner which will use a scenegraph to spawn the objects from the multiple mods. Then if you need to add another mod to the compatibility patch you'll add that via the spawner instead of PlanetBuildingTable.

Here's an example of just the Traders section where I added the spawner:

Step Two
Create the spawner and add references to the mods scenes there.

Make a new file. I'd recommend following the naming pattern I used: MOD1-MOD2_Spawner.SCENE.exml

Paste this into the file. It includes "slots" for 5 "picks" or models which will spawn in there. Delete or add as needed.

!!!Keep in mind that the "slots" ID names have a 16 character limit.

Step Three
Make the Descriptor File. Name it MOD1-MOD2_Spawner.DESCRIPTOR.exml. Again, this includes slots for 5 "picks" feel free to add or delete as necessary.

You can change the "Chance" section if you'd like some models to be more prevalent than others.

There's more information on Descriptor Files available on the NMS Modding Wiki here: http://nmsmodding.wikia.com/wiki/DESCRIPTOR_Files

Step Four
Turn everything into an MBIN, pak it up with a filename that will put it at the bottom of the load order (zzzYouModNameHere.pak) and enjoy your success!