Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Part-time Hermit
Original Poster
#1 Old 22nd Apr 2007 at 10:01 PM Last edited by HugeLunatic : 23rd Oct 2012 at 5:29 PM. Reason: fixed image links
Default Slave Object Tutorial - Repository Textures From Maxis Objects

How to make a custom object use the texture and recolors of an original game object

by IgnorantBliss

This tutorial is also available as a downloadable file in PDF format. Foxit Software PDF Reader is a free program you can use to view PDF files.

Needed for this tutorial:

- SimPE version 0.60 or newer
- CEP ( and CEP files also selected in the SimPE File Table)
- A mesh editor and a uv-mapping program if you're going to edit a mesh and/or make a new uv-map for one
- Previous experience on creating new objects and using SimPE in general (the usual steps of creating a new object are not explained in detail in this tutorial)

1. Introduction

This tutorial explains how to make your cloned object borrow its texture and recolors from an original (Maxis) object.

Reasons you might want make your object borrow its textures from an original object:

- You want your new mesh to have matching textures with the in-game object (such as having a curtain borrow its textures from bedding)

- You have only edited the original mesh slightly (made a sofa to match an existing loveseat) or not at all (made a hacked object with new interactions but retained the original object's look)

- You want to keep the file size as small as possible by not having textures included in the package

After you make the object or at least one subset in it borrow its textures from outside of the package, you can not recolor that subset/object the usual way. Instead, you will need to recolor the original game object for the recolors to show up.

You can have a maximum of two recolorable subsets in an object, and this also applies to objects that borrow their textures from elsewhere. You can, for example, have one subset in the object borrow its textures from another object, and a second subset which has its texture in the cloned package as usual. The subset that has its texture, material definition and material override included in the package can be recolored the normal way, while the other subset needs to be recolored by making a recolor of the original game object.

The tutorial assumes you are already familiar with the basics of creating a custom object, and the details of that are not explained here.

The tools needed for this tutorial are the same ones you need for creating a custom object in general, specifically SimPE, a mesh editor such as Milkshape, and possibly a uv-mapping program such as UV-Mapper Classic. A paint program may be needed for viewing a texture for reference, but you won't be doing any texture editing within the tutorial since you will be using the original game textures. Having the CEP installed ensures (with the majority of objects) that the clone is automatically color enabled, and therefore the full process of color-enabling the object is not explained in this tutorial.

As an example in this tutorial I'm going to show how to make a curtain mesh borrow its textures from bedding. You can pick different objects according to your preference, but it might be easier to first get familiar with this method by copying the tutorial exactly.

Important: The object that contains the materials and textures is called the “master” object, and the one that borrows its textures from the master object is called a “slave” object. In my example with the curtain and the bedding, the bed containing the bedding is the master, and the curtain is the slave.

Let's get started.

2. Selecting an object to clone

For the slave object, I suggest cloning an object that is the closest to your desired finished object when it comes to dimensions and function. If you want to make a (3-tile) sofa that borrows its textures from a (2-tile) loveseat, you should clone an existing (3-tile) sofa as your base, slave object. In some cases it's also possible to add new tiles to an object if necessary, but this will not be covered here.

For my example object I'm cloning the 2-tile curtain called “Loft Curtains by Sparse and Fine” from the base game.

3. Cloning and cleaning up the package

a) Clone your object with your usual (preferably the default) cloning options. Give it new GUID(s) as usual.

b) Delete all unnecessary Material Overrides (MMATs), Material Definitions (TXMTs) and Texture Images (TXTRs). You delete files by right-clicking on them in the Resource List and selecting Delete. If there is going to be no subset in the clone that has its textures included in the package, you can delete all of the aforementioned files. If you have one subset that's going to be a slave to another object, and another that has its texture included, then you have to make sure to delete the correct ones. The name of the subset can be seen in the file names of the MMATs and TXMTs that are related to it. The texture file name usually doesn't mention the subset it belongs to, but it should be obvious from looking at the texture image. Often more than one subset uses the same texture.

For my example object, the curtain, I'm deleting the Texture Image, Material Definition and Material Override for the actual curtain texture (subset called “fabric”), but leaving the Texture Image and Material Definition for the shadow into the package since the shadow won't be borrowed from the bed.

4. Making the mesh and the uv-map

