NOTE: I forgot to mention something important. To keep it simple (otherwise in addition to the NGMP name in string
format you should also specify a ProductVersion), the mod only supports morsels, beverages and objects whose OBJD
resource has 0 (0x00000000) as GroupID which corresponds to ProductVersion.BaseGame.
This should not be a big limitation because the mod is mainly aimed to CC resources and anyway you can simply extract to
a new package the OBJD (and eventually the OBJK remembering to update its reference in the OBJD) of an EP related object,
and then renumbering the GroupID to 0 and the InstanceID using an unique hashing key - the way I did for the hot and cold cup
from Seasons to make the custom beverage version of them.
13th July 2016 Update - Fixed the recipe name in the "serve" interaction
9th July 2016 Update - there's a fair chance I've fu**ed up somewhere, so let me know if something doesn't work
You will probably have to get rid of exiting foodMakers and buy new ones from
the catalog for some of the new features to take effect.
Added a modal dialog window to pick recipes, no more manual data entry
Added support to beverages (they need an NGMP entry, like morsels), those from this mod are supported
but should work with any object that implements the IGlass interface (and that are carryable). Don't ask me a list.
NOTE: due to a bug I wasn't able to fix, I've had to disable beverages making/buying if the foodMaker has the option to
"Not eat after making food" (because beverages weren't added to the Sim's inventory for some reason)
Disable the option "Child can use" (or whatever is called) if you use super alcoholics.
Added support to generic* objects, so "someone" can buy my bag of chips (using ArsilBagOfChips as name) ^^
*This should support any object with an NGMP entry AND carryable AND that can go in a Sim's inventory.
Don't ask me what objects work with it because I don't know.
Of course there's no automatic eating (it may not be something edible) and Sims won't make/buy these objects autonomously
because I haven't thought of a satisfying way to regulate it (they might keep buying and buying non consumable items
filling their inventory with junk that slows the game)
26th June 2016 Update
Major BugFix: now Sims will use the interactions autonomously
Minor BugFix: corrected the text displayed by the "Set morsels" dialog window (before it mentioned recipes, now it mentions morsels)
New interaction to allow/disallow the "Serve" interaction on community lots (I can see some circumstances where it would be out ot place)
Added a check for not valid morsel names (like the check for recipes, it will only report the first invalid entry found)
Added a fixed footprint for the vending machine mentioned in the example (the attachment is in a comment)
23th June 2016 Update
Now the interaction to make/serve food displays the name of the recipe instead of the
Recipe_Key (I did a very similar fix for the morsels too).
I've removed an unnecessary check that prevented to use some recipes that you can't
get from a fridge (mostly snacks).
changed the valid routing cone from 120 to a 60 degree angle. Otherwise Sims would
(when starting from a lateral position) approach the non-counter-appliance object more
from its side than its front.
Mod Info & Requirements
Game version 1.67 (might work with other patch levels, beats me)
This mod is integrated with Japanese Low Dinner Table, a version updated on 21th June 2016 or later.
This is NOT a requirement, it means that the two mods can get along nicely
(DashBoard will report a conflict but that is intentional).
This mod includes only a script, so it requires third party objects to apply the script to (more info and examples later)
This is a script that can be applied to an object to turn it into a generic food maker.
Using Buy/Build mode interactions you can configure what kind of food can be made with the object.
In addition to regular food, the mod also supports morsels (driedfood),
but they need an NGMP resource that associates a name to a specific object.
I realize that this could be a mod a bit hard to understand and use,
so in the next section I'll make a few examples.
More Info and Examples of use
See the first comments for a few concrete examples with override packages already done
(so you don't have to edit the original objects yourself, and if you do then remember to not
redistribute them if that violates the policy of the author).
Let's say you want to make a beverages vending machine.
Open the package with S3PE and right click on the OBJK resource to edit it.
Use my script : Sims3.Gameplay.Objects.Arsil.GenericFoodMaker
Make sure to commit and save your changes.
Now start the game, place the object and use the Buy/Build mode interactions
(CTRL+SHIFT click on the object and use the [Settings] sub pie menu) to configure it.
At the very least you have to:
- make sure to set that this is NOT a counter appliance
- Use "Set Recipes" and use "Juice" as recipe key (so the vending machine will sell the juice snack).
I haven't tested it, but I think you can also use icecream recipes ("IceCreamCone" is the BG one).
Not really, the ice cream cone is eaten with a spoon.
For a list of valid recipe names (keys), you can check the "RecipeMasterList" xml resource
in GameplayData.package. Of course you can also use CC recipes, to find their key just
check the xml resources inside the package.
You can find store recipes in "RecipeMasterList_Store" in ccmerged.package (if you have it
somewhere in the Mods/Overrides folder).
Now, let's say you want an object that creates a morsel.
It doesn't matter what "food maker" you use, I want to make a real example to show how
to add an NGMP resource for an existing CC food (not a recipe!).
There are many of those, ATS3 has loads of them, so let's use one of her items again
for this example: http://aroundthesims3.com/objects/f...n_food_01.shtml
I'll use the very first item on that page, the croissant.
Note: I only use .package files, but you only need to convert the CC to know the InstanceID
of the OBJD resource (you can also get it in game using NRaas DebugEnabler).
So, I convert the Sims3pack to package (with Lepid Llama unpacker) and open it with S3PE.
I copy to the clipboard (or in a temp text document) the InstanceID of the OBJD (0x0B9579...)
Now let's use S3PE to calculate the fnv64 hashing of the unique string we'll use as "name" of the object.
A good example for a name is ATS3_edible_croissant, so we use S3PE's Tools -> fnv hash,
we put ATS3_edible_croissant as "text to hash" and click on "calculate" then we copy to the clipboard
(or in a temp text document) the code (0x7441...).
Now, in the same package of the object or in a new one made for this purpose (especially if you
want to keep the CC in Sims3pack format), you can add a new NGMP resource. With S3PE you:
- click on the "Resource" voice in the menu and then choose "Add..."
- set NGMP as type (click "N" to avoid scrolling) and 0 as group
- put a unique name for the resource (e.g. ATS3_croissant)
- tick the "Use resource name" and click the "FNV64" button
- click the "OK" button
- Now select the newly created resource and then click the "Grid" button (on the bottom of S3PE interface)
- select the "Data" row and then click on "..." on the right
- click on the "Add" button on the bottom
- in the NameHash field put the fnv64 hashing of the unique string we calculated earlier (0x744...)
- in the Instance field paste the InstanceID of the OBJD that we copied earlier (0x0B9579...)
- click on the OK button and then on the Commit button
- save the package
Now, in game, you can use AT3_edible_croissant as morsel name with the "Set morsels" configuring
interaction. [21th June 2016 UPDATE] The interaction will use the catalog name of the object, so make
sure that it is "pleasant to read" checking the STBL (seeing "Arsil's custom food #4" would be bad, right?).
Note: to keep it simple, this will only work for objects (OBJDs) with 0 (0x00000000) as GroupID.
On the other hand, if a creator makes a CC food using a different GroupID then I'd say it's their fault.
Note: you don't need an NGMP resource for each item, you need an entry in a NGMP,
so you can use the same resource for associating more name-InstanceId couples.
At first this was supposed to be the script for a rice cooker, but I noticed it could be easily
turned into something generic.
Ingredients required by recipes are completely ignored.
Handling them and setting the price accordingly should not be too hard, but I'm not familiar
with it (gameplay- nor code-wise) and I know there are mods that change that, so that would
require quite some work and research that ATM I don't feel like doing. Sowwy!
There's no skill gaining creating foods with this mod (due to the generic nature of the mod).
I guess I could add that too, making it optional for every food maker, but see previous paragraph.
The cost of the food, even in residential lots, is based on the register cost of the recipe.
The cost of morsels is based on the cost of the object itself (as defined in the OBJD resource).
You have to write the internal name of recipes (the RecipeKey) and for morsels you have to
use the name used in the NGMP, so it's not very user friendly. A picker to choose the recipes
would be more handy. You have to configure each single food maker, so it can be a little tedious
since there's no option to copy the same settings of an existing one.
Autonomy: if Sims already have a morsel in their inventory, they can't make new ones, otherwise
they would keep making new ones instead of eating those they already have in their inventory
(because the former interaction is "more advertised" than the latter).
This mod is integrated with Japanese Low Dinner Table. If there's a free table and the food maker
is configured to use it, Sims will place the food created (but not morsels) in the low dinner table.
If you set an object as a counter appliance, make sure you place it in a counter.
You can also specify an animation for the Sim to play that should represent making the food,
but of course you'll be limited to simple animations not involving the food maker.
All respective authors and contributors of the tools and tutorials for modding TS3.
MTS and all modders who made the game much more enjoyable.