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
Original Poster
#1 Old 16th Sep 2015 at 8:44 PM
Default Help the newbie: Custom interaction animations
I'm new to script modding, and I'm sure what I'm asking about is beyond my current skills. I'm hoping to scope out whether this is possible, and where to look to learn.

I already can make the most basic tutorial-grade scripting mod. I think I can understand if you reply .

I'm hoping to add some social interactions. I need to put some kind of animation on them, and I'm curious what my options are. I assume it's possible to assign an existing animation from another interaction to a new custom one?

Is it possible to pull an animation from Sims 2?

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Advertisement
Field Researcher
#2 Old 16th Sep 2015 at 11:03 PM
Hey, everyone starts somewhere once!

I haven't delved much into animations, but yes, you could simply call another animation that does something else. A good example of this that I can think of is Ani's Savvier Seller Mod. She made an OFB-like store mod where Sims can restock items for sale. They "restock" but she used the animation from the University skills aptitude test (where they write stuff on a clipboard) to make it look like they are actually doing something.

There are custom ways to make your own animations but I have no idea how!
Inventor
Original Poster
#3 Old 17th Sep 2015 at 12:16 AM
Oh, that's a good suggestion for someplace to look. Thanks!

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Instructor
#4 Old 17th Sep 2015 at 10:32 AM
Hi, good to hear that you've accomplished a tutorial-grade mod so that's a whole lot better (to be honest I find that my help for people coming over with empty ideas but no scripting ideas in general at all goes useless all the time and I'm a bit frustrated with this). So, hi!

Social interactions are based off SocialInteractionA (it is a type of interaction, like, for example, in kolipoki's teddy bear mod tutorial, there's an ImmediateInteraction and that is a type of interaction too) They use SocialJigs and I don't quite know them.

SocialInteractionA is a generic type of interaction only, and as such, all the details are defined in a game xml (forgot it's name, but it's in GameplayPackages I think)

I suppose using in-game-existing animations for your purposes would actually be much better.

I can't say I'm familiar with animations stuff and social interactions so not much exact help. As a start you'll want to try PlaySoloAnimation for the actor sim (that's the basic method for a sim to run an animation) but some, if not most, animations, cannot work under this (a WORKING example: the "refill" animation in my petrol mod is actually the one cleaning toilets, without the brush). This is actually useful but just don't wonder why some don't work under this method, they probably require StateMachine and for now I can only do simple modifications to StateMachine-based animations. Some are not-so-difficult to understand, for example, the NectarMaker.AddFruit contains animations run by State Machines.

