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!
1978 gallons of pancake batter
Original Poster
#26 Old 5th Jun 2011 at 10:14 AM
Ah, sorry about that. The assemblies I compile against have all the access modifiers changed to public. There was no reason to assume this particular interaction would be private. I'll see about changing that.

Just use it with the public modifier. There's really no reason to make an interaction so restricted (private) that "outsider" code doesn't know of its existence (during compile time, i.e. when you write your code).

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Advertisement
Test Subject
#27 Old 5th Jun 2011 at 2:20 PM
Cool, thanks! I complied it both as private and public and it worked either way; just wanted to know if that was a general rule.

Another general question that might not belong here... Intellisense doesn't work for me in this test project. Is that normal when dealing with these Sims reference libraries?
1978 gallons of pancake batter
Original Poster
#28 Old 5th Jun 2011 at 2:49 PM
Quote: Originally posted by 3MTA3
Another general question that might not belong here... Intellisense doesn't work for me in this test project. Is that normal when dealing with these Sims reference libraries?
The QuickInfo popups don't work for obvious reasons; everything else seems to work, though.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#29 Old 10th Jun 2011 at 7:09 PM
The tutorial refers to object modding but I wanted to add interactions to a specific type of objects in a given world and it didn't work...
For example ( Add a new interaction to all plants on a lot ).
Would startup work for this or OnWorldLoadFinishedHandler?
Also would I use a foreach function get all the objects of the type then add an interaction?
Good tutorial but I'm wondering if it would apply to a case like that because it hasn't worked for me.
1978 gallons of pancake batter
Original Poster
#30 Old 10th Jun 2011 at 7:16 PM
You need a pure scripting mod for that. I'll answer to your thread in Modding Discussion soonishly.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#31 Old 14th Jul 2011 at 2:17 AM
Downloaded content in S3OC?
I recently purchased the Gothic Library with SimPoints on EA's website and I want to try to create an object mod to rig the Book of Spells with more interactions. I'm following the tutorial, but I got stuck at the part where you have to clone the object because I can't find the Book of Spells (or any of the other downloaded content) in the list of items. How can I access these items in s3oc? All help is appreciated; thanks in advance.
1978 gallons of pancake batter
Original Poster
#32 Old 14th Jul 2011 at 9:47 AM
I'm not at my workstation right now, but IIRC you need to load the object's package directly to clone a custom object (custom as in not part of the fullbuild/deltabuild packages).

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#33 Old 15th Jul 2011 at 2:22 AM Last edited by Simaholic123 : 15th Jul 2011 at 2:31 AM. Reason: new info
Quote: Originally posted by Buzzler
I'm not at my workstation right now, but IIRC you need to load the object's package directly to clone a custom object (custom as in not part of the fullbuild/deltabuild packages).


Do you know where I would find the package? I see that in the Sims 3 folder in My Documents there is a downloads folder that contains the set as a TS3 custom content file, but I can't find where the individual packages for the objects are located. I tried looking in the Sims 3 folder in the program files too but I haven't found anything with a recognizable name.

Edit: Googling led me to this info:
Quote:
my documents>electronic arts>the sims 3>DCCache It's a strange and clunky system that makes one big file, so it's impossible to get rid of things one by one. Also, when you do delete them from your game, you don't get the disk space for it back. When I learned this, I stopped downloading anything that requires the launcher, because it's just not right to do stuff that way.

So, if this is true, I'm not sure how I can open it directly. Does anyone know how to get around this? Is there a way to resave the item in a different way or something?
Née whiterider
retired moderator
#34 Old 15th Jul 2011 at 2:38 AM
Use Delphy's Sims3pack Multi-Extractor to extract the .package files from those nasty sims3packs. Store content isn't designed for conversion, though, so you might have to run it through the s3rc tool first.

What I lack in decorum, I make up for with an absence of tact.
Test Subject
#35 Old 15th Jul 2011 at 6:34 PM Last edited by Simaholic123 : 16th Jul 2011 at 12:03 AM. Reason: new problem
Another question... sorry :/
Thanks so much, whiterider for that; I think that part worked fine.

New problem though, one of the steps in the tutorial says to find the objects original class and in the example it uses "Sims3.Gameplay.Objects.Miscellaneous.StuffedAnimal." For me this was "Sims3.Store.Objects.SpellBook" though and it wouldn't let me follow any of the next steps in the tutorial. I don't know how to fix this, though I know for a fact that it's possible to mod this item because I found someone on another site who made one to allow children to use it. Anyway, I'm guessing this problem has to do with the fact that one of the references I added was "Sims3GameplayObjects," but there wasn't one for the store items so I can't reference them properly... is there something I can do to fix this? Thanks in advance
1978 gallons of pancake batter
Original Poster
#36 Old 16th Jul 2011 at 7:52 AM
If you want to use that particular item in your code, you need to extract the dll (from the S3SA) from the package (the one you extracted from the sims3pack) and add it to the references in your Visual Studio project. Load it to your assembly browser if you want to see its code.

