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!
Quick Reply
Search this Thread
Inventor
#76 Old 18th Nov 2010 at 9:22 PM
It cannot find the Sims .dlls. If you simply also open them in Reflector, the messages should go away.
Advertisement
Lab Assistant
#77 Old 19th Nov 2010 at 12:29 AM
I guess I don't understand, do I have to open the sims.dll's that I extracted from the base game along with the magicalgnome.dll?
Lab Assistant
#78 Old 19th Nov 2010 at 2:13 AM
Would anyone be willing to share the steps or help me both to do this project and create a tutorial so that others can use it?
Theorist
#79 Old 19th Nov 2010 at 2:55 AM
Quote: Originally posted by HugeLunatic
Updates to someone else's mod cannot be uploaded in the comments. You need to attempt contact with the creator, and I notice that dolphin has the option to email. Plus he hasn't even been MIA for 2 months, not long at all. I suggest you try contacting the creator, because if you want to share updated mods then your going to have to support them.


Okay, I thought it was fine because I've seen some "unofficial" updates posted in the comments of some mods.
Inventor
#80 Old 19th Nov 2010 at 6:49 PM Last edited by velocitygrass : 20th Nov 2010 at 9:54 AM.
This is a quick step-by-step guide. I don't have time at the moment for a full-blown tutorial, but all the necessary information on where to get the tools and how to use them exactly should be available elsewhere.

If someone wants to use this as a starting point to do a full tutorial that would be great.

Needed:

- S3PE - Reflector with addin FileGenerator (install add-in by selecting View -> Add-Ins... and then "Add..." and selecting the FileGenerator.dll)
- Microsoft Visual C# 2008 Express
- [Only if you need to go to step B: ildasm.exe and ilasm.exe to disassemble and re-assemble .dlls for linking]



1) Extract all Sims 3 libraries from the packages by opening them read-only in S3PE and exporting from grid:

gameplay.package
----------------

Sims3GameplaySystems.dll:
0x03D6C8D903CE868C

Sims3GameplayObjects.dll:
0xB9C90FDC6793BC0A

UI.dll:
0xF7C3ADE896D4E765


scripts.package
---------------

SimIFace.dll:
0xC356DF69B70ADD42

ScriptCore.dll:
0x78CF6CF5304D0C4F

Sims3Metadata.dll:
0x600F9EA1DDC99FB1


simcore.package
---------------

System.Xml.dll:
0x6AC101133051BEF1

System.dll:
0x342EE04373CF1E1C

mscorlib.dll:
0x28EE9D383A73463E

2) Extract the S3SA resource (Type: 0x073FAA07) from the mod package via grid in S3PE 3) Open Reflector. If there are any .dlls open in the list, close them by clicking "Del" or by selecting "Close" in the context menu. Then open the .dll from the mod you want to update.

4) Open the .dll "tree" until you see a node called "References". Open that and you'll see all necessary .dlls. Open then in Reflector from where you exported them earlier in step 1. (If Reflector asks if you want to unload mscorlib.dll or others, click yes.) See attached image for this step.

5) In the Tools menu in Reflector select "Generate File(s)...", which will open the Generate Files pane. Select the mod .dll in the tree on the left. In the Generate Files" pane browse to an empty folder to export into, uncheck Create Subdirectories and check Create Visual Studio Project File and then click "Generate Files".

