Locked thread | Replies: 92 (Who?), Viewed: 70563 times. | Locked by: HugeLunatic Reason: Please see updated tutorial in wiki, see first post.
Page 4 of 4
Test Subject
#76 Old 14th Sep 2010 at 4:36 PM Last edited by IdrilR : 14th Sep 2010 at 4:52 PM.
Hi.

Thanks for this tutorial, it is really helpful. I managed to make my bear talk without problem, but I tried to modify an other object (a fence gate) and it won't appear in the catalog, I don't know why...
Test Subject
DELETED POST
14th Sep 2010 at 7:23 PM
This message has been deleted by radcom. Reason: Solved the problem my self
Test Subject
#77 Old 1st Nov 2010 at 3:15 PM
Hi,
I have a problem when i want to test my object. The game just crashes with a stack overflow exception when I click on my cloned object in the buy catalog. It seems that it can not find my code file as the object cloning works as long I do not change the OBJK to my class. (The game do not crash if I change it to the stereo class, the object is just not placeable then).
I'm having AMB and WA as expansion packs and use the latest version available (1.17 for base game). I'm using the new way for installing .package files.
I have checked that no other mod/download is conflicting my object by using new sims 3 folder under my documents. I have also tested the package from Sukhavati available above and have the same effect so it seems not to be an error while creating the object itself. If it does matter I tried the create the object using the latest version of S3PE and S3OC and tried to generate the assembly file with Visual Studio 2010 and alternative with the Assembly Generator available on this website.
Anyone an idea whats going wrong?
Test Subject
#78 Old 1st Nov 2010 at 7:32 PM
Exactly the same (Agent_N) problem here.
Base Game: v1.17.60
WA: 2.12.8
Ambitions: 4.5.6

The problem also appears with the StatueOfLife Mod wich worked well until i patched to (i think 1.17.60)

Greets
David
Top Secret Researcher
#79 Old 2nd Nov 2010 at 12:41 PM
Quote:
Originally Posted by cheezegrate
How do I open the disassembler exactly, I am pressing the space bar yet nothing is coming up?

Quote:
Originally Posted by ani_
cheezegrate: You as well need to click the class you want to see with the right side mouse button and selecte it from there, I also couldn't launce it with space.


I'm having the same problem and I don't understand the solution...I'm kind of new to this program. :\
Test Subject
#80 Old 3rd Nov 2010 at 7:41 PM Last edited by gladosrev2 : 3rd Nov 2010 at 11:27 PM.
First of all, thanks for the in-depth tutorial! It's just what I was looking for

Quote:
Originally Posted by Agent_N
The game just crashes with a stack overflow exception when I click on my cloned object in the buy catalog.


I have the same problem. I did all exactly as in the tutorial, using Visual C# 2010 Express. The Teddy works, when it's only cloned, but when I add the dll, clicking on it in Buy Mode crashes the game to desktop. I have deleted the 4 cache files and am not using any saved games.

I thought maybe I used the wrong original .dlls, so I tried it again, this time with the .dlls from World Adventures Bin folder (I think they are the same as in the base game anyway), but after recompiling and reattaching my .dll, the game crashed just like before when clicking on the teddy.

My framework is working, I use the Extended Core Mod and some cosmetic mods, nothing that conflicts. On a side note, when I use the Chaos Painting by ChaosMageX, the game crashes in exactly the same way (that mod is not updated).

I have only WA installed, latest patch: 2.12.8.009002

Does anyone have a solution please?

[Edit]
SOLUTION:
It seems the game crashes because it does not recognize the custom namespace name. Simply change the namespace name to the name of the object's original namespace. In the example code in this tutorial, change

namespace KolipokiMod
to
namespace Sims3.Gameplay.Objects.Miscellaneous

recompile the project, reattach the .dll, adjust the key and all works!
I found the solution here: http://www.modthesims.info/showthread.php?t=423291



Quote:
Originally Posted by cheezegrate
How do I open the disassembler exactly, I am pressing the space bar yet nothing is coming up?


Double clicking with the left mouse button on a function name in the Reflector should open the Disassembler on the right side, showing the function code.

Quote:
Originally Posted by killovicz
Thanks a lot for this tutorial ,,,

but I got one problem, I DL'ed: Microsoft Visual C# 2010 and not able to load mscorlib.dll as the reference , .

