Replies: 3 (Who?), Viewed: 959 times.
Test Subject
Original Poster
#1 Old 15th May 2020 at 8:59 AM
Default Python help. Adding a "loot_list" to "basic_extras" using Python.
Hey Guys,
Is there anyone who can help me do this?

I want to add a custom loot_list to the basic_extras of an Interaction Tuning, but with Python.

This is what I did using sims4studio, but I want to reduce the number of conflicts by overwriting the in game xml, so I was wondering how to do this with python.
Test Subject
#2 Old 18th May 2020 at 3:03 PM
You can actually do this with a buff and use affordance modifier.
Test Subject
#3 Old 8th Aug 2020 at 12:45 AM
Originally Posted by konansock
You can actually do this with a buff and use affordance modifier.

can you explain that. I want to do the same thing.❤
Lab Assistant
#4 Old 8th Aug 2020 at 2:42 AM
This is very easily done with a snippet and your own custom snippet class since basic_extras is a list that can be modified at runtime with no problem.
I've attached an example for you to take a look at. It injects a loot into the brush teeth interaction so the sim gets a buff named TEST.
If you extract the .zip file's contents directly into your mods folder (leaving the folder structure inside the .zip file intact) the script will run without needing to be compiled, allowing you to quickly test out changes in the game without needing to compile to .ts4script every time.

Remember to rename the snippet class and the .py file to something unique to your mod.
In the snippet's tuning file in the .package, m= the filename of the file with the snippet class, and the c= your snippet class's name.

I encourage experimentation.
Download - please read all instructions before downloading any files!
File Type: zip Loot Injection (2.5 KB, 23 downloads)
Back to top