a) Make the mesh as usual in your mesh editor. If you want to use the mesh from the master object as a base for your new mesh, also make a separate clone package at this point of the master object (this clone you can delete once you're done with this tutorial) and export the mesh from that one for editing.

In my example curtain, I'm not changing the mesh at all since I want to keep the original shape of the curtain mesh and only change its uv-mapping in the next step.

b) The need for uv-mapping depends on what kind of a mesh you're making. If you're using the master object's mesh as a base and are only making slight (or no) changes to it, there should be no need to adjust the uv-map at all. If you're modying the mesh considerably, or making a completely new mesh, then you probably need to uv-map it, too. For making the uv-map, it is often helpful to extract the texture from the master object to use as a reference for your mapping.

Since you're borrowing the texture instead of making a new one, you will have to adjust your mesh to the texture and not vice versa. For example, if you're making a curtain borrow its textures from bedding, map the curtain mesh to an area of the bedding texture that you want to use, and note that different bedding textures have various patterns, and mapping that looks good with one texture might not look so with another.

This is what the uv-map looks like for my example curtain after I mapped it to use the parts of the bedding texture I wanted.

c) Import your finished mesh to SimPE as usual.

5. Cloning the master object for reference

a) Since we will be linking the new object to an existing one, we need to take a look at the original object's structure and filenames to be able to do that. Normally, when you clone an object with the default options, the file names in the package are different from the original in order to make sure the clone will not override the original when put into the game. However, now we need to make a clone with the original filenames intact. This clone is only created for reference and does not need to be saved.

b) At this point of the tutorial it's helpful to have two SimPE windows open at the same time, one with your cloned slave object, and one with the (temporarily) cloned master object.

c) For the cloning options, unselect every option but the “Pull only default color” one.

For my example curtain, I'm cloning the Colonial Ironwood Bed since this is the bed that all the other beds in game borrow their bedding textures from.

6. Editing the Geometric Data Container

a) After you have cloned the master object for reference, open the Geometric Data Container (if there are several of them, open the one(s) that contains the subset you want to borrow textures from), and go to the Groups tab under the Content tab. Take a look at the subset names listed.

b) Then open the same tab in your slave object package, copy the subset name(s) from the master package to replace the wanted subset name(s) in the slave package, and Commit and save the slave package. (To edit a subset name, select it from the list by clicking on it and its name will appear in the Name box on the right, where you can edit it.)

For my example object, I'm replacing the curtain's “fabric” subset name with the subset name “bedding” from the master object.

7. Editing the Shape

a) Next, go to Shape and open the Parts tab in both packages. (If there are several Shapes, find the one that contains the subset you're linking. Sometimes you need to edit several Shapes, as is usually the case with objects like windows and doors.)

b) In the master object package, click on the subset you're borrowing the texture from, and copy the text from the box under “Subset name” to replace the Subset Name in the slave package. Then copy the name from the box under “Material Definition File” to the same box of the newly renamed subset in the slave package. Make sure to replace the name completely, don't leave any parts of the old filename there. Commit. If you have two subsets borrowing their textures from elsewhere, repeat these same steps for both of them. Then save the slave package.

For my example object, I'm replacing the “fabric” subset name with “bedding”, and its Material Definition with the bedding's one.

8. Editing the Geometric Node

a) Next, open the Geometric Node in the slave package. Again, there might be more than one Geometric Node to edit, just like with the GMDCs and Shapes. If that's the case, repeat the following for each of them if they contain the subset you're editing.

b) In the Content tab under Geometric Node, there is a drop-down menu called Blocklist. Open that and see if there is an entry called “tsMaterialsMeshName”. If there isn't, you need to add one. (If it's there already, you can jump to step c ). To add it, click on the Edit Blocks tab, select “tsDataListExtension” from the drop-down menu and click Add.

Then go back to the Content tab and open the Blocklist again. Your newly added entry will be at the bottom of the list. Select it.

In the cExtension tab, type “tsMaterialsMeshName” (without the quotes) into the Name field and click Commit.

Then select the very first entry on the Blocklist, and go to the cObjectGraphNode tab. In the section under “Datalist Extension Reference” click the “add” button. A new line will appear in the box.

Select the new line, then see which number should come next in row, and add that number into the end of the zeros in the Index box. Then type “1” into the Enabled box, and Commit.

