Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Top Secret Researcher
Original Poster
#1 Old 9th Nov 2010 at 6:03 AM Last edited by claudiasharon : 11th Dec 2010 at 5:31 AM. Reason: solved
Default Solved-Updating Dolphin's Magic Gardening Gnome for Late Night.
I got a request to update Dolphin's Magic Gardening Gnome and I have never done a mod like that before. But I would like to learn how to update it. Are there any tutorials or anyone that would be willing to help me?
Advertisement
Inventor
#2 Old 9th Nov 2010 at 7:32 AM
Have you looked at Kolipoki's Object Modding tutorial?

The problem is probably the Namespace problem introduced in the patch.

So basically the steps would be to extract the .dll from the package, open it to get the code in Reflector and then either just copy/paste from there into a newly created Visual Studio project or get the FileGenerator or FileDisassembler plugins for Reflector which will generate a project for you.

In that project you replace the existing namespace with:

Sims3.Gameplay.Objects.TheNamespaceYouHadBefore

Compile the project, import the new .dll into the S3SA resource in the package via Grid and see if it works in your game.
Top Secret Researcher
Original Poster
#3 Old 9th Nov 2010 at 2:26 PM
How do I extract the .dll from the package?

Nevermind, I think I found it, but I have no idea how to find the code you're talking about.
Inventor
#4 Old 9th Nov 2010 at 3:10 PM
Have you taken a look at the .dll in Reflector?
Top Secret Researcher
Original Poster
#5 Old 9th Nov 2010 at 3:10 PM
Yeah I opened it, but I couldn't find the code.

I see that it says namespace Dolphin26.MagicGardeningGnome
and that needs to be changed in order to get the object to work probably.
Inventor
#6 Old 9th Nov 2010 at 3:17 PM
Try double-clicking on one of the methods, if you don't see the code window. I'll upload a screenshot of how it should look in a moment.
Top Secret Researcher
Original Poster
#7 Old 9th Nov 2010 at 3:19 PM
Yeah I'm not getting it.
Inventor
#8 Old 9th Nov 2010 at 3:22 PM
I've attached a picture of how it should look like. Double-clicking to open the code window only works for methods and members, so go down the tree on the left until you can't open anything more and click on something without children. That should bring up the code window.
Screenshots
Top Secret Researcher
Original Poster
#9 Old 9th Nov 2010 at 3:26 PM
Rock on, it worked, thank you. And I need to expand methods, correct?
Inventor
#10 Old 9th Nov 2010 at 3:33 PM
If you want to copy the code of the whole class, yes. As I mentioned, in that case you would have to create a Visual Studio project yourself (and add missing using statements for the Sims .dlls; you can take a look at Buzzler's new scripting tutorial for notes on that).

An alternative would be to download a plugin for Reflector that allows you to export the .dll as a project that you could theoretically open in VS and compile directly. Though that's not always perfect.
Top Secret Researcher
Original Poster
#11 Old 9th Nov 2010 at 3:36 PM
I was having trouble with the plugin, I'm not sure how to use it. :\
Inventor
#12 Old 9th Nov 2010 at 3:39 PM
Which one did you download? Did you add it via the View->Add-Ins... command?
Top Secret Researcher
Original Poster
#13 Old 9th Nov 2010 at 3:41 PM
Yep. It shows up under tools, I got both of the ones you mentioned.

And I'm having trouble getting it to work in Microsoft Visual C#.
Inventor
#14 Old 9th Nov 2010 at 3:53 PM
If you select "Generate Files..." it should open up a window that lets you select a path. Check both boxes, select the .dll on the left in the tree and click the "Generate Files" button.

This should work and generate a project that can be opened in VS. In my test on my own exported .dll in Visual C# 2008 Express it prompted me to convert, but that went fine, though I still had to go through the various steps of setting up a project for .dlls (adding references to sims .dlls).

ETA:
Quote:
And I'm having trouble getting it to work in Microsoft Visual C#.

It might be cleaner to start a project from scratch going through this tutorial. Then you'll know you have all the references in place and only need to take the .cs file(s) from the generated files and add it/them to the project.
Screenshots
Top Secret Researcher
Original Poster
#15 Old 9th Nov 2010 at 3:59 PM Last edited by claudiasharon : 9th Nov 2010 at 4:16 PM.
I keep getting this error.



And I used that tutorial to set up my project but I keep getting around 37 errors.

EDIT:

Okay, now I only get 7 errors.

Inventor
#16 Old 9th Nov 2010 at 4:22 PM
I still have 13 Give me a moment to see if I can get it work for me.
Top Secret Researcher
Original Poster
#17 Old 9th Nov 2010 at 4:23 PM
Okay will do.

Edit: Now I get four errors.

Inventor
#18 Old 9th Nov 2010 at 4:30 PM
Got it to compile \o/

Okay, the virtual thing on the "GetPath()" is because in the patch they added bool isFemale as parameter so just change it to "GetPath(bool isFemale)" and it should be okay. The rest is probably because you reference the mscorlib from the system, not the one distributed with the Sims game. Check steps 3 and 4 in the tutorial I linked earlier to change that.

ETA: I see you solved the rest yourself, so the GetPath() change should be it
Top Secret Researcher
Original Poster
#19 Old 9th Nov 2010 at 4:31 PM
I didn't reference it, I changed it to link to the sims one, I have no idea why it's referencing it.

And I can't seem to find the get path.

LOL nevermind. Find ftw.

So after I compile it...it's a .dll?
Inventor
#20 Old 9th Nov 2010 at 4:35 PM
Double-clicking on the error should jump to the line.
Top Secret Researcher
Original Poster
#21 Old 9th Nov 2010 at 4:36 PM
Found it. It compiled just fine.

But where does it go when compiled?
Inventor
#22 Old 9th Nov 2010 at 4:39 PM
Great

Quote:
So after I compile it...it's a .dll?


Yes, it's a .dll and then you can open the package again, import it into the same resource. (Did you already make the namespace changes?)

Save the package and copy to your mod folder and test if it still crashes.
Top Secret Researcher
Original Poster
#23 Old 9th Nov 2010 at 4:42 PM
Yeah I made the namespace changes, then I compiled it.

But I can't figure out the .dll part, under my projects are all these files but no .dll.
Inventor
#24 Old 9th Nov 2010 at 4:46 PM
Ah, okay. Check for a folder called "bin" and in there "Release". Or just search the whole project folder for any .dll. It should be in there somewhere.
Top Secret Researcher
Original Poster
#25 Old 9th Nov 2010 at 4:50 PM
Yeah it was in the bin. Anyways, thank you for your help, now I have to go test it in my game to see if it works.
Page 1 of 4
Back to top