Posts: 3,003
Thanks: 896 in 4 Posts
6 Achievements
@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