S3PE, or some other Package Editor. I use S3PE, and this tutorial will show how to use S3PE. It should not be difficult in other package editors.

What is a Script Class?

In short, an object is defined by its script class. Some of the most popular examples of changing an object’s script class to make it work like something else are Jynx’s Rabbit Hole Rugs. Creating a rabbit hole rug is a bit more complicated than simply changing the script class of a rug to that of a rabbit hole, because the slots and footprint of the rug must be changed (Jynx has a tutorial at Custom Sims 3). However, the basic reason that Jynx’s rugs behave as a rabbit hole is because they use a rabbit hole class instead of a rug class. Basically, an object’s model is just that: a model. It does not determine how the object functions, or what interactions are associated with it.

Similar to Jynx’s Rabbit Hole Rugs, Custom Edible food is merely a custom mesh which uses the WA DriedFood script class. This is why snob sims dislike those custom foods, unless you use my Custom Food Script object mod. Of course, the problem with that is, if creator’s don’t use my script in their creations, users will have to edit the object themselves. This is an extremely easy process, but I thought I’d make a tutorial, with pictures, to make it even easier, for anybody who is nervous or unsure about editing objects.

You can use any of the three following script classes with my Custom Food Script. See the post to find the default hunger gain/buffs.

Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodLow

Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodMid

Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodHigh

Changing an Object’s Script Class

Finally fixed the pictures!

Before you begin: Make a back up of your package, just in case! Also, back up your save game, just in case. This is a really easy process, but you never know what might happen. Best to be safe by having some back ups.

Click on an image to see a larger version.

1. If your object is not already in package format, convert it now using one of the tools I’ve listed above (or any other tool if you have another you prefer).
2. Open the package in s3pe.
3. Click the “Tag” column to sort by Tag.
4. Find the OBJK resource.

We found the OBJK resource.

5. Right-click the OBJK resource and choose “Edit OBJK”

Time to edit the OBJK resource.

6. In the component column, find the cell labeled “Script.” In the same row, you will notice a field labeled “String:” which will likely look like this: Sims3.Gameplay.Objects.FoodObjects.DriedFoodHigh

This is what the OBJK Editor in S3PE look likes.

7. You can change that string (outlined in pink in the picture above) to use another script class. For example, you could change it to: Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodHigh

IMPORTANT: Do not put a space or any other character at the beginning of the string (in front of Sims3 ) or the object will crash your game when you try to buy it in Buy Mode. If this happens, just go back and remove the space/extra character.

8. Once you’ve finished editing the String field, click Save in the bottom left corner (see above).
9. S3PE will ask if you want to commit the changes. Click Yes.

Heck yes, I want to commit changes (SAVE!).

10. Finally, save the edited package: Hit Ctrl+S or go to File | Save. If you did not back up the original file, you may want to use File | Save As.

11. ONE MORE THING: Before you start your game with your edited objects, go to Documents\Electronic Arts\The Sims 3 and delete the scriptcache.package to make sure your objects will use the new script. Any previously purchased objects may need to be sold and re-purchased.

Congratulations! You’ve just edited an object to use a different script class. I recommend that you load your game up and try to buy all the objects you edited, to make sure that you didn’t manage to sneak in a space or extra character at the beginning of the script class name. All objects in the game must have a script class that starts with “Sims3.” or the game will crash when you try to buy the object. If you have a typo in the middle, or at the end, it’s not such a big deal. The game will not recognize the object and you won’t be able to use it. However, if you only discover that you accidentally put a space at the beginning of the script class after you’ve been playing for a few hours and haven’t saved, you might hate me! I don’t want you to hate me, so please go test out your objects 🙂

Easy, wasn’t it? Feel free to ask any questions or post comments. You may also send a PM at MTS.

is it possible with this Tutorial to build own Rabbitholes?
I want to use Sunsetvalley school and other Schoolrabbithole.
That means two Schools in one town.
Long time ago i used two Schools in one town,but it doesn’t was
possible to put child for example: from Rabbithole School
to Sunset valley school. I think its because Town
only can use one Schoolrabbithole,otherwise i think
i just duplicate the Rabbithole and use this tutorial.
What do you think?