6) Open the project in VS. The VS Conversion Wizard will pop up. Just click it through (back-up shouldn't be necessary).
a) Go to Project -> xxxx.dll Properties. This will open the properties pane.
b) Under "Application" change Target Framework: to .NET 2.0. There will be a warning that the project will be saved and reopened. Confirm that. After VS has done this open the properties again.
c) Change the Output Type to Class Library.
d) Switch to the "Build" pane on the left and click the "Advanced..." button at the bottom right. In the dialog check "Do not reference mscorlib.dll". Save the project. It will prompt with a solution name. Confirm it.
e) In the Solution Explorer under the .dll name you'll find the node "References". You'll find the same References as before in Reflector, some of them with a warning symbol. Remove ALL those references (even those without warning).
f) Now add the missing references (you can check in Reflector if you don't remember which ones) from where you exported them in step 1. (You can go through all of them and change Copy Local to false, but it doesn't really matter.)
g) Close the solution, confirm that you want to save the changes, then reopen it.
h) Select Build -> Build Solution
i) Errors will appear. Double-click on the first error and it will lead you to some code.
j) Fix it. Here are some things that might come up:
I) Private Implementation Details (comment the whole thing out by adding /* in the first line and */ in the last)
II) GetPath() -> GetPath(bool isFemale)
III) warnings in GeneratedAssemblyInfo: try commenting out by adding // in front of the line
IV) "The type or namespace xxxx could not be found (are you missing a using directive or an assembly reference?)" got to point A) below
V) "does not contain a definition for xxxxx" got to point B) below
Note on fixing: The error may not immediately go away in the list of errors. To force VS to do a real check hit "Build Solution" again (which happens to be the next step anyway ).
k) go back to step h and repeat until the status line says "Build succeeded"
l) now that the .dll compiles you can make the necessary namespace change by prepending "Sims3.Gameplay.Objects."
e.g. namespace Dolphin26.MagicGardeningGnome -> namespace Sims3.Gameplay.Objects.Dolphin26.MagicGardeningGnome
Note: You should not have to change this anywhere else in the code.
m) save and build solution

7) Import the .dll back into the package with Grid. You'll find the .dll in [Path you exported the project to]\bin\Release. Don't worry if it's named xxx.dll.dll.

8) Go to the OBJK resource in the package and open it with Grid. Go to the Component Data and open the one with the key scriptClass. For the value prepend "Sims3.Gameplay.Objects." as you did before in step 6)l).

9) Save the package and test it.



A) Go in Reflector and find the bit of code that is giving you trouble. Click on the element that VS says it doesn't have the namespace for. Scroll up in the tree until you get to the parent node that has the curly braces {} symbol before it. That's the namespace. Take that namespace and at the top of the .cs file where you see other using xxxx; add using the_namespace_you_found; e.g. using System.Xml;

B) Go in Reflector and find the bit of code that is giving you trouble. Click on the element that VS didn't find a definition for. Is it greyed out? Does it have a lock or key symbol next to it. Then you'll need to to do the following:
For the .dll in which this was found:
a) copy .dll to another folder
b) disassemble "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\ildasm.exe" Sims3GameplayObjects.dll /output=Sims3GameplayObjects.il
c) make everything public in the .il file:
replace " private " with " public "
replace " family " with " public "
replace " assembly " with " public "
d) reassemble: C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe Sims3GameplayObjects.il /dll /output=Sims3GameplayObjects.dll
e) remove the reference to the old .dll and add the reference to this .dll
Screenshots
Lab Assistant
#81 Old 20th Nov 2010 at 4:44 AM Last edited by Jbob : 20th Nov 2010 at 5:33 AM.
I was doing fine in the quick tutorial until I got to (J-I- Private Implementation Details) This is the code:
[CompilerGenerated]
internal class <PrivateImplementationDetails>{803E99E8-EBC8-4E23-8AA7-6BE6CBA054A2}
{
internal static __StaticArrayInitTypeSize=20 $$method0x6000002-1; // data size: 20 bytes
internal static int $$method0x600000f-1; // data size: 4 bytes

[StructLayout(LayoutKind.Explicit, Size=20, Pack=1)]
private struct __StaticArrayInitTypeSize=20
{
}
}