BTW: That other mod you've seen is probably just a simplistic XML mod.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Test Subject
#37 Old 17th Jul 2011 at 3:35 AM
Thanks!
Ah, got it to work now! Thanks so much for all your help, I really appreciate it
Instructor
#38 Old 23rd Aug 2011 at 12:59 AM Last edited by lorenrose1013 : 23rd Aug 2011 at 1:12 AM.
I just started script modding and got stuck on the first step. When it says to find the objects original class, there is no original class. The string is greyed out and empty. (I cloned a lollipop and am trying to add the 'Eat' interaction)
1978 gallons of pancake batter
Original Poster
#39 Old 23rd Aug 2011 at 6:44 AM
@lorenrose1013: The object you cloned is a prop, like the pencil for homework or knife/spoon for cooking. Props are instantiated for animations and are destroyed immediately afterwards. Therefore they have no functionality on their own and need no script class.

Now to start an object from scratch, derive it from the abstract GameObject class. Be aware, though, that what you're planning is not really a beginner's project. I dare say it's not even intermediate. An Eat interaction is a non-immediate interaction and needs a whole lot more than what's needed for the basic interaction from the tutorial.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Instructor
#40 Old 23rd Aug 2011 at 7:31 AM
Quote: Originally posted by Buzzler
@lorenrose1013: The object you cloned is a prop, like the pencil for homework or knife/spoon for cooking. Props are instantiated for animations and are destroyed immediately afterwards. Therefore they have no functionality on their own and need no script class.

Now to start an object from scratch, derive it from the abstract GameObject class. Be aware, though, that what you're planning is not really a beginner's project. I dare say it's not even intermediate. An Eat interaction is a non-immediate interaction and needs a whole lot more than what's needed for the basic interaction from the tutorial.


Darn I thought this would be simple! If it's not even intermediate, I'm re-thinking this...(Tucks idea in the very back of notebook)

Oh well, thanks for the tip about it not being a beginners project. Now I just have to think of something that is beginner!
Sockpuppet
#41 Old 5th Oct 2011 at 2:56 PM Last edited by BloomsBase : 5th Oct 2011 at 3:50 PM.
According to the tutorial(the video) Koli imports 11 .DLL files as reference files in MS visual C but i only have 8....
Following the tutorial I took the files from:
Gameplay.package wich has 3 files in it(Sims3GameplaySystems.dll / Sims3GameplayObjects.dll / UI.dll)
SimsCore.package wich has 3 files in it(System.Xml.dll / System.dll / mscorlib.dll)
Script.package wich has 3 files in it(SimIFace.dll / ScriptCore.dll / Sims3Metadata.dll)
A total of 9 but according to the tut you dont need the mscorlib.dll as it is integrated in MS visual C already, so i have 8

I am still missing 3 files, wich ones and were to locate them?
Field Researcher
#42 Old 5th Oct 2011 at 4:04 PM
Its the testing Dlls that were removed a while ago. They were put into the main Dlls.
Lab Assistant
#43 Old 18th Feb 2012 at 11:45 AM
Default Why doesn't my script work ?!!
I followed your tutorial and when I upload everything it say there is no interaction! is my problem within my script or within my uploading my namespace in the game OBJK?
Attached files:
File Type: rar  ClassLibrary1.rar (21.8 KB, 19 downloads) - View custom content
1978 gallons of pancake batter
Original Poster
#44 Old 18th Feb 2012 at 12:22 PM
Your script's namespace is Sims3.Gameplay.Objects.Decorations.Mimics.PrayingRug2x1, your class name is TalkingTeddy. Thus the full type name is Sims3.Gameplay.Objects.Decorations.Mimics.PrayingRug2x1.TalkingTeddy. The latter one is what you need to use as the script class in the OBJK.

Also the choices for the names are pretty poor. Take another modder who picks names like that and we're bound to have conflicts.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Lab Assistant
#45 Old 19th Feb 2012 at 7:10 PM
Quote: Originally posted by Buzzler
Your script's namespace is Sims3.Gameplay.Objects.Decorations.Mimics.PrayingRug2x1, your class name is TalkingTeddy. Thus the full type name is Sims3.Gameplay.Objects.Decorations.Mimics.PrayingRug2x1.TalkingTeddy. The latter one is what you need to use as the script class in the OBJK.


so that solved a part of my problem

before I continue with this:

is this code inheritance because if it's correct then I made this code correct sense all rugs are suppose to inherit rug class!

Quote: Originally posted by Buzzler
Also the choices for the names are pretty poor. Take another modder who picks names like that and we're bound to have conflicts.


you got that right over there!

Code:
class TalkingTeddy : Rug


First poorly named is
TalkingTeddy it should of been TalkingRug to make it more understandable for others.

This is what it should look like:
Code:
class TalkingRug : Rug


but still that doesn't do anything since it's just a name.

