This tutorial is a guide to creating slave files which pull their textures from a master file in the same way any matching Maxis pieces do. Use of the repository technique is a great way to reduce file sizes as well as making recolouring a set a lot easier. What better than to only have to recolour 1 or 2 files instead of 10! The Master file can be either a Maxis object or a custom mesh, either works and the process is the same in both instances. This guide assumes that you already have some knowledge of SimPE and that the slave files have already been mapped correctly so that the texture will show in the right way on the slave files. If the slave files have not yet been mapped you will need to remap them, I will not be covering how to do that in this tutorial.
*NOTE: If you are slaving a multistate object (lights) the STR resources also need to be edited. see BHAVs & Multi-state Objects
For the tutorial I am using the Campagne curtains from Sims Design Ave following a request to make them all slaves of the long curtains without shutters. Before starting open wordpad to copy and paste the required MASTER information into. It is easier than writing it down and tends to be more accurate, especially if your spelling is anything like mine. I also make myself 3 headings, CRES, GMDC and SHPE, each on a separate line.
The first thing we need to do is extract certain information from the MASTER file. If using a custom mesh as the master: Open SimPE and in the object workshop window chose open and navigate to the folder you have the mesh in and select it.
If using a maxis mesh as the master: Open SimPE and in the object workshop window chose start and wait for the items to load. Find the item you want to be the master and select it. Once you have selected your master file chose cloneas your option in the task bar. Uncheck all of the boxes and click finish or start, it makes no difference. The package will load in a few seconds.
Once the package has loaded, change to the plug in view and in the Resource Tree select the Resource node (CRES). This is where we will find the filename. Highlight the file in the resource list and then copy the file name (the bit before _cres) and paste that into your open WordPad beside your CRES heading.
*IMPORTANT – in the case of a custom mesh you need to ensure that ##0x1C050000! is added before the filename. Some file names will already show ##0x1C050000! but most do not for some reason. If it is not added the slave will pull the mesh texture but not any recolours.
You can see below in the file I am using the file name is given as rideaux-fenetresansvolets-[frances-27.1.2007-126e] so we need to add the above string so the file name reads as ##0x1C050000!rideaux-fenetresansvolets-[frances-27.1.2007-126e] in our wordpad copy.
Next in the Resource Tree select the Geometric Data Container (GMDC) and highlight it in the Resource list. From here we will make a note of the subset/group name that we wish to use as the master, in this case fabric. Make a note of that in your open wordpad next to the heading GMDC.
The last thing we need to note is the material definition file in the Shape (SHPE). In the Resource Tree select the SHPE and highlight it in the resource list. Ensure the subheading parts is selected, highlight the subset and copy the name of the material definition file to wordpad.
You need to repeat these steps for any master subset you wish to use. For example you may have made a maxis match bookcase and want it to take the frame from say the mission table and the books from the craftmeister bookcase. In which case you would need the details outlined above from both maxis items. Once you have these details you can close the master file – you will not need it any more.
My wordpad document looks like this:
Converting Files to Slaves
Now we are ready to start converting the files we want to make as slaves. I always copy the files and keep a back up of the unedited files. That way if I make a mistake and it all goes horribly wrong I have an unedited copy of the package to retry with. Sometimes it is just way easier to try again than to find where you have made an error!
Choose your first file and open it with SimPE. In the Resource Tree select the Geometric Data Container (GMDC) and highlight it in the Resource list. Check the name of the subset.
In our example the subset has the same name so we do not need to make any changes. However if we were making the curtains a bedding match for example we would need to change the subset name to match our master file. To change the name of the subset – whilst in the GMDC click on the groups tab, highlight the subset in the group section, rename it and commit the changes
The next change we will make is to the Material Definition file. To do this select the SHPE in the resource tree and highlight it in the resource list. Under the parts tab select the subset, if you changed the name of the subset in the GMDC then you will also need to change it in the SHPE. Once you have re-named the subset, if applicable, then copy the information from wordpad into the material definition heading so that it matches the one on the master file. Commit the changes.
Next we need to edit the information in the GMND. Select the geometric node (GMND) in the resource tree and highlight it in the resource list. In the blocklist select tsDesignModeEnabled. Check the name of the subset. If you changed the name of the subset in the GMDC and SHPE, you will also need to change it here. Commit the changes, if applicable.
Next in the Generic Recol Editor window select the edit blocks tab. In the scroll down menu look for (cDataListExtension) and click add. It will appear in the list at the left of the screen. Make a note of the number e.g. in our example 0x5. I always commit the change but you do not have to at this stage.
Next click on the content tab and select GraphNode.Under Datalist Extension reference on the right hand side of the screen click add. The new entry in this case reads 0: 0x00, 0x00. We need to enable the new entry so highlight it in the Datalist Extension Reference change the box enabled to the value 0x01 and change the value in the index to the next number. In this case 0x00000005. This links it with the entry we made above. Commit the changes.
In the blocklist find our new entry and select it.
Select the cExtension tab. The name box will be blank, add in tsMaterialsMeshName as the name. In the drop down list at the right of the screen change from array to string and then add a string. Select the new entry and under the name add the name of the subset, in this case fabric and under the heading string add the filename of the master (i.e. the info we took from the CRES of the master) in this case: ##0x1C050000!rideaux-fenetresansvolets-[frances-27.1.2007-126e]. Commit the changes.
All that remains now is to clean out the package and get rid of useless information. In the resource tree select Texture image (TXTR), highlight it in the resource list, right click on it and select delete. *Please note if the package has 2 subsets and you have only made one of them a slave to another mesh, make sure you delete the correct TXTR. If you are using shadows and have not made those a slave to the master file do not delete any shadow txtr or the shadows will not show.
In the resource tree select Material Definition (TXMT), highlight it in the resource list, right click on it and select delete. *Please note if the package has 2 subsets and you have only made one of them a slave to another mesh, make sure you delete the correct TXMT. If you are using shadows and have not made those a slave to the master file do not delete any shadow txmt or the shadows will not show. In the resource tree select Material Override (MMAT), highlight it in the resource list, right clickon it and select delete.