I have a total of 18 errors in this section and they all seem to be in the File: PrivateImplementationDetails
Error 1 Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal
Error 2 Unexpected character '$'
Error 3 Unexpected character '$'
Error 4 Unexpected character '$'
Error 5 Unexpected character '$'
Error 6 Identifier expected
Error 7 Invalid token '803E99' in class, struct, or interface member declaration
Error 8 Invalid token '-' in class, struct, or interface member declaration
Error 9 Invalid token '-' in class, struct, or interface member declaration
Error 10 Invalid token '-' in class, struct, or interface member declaration
Error 11 Invalid token '}' in class, struct, or interface member declaration
Error 12 A namespace does not directly contain members such as fields or methods
Error 13 Expected class, delegate, enum, interface, or struct
Error 14 Expected class, delegate, enum, interface, or struct
Error 15 Invalid token '=' in class, struct, or interface member declaration
Error 16 { expected
Error 17 The type or namespace name 'StructLayout' could not be found (are you missing a using directive or an assembly reference?)
Error 18 The type or namespace name 'StructLayoutAttribute' could not be found (are you missing a using directive or an assembly reference?)

No matter where I put the (/*) I can't get the error (Error 2 End-of-file found, '*/' expected) to go away after commenting the whole thing out.

Could this section just be deleted?

Edit1: This is how my code looks now
/*[CompilerGenerated]
internal class <PrivateImplementationDetails>{803E99E8-EBC8-4E23-8AA7-6BE6CBA054A2}
{
internal static __StaticArrayInitTypeSize=20 $$method0x6000002-1; // data size: 20 bytes
internal static int $$method0x600000f-1; // data size: 4 bytes

[StructLayout(LayoutKind.Explicit, Size=20, Pack=1)]
private struct __StaticArrayInitTypeSize=20
{
}
}
*/
I only have one error:
Error 1 Elements defined in a namespace cannot be explicitly declared as private, protected, or protected internal

What now or should I not have commented out all of those lines?

Edit 2: No errors, build successful
how do I make the necessary namespace changes by prepending "Sims3.Gameplay.Objects."? I have it in the namespace at the begining:

namespace Sims3.Gameplay.Objects.Dolphin26.MagicGardeningGnome
{
using Sims3.Gameplay.Actors;..etc.etc

but do I have to do that whenever: "Dolphin26/MagicGardeningGnome" shows up for example lower in the code:
private const string sLocalizationKey = "Dolphin26/MagicGardeningGnome:";?

should that be: "private const string sLocalizationKey = "Sims3.Gameplay.Objects.Dolphin26.MagicGardeningGnome:;"?

Asked another way: should every instance of "Dolphin26.MagicGardeningGnome" be changed and addressed as "Sims3.Gameplay.Objects.Dolphin26.MagicGardeningGnome"
Inventor
#82 Old 20th Nov 2010 at 7:49 AM
Just as a note to others about the errors you mentioned: VS is a bit inconsistent in how the errors are displayed. Sometimes they go away straight away after fixing something and sometimes you actually have to select "Build Solution". And yes, deleting has the same effect as commenting out. It only helps in case it still doesn't compile and you might have to go back and fix it in another way.

The extension of the namespace only needs to be done in the first line of code where it actually says "namespace" in front of it. All other mentions of it in the code can be left alone.
Lab Assistant
#83 Old 20th Nov 2010 at 9:20 AM
j) Fix it. Here are some things that might come up:

I would like to add that from this point on as you work your errors, they might not all go away or at least they will look like that. beofre you get frustrated, hit the "build button" again this will clear any errors that have been fixed but don't look cleared.

on that note. Followed the guide and it is 100% working in my game, resolved my issues and moved forward despite being unsure if I was done.

Thank you to all who contributed to this and thank you for that great tutorial. if I can follow it, I think most can too. Great job velocitygrass it was easy to follow once I decided to take the plunge.
Inventor
#84 Old 20th Nov 2010 at 9:58 AM
Quote:
I would like to add that from this point on as you work your errors, they might not all go away or at least they will look like that. beofre you get frustrated, hit the "build button" again this will clear any errors that have been fixed but don't look cleared.
Yes, this can be a bit confusing, especially since it's not consistent. I added a note to the guide. I also clarified the namespace change by making it singular (it said "changes" before) and adding a note.

I'm glad you got it to work!
Top Secret Researcher
Original Poster
#85 Old 21st Nov 2010 at 7:15 AM Last edited by claudiasharon : 21st Nov 2010 at 7:40 AM.
Quote: Originally posted by HugeLunatic
Updates to someone else's mod cannot be uploaded in the comments. You need to attempt contact with the creator, and I notice that dolphin has the option to email. Plus he hasn't even been MIA for 2 months, not long at all. I suggest you try contacting the creator, because if you want to share updated mods then your going to have to support them.


I have attempted to contact dolphin, I emailed and pmed him. Still haven't gotten a response in either places. I will keep trying until it's been over 2 months I suppose and see if I hear anything.

I pmed him at the beginning of November, I guess I'll give him til January until I try to attempt an upload of his mod.

Quote: Originally posted by Buzzler
You shouldn't. It's not yours and on MTS you need the original creator's approval to use their work. Besides: If you upload it here or anywhere, it becomes your job to support it. Will you be able to do that?


I would give the original creator all the credit of course, I'm not going to steal their mod.

But if it's not allowed to do, then it's not allowed to do and there's nothing I can do about it.

Quote: Originally posted by bradleymee
why cant he post the download on here the person who originally made the mod never bothers to come on anyway. and if it be possible i want kolipoki to know how to update his mod by posting a link to a forum post the tells you how to update the mod. because clearly his magic mod isnt working and hes taking an abnormally long time to update it for late night. i have waited nearly a month. and it still isnt solved. and if hes not going to do anything. i have a feeling we should give him some help on how to update. plus i have never had the chance to even play the magic mod at least once


Rules are rules I suppose.

Of course, velocitygrass would get credit as well for being awesome and helping me.

Edit: So, dolphin last updated his mod and commented on his mod on 4th Jun 2010, and last logged in 19th Sep 2010, so it's been two months since he logged in and well over two months since he last updated his mod and commented on it. I'm thinking he's MIA.

I could always attempt to post it, and if it gets posted and he comes back and whines about it, have it taken down.
1978 gallons of pancake batter
#86 Old 21st Nov 2010 at 8:09 AM
Quote: Originally posted by claudiasharon
I would give the original creator all the credit of course, I'm not going to steal their mod.
I'm not questioning your intentions. I believe that you only want to share the updated mod for the benefit of others.

Quote:
I could always attempt to post it, and if it gets posted and he comes back and whines about it, have it taken down.
You need explicit approval on MTS. Honestly. And a moderator already gave their two cents to the matter of uploading.

Also the question remains whether you will be able to support a mod you didn't write.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Top Secret Researcher
Original Poster
#87 Old 21st Nov 2010 at 8:32 AM Last edited by claudiasharon : 22nd Nov 2010 at 9:49 PM.
Quote: Originally posted by Buzzler
I'm not questioning your intentions. I believe that you only want to share the updated mod for the benefit of others.

You need explicit approval on MTS. Honestly. And a moderator already gave their two cents to the matter of uploading.

Also the question remains whether you will be able to support a mod you didn't write.


I'm awaiting approval from a mod on MTS.

I'm sure I can support the mod.
Field Researcher
#88 Old 6th Dec 2010 at 10:47 PM
I'm back! I'll be maintaining my mod... sorry I've been gone for a few months!
Top Secret Researcher
Original Poster
#89 Old 7th Dec 2010 at 1:11 AM
Quote: Originally posted by dolphin26
I'm back! I'll be maintaining my mod... sorry I've been gone for a few months!


Welcome back! Do you want me to have my version of your mod taken down?
Field Researcher
#90 Old 7th Dec 2010 at 5:37 PM
Quote: Originally posted by claudiasharon
Welcome back! Do you want me to have my version of your mod taken down?


Yes, once my official update is available and working. I hope to have that by the end of the day... I've gotten my magic orchid and moodlet manager working, but have one issue with setting the speed of the Gnome that is still causing issues.

Thanks for stepping in for me while I was gone!
Top Secret Researcher
Original Poster
#91 Old 8th Dec 2010 at 12:16 AM
Quote: Originally posted by dolphin26
Yes, once my official update is available and working. I hope to have that by the end of the day... I've gotten my magic orchid and moodlet manager working, but have one issue with setting the speed of the Gnome that is still causing issues.

Thanks for stepping in for me while I was gone!


Okay just let me know.
Page 4 of 4
Back to top