Sims 3 Modding Tutorial

Introduction

  • 5The Actual Script

Download a Sims 3 mod. Make sure the mod you are downloading is for The Sims 3, and not The Sims 4. Also, make sure it is compatible with the latest version of the game. When you find a mod you want to download, click the download link on the page to download the package file as a zip file. Nov 8, 2020 - Explore catbrokensims's board 'Sims 3 Tutorials and Info' on Pinterest. See more ideas about sims 3, sims, sims 3 mods. The Sims 3 Guide - Mod Guide Modding The Sims 3. While EA's Store is a nice feature for The Sims 3, and there are some free items in there, the first two Sims games were made great by the user-generated content that numbered into tens of thousands of items – all free on the internet. Mod The Sims is one of the largest Sims 2, Sims 3 and Sims 4 custom content websites, providing quality free downloads, tutorials, help and modding discussions. 4,233 users active in 24 hours 226,604 files available 1003 tutorials online 417,216 threads 4,642,034 posts.

This tutorial will explain how to make a pure scripting mod, i.e. a mod that isn't tied to an object.
While getting started is a bit more complicated than for an object mod, the actual coding can be as simple or complicated as you want. For today we will make a handy little mod that pauses the game after loading a save game.


What You Need

  • Microsoft Visual C# Express 2008 - simply called VS later in this tutorial
    • Or Microsoft Visual C# 2010 Express
    • Or Microsoft Visual Studio Express 2012 for Windows Desktop
    • Or Microsoft Visual Studio Community
  • Sims3 Package Editor - simply called S3PE later in this tutorial
  • .NET assembly browser/decompiler - this tutorial refers to redgate .NET Reflector, simply called Reflector later on
  • A basic understanding of the C# syntax or at least any C-like language.
  • A game that is properly set up to support scripting mods. If you fail to accomplish that, you can't hope to successfully write scripting mods.

Getting Started

  • Extract the core libraries with S3PE if you haven't already. Here's how to do that:
    1. Open S3PE and click on File -> Open..
    2. Navigate to the installation folder of The Sims 3 and from there to the sub-folder where the executable is located.
      In this folder are three packages: gameplay.package, scripts.package, and simcore.package
    3. Open one of these packages.
    4. Click on an S3SA resource. Note that S3PE shows some information about that resource in the preview area.
    5. Right-click on the resource and choose 'Export DLL'.
    6. Choose a sensible folder for the library and save it under the exact name it gives you. Do not rename it.
    7. Repeat steps 4 to 6 for every S3SA resource in the package.
    8. Repeat steps 3 to 7 for every package listed under step 2. When done, you must have the following list of libraries extracted to the same folder, with the following names:
      • Sims3StoreObjects.dll(from gameplay.package)
      • Sims3GameplayObjects.dll(from gameplay.package)
      • Sims3GameplaySystems.dll(from gameplay.package)
      • UI.dll(from gameplay.package)
      • SimIFace.dll(from scripts.package)
      • ScriptCore.dll(from scripts.package)
      • Sims3Metadata.dll(from scripts.package)
      • System.Xml.dll(from simcore.package)
      • System.dll(from simcore.package)
      • mscorlib.dll(from simcore.package)
    9. Close S3PE.
  • Create a game-compatible Visual Studio project as explained here: Sims_3:Creating_a_game_compatible_Visual_Studio_project
  • Start Reflector and load the core libraries with it.

Additional Preparations In Visual Studio

Before we look at the actual code, we need to set up the VS project to support tunable values. I'll explain why we need to do that later in this tutorial.

  • Open the Solution Explorer for your project.
  • Expand the Properties folder.
  • Double-click on AssemblyInfo.cs to open it.

When VS first opens AssemblyInfo.cs, it will probably throw lots of errors at you. Just ignore that for now. Add using Sims3.SimIFace; and [assembly: Tunable] to it and save. It should now look like that:

(only partly shown)
To get VS to stop whining about some ostensible errors, close and re-load the project in VS.

The Actual Script

The First Steps

Now bring up the actual code file of your project again. The bare code skeleton VS created should still look like this:

  • Remove using System.Linq;
  • Add using Sims3.SimIFace;
  • Change the namespace and class name to something more sensible.


Choose wisely when it comes to your namespace and pick something that hopefully will be unique. You don't want your namespace to clash with an EAxian namespace or with another modder's namespace. Afterwards, the code should look like this:

I am using TwoBTech for my mods, but you must use something else! Don't use someone else's namespace just like that!