so I thought the problem was that maybe the rug doesn't have any interaction from the beginning so the said let me create a new script with the same code and the same object which was a "teddy bear" you give in the tutorial but the problem that happen is that when I used that code below with the "teddy bear"
Code:
using System;
using System.Collections.Generic;
using System.Text;
using Sims3.Gameplay.Objects.Miscellaneous;
using Sims3.Gameplay.Interactions;
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.SimIFace;
using Sims3.UI;

namespace Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod
{
    class TalkingTeddy : StuffedAnimal
    {
        public sealed class TalktoMe : ImmediateInteraction<Sim, TalkingTeddy>
        {
            public static readonly InteractionDefinition Singleton = new Definition();

            protected override bool Run()
            {
                base.Actor.ShowTNSIfSelectable("Hello!", StyledNotification.NotificationStyle.kSimTalking);
                return true;
            }

            [DoesntRequireTuning]
            private sealed class Definition : ImmediateInteractionDefinition<Sim, TalkingTeddy, TalkingTeddy.TalktoMe>
            {
                protected override string GetInteractionName(Sim a, TalkingTeddy target, InteractionObjectPair interaction)
                {
                    return "Talk To Me";
                }
                protected override bool Test(Sim a, TalkingTeddy target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
                {
                    return !isAutonomous;
                }
            }
        }

        public override void OnStartup()
        {
            base.OnStartup();
            base.AddInteraction(TalktoMe.Singleton);
        }
    }
}



and with using

Code:
Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod.TalkingTeddy


it says that there is no interaction with this object.

can I have a correct package for that talking teddy? to check what I made wrong ?


I hope I am not taking non-sense hehe!
1978 gallons of pancake batter
Original Poster
#46 Old 20th Feb 2012 at 7:48 AM
Quote: Originally posted by abd123
is this code inheritance because if it's correct then I made this code correct sense all rugs are suppose to inherit rug class!
Correct.

Quote:
This is what it should look like:
Code:
class TalkingRug : Rug
Code:
namespace Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod{...}


Quote:
Code:
Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod.TalkingTeddy

it says that there is no interaction with this object.
The script class entry in the OBJK resource must be the full type name of your class. Full type name is namespace plus class name. In this case Sims3.Gameplay.Objects.Miscellaneous.KolipokiMod.TalkingRug. If you change the class name or namespace, you need to alter the OBJK entry as well.

The "no interactions available" thing is usually a dead certain sign that the game didn't find the script class referenced in the OBJK. In that case the object won't be instantiated with your class, but with a fallback class called FailureObject which has no actual functionality.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Lab Assistant
#47 Old 20th Feb 2012 at 11:21 AM
I have solved my problem !

the problem was with this code:
Code:
class TalkingTeddy : Rug


Wrong inheritance ! //This made my object look scraped and I couldn't buy it!

The correct code for my Inhertitance was:

Code:
class TalkingRug:RugCountryOval2x1


Correct inheritance!

and in the script:
Code:
Sims3.Gameplay.Objects.Decorations.Mimics.TalkingRug2x1.TalkingRug


I am glade I fixed it ! now I can try and give it my animation !
Forum Resident
#48 Old 5th Mar 2012 at 4:42 PM
I've been trying to poke around in Tree Of Prosperity script, to remove the check for the WishingWell to spawn the LightShow. This is what I did and it didn't work, obviously.

1. Opened the .dll in ILSpy.
2. Saved the code as a cs project.
3. Opened the cs project in VS 2008.
4. Specific not to use mscorlib.dll
5. Changed the reference path so it points to where I keep the game dlls
6. Add the mscorlib extracted from the game files
7. Change Copy Local to False for the references

So now I want to remove: && this.HasWishingWellOnLot from the function that checks if it's time to start the Light Show. I do that, but I can't compile because I get an error:

The type or namespace name 'IsValid' does not exist in the namespace 'Sims3.Store.Objects' (are you missing an assembly reference?)

I saw Buzzler say this:
Quote: Originally posted by Buzzler
If you want to use that particular item in your code, you need to extract the dll (from the S3SA) from the package (the one you extracted from the sims3pack) and add it to the references in your Visual Studio project. Load it to your assembly browser if you want to see its code.


But if I add the .dll for the Tree of Prosperity as reference in my project, I get many more errors, because there is a conflict.

Do I need to create a different namespace for the tree of prosperity to get this to work?
1978 gallons of pancake batter
Original Poster
#49 Old 5th Mar 2012 at 5:34 PM
@nonamena: Please attach your code, so it's possible to see where and how exactly the error occurs.

If gotcha is all you’ve got, then you’ve got nothing. - Paul Krugman
Forum Resident
#50 Old 5th Mar 2012 at 5:58 PM
Quote: Originally posted by Buzzler
@nonamena: Please attach your code, so it's possible to see where and how exactly the error occurs.


Thanks, Buzzler. I've attached the original .dll for the Tree of Prosperity as well as my own cs project.
Attached files:
File Type: zip  StoreObjectsTreeOfProsperity.zip (13.5 KB, 17 downloads) - View custom content
Description: original dll
File Type: zip  Nonamena_code.zip (18.0 KB, 18 downloads) - View custom content
Description: my failing project
Page 2 of 3
Back to top