Replies: 1 (Who?), Viewed: 2095 times.
Test Subject
Original Poster
#1 Old 14th May 2020 at 8:52 AM Last edited by hmiller61615 : 17th May 2020 at 8:07 AM.
Default Modding the Juicer - how to pull quality from stocked produce?
I'm in the process of creating a mod of the Juicer from Seasons - where it's just the basket and sims can eat produce right from it. I have it generating the fruit/veggie in the sims hand BUT it's using the default mesh (often 'bland') instead of pulling the quality from what fruit is currently stocked. In a perfect world I would pull the quality to both change the appearance of the veggie as the Sim is eating it, and change how much hunger value gets filled too.

I've messed around with my 'Interaction - Eat Tomato' BHAV trying to call the quality of what's stocked in the fruit basket, but I think I'm just making a mess. The juicer does have a few existing BHAVs on getting quality of juices and fruits, but it seems to be doing a lot of math that I don't understand the purpose of, and it's starting to hurt my head, .

Anyone know how to get the quality of the vegetables that are stocked, and pull that into my BHAVs of the veggies to change their meshes/hunger value?

It's under Appliances>Small Appliances for anyone able to help
Download - please read all instructions before downloading any files!
File Type: zip (72.0 KB, 6 downloads)
Test Subject
Original Poster
#2 Old 17th May 2020 at 8:07 AM
I was able to figure out how to get the quality of stocked fruit finally - I ended up having to alter one of the existing BHAVs from the juicer, "Get Quality of Juice".

I changed all the constants labeled 2002 (juice types) to 2003 (ingredients), which led to the private BHAV, "Get X Fruit Quality" which needed:
-the specific produce type (apple = Const 0x2003:0x01, orange= Const 0x2003:0x02, etc)
-the number of produce (1),
-param 0x001 (I never learned what this was),
-the stack object ID.

That all culminated in a Stack object attribute 0x0002 (quality) of:
-0 (bland),
-1 (tasty), or
-2 (mouthwatering).

Now I can use those numbers to change not only the mesh of the fruits as they get taken out, but also the hunger value! Phew!

I'm considering this solved.
Back to top