Cached

What Makes It Pure - Part One

Now add the static constructor and a static field with the Tunable attribute to your class. The 'nature' of that field isn't really important. You can use a float or int just as well as a bool. I always use a boolean variable called kInstantiator which is a hidden homage to twallan. The class will now look like this:


Why We Do This

Now might be a good moment to explain why we do this. C# or better the .NET framework has some concrete rules. We will 'exploit' one of these rules to get our script up and running in TS3. This rule goes as follows: The first time a static field, property or method of a class gets accessed, the static constructor of that class will be called. That is to make sure that everything is in decent shape before the class has to interact with the rest of the world.
TS3 on the other hand parses all XML resources, and assigns the tunable values it finds in there to the related variables in the related classes. So. TS3 assigns a value to our static variable, the static constructor of our class will be called, and badda bing we have a foot in the door to get our code running. We will make sure TS3 actually finds an XML resource for our tunable variable later when it comes to building the package.


What Makes It Pure - Part Two

The parsing XML and calling static constructor stuff will be happen really soon, long before the main menu will show for the first time. At that time, our mod can't do anything fancy, because almost none of the interesting stuff is running yet. In Reflector, you'll find a delegate handler called OnWorldLoadFinishedEventHandler in Sims3.SimIFace.World. I trust you know that a delegate is a reference type variable that, instead of referencing an object, references a function. This specific delegate handler, like its name implies, calls all its delegates once a world has been loaded. That will be after you started a new neighborhood, the loading of a savegame, the transition to a vacation world or the transition back from a vacation world. Good time for us to strike, isn't it?
To use OnWorldLoadFinishedEventHandler, add a callback method to your class and, in the static constructor, instantiate a new delegate pointing to that method and add it to OnWorldLoadFinishedEventHandler. It's all right if you're confused now. I know delegates confused the hell outta me. Sometimes they still do. Your class should now look like this:

We now have the basis for our pure scripting mod. All pure scripting mods work that way. In our OnWorldLoadFinished() method, we can begin to invoke our code.


Making It Do Something

We will keep it simple and make a mod that makes sure the game stays paused after loading a savegame. In Sims3.Gameplay.Gameflow (look that up in Reflector), you'll find find a method to affect the game speed: SetGameSpeed(Gameflow.GameSpeed, GameSpeedContext). That's the method our OnWorldFinished() method will call.
If you look at the code of SetGameSpeed(), you'll see that it does some fancy checks if the setGameSpeedContext parameter is anything but SetGameSpeedContext.GameStates. We don't want any fancy checks or anything. We just want it to set the game speed to pause. I suggest we use SetGameSpeedContext.GameStates as second parameter to avoid the checks. Now add the call of SetGameSpeed() to your OnWorldLoadFinished() method. It will look like this:


The Final Code

The code is now finished and should look like this:

Save your project (again) and click on Build -> Build Solution.
Leave VS open for now.


Writing The XML File

Open a text editor and paste the following:

Of course you have noticed the kInstantiator variable from the code. Save the file. You can close the text editor now as you won't need it again.


Building The Package

Open S3PE and click on File -> New to start a new package.

First add the script itself:

  • Click on Resource -> Add..
  • Choose S3SA for Type.
  • Enter 0 for the Group.
  • Go down to Name field and enter a name for your script resource. The exact name isn't important, but it should be something that is unique for you. Click the FNV64 button.
  • Once you're done, click on Ok. S3PE will now show the S3SA resource and a _KEY resource. You can just ignore the latter one.
  • Select the S3SA resource.
  • Choose Resource->Import DLL.
  • Navigate to the .dll file VS created. It will be in DocumentsVisual Studio xxxxProjects{YourProjectName}{YourProjectName}binRelease. Select the file; click on the Open button and then select 'Yes' to the prompt for commit.


It's time to save your package. Usually, it's a good idea to begin the filename with your username or something that will identify all your mods.

Now on to the tuning XML:

  • Click on Resource -> Add.. once more
  • Choose _XML 0x0333406C for Type.
  • Enter 0 for the Group.
  • Here the Instance value is important, so get the Name right. It must be the namespace plus class name of the class where the tunable variable is located. In the case of this tutorial that's TwoBTech.Pausinator.
  • With the _XML resource selected, choose Resource->Import->From file.. and this time import the XML text file you created. S3PE will show the content of the XML resource in its preview window. Make sure that the content begins with an angle bracket and not with some unintelligible characters. That is a common error.


