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!
Quick Reply
Search this Thread
Scholar
Original Poster
#1 Old 4th Sep 2022 at 5:06 PM
Default Adding To inventory
Let's say I want to add raw meat or burger or pizza slice to a sim's inventory. How do I go about doing that?

This code adds apple to inventory in conjure apple spell
Code:
IngredientData data = IngredientData.NameToDataMap[mAppleMedatorName];
			return Ingredient.Create(data, q, false, PlayerDisclosure.Exposed);

And mAppleMedatorName = "Apple";

So does that mean I can add burger or pizza slice this way with the right string id? Where can I find a list of IDs?

If you like my mods. Consider supporting me on Patreon
Check out my website for updates on my mods and other work PuddingFace.wixsite.com
Check out my Youtube channel for tutorials(modding tutorials) and other content Youtube

Follow me on Twitter Instagram Pinterest Tumblr
Advertisement
Test Subject
#2 Old 4th Sep 2022 at 9:50 PM
Quote: Originally posted by PuddingFace
So does that mean I can add burger or pizza slice this way with the right string id?

From my experience, this does work with "simple" ingredients like apple or steak (the ones that inherit from the Ingredient class). You can find them in GameplayData.package under “Ingredients”, the medator names seem to be the same ones that are listed as “Ingredient_Key” in the XML. However, to create prepared food like a plate of burgers or a pizza slice, you will probably need to use the Recipe.CreateFinishedFood() method (or something similar that returns a FoodContainer).
Back to top