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 27th Jun 2020 at 12:00 AM - Updated 27th Nov 2020 at 11:05 PM by kestrellyn
28 Comments / replies (Who?) - 3 Feedback Posts, 1 Thanks Posts
Update: added new versions of the social object

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

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 2 Seasons

This is a multi-part download:


Download one social object, one controller, and the social plugin.
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
partygiftssocialobject-BaseGame.zip | Social object with basegame objects, for use without AL

Size: 7.3 KB · Downloads: 41 · 27th Nov 2020
7.3 KB 41 27th Nov 2020
partygiftssocialobject-AL.zip | Social object with basegame objects, requires AL

Size: 7.3 KB · Downloads: 48 · 27th Nov 2020
7.3 KB 48 27th Nov 2020
partygiftscontroller-Seasons.zip | Controller for use without AL

Size: 3.0 KB · Downloads: 207 · 27th Jun 2020
3.0 KB 207 27th Jun 2020
partygiftssocialplugin.zip | Social plugin

Size: 944 Bytes · Downloads: 606 · 27th Jun 2020
944 Bytes 606 27th Jun 2020
partygiftssocialobject-AllEPs.zip | Social object with objects from all EPs and SPs - requires AL

Size: 13.1 KB · Downloads: 753 · 27th Jun 2020
13.1 KB 753 27th Jun 2020
partygiftscontroller-AL.zip | Controller for use with AL

Size: 3.1 KB · Downloads: 630 · 27th Jun 2020
3.1 KB 630 27th Jun 2020
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:

1. Download: Click the download link to save the .rar or .zip file(s) to your computer.

2. Extract the zip, rar, or 7z file.

3. Place in Downloads Folder: Cut and paste the .package file(s) into your Downloads folder:
  • Origin (Ultimate Collection): Users\(Current User Account)\Documents\EA Games\The Sims™ 2 Ultimate Collection\Downloads\
  • Non-Origin, Windows Vista/7/8/10: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads\
  • Non-Origin, Windows XP: Documents and Settings\(Current User Account)\My Documents\EA Games\The Sims 2\Downloads\
  • Mac: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads
  • Mac x64: /Library/Containers/com.aspyr.sims2.appstore/Data/Library/Application Support/Aspyr/The Sims 2/Downloads
Need more information?
 
28 Comments / Replies (Who?) - 11 Feedback Posts, 16 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 2 of 2
Test Subject
THANKS POST
#26 Old 28th Nov 2020 at 1:20 AM
Yes, now everything seems fine. Thank you. You're amazing!
Lab Assistant
#27 Old 4th Dec 2020 at 12:35 AM
What's your advice for those of us using Simler90's New Parties mod in the mean time? Have you sent Simler90 a private message about making your mods compatible? I'd really love to use both.
Top Secret Researcher
Original Poster
#28 Old 4th Dec 2020 at 7:43 AM
Simler seems impossible to contact most of the time, but I guess I could try. The advice currently is that they are not compatible. If you use both and load new parties last, the party gifts controller will never get cleaned up and gifts won't count towards party score. From looking at simler's code, if you load this mod last you won't get simler's party score modifications (which based on the description will affect the bonfire party and the slumber party) and no one will give money at the end of the campaign fundraiser, and possibly it won't have an effect on your sim's career.

I might make a compatible version eventually, I don't think New Parties has been updated in a while.
Lab Assistant
#29 Old 4th Dec 2020 at 11:22 PM
Thanks for getting back to me! Simler90 does seem to ignore most comments and messages but I asked MidgeTheTree over on Tumblr and she says that Simler has either gotten back to her or acted upon feedback shes given in direct messages on here - maybe they listen to respectable modders such as yourself and ignore us peasants lol! You probably have the best shot of getting through to them.

I'm really sad to hear they can't work together at all at the moment. I'd really really love a compatible version, but I do understand it would be difficult/frustrating if New Parties then got updated further. Good luck and thanks in advance if you do decide to tackle a compatible version
Page 2 of 2