Save the package.

Rinse And Repeat

Give the package a test run in the game. If you followed this tutorial, it will work. Basically. It doesn't pause the game after the transition to a vacation world. Let's see if we can do something about that. The easiest way should be to delay the call of SetGameSpeed() a little until we know that the game clock is actually running. We will do that by adding an alarm that fires one second after setting it.

  • Add a new static method without parameters to your class. Name it OnPauseAlarm.
  • Move the call of SetGameSpeed() to that method.
  • Add using Sims3.Gameplay.Utilities; to your code.
  • In OnWorldLoadFinished(), add an alarm by writing

AlarmManager.Global.AddAlarm(1f, TimeUnit.Seconds, new AlarmTimerCallback(OnPauseAlarm), 'Pause Alarm', AlarmType.NeverPersisted, null);


Of course you assume that you'll find the AlarmManager class in Sims3.Gameplay.Utilities, and you are right. Please note that AlarmTimerCallback is a delegate, too. Your code should now look like this:

Save the project and build the solution again. In S3PE import the updated .dll file. Save the package and again test it in the game.


Rinse And Repeat Once More

That's better. The game will now definitely be paused, but now there's a new glitch: If the game was actually automatically paused post load, then the mod will pause it again immediately after you un-pause it. That's not the end of the world, but let us see if we can do something about it nevertheless.


Hint: The quick&dirty but fully functional solution would be to set the game speed to normal in OnWorldLoadFinished() and then pause it again in OnPauseAlarm(). I want to show you something, though.


Let's have a look at Sims3.Gameplay.GameStates.OnArrivalAtVacationWorld(). In there you'll find this call:


Now might be a good idea to fire up your browser and learn what events are in programming. That is if you didn't already. In a nutshell, an event is some occurrence of interest, a listener or client is something that expresses the wish to be informed of that occurrence, and the handler is responsible for notifying the listeners, i.e. raising the events. The notifying happens by calling a method that is called callback. And yes, this is delegate stuff again. It's not necessary to fully understand the quoted call right now. It's just important to understand that OnArrivalAtVacationWorld() makes a class named EventTracker raise an event and not just any event but an event that is specified as EventTypeId.kSimEnteredVacationWorld. Look up the EventTypeId enum in Sims3.Gameplay.EventSystem.


Now what will we do about that event stuff?

  • Add using Sims3.Gameplay.EventSystem; to your code.
  • Add a static callback method to your code. The return type needs to be ListenerAction the parameter needs to be Event. Move the method call to set the game speed into that method, and make the callback return ListenerAction.Keep.
  • In OnWorldLoaded(), comment out the AlarmManager stuff. Then add an EventListener by writing

The code should now look like this:

Save the project and build the solution again. In S3PE import the updated .dll file. Save the package and again test it in the game.


The End

If you followed this tutorial, you should now have a mod that allows you to take a quick leak after sending your sims to a vacation or get some cookies after telling TS3 to load your save game. You know you deserve a cookie now.


You learned how to set up a VS project for a pure scripting mod, and got to know two things that are extremely handy when it comes to modding TS3: alarms and events.


It's perfectly all right if you don't fully understand all this delegate stuff and the syntax right away. You can just copy&paste the relevant parts to your new projects for the time being. Your understanding of C# and the TS3 code base will advance if you just keep going.


Where Does The Newborn Go From Here?

The mod we made in this tutorial is as simple as it gets. What you can do with a pure scripting mod is somewhat limited, but there are still lots and lots of things you CAN do. That is if you know how. How do you learn how? For the beginning, I suggest to look at other modders' code in Reflector to see what they did and how they did it. Follow their calls in Reflector and look what the EAxian code they're calling does. Start with simple mods. You can't expect to get accustomed to the whole TS3 code base in an instant.


That's why I lead you to first versions of the mod that didn't do exactly what they were supposed to do, beside showing you alarms and events. That is just how scripting modding goes. Sometimes things work right away, but that will be an absolute exception. I suggest keeping that in mind to avoid getting frustrated.


Questions?

Ask them here: Q&A Thread for Sims 3 Pure Scripting Modding Tutorial

Retrieved from 'http://simswiki.info/index.php?title=Tutorial:Sims_3_Pure_Scripting_Modding&oldid=69663'

If you desire to go back to The Sims 3 after many years, we have compiled a list of the best The Sims 3 mods for you.

