Welcome to
Mod The Sims
Online: 1168
Have an account? Sign in:
If you don't have an account, why not sign up now? It's free!
Other sites: SimsWiki
Reply  Replies: 2 (Who?), Viewed: 2581 times.
Search this Thread
Old 10th Jun 2020, 9:06 AM DefaultCreating Self-Interaction Objects? #1
Original Poster

Test Subject

Join Date: Dec 2013
Posts: 2

Hello, I'm interested in creating a modded object that, when placed in the Sim's inventory, can increase or decrease their motives simply by clicking on the Sim themselves. This would work similarly to the cell-phone or music player which can be utilized even in their inventories. I read through Echo's tutorial yet I am unsure if it pertains to household objects purely or if it can work with objects in Sim's inventories as well. Would creating an inventory object be the best course of action in creating this mod? If so, what would be the best way to go about it. Also, I am a little unfamiliar with tokens yet would those be more viable than inventory objects or not?
Old 11th Jun 2020, 7:44 AM #2
Top Secret Researcher

Join Date: Feb 2008
Posts: 1,885
Thanks: 5051 in 35 Posts
11 Achievements

Do you mean this tutorial? http://www.eternal-echo.net/sims/tu...s/interactions/ Making interactions on sims is a bit more complicated than that. However, you can have the self-interaction triggered by anything you want - an object, a token, or pretty much anything else. You need a social plugin controller to make the interaction available. If you want the sim to perform an animation, or if you want to spawn dialogs for some reason, you will also need a social object.

If you don't need the social object, it's relatively simple: I would download this mod: https://modthesims.info/d/140314/do...2006-03-26.html or the Name the Father social plugin which was actually made using that mod as a base (although that one also contains a token object which you may wish to delete), and then replace the code with your code and the GUID of the object with your GUID. The code to determine when the interaction appears goes in CT - Object Menu, which is analogous to the Guardian BHAV of a normal object interaction. This function will also have to call 0x32 (Add/Change the Action String) to set the interaction text, the text that this primitive uses is in text list 0x12E. The clicked-on sim in this function is Param 0 and the selected sim is "Me". Thus, for a self-interaction, you will want to test that Param 0 == My object ID. You can see this happening in Name the Father. You may also want to check for an inventory object or token, those are both handled through the 0x33 Manage Inventory primitive. The code that gets executed after the interaction is selected is in CT - Object Menu Command, which is analogous to the Action BHAV, and it will get passed the Stack Object and Temp 0 the same way an Action BHAV would. Again, you can't do animations here, or spawn dialogs, or possibly other things that I'm not aware of - if you want to do any of that stuff you need a social object.

If you want to use a social object, you should download an actual custom social interaction and modify that instead. The way it generally works is that you have a social plugin as described above, but CT - Object Menu Command spawns the social object and then pushes the sim to do an interaction on that object. The social object is a lot like a regular object like the one in the tutorial - it has a TTAB and TTAS and all that, and it can do animations and dialogs. Normally you have two interactions with the social object (one for the first sim and one for the second sim), but since it's a self-interaction I think you may need only one for your case (and don't have to worry about syncing animations, etc.).

Don't forget to change the GUIDs! And if an object in the mod you use has a fallback GUID set, change it to 0.
Old 12th Jun 2020, 1:22 AM #3
Original Poster

Test Subject

Join Date: Dec 2013
Posts: 2

Thank you for the info, that really helps!

Section jump:

Powered by MariaDB Some icons by http://dryicons.com.