• Welcome to SC4 Devotion Forum Archives.

MML - The Making Of

Started by Diggis, February 24, 2013, 01:16:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Diggis

Creating your own MML Mod isn't very hard, once you understand the technique. First of all, you have to create a "construction lot" in the Lot Editor. I suggest using an existing lot of your set, or simply starting with an empty grass or cement lot. Add some construction props and save it under a new name.  It's a good idea to only have the necessary lots in your plugins folder so you don't end up with unwanted dependencies.Some good construction props can be found with the basic maxis props.  Type 02ff0000 into the add props window and there will be a list there.  Other good sets can be found in BSC vehicles and Foss's construction props (I need to check these, but I think it's right)

Open the SC4Lot file in ilive's Reader and use "save as" to create it as a DAT file. Create a nice icon and import it with LEProp. Add a lot name and description as well by entering them in LEProp and clicking "Apply", then "Save DAT". Don't forget to add a note in the lot description that the construction lot will unhide the other icons of the set.

A good trick is to use an icon from one of the set you are making the MML for, save it using the LEProp and open it with Photoshop or similar and add a Bulldozer icon of some sort to it.

Now, open an existing MML Mod DAT file in ilive's Reader and copy the LUA script by right-clicking on the file and selecting "Copy file(s)". Paste it to the construction lot with right-clicking and "Paste file(s)". Next, add (or copy) a "Building: Landmark" occupant group to the Building Exemplar file of the construction lot.  You can take this from an existing MML too.In the next step, you have to copy all Building Exemplar files from your set of lots to the construction lot as well. In each of these Building Exemplar files, you have to add a "Conditional Building = True" property (simply copy one from an existing mod file).

Finally, the LUA script needs to be edited.
Change the instance ID by clicking on the "File Info" button and then the "Edit" button in the window that shows up. Enter the same IID as the Building Exemplar file of the construction lot has, but change the first number to "0". Click "OK" and then right-click in the file list and select "ReIndex". Now open the LUA script, hit "Edit" and change the package ID so it matches the IID of the LUA script.

Scroll down to the list of IDs and change the first one (the one of the construction lot) to the Building Exemplar file instance ID. Look up the IIDs of the other lots (usually they are identical with the numbers in the file name, as the Lot Editor saves them). It can't hurt to add the lot names behind the "--", the green texts are only comments and won't be used by the script.

In addition, change the array variable (it shows up three times in front of the "=" in the first three rows and once between the "( )" in the last row) to a unique name (attention, use only capital letters and underscores!). Now, save the script by clicking "Apply", and then save the lot file. I suggest to rename it and place it in the "\zz_BSC_MML" folder, so it's loaded last when starting the game.

Hopefully this will help some people on their way to creating these useful files. I'll hopefully get some images etc into this at some point, but until then feel free to post any questions you have and I will answer them as best I can.

Many thanks to the BSC and SFBT members for the beta testing and development of this mod.
daeley: idea, unlocker script
Andreas Roth: new construction lots, modding, documentation