Even though The Sims 3 is a classic game, it is still an old one that means some of its vanilla features can feel outdated. Here is where mods come into play. The Sims 3 has a huge modding community and if you want to visit this great simulation game after 9 years, here are the most essential The Sims 3 mods to choose from.

Also, Learn to Install Sims 3 mods

Best SIMS 3 Mods to Download

MasterController

MasterController gives you the control of a lot of game mechanics. The mod contains tools for managing every Sim in your town manually. You can form relationships, customize households and change your Sims’ job etc. It also has different, optional modules such as Cheats, ExpandedTattoo, Integration and Progression, all with unique features on their own.

Download MasterController

Tagger

This small handy The Sims 3 mod gives you the ability to tag certain Sims or groups, so you can find them a lot easier when they are not home. You can see their income, how much they are worth etc. too and all these makes managing Sims in your town significantly easier.

Download Tagger

StoryProgression

StoryProgression is undoubtedly one of the best Sims 3 mods out there. It replaces the EA story progression system and provides a lot more story options and gives you an overall better progression system. It also has tons of different add-ons that contain specific scenarios to play with or expand certain areas such as career.

Download StoryProgression

Overwatch

The Sims 3 was a buggy game. Sims in your world can get stuck in a lot of different ways and many game mechanics can become corrupt really fast after there are enough Sims in your town, and the game becomes unable to handle all of that after some time and this causes significant lag. Overwatch cleans all of that mess for you each night and every time you load a new save, rescuing you from a lot of headache.

Download Overwatch

Woohooer

Woohooer adds various new romantic interactions between Sims. It has a lot of different modules you can optionally install. It is not mandatory and does not have a big impact on the gameplay but can provide a new experience to those looking for new “woohoo” options.

Downlaod Woohooer

ESkin-nAtural+

Default Sim skins can get boring and start to seem bland after a while. This mod replaces the default character models with higher definition and better-looking ones. Your Sims will look like superstars after this. If you do not have a problem with the eastern-style models, install this The Sims 3 skin mod right away.

Download ESkin-nAtural+

Retuned Attraction System

This essential The Sims 3 mod makes some really needed changes to the game’s attraction system. It makes the relationship system more realistic by adding more variables as to how two Sims get attracted to each other, other than some random numbers or skills.

Download Retuned Attraction System

More Traits for All Ages

In the native game, each of your Sims is limited to just a couple of traits. While this balances things out and encourages you to play with multiple Sims, it gets boring quick and your Sims feel shallow. This mod is a great addition to The Sims 3, it lets you raise the maximum number of traits each Sims can get, which results in much more complicated and realistic Sims.

Download More Traits for All Ages

Grow

One of the fundamental mods to make The Sims 3 more realistic, Grow mod makes your Sims grow gradually and slowly rather than just exploding in size in certain checkpoints in their life. Their voices can change too and they can gain weight, rather than just height.

Download Grow

Apartment mod

With the Apartmen mod, you can set up more than 1 family in one lot without the need to manage them all at once. Or you can set up the lot to look like apartments by using EA’s uni locked door feature, then place a family on each separate level. This gives the game a sitcom-like feeling and can be a small, new experience.

Download Apartment mod

Food and Cooking Tweaks

This Sims 3 mod makes some small but necessary changes in te cooking mechanics. The base time it takes to cook is reduced in both single and group servings, there are less leftovers when your Sims do not finish their meal and their chance of cleaning up after themselves is set to %100 rather than %50. These changes makes the cooking & cleaning a lot more smoother.

Download Food and Cooking Tweaks

The Sims 3 Hair Mods

The Sims 3, without any mods, does not have that many great hair options. If you want to check out great hair models designed by other creators and make your Sims look much more unique and stylish, download The Sims 3 Hair Mods choose what you want and download the hair in your dreams.

Private Room Door

Do you want to keep your Sims family’s treasures and secrets away from outsiders? Well, look no further. This Sims 3 mod adds doors that are only unlockable by the Sims that has the correct key. If you want to hide family heirlooms from other Sims and thieves, this is the mod for you.

Download Private Room Door

Change At Home After Work

I’ve always disliked the fact that sims head home after work and stay in their work attire, even if they head out again after that. With this pure scripting mod, they will change into their everyday clothes upon reaching home while wearing their work attire.

