PDA

View Full Version : Replacing base items


ShideKnight
27th Oct 2011, 12:51 AM
Heyyas, I am trying to rewrite the body sculptor to have some additional abilities. How would I go about doing that? Should I include in the .dll just the parts that I'm modifying, or do I have to do it as a core mod?

I'm kind of at a loss right now. I got it to compile at least but now Sims3 is crashing when it starts. I have a feeling it's because of how I am trying to replace the methods of the body sculptor. Can someone point me to a mod I can look at or post a snippet of CIL or C# that gives an example how to do it?

My original idea was to just try and overwrite the whole Sims3.Gameplay.Objects.Rewards.BodySculptor code.

twallan
27th Oct 2011, 8:05 AM
Are you simply looking to add new interactions to the Body Sculptor object ?

I would suggest looking at a mod such as Treeag's "Put Away Books" mod : http://www.modthesims.info/d/386361

It provides a simple example of how to add a brand new interaction to an existing object in-game.

:)

Buzzler
27th Oct 2011, 8:08 AM
You know the object modding tutorial? If not, go to my profile and click on the articles tab to find it.

To replace an object's script, you basically follow the tutorial. The main difference is that in S3OC you need to untick "Renumber Internally" to make an override package instead of a clone. Of the package S3OC creates you then only need the OBJK resource in which you change the script class to yours.

What your script needs to look like, depends on what you want to do. ;)

ShideKnight
28th Oct 2011, 2:59 AM
Thanks guys

I had looked through the tutorials... I must of missed something >.>
Oh well.
Defiantly always appreciate good code examples to look at.