Since for my example object the new entry is 5th on the list, I enter “5” into the Index box.

c) After you're done with that (or if the tsMaterialsMeshName block already existed) you can move on. Select the tsMaterialsMeshName entry from the blocklist again (the correct name may not show on the Blocklist until you save, exit and re-open the package, but don't worry). From the drop-down list in the bottom right corner, select String and click add. If you have two subsets borrowing their textures, add two Strings and Commit. Leave this tab open.

(If your object already had the tsMaterialsMeshName block and it contains one or more Strings already, you may have to delete/replace the original ones with the new ones if you don't want to keep the original links for those listed subsets, especially if subsets listed don't exist in the package anymore after you've edited it. To delete a String, just select it, click Delete in the bottom right corner and Commit.)

d) Go back to the master package, open the Resource Node and select the tab called cObjectGraphNode. Copy the name in the Filename box, without the “_cres” extension.

e) Go back to the slave package and the tsMaterialsMeshName block in Geometric Node we have open. Then click on each added String in the Items box, type the name of the subset into the Name field and then paste the copied name from the master object's Resource Node into the String field for each subset. Then Commit and save the package.

f) If earlier in the tutorial you had to change the subset name from the original one (since they need to match those of the master object), there is one more step to do. While still in the Geometric Node, select an entry called “tsDesignModeEnabled” from the Blocklist. In the cExtension tab, in the Items box, you will see the subsets that are listed as recolorable. Rename them to match the new subset names from earlier in the tutorial by clicking on each at a time and editing the name in the Name box on the right, and then Committing. Save the package. (Note that you can have no more than 2 subsets listed under tsDesignModeEnabled)

For my example object, I renamed the “fabric” subset to “bedding”.

g) The master package you can close without saving, it won't be needed anymore.

9. Testing your object

Now you can put the slave object package into your game (the Downloads folder where all other custom items go, as well) and see if it works as intended! If not, double-check that you didn't miss any steps in the tutorial. If you still keep having problems, feel free to post questions at the tutorial thread in the forum.

Troubleshooting Checklist:
1) GameCrashes Error in editing the GMND. See pic Step8b4. Verify that you have added an entry for any blocks you have added, that they are all enabled, and that the number matches the entry you added.

2) Only default texture or No texture Verify that you have added the ##0x1C050000! before the filename in the SHPE and GMND if slaving to a custom object.
Attached files:
File Type: zip  Slave Object Tutorial - Repository Textures From Maxis Objects.zip (898.9 KB, 762 downloads) - View custom content
Forum Resident
#2 Old 22nd Apr 2007 at 10:17 PM
oh! you did this just for me didn't you!? I love you :lovestruc
MTS2 Hot Pepper
#3 Old 25th Apr 2007 at 6:22 PM
I will try this one to make downloaded MM set slavable (or fix it in other words)

Currently playing Sims 4 full collection. (and fixing my mods folder)
MTS2 Hot Pepper
#4 Old 28th Apr 2007 at 4:43 PM
All my efforts failed i could not find why.

In the cExtension tab, type “tsMaterialMeshName” (without the quotes) into the Name field and click Commit

please correct the quoted sentence - tsMaterialsMeshName
This unfortunate misprint made me mad. Thanks to CTNutmegger she founded a mistake,

Currently playing Sims 4 full collection. (and fixing my mods folder)
Part-time Hermit
Original Poster
#5 Old 28th Apr 2007 at 6:42 PM
Sorry about the typo, I have fixed it. It was wrong in the text and correct on the image. No need to get mad about it, though .
Forum Resident
#6 Old 11th May 2007 at 9:17 PM
I have a question about step 8 - the parts between step 8b and step 8c
in the geometric node... I'm trying to make my (still with glitchy animations ) backwards garage door...
In the geometric node I have 13 items... (13 in shape, 13 in gmdc too of course), but with so many to do, I want to make sure I don't get lost in the process you know...

actual question:
should I go thru each of my 13 items meaning
ok should I take item 1 and go thru all the steps between 8b and 8c then take item 2 and go thru all those steps
or can I take item 1 and do the tsMaterialsMeshName step, take item 2 and do the tsMaterialsMeshName step, take item 3 and repeat just that step the 13 times...

