Nona's Sims

Modding and Troubleshooting The Sims 3

Edit Your Custom Foods Easily: s3sr OBJK Resource Scripts (Batch processing, NO s3pe needed)

Good News, Everyone! [/Farnsworth] I’ve got an easy way for you to edit your Custom Food. Actually, I can’t believe I didn’t think of this before. I had totally forgotten about #aWT’s amazing tool, s3sr. It makes editing a whole batch of objects really easy.

I know, I know. I just posted this totally awesome Tutorial about editing an object’s ScriptClass, but that’s fine. Also, I have posted my own personal OBJK Overrides in this thread: Already Edited OBJK Resources for Custom Food. Nevertheless, the information in this post remains perfectly useful.

Anyhow! To use this method:

You will need:

  • #aWT’s s3sr Tool (Plus requirements: .NET Framework 3.5 or higher and Windows XP/Vista/7)
  • Custom Food Objects from Around The Sims 3, One Billion Pixels, or Parisian Sims.
  • My s3sr script(s).
  • Optional: S3PE or any other Package Editor (such as NRaas Packer/Postal) Note: You will need a package editor only if you want to write your own script completely from scratch. If you use my s3sr scripts as a template, you will have all required information and do not need a package editor to get the OBJK instance ID.
You May also need:
  • Delphy’s Multi-Extractor (or Echo’s Tool) to convert a Sims3Pack to package form.
  • 7zip to unzip s3sr. 7zip is freeware.
  • NotePad or NotePad++ to edit my script to your liking (note: This is really, really, easy. You do not need to know any programming). I highly recommend NotePad++, and it’s free!

What this does:

This tool does not directly edit your package files. Instead, it will copy the OBJK resource and then edit the OBJK to use the specified ScriptClass. Once you’ve run one of my “scripts”, you can put the resulting package in your Overrides folder. If you ever remove my mod, or want to use EA’s script, all you have to do is delete the package in your Overrides folder.

How to Edit the OBJK Resources in Batches

1. Download and “Install” (unzip) the latest s3sr  (don’t download the source code) — You may need to use 7zip to do this (it’s free). Make sure you have all pre-requisites to run the program. If you are using Windows Vista or Windows 7, you will need to run the program with administrator privileges.

2. Download the scripts belows for the foods you want to edit.

3. Go to the directory where you have unzipped s3sr and double click s3sr.exe

4. A nice GUI will pop up. Select Custom.

5.  Under Directory Path, click the “…” button and navigate to the folder where you have your custom food. Don’t worry, this will not edit your objects directly!

6. Choose the Output Package path by clicking on the “…” button and choosing where to store the output package.

7. Close s3sr.

8. Find my script (*.s3sr file) and double click it.

9. Navigate to the Output Package path, and find the new package created by s3sr. This is a merged package file, which contains all edited OBJK resources. You can open the package in s3pe to double check that the resources have been properly edited, if you like.

10. Put the package created by s3sr in your Mods\Overrides folder. If you don’t have an Overrides folder, get the framework from ModTheSims. Repalce your current Resource.cfg with the one contained in the download, and then create a folder called “Overrides” and you’re done 🙂

About My S3sr “Scripts”

These “scripts” are really easy to make and edit. No programming knowledge is required, although you might want to be familiar with some sims 3 creation terms, such as Resource  (OBJD/OBJK/CAP), Instance, etc. To write the script, all you need is NotePad and your objects. To edit a script, all you need is NotePad (Note: I use NotePad++ because it’s awesome and free. I also highly recommend it).

NOTE: These scripts change all OBJK resources for custom food to use the same ScriptClass, namely: Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodHigh

To Edit the s3sr Scripts:

1. Open the .s3sr file in NotePad (or NotePad++).

2. I have labelled each object I’ve edited instead curly brackets above the line which actually tells s3sr what to change. For example:

