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!
Forum Resident
Original Poster
#1 Old 13th Feb 2020 at 4:46 PM Last edited by vegan_kaktus : 13th Feb 2020 at 11:03 PM.
Default New interaction for dogs
I've been working on this interaction for a while now (ever since this morning lol) where I'm trying to make it possible for dogs to take in the newspaper, and I've successfully added a pie menu to the newspaper (only available for dogs), created a BHAV so the dog walks up to the newspaper and "picks" it up (using the "pick up stick" animation from play fetch) - but how do I place the newspaper in the dog's mouth? Like the stick does when playing fetch? Atm my BHAV looks like this:

I've been following this tutorial by Echo so far, but it unfortunately doesn't explain how to place objects/accessories in hands etc. I can't think of any mod I can look at either, so any help is much appreciated! I can upload my file if someone wants to take a look at it, or you can view the content of my file here :-)
Advertisement
Alchemist
#2 Old 13th Feb 2020 at 10:28 PM
Can you post your file?
Forum Resident
Original Poster
#3 Old 13th Feb 2020 at 11:02 PM Last edited by vegan_kaktus : 14th Feb 2020 at 12:40 AM.
@omglo Absolutely! Here you go :-))

Edit: Sorry! I uploaded the wrong file here is the one I meant to upload!
Scholar
#4 Old 14th Feb 2020 at 12:47 PM
You need to 'snap' the newspaper into the Dog's slot, slot 6 I think is for the dog's mouth. Best to examine the default Social-Dog-PlayFetch to see how to do this and how to drop the newspaper later, I have extracted Social-Dog-PlayFetch and included it in the attached file along with a possible way of doing it in your file.
Attached files:
File Type: zip  newspaper_interaction.zip (13.2 KB, 7 downloads)
Forum Resident
Original Poster
#5 Old 14th Feb 2020 at 1:49 PM Last edited by vegan_kaktus : 14th Feb 2020 at 6:01 PM.
@Chris Hatch *screams* Thank you so much! Forgot to mention that but I actually extracted and compared the play fetch interaction, but I still couldn't understand how to place/snap the newspaper in the dog's mouth (which indeed is slot 6). You extracted more files than I did though, so thank you! I think I might have started something I'm still way too unskilled for to actually finish, but I will do my best. Now off to SimPE I go :-))
Instructor
#6 Old 20th Feb 2020 at 9:26 PM
Hope you'll succeed, it's a really interesting project.

I believe in the "Thanks" button and its amazing powers !!!
Lab Assistant
#7 Old 10th Mar 2020 at 4:39 PM
Dogs already went autonomously to fetch the newspaper back in Sims 1. I'd be nice if they could do the same in Sims 2, so good luck!
Alchemist
#8 Old 14th Mar 2020 at 6:15 PM
@vegan_kaktus

Hi, it's EarlyPleasantview from Tumblr, replying here because it'll be easier. I looked at the file you sent over. First, I wanted to test and see if the paper snapped into the dog's mouth. It didn't. When you're making a mod, it's a good idea to test it little by little as you go along. Make sure you have testing cheats turned on, and instead of having a line return false if it fails it's better to set it to error while you're in testing, so you can locate the problem line.

Here's the error that I got. I'm sorry to say I did not find a solution. Perhaps someone else will know.

As far as the game is concerned, dogs can't hold newspapers. You can't edit the dogs, so you have to figure out what the problem is with the newspaper and how that is different from the accessory stick that dogs can hold. It's probably something in the paper's Function Init that is causing the issue, but looking through, I didn't see anything that stood out. I did try changing the paper's weight (which is an option found in the Init), but it didn't fix it.

Before I could test this, the package needed some fixes, which I'll explain so you know for your future modding projects. Adding a feature to an existing object is a bit different than creating a standalone object, which Echo's tutorial is about.



