INFO
How many times have you sent your musician sim to the bar or park to showcase their latest hit single only to find when they get there that they left the guitar on the floor of the bathroom or some other stupid corner of the house? If you're like me, pretty much every time. OK, I admit it I sometimes don't stop to think!
I had enough, so I wrote this mod for The Sims 4 to change the default action to putting an instrument in the sims inventory when they have finished playing. Now they'll always have their instrument handy no matter where they may roam.
-Scumbumbo
INSTALL
Unzip both the package and script files contained in the main zip file you downloaded into your Mods folder. You should end up with a package file named 'MTS_Scumbumbo_KeepInstrumentsInInventory' AND a zip file named 'MTS_Scumbumbo_KeepInstrumentsInInventory_Script' in the Mods folder.
Make sure that scripting mods are enabled in the game options (on the "Other" tab). Be sure to check this setting after updating the game for a new patch, as if you don't turn off the show mods at startup option the game will disable scripts after an update is installed.
See the screenshot of a sample Mods folder if you need a reference. You'll have other CC and mods in there, but it's important that both files shown are in the Mods folder for this to work properly. Without the script portion of the mod, visiting sims or sims on community lots can pick up instruments and steal them!
If you wish, the package file can be placed in a subfolder, but the zip file must go into the main Mods folder.
EXTRA
This mod may conflict with any other mods that modify the strategy for putting down instruments or other objects.
As this modifies the generic strategy for putting down any instrument, it should continue to work for any new instruments added to the game.
Technical Notes
This modifies the following XML resources:
S4_6224C9D6_00000000_0000000000017C15 - PutDownStrategy_Instrument
How it works
The XML package changes the PutDownStrategy_Instrument to swap the "costs" of putting an instrument on the floor versus putting in the sims inventory. They will prefer to put instruments into their inventory. Simple...
...until I tested the technique and found that on community lots, sims would pick up and play an instrument, and then cheerfully swipe it from the lot! Free violin... wooo! (Not good)
The script portion of the mod replaces the _run_interaction_gen() function in the carry.put_down_interactions script, adding a test to make sure that if an instrument (or any other object) is used on another lot and the sim's household does not own that item, they will place it down instead. So basically, if they own the instrument, they can take it out of their inventory and when done they will put it back in their inventory. If they don't own the instrument, they can pick it up and play it, but will put it back down when finished.
The script source is included in the zip file and can be included in similar mods. It would only be required if sims could feasibly steal objects from other lots without it. If you do include this in another mod, I do expect to be credited!
Additional Credits
Big, BIG thanks go to Velocitygrass for the Sims4XmlExtractor and, of course, Kuree and all the others at Sims4Group who have put together the S4PE tool.