MMM

Packs

As you may or may not be aware (be aware please), you can use the “include” function to split your script into multiple files. This will help you to manage your code as it grows in complexity by splitting components into separate files. The only drawback to this is that you would have to distribute a whole bunch of Lua files with your bzn and dsl files – and they may potentially clash with existing Lua files.

To get around this issue you now have the ability to create a pack file. This is a zip file (given the extension mmmpack) that contains all of your script files. It will preserve your directory structure so you can use script subdirectories to keep your scripts organised. Originally packs used a custom file format, but I opted for zip in the end as almost everyone knows how to make a zip and it saves me having to write and test an entire application to create packs.

The pack will be loaded if present – that is it takes priority over the actual .lua files. You should only use the pack when distributing the mission as debugging information will be limited. Using packs means that you only have to distribute the bzn, dsl and mmmpack files when your map is ready for release.

Subscribe to RSS - MMM