Numenor
29th Jul 2007, 08:12 PM
TUTORIAL - *REDUCING* THE NUMBER OF TILES OF AN OBJECT
Preliminary note: this tutorial explains how to reduce a 2-tile object to 1 tile only; but with the proper adjustments can be used to turn any larger multi-tile object to a smaller multi-tile object, or even 1 tile only.
PURPOSE OF THIS TUTORIAL
When you clone a multi-tile object and reduce its mesh using a 3D editor, you will find that the object is still considered by the game "multi-tile": while placing it on the lot, you will see multiple green squares, even if the mesh now is only 1 tile large. Even if you remove the useless green squares, the object will stay in its off-center position; and moving the entire mesh using the 3D editor is useless, because the sims will still interact with the object from the wrong off-center position.
This tutorial will explain how to functionally reduce the tile size of an object.
STEP 0 - STARTING POINT
In this tutorial we'll start with a 2x1 multi-tile object. Look at the picture.
http://img411.imageshack.us/img411/1851/0startingpointxh2.jpg
Notice that there are TWO green tiles when you place the object on the lot; also, notice how the sim positions himself at the center, when cleaning the pet bed.
STEP 1 - REDUCING THE MESH
This step is not fully explained here; you have to edit the mesh in your favourite 3D editor, scaling it down to fit one tile. When you reimport the reduced mesh into the package, you'll have this result:
http://img96.imageshack.us/img96/9681/1smallmesh2tilesrr6.jpg
The mesh is now 1 tile wide, and the sim can correctly interact with it; but still there are TWO green squares, and the object is seen as a 2-tile object by the game.
STEP 2 - GETTING RID OF THE UNWANTED GREEN SQUARES
Open the package in SimPE; in the Resource Tree, select "Object Data"; in the Resource List you will see several OBJD files. You have to delete them all, except two: the one that contains "0,0" in its name, and the one that contain no numbers at all in its name. Technically speaking, we are keeping only the Master OBJD and the Lead Tile. Take note of the Instance numbers of the OBJD you are deleting.
When done, select the "Object Function" entry in the Resource Tree and delete the OBJF files having the very same Instance numbers as the OBJD that you have deleted earlier. Then do the same with the "Name Reference (NREF)" files. When finished, you should have only TWO OBJD, TWO OBJF and TWO NREF. Double check that the Instance Numbers of the files match one another.
At this stage, the result is the following:
http://img517.imageshack.us/img517/9499/2removedtilesgm1.jpg
As you can see, now there is only ONE green square, and the sim can correctly interact with the object. But the mesh is off-center, compared to the green tile. The object will be therefore walked through by the sims, and will surely cause problems when placing it on the lot.
A COMMON MISTAKE - WHAT YOU MUST *NOT* DO!
In order to fix the alignment of the mesh,m you might be tempted to load again the mesh in your 3D editor and move it half tile to the right. DON'T DO THAT! If you do, this will be the result:
http://img266.imageshack.us/img266/8620/2anomovedmeshoffcenterat6.jpg
You see? The mesh now looks correctly in place, but the sims interaction will still be off-center! Tsk, tsk! :)
A GOOD SOLUTION - TRANSLATING THE CRES
As seen, the solution is NOT moving the mesh, but rather instruct the game to move it. To do that, you have to open the CRES and select the "Hierarchy" tab; then, select the SECOND line in the list.
http://img252.imageshack.us/img252/9208/cres1pm2.jpg
:here: IMPORTANT - In a simple CRES, selecting "the second line" is enough. But you should always examine the CRES structure, as represented in the Hierarchy tab. In the screenshot above, you can clearly see how the various blocks are connected: the first line is the main one (the "root"); then there is the second line that is "attached" to the first, and so on. The last two lines are both connected to the same node.
What you have to do, here, is to select (one by one) *all* the blocks that are directly connected to the "Root", and perform the following steps to all of them.
Once you select the second line, SimPE automatically selects the "Content" tab (if it doesn't, select the Content tab yourself).
You will see something like this:
http://img405.imageshack.us/img405/9520/cres2rx1.jpg
In the "Translation" section, you have to modify the value for the X; just subtract 0.5 to the existing value, and commit. This will force the game to move the mesh, the routes, the slots and anything else by half a tile to the left.
:here: ADVANCED INFO - In this example, the starting point is an object 2 tile wide and 1 tile thick. If you are dealing with different sizes, you have to modify the X and/or Y values accordingly.
Remember that reducing the X by 0.5 moves the object half tile to the right; reducing the Y by 0.5 will move the object half tile away from the camera.
Preliminary note: this tutorial explains how to reduce a 2-tile object to 1 tile only; but with the proper adjustments can be used to turn any larger multi-tile object to a smaller multi-tile object, or even 1 tile only.
PURPOSE OF THIS TUTORIAL
When you clone a multi-tile object and reduce its mesh using a 3D editor, you will find that the object is still considered by the game "multi-tile": while placing it on the lot, you will see multiple green squares, even if the mesh now is only 1 tile large. Even if you remove the useless green squares, the object will stay in its off-center position; and moving the entire mesh using the 3D editor is useless, because the sims will still interact with the object from the wrong off-center position.
This tutorial will explain how to functionally reduce the tile size of an object.
STEP 0 - STARTING POINT
In this tutorial we'll start with a 2x1 multi-tile object. Look at the picture.
http://img411.imageshack.us/img411/1851/0startingpointxh2.jpg
Notice that there are TWO green tiles when you place the object on the lot; also, notice how the sim positions himself at the center, when cleaning the pet bed.
STEP 1 - REDUCING THE MESH
This step is not fully explained here; you have to edit the mesh in your favourite 3D editor, scaling it down to fit one tile. When you reimport the reduced mesh into the package, you'll have this result:
http://img96.imageshack.us/img96/9681/1smallmesh2tilesrr6.jpg
The mesh is now 1 tile wide, and the sim can correctly interact with it; but still there are TWO green squares, and the object is seen as a 2-tile object by the game.
STEP 2 - GETTING RID OF THE UNWANTED GREEN SQUARES
Open the package in SimPE; in the Resource Tree, select "Object Data"; in the Resource List you will see several OBJD files. You have to delete them all, except two: the one that contains "0,0" in its name, and the one that contain no numbers at all in its name. Technically speaking, we are keeping only the Master OBJD and the Lead Tile. Take note of the Instance numbers of the OBJD you are deleting.
When done, select the "Object Function" entry in the Resource Tree and delete the OBJF files having the very same Instance numbers as the OBJD that you have deleted earlier. Then do the same with the "Name Reference (NREF)" files. When finished, you should have only TWO OBJD, TWO OBJF and TWO NREF. Double check that the Instance Numbers of the files match one another.
At this stage, the result is the following:
http://img517.imageshack.us/img517/9499/2removedtilesgm1.jpg
As you can see, now there is only ONE green square, and the sim can correctly interact with the object. But the mesh is off-center, compared to the green tile. The object will be therefore walked through by the sims, and will surely cause problems when placing it on the lot.
A COMMON MISTAKE - WHAT YOU MUST *NOT* DO!
In order to fix the alignment of the mesh,m you might be tempted to load again the mesh in your 3D editor and move it half tile to the right. DON'T DO THAT! If you do, this will be the result:
http://img266.imageshack.us/img266/8620/2anomovedmeshoffcenterat6.jpg
You see? The mesh now looks correctly in place, but the sims interaction will still be off-center! Tsk, tsk! :)
A GOOD SOLUTION - TRANSLATING THE CRES
As seen, the solution is NOT moving the mesh, but rather instruct the game to move it. To do that, you have to open the CRES and select the "Hierarchy" tab; then, select the SECOND line in the list.
http://img252.imageshack.us/img252/9208/cres1pm2.jpg
:here: IMPORTANT - In a simple CRES, selecting "the second line" is enough. But you should always examine the CRES structure, as represented in the Hierarchy tab. In the screenshot above, you can clearly see how the various blocks are connected: the first line is the main one (the "root"); then there is the second line that is "attached" to the first, and so on. The last two lines are both connected to the same node.
What you have to do, here, is to select (one by one) *all* the blocks that are directly connected to the "Root", and perform the following steps to all of them.
Once you select the second line, SimPE automatically selects the "Content" tab (if it doesn't, select the Content tab yourself).
You will see something like this:
http://img405.imageshack.us/img405/9520/cres2rx1.jpg
In the "Translation" section, you have to modify the value for the X; just subtract 0.5 to the existing value, and commit. This will force the game to move the mesh, the routes, the slots and anything else by half a tile to the left.
:here: ADVANCED INFO - In this example, the starting point is an object 2 tile wide and 1 tile thick. If you are dealing with different sizes, you have to modify the X and/or Y values accordingly.
Remember that reducing the X by 0.5 moves the object half tile to the right; reducing the Y by 0.5 will move the object half tile away from the camera.