{OBP_EdibleSushi1}
OBJK Instance:0x4278D5F667FC9300 ScriptClass:Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodHigh

To change the ScriptClass, simply edit the information after “ScriptClass.” Do not add any extra spaces, and do not change the “Instance:” information at all.

3. Save the package when you’re done making the changes.

4. Run the edited script  by double clicking on the s3sr file so that you can use your own changes to the script class. Put the resulting package file in your Overrides folder.

Finally, DOWNLOADS!

Scripts (s3sr):

Around The Sims 3 –  Edible Pastries Part One, Edible Pastries Part 2, Edible Foodcart Food, Edible Easter Chocolates, Edible Mexican Taco  *

One Billion Pixels – Edible Cupcakes, Edible Sushi, Edible Pastries, Edible Burgers

Parisian Sims – Edible Macarons, Edible Religieuse

*These scripts include the donate gift objects, however, if you do not have those objects, the script will just ignore them.

My Personal s3sr Scripts

As previously mentioned, the scripts linked above all use  Sims3.Gameplay.Objects.FoodObjects.NonaDriedFoodHigh as the Script Class for all objects. I did this because I have no idea how people would like their objects to function.

However, I am also sharing my personal script which is varied. For the most part cookies, macrons, cakes, and other dessert-type objects are given the NonaDriedFoodLow Script Class. Bread-y objects, such as bagels, croissants, and pretzels are assigned the NonaDriedFoodMid Script Class. Finally, more “filling” food types, such as sandwiches, burgers, tacos, etc use the NonaDriedFoodHigh Script Class. If you would like some variation in your custom foods, try this script out.

s3sr Scripts for Individual Custom Food Sets – Each Food collection has its own script.

All Custom Food OBJK Replacements s3sr script – Nona.zipOne script, which contains all custom food OBJK edits. You will end up with one package file containing all OBJK overrides (no need to merge the overrides yourself).

This link contains only the s3sr scripts.

May 11, 2012 - Posted by | Tutorial | , , , , , , , , , , ,

6 Comments »

  1. […] resources in batches, and to download the s3sr scripts I created to make these OBJK overrides: Edit Your Custom Foods Easily: s3sr OBJK Resource Scripts (Batch processing, NO s3pe needed). You can download the s3sr script directly here: s3sr […]

    Pingback by Already Edited OBJK Resources for Custom Food « Nona's Sims | May 11, 2012 | Reply

  2. […] #aWT’s s3sr Tool, to make it easier to edit objects in batches. In that case, I recommend using my s3sr scripts, which have already got all the Instance IDs you’ll need for the various custom […]

    Pingback by Script mod: Script for Custom Foods (removes Foul Food, Tunable) « Nona's Sims | May 11, 2012 | Reply

  3. Hey Nona! Thanks so much for the custom food mod and for these scripts! Just wanted to let you know the link to your personal scripts seems to be broken? When I click on it, it takes me to a “page not found” on your blog.

    Comment by Iggysaurus | May 13, 2012 | Reply

  4. P.S. Love the Futurama reference! I’m actually watching a rerun right now when I stumbled across this post! 🙂

    Comment by Iggysaurus | May 13, 2012 | Reply

  5. Hi, Iggy, Thanks so much for the comments. I don’t mind any “spam” at all 🙂 It’s nice to know that at least somebody reads my boring blog from time to time, haha 😉

    More importantly, thank you very much for letting me know about the broken link. I will fix it right away. I wanted to update this post a bit anyhow.

    PS I need a Futurama fix, myself!

    Edit: Just posting to say I’ve fixed the links! Thanks again for the report.

    Comment by Nona | May 13, 2012 | Reply

  6. […] Note: If yu’re reading this because of my Custom Food Script, you can get already edited OBJK overrides here, and you can find out how to do batch processing of OBJK resources here. […]

    Pingback by Tutorial: How to Change the Script Class of an Object « Nona's Sims | May 18, 2012 | Reply


Leave a comment