then go back and do the next part -the datalist extension adding part - for item 1 then item 2 and so forth

does it matter either way?
hope that made sense...

Subtle In Spades
Part-time Hermit
Original Poster
#7 Old 11th May 2007 at 9:22 PM
It doesn't really matter in which order you do it, as long as you do everything . With that many files to edit, it may get a bit overwhelming. Just use the order that seems most comfortable .
Forum Resident
#8 Old 11th May 2007 at 9:35 PM
Thanks so much for the super-fast answer

Subtle In Spades
Test Subject
#9 Old 15th May 2007 at 5:53 PM
Thank you so very much. You are wonderful.
Test Subject
#10 Old 18th May 2007 at 10:42 AM
Thanks for the tutorial. I done the steps without a problem when i just removed something from a maxis mesh and was able to slave it to the master without any trouble since it was the same mesh. My trouble started when i tried to link a rug to the bedding, hoping it will allow any bedding to be the same as the rug, i put the rug into game, went to recolor it with the recolor tool thingy and it said that this object isn't recolorable or something along those lines. I do have an up to date version of CEP and the rug, the bathroom rug from Nightlife is already recolorable. I have run through all the steps again and i did do everything right so i'm unsure as to why it won't pick up any other bedding textures apart from the main blue bedding set
Part-time Hermit
Original Poster
#11 Old 20th May 2007 at 4:51 PM
It's hard to say for sure what's wrong without looking at the object. Can you please upload your package here as an attachment?
Test Subject
#12 Old 23rd May 2007 at 8:11 AM
Thanks anyway IgnorantBliss, but somehow after 3 attempts at it again i finally done it
Top Secret Researcher
#13 Old 6th Jun 2007 at 5:04 AM
Thank you for this great tutorial IngorantBliss :-)
I have a question: i have a mesh ( which unfortunately isn't recolorable but i don't feel like redoing it now), so is it a way to make the recolors work? It doesn't have subsets. Basically it's a tad larger version of this tree here and i didn't upload it because the recolors didn't work.I was wondering if this can become a slave of the smaller one and its recolors which i uploaded here? >>http://www.modthesims2.com/member/s...ad.php?t=234731

You will find my older and newest creations here
Part-time Hermit
Original Poster
#14 Old 6th Jun 2007 at 7:47 AM
It should be possible to make it a slave to the other tree, I don't see why not . Just make sure the subset names match and such.
Top Secret Researcher
#15 Old 6th Jun 2007 at 1:34 PM
So the fact that the one tree is not recolorable at the moment doesn't matter? I will try then.


You will find my older and newest creations here
Top Secret Researcher
#16 Old 7th Jun 2007 at 12:47 AM
Hi IB :-)

I tried 2 times following the tutorial but there where missing parts , didn't know what to do and proceeded on my own and it didn't work (i didn't expect it to work anyway as it had no subsets and it wasn't recolorable at the first place as i said ).

But before i try one hundred times again to make it work can you please tell me if it's possible to do it with this particular mesh by taking a look at it?

Thanks in advance :-)
Attached files:
File Type: rar  corvidophile2_MiniPine_MESH-master.rar (169.0 KB, 41 downloads) - View custom content
File Type: rar  corvidophile2_MiniPineTree_MESH-slave.rar (162.7 KB, 37 downloads) - View custom content

You will find my older and newest creations here
Part-time Hermit
Original Poster
#17 Old 7th Jun 2007 at 7:21 AM
I'm not sure what you mean by "it has no subsets". Both trees have one subset that is called treepine_tree. The difference is that the other one is missing the tsDesignModeEnabled block from the Geometric Node. It can be added in the same manner as how adding tsMaterialsMeshName is explained in the tutorial. After adding the missing block, you can add subsets to the list by adding an Array (instead of a String that's added in the tutorial). And array only needs a subset name, nothing else. Also, with the tsMaterialsMeshName that you do have in one of the objects, the String is missing the subset name in the beginning. It lists the CRES name for the other object correctly but the package doesn't know which subset it belongs to . I recommend you go through the tutorial again and make sure you add that part correctly .
Top Secret Researcher
#18 Old 7th Jun 2007 at 11:24 AM
Thanks so much , i saw the tsdesigneModeEnabled missing and i just didnt know how to add it.