I did check the "Do not reference mscorlib.dll" in the build-prop, however I can not find "Set the active configuraiton to All Configurations"-part anywhere. There are no Configuration/Platform boxes on the top of the build configuration screen ... I'm probably missing something obvious.

Should I un-install 2010 and go for 2008 ver. instead??


I got this to work with Microsoft Visual C# 2010 Express. Couldn't find the configurations as well, so skipped it (seems to be set to Release by default). I actually had to uncheck "Do not reference mscorlib.dll" to get the project to compile, it threw an error otherwise.

"The past tempts us, the present confuses us and the future frightens us.. and our lives slip away, moment by moment, lost in that vast, terrible in-between"
Test Subject
#81 Old 18th Nov 2010 at 1:02 AM Last edited by nytwish : 18th Nov 2010 at 11:11 AM.
just a question
nice tutorial btw and thanks for sharing sir, but i cant seem to understand this part. perhaps can you tell me where can i see this? thank very much.

After your new resource is created go to the OBJK, Collection of Keys, 2nd Key and type "[Your Namespace Name].[Your Class Name] For this example it would say KolipokiMod.TalkingTeddy. Next you need to import your dll. Click on the S3SA and hit grid. The first item on the list should have an import/export click on it, bring the drop down menu down and click import. Navigate to your dll of your code "Visual Studio 2008 - Projects - [name of saved project here] - [name of saved project here] - obj - release - [nameofproject].dl" and hit open, after that hit commit and save your project. If all went well then you know have a nice object that will tell you Hi.


EDIT
after reading the comments , i changed the string key in objk with Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod.TalkingTeddy with the namespace on my dll file named Kolipoki. i also got the problem no interaction.. here is my package and dll file..

Files Here

ps. i tried using the monkey bar and no problems with framework whatsoever, can someone tell me what i need to do?
Inventor
#82 Old 18th Nov 2010 at 7:39 PM
The change of namespace needs to be BOTH in the code for your .dll AND in the OBJK.

The .dll in your package still has the namespace KolipokiMod

Code:
namespace KolipokiMod
{
    public class TalkingTeddy : StuffedAnimal
// more stuff
}
Change this to:

Code:
namespace Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod
{
    public class TalkingTeddy : StuffedAnimal
// more stuff
}
then recompile, import the .dll again and it should work.
Test Subject
DELETED POST
18th Dec 2010 at 4:37 PM
Default Problem with assemblies and code...
This message has been deleted by Gekedec. Reason: Issue solved
Test Subject
#83 Old 20th Dec 2010 at 12:15 AM
Default Object Modding Tutorial Issue
Hi people! I've got a problem with the Object Modding tutorial, specifically while testing the new object....I did everything Kolipoki said, I even used the same names and the same Teddy bear as the new object so it would say hi to me in-game. However, when I start the game, get into a family and go to Buy Mode, I can see the new teddy but I can't buy it.....I can grab it with the hand tool but it never releases the bear....leaving me unable to buy it...Does anyone know why? Thanks!
One horse disagreer of the Apocalypse
DELETED POST
20th Dec 2010 at 11:13 AM
This message has been deleted by HugeLunatic. Reason: thread merged
Test Subject
#85 Old 21st Dec 2010 at 5:20 PM Last edited by Gekedec : 23rd Dec 2010 at 6:36 AM. Reason: Found the silly mistake!
Quote:
Originally Posted by HugeLunatic
Did you update the scriptclass as discussed in this thread? http://www.modthesims.info/showthread.php?t=423291


I think I did this....but I don't know if I did something wrong. The tutorial says to go to the OBJK so I can change the second key....so I chose the OBJK, hit grid, went to "Component data" and hit "...", there I found "CDTAssetResourceName" and "CDTString"...I chose the second one and went to the "key" field. It said "scriptclass" so I changed it for "Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod.TalkingTeddy"...is it correct? or I had to change the key field of CDTAssetResourceName?

I even tried changing the namespace as suggested in the thread but nothing happens...I can't still buy the bear.


