Numenor
6th Aug 2005, 03:36 PM
>>> MODDING INFOCENTER <<<
HOW TO LINK STRAIGHT AND DIAGONAL OBJECTS
DISCLAIMER: The "Modding InfoCenter" threads are NOT tutorials: they are intended to help average-experienced object creators performing specific tasks, or to give users a deeper in-sight on specific modding-related subjects. So, don't expect to find step-by-step explanations, to be performed "blindly". Please DO NOT REPOST the following info, or part of them, on other sites.
All the "Modding InfoCenter" threads are created and mantained by Numenor and JWoods. Everyone is welcome to post his own questions or additional information about the specific thread subject.
-------------------------------------------------------------------------------------
SUMMARY
This article explains how to "link" straight and diagonal objects. It applies mainly to windows, doors, arches and curtains, i.e. the object types that Maxis has set to have a diagonal version. There's no apparent reason why this "linkage" shouldn't work for other object types, although this possibility is untested, yet.
:deal: This InfoCenter article is also provided in PDF format. To view it, we strongly suggest to download the Foxisoft PFD Viewer (http://www.foxitsoftware.com/pdf/rd_intro.php): it's free and small, less than 1Mb!
-------------------------------------------------------------------------------------
STEP 1 - CLONING BOTH THE STRAIGHT AND THE DIAGONAL OBJECTS
Start SimPE's Object Workshop and "Start" it by clicking on the proper button. When the category list appears, browse it until you find the object (window, door, arch or curtain) you want to clone. In the list, you should find two almost identical entries, usually having the same name. The "straight" version is the one that has a thumbnail. If you can't find, immediately above or below the straight object, another identical entry without the thumbnail, than be warned: maybe the object you have chosen was not designed by Maxis to have a diagonal version.
http://thumbs.modthesims2.com/getimage.php?file=107280&stc=1]
Select the straight object and clone it. Leave all the cloning options as they are by default.
:cool: HINT: in the Scenegraph rename Wizard, replace the suggested ModelName to a shorter, but unique, custom one; we suggest the form "YourName-UniqueObjectName". You can include dashes ("-") but NOT underscores ("_").
:here: FAQ: Always leave the "Pull Wallmasks" option activated: even if the object you are cloning has no wallmasks (e.g. curtains), keeping the option checked won't hurt.
Click "OK" in the Scenegraph window and save your package with a custom name; append the extension "_Straight" to the package name.
When done, "Start Over" Object Workshop, select the diagonal object and clone it. Again, don't change the default cloning options.
:new: In particular, be sure that the option "Create as stand-alone object" is NOT checked.
:cool: HINT: in the Scenegraph rename Wizard, replace the suggested ModelName with the same name you have used for the straigh object, but append to it "-Diagonal".
Click "OK" in the Scenegraph window and save your package with the same name as the straight one, but this time append the extension "_Diagonal" to the package name.
:here: FAQ: it's not possible to include both straight and diagonal versions into a single package.
:new: :here: FAQ: the diagonal windows are listed in Object Workshop in "Other -> Windows", along with the straight windows; on the contrary, the diagonal curtains are listed in Object Workshop under "Unknown"
STEP 2 - EDIT THE MESHES AND THE TEXTURES.
This step will not be explained in detail: the users are supposed to know how to do that (if not, please try and master the cloning and editing tecniques by following a good tutorial, like this one (http://www.modthesims.info/showthread.php?t=104795)).
Remember to register a unique GUID for each Object Data contained in both the straight and the diagonal packages.
:cool: HINT: Diagonal windows, doors and arches usually use the same mesh as the straight version, so you don't have to edit the diagonal mesh: you can simply import the straight one in the diagonal, too. On the contrary, diagonal curtains and drapes usually have a different mesh than the straight one (it is turned by 45° and moved off-center, compared to the straight one).
STEP 3 - LINKING THE OBJD (Object Data).
If we want our object to automatically turn by 45° when placed on a diagonal wall, we have to "link" the straight OBJD to the diagonal OBJD. To do so, we have to put the GUID of the "master" straight OBJD in the "master" diagonal OBJD.
If the objects you have cloned have only one OBJD, that is the "Master" one. But very often there are multiple OBJDs in the same package, you have to understand which one is the "Master".
Usually the Master OBJD is the one that has the shortest name (i.e. it has no "0,0", "0,1"... appended). Note that sometimes (very seldom) Maxis made us the gift to append the word "Master" or "Main" to the master OBJD name: in this case it's easy :)
:new: The only safe system to be 100% sure to locate the correct "master" OBJD is looking into the "Raw Data" tab of the OBJD, in the fields 0x000B ("Multi-tile sub index": it's under the "Placement" section): if you find the value "0xffff", that is the "Master" OBJD.
:here: FAQ: Sometimes (luckily, very seldom), all the OBJD in the package have the same name: in this case there's no other solution but looking at the field 0x000B, as explained above.
Once you have located the Master OBJD for both the straight and the diagonal, look at the following picture:
http://thumbs.modthesims2.com/getimage.php?file=418903
You have to copy exactly the values as shown in the picture: the main GUID of the straight object sould be copied into the "Grid-Aligned Selector GUID" fields of the diagonal; and the main GUID of the diagonal should be copied into the "Diagonal Selector GUID" fields of the straight.
:cool: HINT: Opening the two packages in two different instances of SimPE running at the same time will simplify the job.
STEP 4 - LINKING THE SHAPES
You may have noticed that in the diagonal clone there are no textures (though sometimes a "shadow" texture is included) and no Material Overrides. This is normal: in fact, the clone will "borrow" the textures from the straight version; we only need to "tell" the diagonal where to find the needed textures.
We do this by copying all the MATD references contained in all the straight Shapes in the corresponding diagonal shapes.
Windows, doors and arches have multiple shapes (the diagonals have the same number of Shapes, with similar names). Curtains are simpler, because usually have only one shape.
Select the first Shape, go to the "Parts" tab and select the first line; copy the Material Definition reference and paste it in the same line of the same shape of the diagonal.
http://thumbs.modthesims2.com/getimage.php?file=107282&stc=1] http://thumbs.modthesims2.com/getimage.php?file=107283&stc=1]
When you copy and paste the Material Definition references, include the ##0x1C050000! part.
Repeat the Copy & Paste for each line of the Shape, and for each Shape.
:cool: HINT: Opening the two packages in two different instances of SimPE running at the same time will simplify the job.
STEP 5 - LINKING THE TEXTURES
The last thing to do is to modify the diagonal GMND, in order to instruct it to look for the texture in an external packages.
Open the straight package and select the Resource Node; go to the "cObjectGraphNode" tab. Copy the the CRES name, including the ##0x1C050000! prefix.
http://thumbs.modthesims2.com/getimage.php?file=107284&stc=1]
Now open the diagonal package and select the GMND; from the Blocklist, choose the "tsMaterialsMeshName" block.
Select in turn each line of the Items list and paste the CRES reference into the "String" field. Commit each time.
http://thumbs.modthesims2.com/getimage.php?file=107285&stc=1]
-------------------------------------------------------------------------------------
OTHER USEFUL RESOURCES
Modding Infocenter Index (http://www.modthesims2.com/forumdisplay.php?f=333) - Comprehensive list of all the InfoCenter threads
Object Creation Workshop and Repair Center (http://www.modthesims2.com/showthread.php?t=82084) - If your object doesn't work, no matter what you try
Colour Options for "EP-ready" packages (http://www.modthesims2.com/showthread.php?t=42014) - About the texture linking tecniques
Sims 2 start to finish Object Creation Tutorial (http://www.modthesims2.com/showthread.php?t=59293) - Learn how to create your own object
-------------------------------------------------------------------------------------
HOW TO LINK STRAIGHT AND DIAGONAL OBJECTS
DISCLAIMER: The "Modding InfoCenter" threads are NOT tutorials: they are intended to help average-experienced object creators performing specific tasks, or to give users a deeper in-sight on specific modding-related subjects. So, don't expect to find step-by-step explanations, to be performed "blindly". Please DO NOT REPOST the following info, or part of them, on other sites.
All the "Modding InfoCenter" threads are created and mantained by Numenor and JWoods. Everyone is welcome to post his own questions or additional information about the specific thread subject.
-------------------------------------------------------------------------------------
SUMMARY
This article explains how to "link" straight and diagonal objects. It applies mainly to windows, doors, arches and curtains, i.e. the object types that Maxis has set to have a diagonal version. There's no apparent reason why this "linkage" shouldn't work for other object types, although this possibility is untested, yet.
:deal: This InfoCenter article is also provided in PDF format. To view it, we strongly suggest to download the Foxisoft PFD Viewer (http://www.foxitsoftware.com/pdf/rd_intro.php): it's free and small, less than 1Mb!
-------------------------------------------------------------------------------------
STEP 1 - CLONING BOTH THE STRAIGHT AND THE DIAGONAL OBJECTS
Start SimPE's Object Workshop and "Start" it by clicking on the proper button. When the category list appears, browse it until you find the object (window, door, arch or curtain) you want to clone. In the list, you should find two almost identical entries, usually having the same name. The "straight" version is the one that has a thumbnail. If you can't find, immediately above or below the straight object, another identical entry without the thumbnail, than be warned: maybe the object you have chosen was not designed by Maxis to have a diagonal version.
http://thumbs.modthesims2.com/getimage.php?file=107280&stc=1]
Select the straight object and clone it. Leave all the cloning options as they are by default.
:cool: HINT: in the Scenegraph rename Wizard, replace the suggested ModelName to a shorter, but unique, custom one; we suggest the form "YourName-UniqueObjectName". You can include dashes ("-") but NOT underscores ("_").
:here: FAQ: Always leave the "Pull Wallmasks" option activated: even if the object you are cloning has no wallmasks (e.g. curtains), keeping the option checked won't hurt.
Click "OK" in the Scenegraph window and save your package with a custom name; append the extension "_Straight" to the package name.
When done, "Start Over" Object Workshop, select the diagonal object and clone it. Again, don't change the default cloning options.
:new: In particular, be sure that the option "Create as stand-alone object" is NOT checked.
:cool: HINT: in the Scenegraph rename Wizard, replace the suggested ModelName with the same name you have used for the straigh object, but append to it "-Diagonal".
Click "OK" in the Scenegraph window and save your package with the same name as the straight one, but this time append the extension "_Diagonal" to the package name.
:here: FAQ: it's not possible to include both straight and diagonal versions into a single package.
:new: :here: FAQ: the diagonal windows are listed in Object Workshop in "Other -> Windows", along with the straight windows; on the contrary, the diagonal curtains are listed in Object Workshop under "Unknown"
STEP 2 - EDIT THE MESHES AND THE TEXTURES.
This step will not be explained in detail: the users are supposed to know how to do that (if not, please try and master the cloning and editing tecniques by following a good tutorial, like this one (http://www.modthesims.info/showthread.php?t=104795)).
Remember to register a unique GUID for each Object Data contained in both the straight and the diagonal packages.
:cool: HINT: Diagonal windows, doors and arches usually use the same mesh as the straight version, so you don't have to edit the diagonal mesh: you can simply import the straight one in the diagonal, too. On the contrary, diagonal curtains and drapes usually have a different mesh than the straight one (it is turned by 45° and moved off-center, compared to the straight one).
STEP 3 - LINKING THE OBJD (Object Data).
If we want our object to automatically turn by 45° when placed on a diagonal wall, we have to "link" the straight OBJD to the diagonal OBJD. To do so, we have to put the GUID of the "master" straight OBJD in the "master" diagonal OBJD.
If the objects you have cloned have only one OBJD, that is the "Master" one. But very often there are multiple OBJDs in the same package, you have to understand which one is the "Master".
Usually the Master OBJD is the one that has the shortest name (i.e. it has no "0,0", "0,1"... appended). Note that sometimes (very seldom) Maxis made us the gift to append the word "Master" or "Main" to the master OBJD name: in this case it's easy :)
:new: The only safe system to be 100% sure to locate the correct "master" OBJD is looking into the "Raw Data" tab of the OBJD, in the fields 0x000B ("Multi-tile sub index": it's under the "Placement" section): if you find the value "0xffff", that is the "Master" OBJD.
:here: FAQ: Sometimes (luckily, very seldom), all the OBJD in the package have the same name: in this case there's no other solution but looking at the field 0x000B, as explained above.
Once you have located the Master OBJD for both the straight and the diagonal, look at the following picture:
http://thumbs.modthesims2.com/getimage.php?file=418903
You have to copy exactly the values as shown in the picture: the main GUID of the straight object sould be copied into the "Grid-Aligned Selector GUID" fields of the diagonal; and the main GUID of the diagonal should be copied into the "Diagonal Selector GUID" fields of the straight.
:cool: HINT: Opening the two packages in two different instances of SimPE running at the same time will simplify the job.
STEP 4 - LINKING THE SHAPES
You may have noticed that in the diagonal clone there are no textures (though sometimes a "shadow" texture is included) and no Material Overrides. This is normal: in fact, the clone will "borrow" the textures from the straight version; we only need to "tell" the diagonal where to find the needed textures.
We do this by copying all the MATD references contained in all the straight Shapes in the corresponding diagonal shapes.
Windows, doors and arches have multiple shapes (the diagonals have the same number of Shapes, with similar names). Curtains are simpler, because usually have only one shape.
Select the first Shape, go to the "Parts" tab and select the first line; copy the Material Definition reference and paste it in the same line of the same shape of the diagonal.
http://thumbs.modthesims2.com/getimage.php?file=107282&stc=1] http://thumbs.modthesims2.com/getimage.php?file=107283&stc=1]
When you copy and paste the Material Definition references, include the ##0x1C050000! part.
Repeat the Copy & Paste for each line of the Shape, and for each Shape.
:cool: HINT: Opening the two packages in two different instances of SimPE running at the same time will simplify the job.
STEP 5 - LINKING THE TEXTURES
The last thing to do is to modify the diagonal GMND, in order to instruct it to look for the texture in an external packages.
Open the straight package and select the Resource Node; go to the "cObjectGraphNode" tab. Copy the the CRES name, including the ##0x1C050000! prefix.
http://thumbs.modthesims2.com/getimage.php?file=107284&stc=1]
Now open the diagonal package and select the GMND; from the Blocklist, choose the "tsMaterialsMeshName" block.
Select in turn each line of the Items list and paste the CRES reference into the "String" field. Commit each time.
http://thumbs.modthesims2.com/getimage.php?file=107285&stc=1]
-------------------------------------------------------------------------------------
OTHER USEFUL RESOURCES
Modding Infocenter Index (http://www.modthesims2.com/forumdisplay.php?f=333) - Comprehensive list of all the InfoCenter threads
Object Creation Workshop and Repair Center (http://www.modthesims2.com/showthread.php?t=82084) - If your object doesn't work, no matter what you try
Colour Options for "EP-ready" packages (http://www.modthesims2.com/showthread.php?t=42014) - About the texture linking tecniques
Sims 2 start to finish Object Creation Tutorial (http://www.modthesims2.com/showthread.php?t=59293) - Learn how to create your own object
-------------------------------------------------------------------------------------