I’m not sure if you are still keeping this blog, but I thought this would be the place to ask my question, just in case. 😉
First of all, I hope you are fine and your projects are going well.
Now, to my question. I’m sorry, I think it’s more than one.
In order to make a regular CC hamper behave like a Super hamper, first do I need to clone the original hamper?
If I do Not clone the original, if I make any changes, this means I would only have one modded cc hamper, right?
If I make a mess of the original this way, to fix it, can I just clear my caches, and place the un modified original back in the packages folder?
Finally, the most important thing. I read this tutorial and as far as I understood, the ONLY change needed to make a cc hamper behave like a Super hamper, is to add the word “Nona”, to the String data? Is this word, your name, the exact word that corresponds with the Super hamper Mod?

I’m truly sorry to bug you, but your mod, and the fact that you encourage its users to try and make our own super hampers following it, and my addiction to the sims, nag at me to try. 😀

Hi Redmallie, I could be wrong but I think the answer is above but I will try to help as I am just learning how to do this myself.
1. Clone the CC Hamper you want to use
2. When you clone it give it a name so you can tell your clone from the original
3. I have already downloaded the super hampers. Go to one of the hampers itself (not the other file Nona has supplied that you download with the hampers)
4. Open that hamper(Nonas) in S3PE
5. Go to the OBJK
6. Click in the bottom of S3PE and click Grid
7. Click on the componentdata > to the right click the 3 dots
8. A new pop up> click on CDTString > Copy the Script Class > Close out of the whole thing
9. Now open your cloned hamper in S3PE.
10. Follow the same steps to bring you to the Scrip Class
11. Paste the Script Class from the Nona Hamper
12. Commit the changes and click Save
13. Close S3PE.
14. Add the new package to your Mods folder where you have Nona’s hampers.
Now you should have a working hamper. You will need to clear your script cache before the game will recognize it.

I hope this helps. Like I said I am just starting out with this so it’s been trial and error with me. I come back to Nona’s guides just in case something doesn’t work right.

Madone, thank you very much for helping. 😉
Yes, Nona has the information in her tutorial, but being a total newbie at doing anything like this, I just want to be sure and extra sure that I get it, hehehe.

My main question is about the original hamper. By cloning the object and modifying this clone, I can keep the original as it was, right?

This means that I could put the original AND have the “magnetized” clone in my game together.
Or I could choose to have ONLY the “magnetized” hamper, right? I would prefer to have only one hamper instead of two for each one in order not to clutter the game so much.

You’re Welcome. If you clone one from the game I believe it does keep the original one in the game. I have only used this to update a custom content hamper because the ones in the game look huge to me lol. I think the original one I had in the game before the clone might have disappeared or I might have taken it out because I didn’t want the original one anymore.

With S30C you can create the clone by clicking cloning normal objects and it will import all the objects you have (including EPs) right into the tool. Then you can get your clone to change the script class and name it your super hamper name as a package and I believe that is how it will leave the original one in the game if you are looking to modify a game hamper.

About

Hi, I’m Nona and I love the Sims. Welcome to my blog.

I’m an avid Sims fan, player, and modder. I’ve been modding the Sims 3 for over two years, but I’ve been playing the Sims since The Sims 1 was first released in 2000. I’m not a professional coder, however, I’ve been programming since middle school, where I learned BASIC. In high school I learned C++, HTML, and Java. It was only natural for me to transfer my love of coding (and blogging) to my favorite simulation game.

I know all of us who love the Sims have also had our fair share of technical issues with the game. I love to help fellow simmers fix their game, so they can spend their free time playing and not troubleshooting. I also love to mod the Sims, so we can play with life the way we want. If you’re having a problem with your game, feel free to drop me a comment, and I’ll try my best to help you out.

If you want to find more of my mods, visit my forum at Simlogical, where most of my mods are hosted, and check out my profile at ModTheSims.

Patch Level Compatibility

All of my mods are updated and compatible with patch levels 1.63, 1.66, and 1.67.