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!
Test Subject
Original Poster
#1 Old 3rd Nov 2018 at 6:20 PM
Default Help with interactions
So, I want to add an interaction on a bed called "wallow," which is basically the cry in bed option but you can do it at any time and grants a happy moodlet (Sims 4), with the same animation. how do i go about it?

ps, i don't want to rename the cry in bed option, i want it to be seperate
Advertisement
Lab Assistant
#2 Old 7th Nov 2018 at 4:44 AM
Quote: Originally posted by FiberBriver
So, I want to add an interaction on a bed called "wallow," which is basically the cry in bed option but you can do it at any time and grants a happy moodlet (Sims 4), with the same animation. how do i go about it?

ps, i don't want to rename the cry in bed option, i want it to be seperate

What are you familiar with so far?

You'll need something that can generate new hashes for you, first of all. Sims 4 Studio has a Hash Generator tool built-in. The basic idea is you put in some text for the name of your file, including a unique modder name, so that there's less likely to be collisions in names of unique resources.

So you might call the interaction file FiberBriver_Interaction_Wallow or something like that and you'd plug that into the Hash Generator tool. The FNV 64 decimal value it gives you replaces the "s=" value near the top of the xml file. The FNV 64 hexadecimal value it gives you replaces the part at the end of the xml file (the external filename). So for example if its name was S4_E882D22F_00000000_000000000001A6A6.xml and the hexadecimal value is CBF29CE484222325, then you'd change it to S4_E882D22F_00000000_CBF29CE484222325.xml

Then the inside of the file near the top would look something like this: n="FiberBriver_Interaction_Wallow" s="14695981039346656037"

And voila, you now have a new file, as opposed to overriding an existing file.

From there, it gets a little more complicated depending on what all you want to do.

From the sound of it, you'll need the interaction file itself, then you'll need a buff (your custom happy buff along with a data file to go with it) and a loot file that "loots" the buff at the end of the interaction.

You will also need a way to get your interaction to show up on the bed. Since you probably want it to show up for all sims within a certain age range, you'll need a script to do this. There's some pretty standard python script for injecting interactions to objects. However, for a case like beds, I'm not sure how straightforward it will be. You could run into an issue with trying to get it onto every different type of bed, since there is more than one. I believe there's a way to inject interactions to objects based on category tags with scripts (ex: a generic bed tag) but I'm not sure how off-hand.

I do know that if you don't use python scripts and you add an interaction through a buff or trait, you can use tags there. But it sounds like the kind of thing you'd want every sim to have, not just ones with a certain trait.

♫ Improvising into a corner ♫
♫ No rhyme or rhythm in this verse cause I'm in a corner ♫
Deceased
#3 Old 8th Nov 2018 at 1:56 AM
Quote: Originally posted by Triplis
...There's some pretty standard python script for injecting interactions to objects. However, for a case like beds, I'm not sure how straightforward it will be. You could run into an issue with trying to get it onto every different type of bed, since there is more than one. I believe there's a way to inject interactions to objects based on category tags with scripts (ex: a generic bed tag) but I'm not sure how off-hand


You could look at the object tags to decide what objects to add the interactions to, or you can use a technique like I do with Don't Wash Dishes Where You Angry Poop which looks at the super affordances of all objects in the game and adds the new interaction to the super affordances list for all objects which already have the EA "Sink wash dishes" interaction (14242) on them. That script is fairly easy to understand if you're already an experienced script modder, but it does do a LOT more than just add those interactions to sinks, so I'll be happy to help you understand how to deal with that part you'd be interested in once you get to that stage.
Back to top