MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Autonomous gift giving at parties

by kestrellyn Posted 26th Jun 2020 at 11:00 PM - Updated 6th Sep 2021 at 3:42 AM by kestrellyn
159 Thanks  Thanks     38 Favourited
  • Added new versions of the social object
  • Fixed problem where gift-giving would interrupt weddings. You will need to use the base game wedding arch for it to work properly.
  • Fixed problem where the active family was charged for all the gifts.

This hack was originally released for a Secret Santa that happened over a year ago, as a gift for Sunrader, who's been helpful with testing since then. I finally polished it up for general release.

Basically: this hack allows sims to autonomously give each other gifts during parties. They will not actually give each other things from their inventories, they will actually purchase a totally new object and give it to the other sim. You can have birthday party style giving, where everyone give gifts to a particular sim, or Christmas party style giving, where everyone gives gifts to everyone else. Moreover, positively received gifts will increase the party score! Rejected gifts will naturally decrease the party score. The whole hack is highly configurable (because that was something Sunrader originally wanted). Details follow.

There are three packages that you need for this hack - the social plugin, the social object, and the controller.

The Social Interaction

This involves a totally new social interaction called Give Party Gift, which is only available during parties. It does require Seasons, however, because the gift box accessory used in the animation is a Seasons object (and the animation itself may require Seasons, too). As such, the success of the social interaction can be customized separately from the regular Give Gift interaction from Seasons. If you open the social object package in SimPE, you will see a BCON called "Gift Accept/Reject Tuning (Modify this one)", which you can modify to change when gifts are accepted or rejected. There are two possible acceptance results - a "good" accept where the sim enthusiastically accepts the gift, and a "meh" accept where they're fairly neutral. There are thresholds of STR, LTR and playfulness for "good" and "meh" accepts - basically, the "good" accept will happen if the sims meet any of the three requirements for it, the "meh" accept will happen if the sim doesn't meet those requirements but does meet at least one of the requirements for the "meh" accept, and a rejection will happen otherwise. Note that for the playfulness requirements the value in the BCON is 100 times the number of playful points, so 800 in the BCON means 8 playful.

When this social interaction is accepted, the game will randomly choose an object from a gift list, charge the giver for it, and put it in the receiver's inventory. Which list is used is chosen by a dialog that you will get at the beginning of the party. These lists are also BCONs in the social object, named starting with "Gift GUIDs", which can be modified. They look like this:

The first line is the number of GUIDs. It's very important that you remember this line, and if you edit the BCON, be sure to update it. An easy way to tell how many GUIDs there are is to take the (decimal) line number of the last line of the BCON and divide it by 2. After that, each GUID is entered on two lines - the first contains the last four digits of the GUID, and the second line contains the first four digits of the GUID. There are also labels for these three lists - the first line is labeled with the in-game name of the object, and the second line is labeled with its EP or SP requirement. Note that if you delete a line of the BCON, the corresponding line of the labels will NOT be deleted, so you will have to go do that separately. There should also not be any blank/0 lines in these BCONs.

There are three versions of the social object: partygiftssocialobject-AllEPs contains GUIDs from all EPs and SPs, including two from the EA Store, and obviously requires either the UC or every EP/SP plus the two EA Store baby toys (which I believe you can download from MATY). partygiftssocialobject-BaseGame contains only objects from the base game, although it still requires Seasons to actually work. partygiftssocialobject-AL also contains only base game objects, but should be used if you also have AL installed. If you have some other combination of EPs and SPs, you can download just the Base Game package (or the AL package if one of the EPs you have is AL), or download both and create custom gift lists with just the items that are actually in your game. You can also add any CC objects you want to these lists, or swap them out for entirely different lists as long as they are formatted the same way. If you want to make some objects more frequent as gifts than other objects, you can add them to the list(s) multiple times.

By default, the lists for Deco and Baby and Child contain only objects that cost up to 500 simoleons, and the Housewares list contains only object that cost up to 1000. If you change this, you will probably also want to change the minimum amount of money that sims need to have in order to give gifts off of that gift list. This is recorded in two places: 1) in the social plugin package there is a BCON you can edit called "Max possible gift price" (one line per gift list) and in the controller package there is a similar BCON called "Maximum gift cost" (similarly one line per gift list). This is the amount of money the sim has to have in order to give a gift, and it should be at least the actual maximum cost of gifts on the list.

If there's an error in a gift list, either one that you introduced by editing it or one that I introduced when I manually entered ~300 GUIDs into SimPE, you won't get an error or a reset, you'll instead get a notification in the upper right. If the game just couldn't create an object with the specified GUID, the notification will tell you the (decimal) line number of the first line (second part) of the GUID, followed by the actual values that are recorded for that object, second part then first part. These latter values will also be in decimal, so you will have to convert them to hex to see what they are in SimPE. If the sim coudn't afford the gift because you set the maximum gift cost too low, you will get a notification telling you where to set that.