EDIT: I can now buy the Bear! I had to change the "Data" field NOT the "Key" field....silly mistake! Thanks for making me pay attention to the scriptclass in OBJK
Interstellar Traveler
#86 Old 21st Dec 2010 at 10:51 PM Last edited by Simul8rReviews : 22nd Dec 2010 at 1:19 AM.
Hello, well im having a problem which i think it's either scripting or something else. Okay first, I did this tutorial and wrote out the code on this tutorial for me to actually understand code (sorta helped) and just incase, i erased all that i wrote out and copied and pasted the code in this tutorial (i was afraid it had mistakes) and i did everything it told me to do..but when i go into the game, i just get "No Interactions Available" <I read about that on the previous page so you dont have to tell me.
okay well.. I do have the framework, i do have a couple of scripting mods though, could that be the reason? I've tried this multiple times with Visual C# and Assembly Generator and still no luck.
The scripting mods i am using are:
NRaas DebugEnabler
Buzzlers Scribbling Pad
and some mod that changes the color of your CAS, not sure if that's a scripting mod


EDIT: I also changed the namespace to i.e. Sims3.Gameplay.Objects.Decorations.Mimics.MysteryMirror
and it still doesn't work
Interstellar Traveler
#87 Old 21st Dec 2010 at 11:21 PM Last edited by Simul8rReviews : 22nd Dec 2010 at 1:56 AM.
I now am getting this error message on Visual C# whenever i code D:
"Predefined type 'System.Objects' is not defined or imported"
and it doesnt give me the line or column number



Test Subject
#88 Old 23rd Dec 2010 at 6:48 AM Last edited by Gekedec : 23rd Dec 2010 at 7:05 AM.
Quote:
Originally Posted by Simul8rReviews
I now am getting this error message on Visual C# whenever i code D:
"Predefined type 'System.Objects' is not defined or imported"
and it doesnt give me the line or column number





It also happened to me...and I solved it by unchecking the "Do not reference mscorlib.dll" in the project's properties as opposed to what the VS tutorial said...I completely ignored that step that involves the configuration and the mscorlib....plus I didn't even extract the mscorlib.dll from the game's packages... You should watch the tutorial's video suggested by Kolipoki because it shows exactly what you have to do....and you will notice that mscorlib.dll is completely ignored and excluded from the references that are supposed to be called by the VS project.

Now I have a question for everyone...I can buy the bear and make it say hello as intended but the action's in-game text (the one that is supposed to be long and changed for something shorter and clearer, when you click on the object) doesn't exist!! There is nothing there....just a blank space...but as I said, even though it doesn't show the name of the action, I can still click on it and it will execute the hello thing. Any ideas regarding this issue?
Interstellar Traveler
DELETED POST
23rd Dec 2010 at 8:34 PM
This message has been deleted by Simul8rReviews.
Interstellar Traveler
#89 Old 29th Dec 2010 at 8:48 PM
Okay I seriously need help. I even tried this and It's not working at all. I keep getting "No Interactions Available"!

Its not conflicting, I removed all my scripting mods, deleted all cache, and checked if i had my framework and I do.

This is really starting to bug me that I cannot get this to work..
Help anyone?

Formally SeeMyu | Retired Mod
Forum Resident
#90 Old 11th Jan 2011 at 5:13 PM
Personally, I work on the theory that if my game was working with my other mods,
and quit working when I install my latest attempt, then the problem must be within
my latest attempt at mod creation. Saves a lot of file shuffling, and lets me focus
on finding the difference between my non-functioning mod and the tutorial author's
example. Lately that turned out to be a .dll with a namespace that differed from
the cloned objects. Have you checked that? It's why my object didn't have any
interactions. Look under "Finding the original objects name" in the first post for
help with that.
Space Pony
#91 Old 17th Feb 2011 at 3:45 AM
Just in case someone is watching this thread and could help me. I've been having trouble with the disassembler portion. I tried space bar and right clicking but nothing shows up other than copy and a couple of view options. I've tried in both Visual Studio C# 2010 Express and Visual Studio 2008. Any help and/or suggestions would be greatly appreciated.
Me? Sarcastic? Never.
staff: administrator
#92 Old 17th Feb 2011 at 4:54 AM
I believe the disassembler portion is referring to Reflector, not Visual Studio. That is where your looking up the EA class and determining what it does. You can either hit space bar or double click.
Space Pony
#93 Old 17th Feb 2011 at 6:46 AM
Oh. That explains a lot. Thank you :3
Locked thread | Locked by: HugeLunatic Reason: Please see updated tutorial in wiki, see first post.
Page 4 of 4
Back to top