Line 1 is the animation. If you look at the panel to your right, you'll see that the animation has an event tree, which is a BHAV that runs at the same time as the animation. The instance number is 0x100A, and you can see it written backward in Operand boxes 04 and 05 (the first Operand box is actually box 0, so the numbers might seem one off). Since operand 0x100A is already running at the same time as Line 1, you don't need to run it a second time in Line 2.

Line 2 is leading to Line 3, which doesn't exist. I understand that you're planning to add more code to it to make the dog bring the paper inside, but for now you want to delete line 2 until the Snap issue is solved. Have Line 1's true and false target return true. For Sim and pet animation lines, the true and false target should always be the same, due to a game quirk. That doesn't seem to be the case for object animations.


I see that you've imported Event Pick up Stick to your package. You changed the group number to the newspaper's group, which is right. When you're adding a feature to an object, you have to make sure that the instances are unique. The newspaper is already using 0x100A for something else, and adding another BHAV with the same instance to that group will override the original 0x100A BHAV. Open your latest Objects.Package, filter by the group number, sort by instance number, then choose the first instance number that's free and use that for your new BHAV. Once you've changed the instance number of the event tree, don't forget to go back to the animation line and put the new instance number in Operands 04 and 05. The same applies to the text list. The new Object Anims in your package will override the Anims Object string that the newspaper already had. Import the newspaper's Object Anim string and add the additional animations to the end of it, like you did with the pie menu string. Then go back to your BHAV and make sure it's running the right animation string.

Line 0 is checking the value of Parameter 0, which in this case is going to be a time code in the animation itself. It's not necessary for what you're doing, and sometimes this doesn't even work when you're re-purposing animations. I ended up removing it in the edited package, for the sake of making it simpler. I also removed the line that only runs if Line 0 returns true.

Line 1 is looking for Stack Object's attribute 16, which the newspaper doesn't have. In the fetch interaction, that attribute is defined as the stick. To add an attribute, you have to go into your objects.package, filter by the group number for the object you're working on, then go to texts lists. Extract the line with instance 100. Add it to the package, etc. just like other strings. The attribute names are for you, not the game, so you can can name it whatever you want. You also have to go to the OBJD and make sure that the number of attributes on your list is equal or lower than the number of attributes in the line 3A.


I won't go into how to define attributes, because you'll have an example in the updated package below. It's in Interaction Come Do Stuff. If it doesn't make sense, feel free to ask.

I'd recommend these threads if you haven't seen them yet.
http://modthesims.info/t/67365
https://modthesims.info/t/showthread.php?t=111469
http://modthesims.info/showthread.php?t=212101
Forum Resident
Original Poster
#9 Old 14th Mar 2020 at 7:01 PM
@omglo Thank you so much! I'm very thankful for you taking the time trying to help me.

The newspaper actually didn't snap for me either, but I simply thought that it might be because the BHAV had no content after placing the newspaper in the dog's mouth (this made a lot more sense in my head haha). I'm still very new to this, so thank you for your thorough explanations and the links! I really appreciate it. For now I might put a hold on this project, but I won't give up on it just yet. I'll come back to it when I feel a little more comfortable with modding. Again, a huge thank you for your help and links! I'll study them thoroughly.
Alchemist
#10 Old 14th Mar 2020 at 7:33 PM
I completely understand. All of us have had projects we had to put on hold until we were more comfortable with it. You're already off to a good start. For when you pick this up later, I think this will help you get the dog to bring the paper into the house. It might not make sense now, but when you're more experienced it will. You can have the dog bring the paper to the nearest coffee table as a means of getting it inside. http://simswiki.info/wiki.php%3Ftit...AV:Find_nearest
Forum Resident
Original Poster
#11 Old 14th Mar 2020 at 7:43 PM
@omglo Thank you once again! There's so many good tutorials on MTS and SimsWiki, it's a shame I can't seem to learn how to navigate on any of them. So really, thank you for the links (and explanations)!
Back to top