The Controller and the Gift Recpient

You will get a second dialog when you start a party, after being asked to choose the gift list, which will ask if you want autonomous gift giving at all. The first option ("Yes, to everyone") will cause all sims on the lot to give gifts completely autonomously to anyone else on the lot. (Note: I've had trouble with this mode on my new computer, although it worked fine on my old Windows 7 computer and Sunrader reports that it works for them. So YMMV.) The third option ("No") will turn off autonomy completely, although the interaction will still be available if you, the player, want to use it. The second option ("Yes, to a designated gift recipient") will ask you to choose a gift recipient and will then cause the controller to run a script which will direct every family member and greeted or invited guest to give one gift to your designated gift recipient (not all at once; they will take turns). In this mode, the controller will interrupt your commands when it is that sims's time to give their gift. It should take a break if the gift recipient has low critical motives, is trying to satisfy critical motives, or is doing something party-critical like getting married or growing up. If the gift recipient leaves the lot during the party, or is off-lot at the time the party starts, gift-giving should resume after they return.

The "critical motives" are bladder, hunger, and energy and you can configure what "low" means by editing the BCON in the controller package called "Minumum motvies for gift recipient". Note that motives in the game actually go from -100 to positive 100, so the setting of -50 means when the bar is 1/4 full.

You can also modify the effects that given gifts have on the party score, by modifying the BCON called "Party scores for gifts" in the controller. There are different values for "good" gifts, "meh" gifts, and rejected gifts. These are scaled by the number of people at the party - the way it works is that if every person at the party gives one "good" gift, the party score will be modified by the "good" gift score times 10, and if every person at the party gives a "meh" gift, the party score is modified by the "meh" gift score times 10, etc. So, the more people there are at the party, the smaller an effect each individual gift has. A roof raiser party is achieved at a score of 175; by default the settings are 10 for a "good" gift, 5 for a "meh" gift, and -5 for a rejected gift. Note that these have effect regardless of whether the gift was given autonomously, or by you, or as part of the controller's script.

There are two versions of the controller: partygiftscontroller-AL is what you need if you have Apartment Life, and partygiftscontroller-Seasons is what you need if you don't have Apartment Life.

Game Compatibility

This hack requires Seasons. Otherwise, you will just need to get the correct social object and controller packages.

Hack Compatibility

This might conflict with hacks that change what happens at the beginning and end of parties, or hacks that change how party score is calculated. It does conflict with simler90's New Parties mod - I thought about making a compatible version for that, but I suspect that simler is going to continue updating that mod to add more and more new parties, and it will be hard to tell if they modify the main part that conflicts with this one (which is the party score calculation), so it will be hard for me to keep that compatible version up to date. I'd be happy to help them make their mod compatible, though, since I don't plan to change the party score calculation of this mod ever again.

Specifically, this mod modified BHAVs 0x1002, 0x1005, and 0x101D in group 0x7FB4DF10, as well as adding a new BCON 0x1010 to that group.

Additional Credits:
Sunrader, for testing

This is a multi-part download:

Download one social object, one controller, and the social plugin.

Download files

Filename Size Downloads Date | Social object with basegame objects, for use without AL

Size: 7.3 KB · Downloads: 216 · 6th Sep 2021
7.3 KB 216 6th Sep 2021 | Social object with basegame objects, requires AL

Size: 7.3 KB · Downloads: 251 · 6th Sep 2021
7.3 KB 251 6th Sep 2021 | Social object with objects from all EPs and SPs - requires AL

Size: 13.1 KB · Downloads: 1,334 · 6th Sep 2021
13.1 KB 1,334 6th Sep 2021 | Controller for use with AL

Size: 3.1 KB · Downloads: 1,034 · 28th Aug 2021
3.1 KB 1,034 28th Aug 2021 | Controller for use without AL

Size: 3.1 KB · Downloads: 321 · 28th Aug 2021
3.1 KB 321 28th Aug 2021 | Social plugin

Size: 944 Bytes · Downloads: 1,012 · 26th Jun 2020
944 Bytes 1,012 26th Jun 2020

Key: - File was updated after upload was posted
Tip: You can click the magnifying glass to see the archive contents

Need help with downloading or installing content? Click here!
44 Comments / Replies (Who?)

Expansion/Stuff packs required:
Sims 2 Seasons

44 Comments / replies (Who?)



Type: Social Mods Global Mods

Tags: #party, #parties, #gifts, #gift, #give gift