PDA

View Full Version : Tutorial: *Reducing* the no. of tiles of an object


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.

corvidophile2
30th Jul 2007, 10:51 AM
Thanks Numenor, this will come in VERY handy! I did that common mistake when you first gave me your instructions lol

Phaenoh
17th Aug 2007, 01:20 AM
This is very useful, thank you. Is the process of adding another square about the same except reverse?

Nevermind, I found a tutorial by Echo that already explains it! Yippy-skippy!

olomaya
18th Aug 2007, 06:14 AM
Thank you so much for this. I've just started a project converting Maxis dressers and armoires to one-tile objects. They have all worked fine, however, the object is 1x1, rather than 1x2 (the object itself and the empty tile needed in front of it). While this isn't a problem with functionality and animation wise, I just wonder what it is I am doing wrong.

Numenor
18th Aug 2007, 04:21 PM
Olomaya, your problem is slightly different from the one explained in the tutorial.

The tut explains how to reduce a 2x1 object to a 1x1 object; but you need to convert a 2x2 armoire (counting the green tiles in front of it) to a 1x2 tile (1 for the mesh, 1 for the green empty tile).

Therefore, you must end up in your package with *three* Object Data (the master, the 0,0 and the... 0,1? I never remember if it's the 0,1 or the 1,0 :P )

olomaya
18th Aug 2007, 04:39 PM
Ah, I thought that might be the problem after checking out the OBJD of Maxis one-tile dresser. It's the 0,1 file. Thanks again for this great tutorial!

nengi65
28th Aug 2007, 07:53 AM
Thank you Numenor, you are truly a lifesaver with all the fantastic info you are sharing with us noobs :)

Natalya_Sh
1st Oct 2007, 01:06 AM
How to reduce a 2-tile object to 1 tile only, not deleting files OBJD, but replacing them.
Example: Desk+Bookcase in Secretaire.package.

P.S. Excuse me, I do not speak English. Therefore I can not write how I have made it.

Reyn
15th Jul 2008, 07:53 PM
Thank you so much, this is a real life saver - I love waterfalls, and the monkey one was so huge, and now it has a nice, tidy footprint and is just a waterfall!

Okay, upon testing, I found one tiny little problem - for some reason, the animation to add soap is way over where the waterfall was originally, befoe I told it to move it. Seeing as how I wanted this specifically for pools and ponds, its not a big deal for me, but I'd like to know if I possibly screwed up something, just to do the job right.

Gwenke33
15th Aug 2009, 04:48 PM
Thank you so much for this. I can't mesh but now I can fix CC that should be one-tile.

LadyAngel
15th Dec 2012, 12:03 PM
Thank you for this, you have just saved my sanity :)

phantomgremlock
30th Jan 2013, 02:42 AM
Hello Numenor, how are you lately? I followed this tutorial to change a 3 tile new base-game object to a 1 tile object. As instructed, I deleted 2 OBJD files, 2 OBJF files, and 2 NREF files. At this point I loaded the game to see if the two other tiles vanished, they didn't. I get the understanding that they should have disappeared at this point without touching the CRES yet..Could you please tell me why nothing happened?

I have the latest version of SimPE and tools

Thankyou once again, your tutorials have done wonders

HugeLunatic
30th Jan 2013, 02:55 AM
If your object is was originaly 3 tiles and you removed two OBJDs, etc, then I think you may have removed too many. You remove all but two.

mustluvcatz
30th Jan 2013, 03:29 AM
A 3 tile object should have 4 of each (OBJD, OBJF, NREF) . A 1 tile object should only have 1 of each. So shouldn't 3 of each be removed?

phantomgremlock
30th Jan 2013, 03:39 AM
I figured out the problem. :faceslap: When I went into buy mode, placed the new decoration in a house, originally it had 3 green tiles. After using this tutorial to make it a 1 green tile object, I went back into the game -> house where I left the object, moved the object over a few spaces...it still showed 3 tiles. After going back into buy mode deleting the object and buying it again, it appeared with just 1 tile when i placed it back into the house. It had to be deleted and bought again in order for it to show up with the new update. Thank you for your quick replies Everyone ^_^.

Added: It was a 3 tile table converted to a 1 tile object