I will do it again and let you know! thanks xoxo

You will find my older and newest creations here
Top Secret Researcher
#19 Old 9th Jun 2007 at 2:12 AM
IB in my slave package in GeometricNode in the edit blocks i can't find a tsdesignemodeEnabled block to add . :-(

You will find my older and newest creations here
Test Subject
#20 Old 9th Jun 2007 at 3:07 AM
here you go
Attached files:
File Type: rar  corvidophile2_MiniPineTree_MESHenabled.rar (162.7 KB, 42 downloads) - View custom content
#21 Old 9th Jun 2007 at 3:10 AM
This is something you can add to the GMND in SimPE, it just isn't obvious how.
Frist, look at the GMND that has a tsDesignModeEnabled block. If you have never seen it, the main tab of the plugin is a drop down box... as you select different edit blocks, the editable fields change to match the type.
So, you use the one with a tsDesignModeEnabled as a refernece. But you go to the GMND that is missing the block, in the plugin pick the edit blocks tab, in the dropdown find "CDataListExtension" and click Add, and a new unnamed block will appear at the end of the list (if the last was 0x03 before this will be 0x04).
Now, go back to the first tab and then drop down the list above it and pick your new block 0x04 (or whatever). The plugin will be on a tab called CExtension, on the left side out tsDesignModeEnable in the block marked name on the left side (you can see this on your reference GMND).
Now, on the right side is a drop dowm that says array. This just happens to be what we want to add to out new tsDesignModeEnabled block. Click on add, and an unnamed array will be added. Then for the forst elements, put in the name of your recolor.

This is difficult to explain without adding pictures like a tutorial, but you can make this from scratch.

<* Wes *>

I see stormwench beat me to the punch.
Top Secret Researcher
#22 Old 9th Jun 2007 at 3:18 AM Last edited by corvidophile2 : 9th Jun 2007 at 5:43 AM.
Thank you so much Stormy and wes_h! I'm grateful!

Stormy beat you because you are not in the create chat hehe :-P

update:It still won't work.I noticed when i was editing them that both meshes have the same subset name which is treepine_tree so there was nothing to replace there. I guess that is causing it not to work.

I will clone a different tree and remake it. :-P

pdate2:ok i quit.It appears the new clone doesn't have a TsdesigneModeEnabled block too.But now i know why because both the pine tree and mesculito tree i cloned are objects that are not designable in game in first place. All these tries for nothing. Haha i now learnt the repository technique by heart if only i could get it to work also.


You will find my older and newest creations here
Part-time Hermit
Original Poster
#23 Old 9th Jun 2007 at 8:31 AM
I wasn't specific enough about my explanation. When you add a new block to the Geometric Node, you also need to edit the Datalist Extension Reference to match the number of blocks. When adding the tsDesignModeEnabled block this part works exactly the same way as adding the tsMaterialsMeshName block (as shown in the tutorial).

The subset names of the objects have to be the same, otherwise the master/slave thing won't work properly. So, having the same subset name should not be a problem, but rather a requirement .
Top Secret Researcher
#24 Old 29th Jul 2007 at 12:08 PM
Is there anyway to link a slave to a dirty stage as well ( like in pet beds) and how can it be done ? because i fail to see the dirty parameter in the master.


You will find my older and newest creations here
The ModFather
retired moderator
#25 Old 29th Jul 2007 at 3:56 PM Last edited by Numenor : 29th Jul 2007 at 4:10 PM.
Sure, it can be done, and it's easy, too

Your slave object must be a multi-state (clean/dirty) object, just like the chosen repository one.

Create the slave object as usual, fixing the GMND and the SHPE as explained in the tutorial; then you have to edit the Text List 0x88 (Materials): replace the references to the clean and dirty textures with the corresponding references found in the Master object's text list. If the Master is a Maxis object, be sure to avoid any ##0x1c050000! prefix.

This procedure apply to any multi-state object (including lit/unlit); only, be sure that the master is of the same type of the slave (this shouldn't be a problem, since usually the MAster is the same object you have cloned your slave from).

(NOTE: when dealing with multi-state objects enslaved to a Maxis master, the Fix Integrity might add the prefix in the Text List: double check the TL frequently...)

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)

I *DON'T* accept requests, sorry.
Page 1 of 4
Back to top