The best approach I am thinking for you, is to probably, first route the actor sim to the target Sim (there's a method, you can specify the distance) and then play the solo animations. It depends on the purpose of your interaction: is it animation-oriented (ie Kiss / Make Out don't really have the purpose, so as to say, the focus is on the kissing animation, right? But others, for example, the Ani's restock interaction is focused on actually restocking the shelves, the animations is only used to pretend things are really being done in the gameplay perspective)
Inventor
Original Poster
#5 Old 17th Sep 2015 at 1:17 PM
This helped a lot. Thanks. I appreciate you taking the time to write that out.

Yeah, I've seen some of the forum posts about script modding. I can see why it would be frustrating. This is complicated stuff, and you already need to know how to program. My day job is writing C# web apps, so what I really need to get under my fingers is the object library. I'm also still confused on how to get the end result in and out of a package file. I'm sure that's in the tutorials I'm already working through, but my brain is full by the time I get there . To learn from other people's mods, I have to figure out how to get them out and look at them.

I think my vision is of small enough scope for a first project. I'd like to do a follow up to Cherry92's Toddler Interactions. I do a lot of messing around in NRaas Retuner. I discovered that the ToddlerHug interaction could be enabled from a toddler actor to a toddler target, and it looked pretty cute. It's always bugged me that there's so little toddlers can do, and they can barely interact with each other at all. I tried enabling the Play With interaction for the peg box, just for grins, but of course there's no toddler animation. I'd also like to do something with Peekaboo so that it doesn't require a premium object for two toddlers to do it together.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Inventor
Original Poster
#6 Old 18th Sep 2015 at 1:32 PM
Actually, as I poke around looking at other people's mods, I want to verify -- if I want to enable an existing interaction for a new age group and add an animation that exists in the game, does that require a scripting mod? Could it be done with just ITUN? I'm browsing simple animation-altering mods, but I still am not 100% sure what I'm looking at.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
#7 Old 19th Sep 2015 at 2:25 AM
I don't have any clue how to do stuff with animations, but the package-building is easy. There's a tutorial on the "pure scripting mod" tutorial on this page. You need to use S3PE, but it's really easy.

To download other people's packages to inspect them, open up the .package in S3PE, and right click on the item with "S3SA" and click "Export". This is where the DLL file is. Export it to somewhere, then open it with IL-Spy. IL-Spy is also a great way to search through all the libraries and find what you need.

Sometimes "unlocking" stuff for things that EA did not want it to do is as simple as searching through the code and finding where and how they impose the restriction, then just copying and pasting that part into your code. And change that part. Then, you can tell the game to load your custom interaction instead of the default one.

Example: In my mod, I wanted to be able to enable roommates on Apartment lots. I found the interaction where the sims enable roommates, and it specifically mentioned an exclusion for Apartment lots. i copied this into my own script, changed what I wanted (simply removed the part about Apartments). Then, I added a PreLoad handler:

Code:
private static void OnPreLoad()
		{
			Phone.CallToggleRoommateServices.Singleton = new RoommatesFix.FixedCallToggleRoommateServices.Definition();
			Phone.CallChangeRoommateCount.Singleton = new RoommatesFix.FixedCallChangeRoommateCount.Definition();
			Phone.CallChangeRoommateType.Singleton = new RoommatesFix.FixedCallChangeRoommateType.Definition();
		}

for each of the interactions I changed. You have to add this also:

Code:
LoadSaveManager.ObjectGroupsPreLoad += new ObjectGroupsPreLoadHandler(RoommatesFix.OnPreLoad);


to your main function call.
Instructor
#8 Old 19th Sep 2015 at 4:31 AM
Quote:
Actually, as I poke around looking at other people's mods, I want to verify -- if I want to enable an existing interaction for a new age group and add an animation that exists in the game, does that require a scripting mod? Could it be done with just ITUN? I'm browsing simple animation-altering mods, but I still am not 100% sure what I'm looking at.


The "enabling for other age group" part doesn't but the "add an existing animation" part DOES require scripting. Without a script, if you simply enable the interaction for another age group, there will be no proper animation for that age group sim and the actor / target sim will be stretched.

If you have C# experience already that's really cool Don't worry about learning about Object scripting. I used to have only Visual Basic.NET (which is crap) experience and the scripting practices were not helpful at all (you could a lot of potentially buggy codes while VB still accepts them). I had to learn C# as a whole new thing! It's really special: if you know it, you know it. If you don't, you just don't and you'll need some time to digest.

And in case anyone doesn't know I've found an updated version of Cherry's Toddler interaction mod here:
http://claudiasharon.tumblr.com/pos...nteractions-mod
Inventor
Original Poster
#9 Old 19th Sep 2015 at 5:10 AM
Thanks. I found that one in the comments of Cherry's mod download here on MTS. I really love that mod.

So, I'm still unclear at how I can pick through other mods source code. If I'm compiling my results into a DLL, then I can't just pull someone else's work out of the package and read it, can I? I didn't fully follow what pjsutton said. Do I need a tool to decompile it? Or do folks often make their source code available?

Cherry's mod seems like exactly the one I should be playing with. She adds an interaction for eating from a food blow that uses the animation for eating baby food. I haven't looked up how to pull animations out of the game, but it's done often enough that I figure there's a tutorial somewhere. It's called a CLIP file, yes?

I really appreciate having someone to talk things through with. Thanks . I like C#, and this is giving me some marketable skills. I've been doing .Net web development for years. Messing around with DLLs, resources, and a totally different object library is really interesting.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Field Researcher
#10 Old 19th Sep 2015 at 6:21 AM
Quote: Originally posted by echoweaver
Thanks. I found that one in the comments of Cherry's mod download here on MTS. I really love that mod.

So, I'm still unclear at how I can pick through other mods source code. If I'm compiling my results into a DLL, then I can't just pull someone else's work out of the package and read it, can I? I didn't fully follow what pjsutton said. Do I need a tool to decompile it? Or do folks often make their source code available?

Cherry's mod seems like exactly the one I should be playing with. She adds an interaction for eating from a food blow that uses the animation for eating baby food. I haven't looked up how to pull animations out of the game, but it's done often enough that I figure there's a tutorial somewhere. It's called a CLIP file, yes?

I really appreciate having someone to talk things through with. Thanks . I like C#, and this is giving me some marketable skills. I've been doing .Net web development for years. Messing around with DLLs, resources, and a totally different object library is really interesting.


When you write your code and compile in Visual Studio, it creates a DLL file. That file is added as a resource of type "S3SA" in S3PE. S3PE is a program you need to download from MTS to make/open package files. Once you have S3PE, you can open package files and extract data from them. If you extract the S3SA resource of any package file, you will get the DLL that was created when the code was compiled. ILSpy is a decompiler that turns the DLL into code, so you can see what someone did with it. Does that make more sense?
Inventor
Original Poster
#11 Old 19th Sep 2015 at 12:53 PM
Thanks.

I'm good with S3PE. I asked questions a couple of places and was pointed to other folks' mods, but I was confused on how I could see the source code. Sounds like ILSpy is the piece I was missing.

Echo Weaver's Simblr: http://echoweaver.tumblr.com/
A portrait in stubbornness - Playing the same legacy since 2009
Sample a Brave Legacy: http://sims3sample.illation.net
Back to top