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 28th Oct 2017 at 6:19 PM
Put custom object in sim inventory
Hi,i am trying to add a custom object to sim inventory using python script could somebody help me with that ,thanks
Advertisement
Deceased
#2 Old 5th Nov 2017 at 10:56 PM
Seems like I did this in my Packing Crates mod, but I'm not sure. I know I did some things with inventories, but I just reinstalled the game today after burning out like two years ago and I'm nowhere near to being able to really help much at this point, if I even DO get back into modding at all (no promises on that).

Likely that mod doesn't even work anymore after this long, but if you look at the Python script sources it just may give you some ideas on how to accomplish what you need done.
Test Subject
Original Poster
#3 Old 7th Nov 2017 at 2:00 PM
Hi ,thanks to scumbumbo i did find a way for that :
output = sims4.commands.CheatOutput(_connection)
client = services.client_manager().get(_connection)
sim = client.active_sim
info = sim.sim_info
def_id=18322983424360206290
obj = objects.system.create_object(def_id)
inventory = sim.inventory_component
if inventory.player_try_add_object(obj):
output("done")
Back to top