Final fantasy 5 pc download Final Fantasy V is widely believed to be the best all-around game of the series, despite the now-dated graphics and sounds. The gameplay is similar to FFIV and FFVI (our II and III, respectively), but the core of it all is the )ob/Ability system (which is now used in Final Fantasy Tactics, ironically). By finding special pieces of the four. About This Game Twenty years after the original FINAL FANTASY V released in Japan, the classic RPG has found its way to PC! Embark on an epic adventure as four heroes are driven together by fate: Bartz and his chocobo companion, Princess Lenna of Castle Tycoon, the mysterious Galuf, and the pirate captain Faris.

Download Change At Home After Work

Bichi kannada books free download full. Once attributed to Girolamo Spinelli; now believed to be the work of Galilei. Drake, Stillman. Favorite favorite favorite favorite ( 1 reviews ) Topics: Homiliaries, Sermons, Latin.

The Normandy SR2

And as our last pick, the coolest The Sims 3 mod: The Normandy SR2. It adds the famous Normandy SR2 to the game as a house that you can move in. Everything is well implemented to the style of The Sims 3. If you are a Mass Effect fan like myself, you must install this mod.

Download The Normandy SR2

Snow but better! – Snow Replacement Mod

The Sims 3 is a game that has lasted over the years as one of the top PC games of the franchise. There are some downfalls however to a game that old, graphics being one of them. A lot of the textures that are included in the “Seasons” DLC are dated looking and simply not pleasant. This mod overwrites those older textures, with completely re-done snow textures and more detailed frosted windows and glass.

It also fixes the ugly grass patches and increases the details of roads. A lot of work was put into this mod to make your game look better, and who doesn’t want that! Install this mod today to make the wintertime a beautiful time.

Download Snow but better! – Snow Replacement Mod

Note: This mod requires the Seasons DLC.

The Third Person Mod

Normally, the Sims 3 is a top-down perspective type of game. It gives you the ability to manage the Sims how you like and lets you oversee whatever you need to. This mod allows you to take matters into your own hands and control and view your Sims by seeing the world through their perspective, giving you a whole other level of immersion into your gameplay.

With just one press of a button, you can smoothly and seamlessly transition between normal mode and third-person mode. It also lets you control your Sims using the keyboard and move them around the world however you like. Each Sim has its own animations and they all look and feel different from one another in this mod. The camera is also intelligent and will adapt and move around depending on what your Sims are doing and their situation at the time.

This is overall one of the best mods I have ever seen for the Sims 3, as it has continued support into 2019 and is truly built from the ground up, covering all the bases to provide the most immersive experience possible in the Sims 3.

Download The Third Person Mod

Deep Conversations

Conversations in The Sims 3 are typically very boring and not important at all, you have no control over what the Sims talk about, and no control over whether the outcome is positive or negative. A lot of the time players just skip through the scenes and barely pay attention to what is being said.

The Deep Conversations mod completely changes how the Sims interact and allows you to get more insight on what they talk about, and let you step in sometimes! This mod comes with a “Get to Know” feature, which lets you learn everything about the neighbor you are talking to, and they provide that info in first-person. Deeper Conversations also has interactive dialogs from time to time, to help choose what your Sim says given the different circumstances. These will give unique and unexpected results depending on what you choose.

Conversations will also be remembered and have an impact on future conversations, meaning every conversation is actually meaningful and contributes to the Sims mood during the conversation. Deeper Conversations thoroughly overhauls the conversation interactions, and I would recommend it to anyone who is trying to get more immersed and involved in each Sims storyline.

Download Deep Conversations

Ninja Career Mod

Many of us as a child wanted to grow up and be a ninja, they are super cool and they fight off bad guys and have other noble duties. With this mod, it allows that dream to become a reality for your sims, by adding a ninja career to the game. The ninjas will work Monday through Friday in the evening and they have different ranks corresponding to their belt color. The lowest being a white belt, and the highest being a black belt.

You can watch your Sims train and progress themselves through the ranks to become the ultimate Ninja with this mod. If you could never become a ninja yourself, you can always download this mod to let your Sims do the hard work and training for you!

Download Ninja Career Mod

Note: This mod requires NRaas Career Mod and World Adventures expansion pack.

SIMS 3 Hair Mods

SIMS 3 Vampire Mods

Conclusion

See Full List On Wikihow.com

Here they are, best The Sims 3 mods that you can try out right now. Even though it is a fairly old game, these mods can make the game feel fresh again for you and fix a lot of the annoyances that the native game came with, enhancing your experience. If you found any of the Sims 3 mods we listed here great or helpful or think we missed any, let us know below!

How To Install Mods In Sims 3 Our Pastimes

Read More Article related to The SIMS